@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Inter:wght@400;700&splay=swap');

:root {
    --bg-color: #0a0a0b;
    --card-bg: #121214;
    --primary-color: #e63946;
    --secondary-color: #ffb703;
    --text-heading: #ffffff;
    --text-body: #a0a0a5;
    --border-color: rgba(230, 57, 70, 0.2);
    --accent-glow: rgba(230, 57, 70, 0.3);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
}

body.light-mode {
    --bg-color: #fdfbf7;
    --card-bg: #ffffff;
    --primary-color: #b91d1d;
    --secondary-color: #d97706;
    --text-heading: #1a1a1a;
    --text-body: #4b5563;
    --border-color: rgba(185, 29, 29, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-body);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem; /* Sized down slightly from 1.8rem to fit mobile better */
    letter-spacing: 2px;
    color: var(--text-heading);
}

.nav-logo::first-letter { color: var(--primary-color); }

.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { text-decoration: none; color: var(--text-body); font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); }

/* Keep your theme toggle exactly as is! */
#theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* Add this to handle the new utility bucket */
.nav-utils {
    display: flex;
    align-items: center;
    gap: 12px;
}

.visitor-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary-color);
    white-space: nowrap;
}

/* --- MAIN LAYOUT --- */
.container {
    display: grid;
    grid-template-columns: 320px 1fr; /* Profile left, Content right */
    gap: 50px;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.project-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes content to top and pills to bottom */
    min-height: 220px;
}

.project-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    background: rgba(230, 57, 70, 0.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.project-box h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 10px;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.experience-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
}

.experience-box:hover {
    border-color: var(--secondary-color); /* A subtle gold shift for Experience */
    transform: translateY(-5px);
    background: rgba(255, 183, 3, 0.02); /* Very subtle gold glow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.experience-box h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.1rem;
}

.exp-date {
    font-size: 0.75rem;
    color: var(--secondary-color);
    font-weight: 700;
    opacity: 0.8;
}

.hobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.hobby-card.personal-vibe {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1 / 1; /* Forces the Square Ratio */
    background: var(--card-bg);
    border: 1px solid rgba(79, 70, 229, 0.2); /* Subtle Indigo Border */
    padding: 25px;
    border-radius: 16px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* The Vibe Shift: Indigo to Teal */
.hobby-card.personal-vibe:hover {
    border-color: #2dd4bf; /* Teal */
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(45, 212, 191, 0.1);
    background: linear-gradient(145deg, var(--card-bg), #0f172a); /* Deep Indigo tint */
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #4f46e5; /* Indigo */
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 1px;
}

.hobby-emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.hobby-card h3 {
    font-family: var(--font-heading);
    color: #f8fafc;
    margin-bottom: 10px;
}
/* --- PROFILE SIDE --- */
.profile-side { display: flex; flex-direction: column; gap: 20px; }
.profile-pic { width: 100%; border-radius: 15px; border: 2px solid var(--border-color); }

.profile-side h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1rem;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.social-links a {
    display: block; padding: 12px; margin-bottom: 10px;
    text-align: center; text-decoration: none;
    font-family: var(--font-heading); font-weight: 700;
    border-radius: 8px; border: 1px solid var(--border-color);
    background: var(--card-bg); color: var(--text-heading);
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* --- CONTENT SIDE & VIEWS --- */
.view-section {
    display: none; /* Everything hidden initially */
    flex-direction: column;
    gap: 20px;
}

/* This is the class our JavaScript triggers */
.view-section.active {
    display: flex !important;
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
}

.divider{
    margin: 20px auto;
}

.uni-subhead { color: var(--secondary-color); font-weight: 700; margin-bottom: 10px; }

/* Stats & Pills */
.pill-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill-container span {
    background: rgba(230, 57, 70, 0.1); color: var(--primary-color);
    padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; border: 1px solid var(--border-color);
}

.project-box .pill-container {
    margin-top: 20px;
    gap: 6px;
}

.project-box .pill-container span {
    font-size: 0.7rem;
    padding: 4px 10px;
    background: rgba(230, 57, 70, 0.05);
    border: 1px solid var(--border-color);
    pointer-events: none; /* Prevents the pill from intercepting the link click */
}

.experience-box .pill-container {
    margin-top: 20px;
}

.hobby-card.personal-vibe .pill-container span {
    background: rgba(45, 212, 191, 0.1);
    color: #2dd4bf;
    border-color: rgba(45, 212, 191, 0.2);
}
/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 850px) {
    
    /* 1. UPDATED: The "Ifetayo" Header Fix */
    nav {
        flex-wrap: wrap; /* Allows the nav-links bucket to wrap to a new line */
        padding: 10px 15px !important;
        flex-direction: row !important; /* Keep Logo and Utils on one line */
        height: auto;
    }

    .nav-logo {
        font-size: 1.1rem !important;
        flex: 1; /* Pushes the utility bucket to the right */
    }

    .nav-utils {
        order: 2; /* Keeps the toggle and counter at the top right */
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-links {
        order: 3; /* Forces the menu links to drop to the next line underneath */
        width: 100%;
        flex-direction: row !important; /* Keep links side-by-side */
        flex-wrap: wrap; /* But let them wrap if they run out of space */
        justify-content: center;
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid var(--border-color);
        gap: 10px !important;
    }

    .nav-links a {
        font-size: 0.75rem !important;
        background: rgba(230, 57, 70, 0.05); /* Tappable button feel */
        padding: 4px 8px;
        border-radius: 4px;
    }

    /* 2. KEEP: THE BIG FIX: Stack the main layout */
    .container {
        grid-template-columns: 1fr; 
        margin: 20px auto;
        gap: 20px;
        width: 100%;
    }

    /* 3. KEEP: Make sure cards take full width */
    .profile-side, .view-section {
        width: 100%;
    }

    .profile-pic {
        width: 250px; 
        margin: 0 auto;
    }

    /* 4. KEEP: Fix the Hobby Squares so text doesn't overflow */
    .hobby-card.personal-vibe {
        aspect-ratio: auto; 
        min-height: 250px;
    }

    /* 5. KEEP: Stretch the grids */
    .projects-grid, .experience-grid, .hobby-grid {
        grid-template-columns: 1fr; 
    }
}