/* --- 0. ROOT VARIABLES & BREAKPOINTS --- */
:root {
    --bg-color: #ffffff;
    --text-main: #000000;
    --text-muted: #666666;
    --text-disabled: #8e8e93;
    --media-bg: #f5f5f5;
    --font-stack: 'NeueMontreal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --header-height: 80px;

    /* Responsive Design System Layout Controls */
    --site-padding: 1rem;
    --container-margin: 1rem;
    --hero-width: 85%;
    --grid-gutters: 1rem;
    --work-grid-gap: 4rem;
    --spacer-layout-gap: 1.5rem;
    --hero-margin: 6rem 0 6rem 0;

    /* Typographic Hierarchy Controls */
    --font-neuebit: 'neuebit', sans-serif;
    --font-aeonik-regular: "'Aeonik-Regular'", sans-serif;
    --font-bio: "NeueMontreal", sans-serif;
    --font-year: "NeueMontreal", sans-serif;

    --h1-font-size: 2rem;
    --h1-line-height: 1.75rem;
    --h2-font-size: 1.5rem;
    --h2-line-height: 1.25rem;
    --description-font-size: 1rem;
    --description-line-height: 1.4rem;
    --project-year-font-size: 0.85rem;
}

/* --- FONTS --- */
@font-face {
    font-family: 'neuebit';
    src: url('assets/neuebit.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BCSans';
    src: url('assets/2023_01_01_BCSans-Regular_2f.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'NeueMontreal';
    src: url('assets/NeueMontreal-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Aeonik-Regular';
    src: url('assets/Aeonik-Regular.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* --- RESET & BASE STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    cursor: url('assets/Cursor.png') 0 0, auto !important;
}

body {
    cursor: url('assets/Cursor.png'), auto;
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

h1 {
    font-family: var(--font-neuebit);
    font-size: var(--h1-font-size);
    line-height: var(--h1-line-height);
}


/* --- GLOBAL LAYOUT CONTAINERS --- */
.container {
    margin: var(--container-margin);
    transition: margin 0.2s ease;
}

.grid-container {
    display: grid;
    grid-template-columns:
        [outer-start] var(--grid-gutters) [content-start] repeat(12, minmax(0, 1fr)) [content-end] var(--grid-gutters) [outer-end];
    gap: 0 1.5rem;
    max-width: 1920px;
    margin-inline: auto;
    transition: grid-template-columns 0.2s ease;
}

.centered-feature-box {
    grid-column: 3 / 10;
}


/* --- STICKY NAVIGATION HEADER --- */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Forces all three title/nav items straight to the top edge line */
    padding: var(--site-padding);
    border-bottom: 1px solid var(--text-main);
    transition: padding 0.2s ease;
}

.site-header .subtitle {
    font-size: var(--h1-font-size);
    color: var(--text-muted);
}


/* --- NAVIGATION CONTAINER BLOCKS --- */
.desktop-nav {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
}

.desktop-nav a {
    margin-left: 2rem;
    font-size: var(--h1-font-size);
    font-family: var(--font-neuebit);
    line-height: var(--h1-line-height);
}

.menu-toggle {
    display: flex;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 14px;
    padding: 0;
    z-index: 1100;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-active .hamburger-line:nth-child(2) {
    transform: translateY(-6px) rotate(-45deg);
}


/* --- MOBILE EXPAND OVERLAY --- */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1;
    display: flex;
    align-items: flex-start;
    padding: 2rem 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    position: absolute;
    bottom: 4rem;
    left: var(--site-padding);
    width: calc(100% - (var(--site-padding) * 2));
}

.mobile-nav-links a {
    font-size: 4.25rem;
    font-family: var(--font-neuebit);
    color: var(--text-disabled);
    transition: color 0.2s ease;
    line-height: 1;
}

.mobile-nav-links a.active,
.mobile-nav-links a:hover {
    color: var(--text-main);
}


/* --- HERO TEXT RUNWAY --- */
.hero-section {
    margin: var(--hero-margin);
    width: var(--hero-width);
    transition: width 0.2s ease, margin 0.2s ease;
}

.hero-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-section .bio {
    font-size: var(--h1-font-size);
    margin-top: 2rem;
}


/* --- PORTFOLIO SYSTEM LAYOUTS --- */
.work-grid {
    display: flex;
    flex-direction: column;
    gap: var(--work-grid-gap);
    margin-bottom: 6rem;
    transition: gap 0.2s ease;
}

.spacer {
    display: flex;
    flex-direction: column;
    gap: var(--spacer-layout-gap);
}

.project-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-media {
    background-color: var(--media-bg);
    border: 1px solid rgba(0, 0, 0, 0.15);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
}

.project-media img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.gif img {
    clip-path: inset(5px 5px 5px 5px);
}

.illo img {
    width: 45%;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.project-info h3 {
    font-size: var(--h2-font-size);
    line-height: var(--h2-line-height);
    font-family: 'neuebit', sans-serif;
}

.project-year {
    display: block;
    font-size: var(--project-year-font-size);
    font-family: var(--font-year);
    color: var(--text-main);
    margin-bottom: 1.25rem;
}

.project-info p {
    font-family: var(--font-bio);
    font-size: var(--description-font-size);
    line-height: var(--description-line-height);
    color: #878787;
    margin-bottom: 1rem;
}

.project-info p:last-child {
    margin-bottom: 0;
}


/* --- FOOTER STRUCTURE --- */
.site-footer {
    padding: var(--site-padding);
    border-top: 1px solid var(--text-main);
    font-size: 0.85rem;
    color: var(--text-main);
    transition: padding 0.2s ease;
}

.footer-left {
    font-family: 'neuebit', sans-serif;
    font-size: var(--h1-font-size);
    line-height: var(--h1-line-height);
    color: var(--text-main);
}


/* ==========================================================================
   PROGRESSIVE LAYOUT OVERRIDES (BREAKPOINTS)
   ========================================================================== */

/* 1. MOBILE BREAKPOINT SETTING */
@media (max-width: 833px) {
    :root {
        --site-padding: 1rem;
        --container-margin: 1rem;
        --hero-width: 100%;
        --grid-gutters: 1rem;
        --work-grid-gap: 5rem;

        --h1-font-size: 2rem;
        --h1-line-height: 1.75rem;
        --h2-font-size: 2rem;
        --h2-line-height: 1.75rem;
        --description-font-size: 1rem;
        --description-line-height: 1rem;
    }

    .site-header {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        background-color: var(--bg-color);
    }

    .header-center {
        display: none;
    }

    .header-right {
        display: none;
    }
}

/* 2. STANDARD MONITOR BREAKPOINT SETTING (Tablets & Laptops) */
@media (min-width: 834px) and (max-width: 1439px) {
    :root {
        --site-padding: 3.125rem;
        --container-margin: 3.125rem;
        --grid-gutters: 3.125rem;
        --hero-width: 75%;
        --work-grid-gap: 6rem;

        --h1-font-size: 1.75rem;
        --h1-line-height: 1.5rem;
        --h2-font-size: 1.75rem;
        --h2-line-height: 1.5rem;
        --hero-margin: 20rem 0 15rem 0;
        --description-font-size: 0.75rem;
        --description-line-height: 0.75rem;
    }

    .menu-toggle {
        display: none;
    }

    .site-header {
        border-bottom: none;
        position: absolute;
    }

    /* Activates layout grid configuration on the parent .spacer container blocks */
    .spacer {
        display: grid;
        grid-template-columns: 0.3fr .75fr;
        gap: 4rem;
        align-items: flex-start;
    }

    /* Makes the .project-item wrapper completely pass-through */
    .project-item {
        display: contents;
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--header-height) + 1.5rem);
        /* Updated */
        z-index: 10;
        grid-column: 1;
    }

    /* Locks left column components cleanly to layout column 1 and enables sticky tracking */
    .project-info {
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--header-height) + 6rem);
        /* Leaves breathing room below clear header blur masks */
        z-index: 10;
        grid-column: 1;
    }

    /* Locks layout media nodes to the right column */
    .project-media {
        grid-column: 2;
    }

    .site-footer {
        padding: 2rem 3.125rem;
    }
}

/* 3. EXTRA LARGE DISPLAYS (Large Desktop Monitors) */
@media (min-width: 1440px) and (max-width: 1919px) {
    :root {
        --site-padding: 7.125rem;
        --container-margin: 7.125rem;
        --grid-gutters: 7.125rem;
        --hero-width: 65%;
        --work-grid-gap: 8rem;

        --h1-font-size: 2.75rem;
        --h1-line-height: 2.5rem;
        --h2-font-size: 2.75rem;
        --h2-line-height: 2.5rem;
        --hero-margin: 25rem 0 15rem 0;
        --description-font-size: 1rem;
        --description-line-height: 1rem;
        --project-year-font-size: 1.25rem;
    }

    .menu-toggle {
        display: none;
    }

    .site-header {
        border-bottom: none;
        position: absolute;
    }

    .spacer {
        display: grid;
        grid-template-columns: 0.4fr 0.75fr;
        gap: 6rem;
        align-items: flex-start;
    }

    .project-item {
        display: contents;
    }

    .project-info {
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--header-height) + 1.5rem);
        z-index: 10;
        grid-column: 1;
    }

    .project-media {
        grid-column: 2;
    }

    .site-footer {
        padding: 2.5rem 7.125rem;
    }
}

/* 4. ULTRA-WIDE MONITOR ADJUSTMENTS */
@media (min-width: 1920px) {
    :root {
        --site-padding: 11rem;
        --container-margin: 11rem;
        --grid-gutters: 10rem;
        --hero-width: 65%;
        --work-grid-gap: 20rem;

        --h1-font-size: 3rem;
        --h1-line-height: 2.75rem;
        --h2-font-size: 2.5rem;
        --h2-line-height: 3rem;
        --hero-margin: 20rem 0 15rem 0;
        --description-font-size: 1.25rem;
        --description-line-height: 1.25rem;
        --project-year-font-size: 1.25rem;

    }

    .container {
        margin-top: 30rem;
    }

    .menu-toggle {
        display: none;
    }

    .site-header {
        border-bottom: none;
        position: absolute;
    }

    .site-footer {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .spacer {
        display: grid;
        grid-template-columns: 0.35fr .75fr;
        gap: 4rem;
        align-items: flex-start;
    }

    .project-item {
        display: contents;
    }

    .project-info {
        position: -webkit-sticky;
        position: sticky;
        top: calc(var(--header-height) + 6rem);
        z-index: 10;
        grid-column: 1;
    }

    .project-media {
        grid-column: 2;
    }
}