/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #050508;
    --bg-secondary: #0a0a10;
    --text: #d4e0d0;
    --text-muted: #6b7a6e;
    --accent: #e63946;
    --font-heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --crt-green: #00ff50;
    --crt-cyan: #00e5ff;
    --crt-magenta: #ff00aa;
    --reflect-x: 50%;
    --reflect-y: 50%;
}

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scrollbar-width: thin;
    scrollbar-color: #333 var(--bg);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: default;
}

::selection {
    background: rgba(0, 255, 80, 0.2);
    color: var(--text);
}

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

img {
    display: block;
    max-width: 100%;
}

/* =============================================
   CURSOR GLOW
   ============================================= */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 80, 0.08) 0%, rgba(0, 229, 255, 0.04) 30%, transparent 70%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    transition: all 0.5s var(--ease-out-expo);
    mix-blend-mode: difference;
}

.nav.scrolled {
    padding: 1rem 1.5rem;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    position: relative;
    padding: 0.25rem 0;
    line-height: 1;
}

.lang-toggle {
    position: relative;
    z-index: 9999;
    background: none;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.4rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: border-color 0.3s ease, transform 0.3s ease;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
}

.lang-toggle:hover {
    transform: scale(1.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover::after {
    width: 100%;
}

/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;

    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.35;
    z-index: 1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 255, 80, 0.05) 0%, transparent 60%),
        radial-gradient(ellipse 60% 80% at 20% 80%, rgba(0, 229, 255, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(255, 0, 170, 0.03) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-title-wrap {
    overflow: visible;
    position: relative;
    margin-bottom: 3rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 200;
    font-size: clamp(7rem, 28vw, 22rem);
    line-height: 0.8;
    letter-spacing: 0.2em;
    padding-left: 0.2em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.02em;
    position: relative;
    color: rgba(255, 210, 130, 0.25);
    text-shadow:
        -4px 0 0 rgba(255, 185, 40, 0.45),
         4px 0 0 rgba(255, 80, 20, 0.35),
         0 0 50px rgba(255, 185, 40, 0.16),
         0 0 100px rgba(255, 120, 20, 0.08);
    animation: neon-buzz 3.5s steps(1) infinite;
}

/* Moiré LED grid overlay on the title — masked to text area */
.hero-title-wrap::after {
    content: '';
    position: absolute;
    inset: -10% -5% -10% -5%;
    pointer-events: none;
    z-index: 2;
    background:
        repeating-linear-gradient(
            to right,
            rgba(255, 190, 40, 0.06) 0px,
            transparent 1px,
            transparent 1.5px,
            rgba(255, 80, 20, 0.05) 1.5px,
            transparent 2.5px,
            transparent 3px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 3px
        );
    background-size: 3px 3px;
    mix-blend-mode: overlay;
    mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, black 30%, transparent 70%);
    animation: moire-shift 6s ease-in-out infinite;
}

/* ---- GASPARD NOÉ EDITION — Enter the Void ---- */
@keyframes neon-buzz {
    /* === TUNGSTEN BASE — tense calm === */
    0% {
        text-shadow:
            -4px 0 0 rgba(255, 185, 40, 0.45),
             4px 0 0 rgba(255, 80, 20, 0.35),
             0 0 50px rgba(255, 185, 40, 0.16),
             0 0 100px rgba(255, 120, 20, 0.08);
        color: rgba(255, 210, 130, 0.25);
        opacity: 1;
        filter: none;
        transform: none;
        font-weight: 200;
        font-style: normal;
        font-family: var(--font-heading);
        letter-spacing: 0.2em;
    }
    /* micro-tension */
    4% { opacity: 0.88; }
    5% { opacity: 1; }

    /* === VIOLENCE 1 — HOT PINK EXPLOSION === */
    /* typo: SNAP to BLACK ITALIC — lettres miroir qui s'embrassent */
    8% {
        text-shadow:
            -25px 0 0 rgba(255, 0, 100, 0.9),
             25px 0 0 rgba(0, 220, 255, 0.7),
             0 0 80px rgba(255, 0, 100, 0.4),
             0 0 200px rgba(255, 0, 100, 0.15);
        color: rgba(255, 255, 255, 0.9);
        opacity: 1;
        filter: none;
        transform: scaleX(-1);
        font-weight: 900;
        font-style: italic;
        letter-spacing: 0.08em;
    }
    /* INVERSION FLASH — toujours miroir */
    9% {
        filter: invert(1) hue-rotate(180deg);
        opacity: 0.85;
        transform: scaleX(-1);
        font-weight: 900;
        font-style: italic;
        letter-spacing: 0.08em;
    }
    /* snap back — BLOOD RED NEON + Copperplate gravé (Irréversible) */
    10% {
        text-shadow:
            -5px 0 0 rgba(200, 0, 0, 0.6),
             5px 0 0 rgba(255, 40, 0, 0.45),
             0 0 60px rgba(255, 0, 0, 0.2),
             0 0 120px rgba(200, 0, 0, 0.08);
        color: rgba(255, 60, 30, 0.3);
        filter: none;
        opacity: 1;
        transform: none;
        font-weight: 600;
        font-style: normal;
        font-family: Copperplate, 'Copperplate Gothic Bold', fantasy;
        letter-spacing: 0.15em;
    }

    /* calm... breathe... */
    16% { opacity: 0.92; }
    17% { opacity: 1; }

    /* === VIOLENCE 2 — ACID YELLOW BURST === */
    /* typo: SNAP to MONOSPACE WIDE — raw, alien, technical */
    22% {
        text-shadow:
            -18px -3px 0 rgba(255, 255, 0, 0.85),
             18px  3px 0 rgba(255, 0, 100, 0.65),
             0 0 60px rgba(255, 255, 0, 0.35);
        color: rgba(255, 255, 50, 0.7);
        opacity: 1;
        transform: translateX(3px);
        filter: none;
        font-family: 'Courier New', Courier, monospace;
        font-weight: 400;
        letter-spacing: 0.45em;
    }
    /* BLACKOUT */
    23% {
        opacity: 0.06;
        transform: none;
        filter: none;
    }
    /* snap back — WHITE GLOW vieux film + Didot thin élégant */
    24% {
        text-shadow:
            -2px 0 0 rgba(255, 255, 255, 0.3),
             2px 0 0 rgba(255, 255, 255, 0.2),
             0 0 40px rgba(255, 255, 240, 0.15),
             0 0 100px rgba(255, 250, 230, 0.06);
        color: rgba(255, 255, 245, 0.18);
        opacity: 1;
        filter: none;
        transform: none;
        font-family: 'Didot', 'Bodoni MT', 'Playfair Display', serif;
        font-weight: 200;
        font-style: italic;
        letter-spacing: 0.25em;
    }

    /* tension flickers */
    33% { opacity: 0.82; }
    34% { opacity: 1; }
    37% { opacity: 0.65; }
    38% { opacity: 1; }

    /* === VIOLENCE 3 — THE NOÉ CLASH (CYAN vs MAGENTA) === */
    /* typo: SNAP to Phosphate display — les lettres se retournent */
    44% {
        text-shadow:
            -30px 0 0 rgba(0, 220, 255, 0.9),
             30px 0 0 rgba(255, 0, 160, 0.9),
             0 0 120px rgba(255, 255, 255, 0.25);
        color: rgba(255, 255, 255, 0.85);
        opacity: 1;
        filter: none;
        transform: scaleX(-1) scaleY(1.015);
        font-family: Phosphate, Impact, 'Arial Black', sans-serif;
        font-weight: 900;
        font-style: normal;
        letter-spacing: 0.02em;
    }
    /* HARD INVERT — miroir inversé */
    45% {
        filter: invert(1);
        transform: scaleX(-0.98);
        opacity: 0.9;
        font-family: Phosphate, Impact, 'Arial Black', sans-serif;
        font-weight: 900;
        font-style: normal;
        letter-spacing: 0.02em;
    }
    /* reversed split — retour à l'endroit */
    46% {
        text-shadow:
             30px 0 0 rgba(0, 220, 255, 0.65),
            -30px 0 0 rgba(255, 0, 160, 0.65);
        filter: none;
        opacity: 0.35;
        transform: none;
    }
    /* snap back — HOT PINK NEON + Impact noir (Climax) */
    47% {
        text-shadow:
            -5px 0 0 rgba(255, 0, 100, 0.55),
             5px 0 0 rgba(255, 0, 160, 0.4),
             0 0 60px rgba(255, 0, 120, 0.2),
             0 0 130px rgba(255, 0, 100, 0.08);
        color: rgba(255, 0, 120, 0.3);
        filter: none;
        opacity: 1;
        transform: none;
        font-family: Impact, 'Arial Black', sans-serif;
        font-weight: 900;
        font-style: normal;
        letter-spacing: 0.05em;
    }

    /* slow dread */
    55% { opacity: 0.88; }
    58% { opacity: 0.55; }
    59% { opacity: 1; }

    /* === VIOLENCE 4 — WHITE BLOWOUT (le flash DMT) === */
    /* typo: Zapfino calligraphique — l'âme qui se détache, miroir */
    64% {
        text-shadow:
            0 0 40px rgba(255, 255, 255, 0.95),
            0 0 100px rgba(255, 255, 255, 0.6),
            0 0 250px rgba(255, 200, 100, 0.3),
            -20px 0 0 rgba(255, 0, 100, 0.5),
             20px 0 0 rgba(0, 220, 255, 0.5);
        color: rgba(255, 255, 255, 0.95);
        opacity: 1;
        filter: none;
        transform: scaleX(-1);
        font-family: 'Snell Roundhand', 'Zapfino', cursive;
        font-weight: 700;
        font-style: normal;
        letter-spacing: 0.1em;
    }
    /* TOTAL BLACKOUT */
    65% {
        opacity: 0.04;
        filter: none;
        transform: none;
    }
    /* snap back — ELECTRIC BLUE NEON + Futura géométrique (Enter the Void) */
    66% {
        text-shadow:
            -5px 0 0 rgba(0, 100, 255, 0.55),
             5px 0 0 rgba(0, 180, 255, 0.4),
             0 0 60px rgba(0, 150, 255, 0.22),
             0 0 140px rgba(0, 100, 255, 0.08);
        color: rgba(0, 160, 255, 0.3);
        opacity: 1;
        filter: none;
        transform: none;
        font-family: Futura, 'Century Gothic', 'Trebuchet MS', sans-serif;
        font-weight: 200;
        font-style: normal;
        letter-spacing: 0.35em;
    }

    /* calm before the storm */
    74% { opacity: 0.85; }
    75% { opacity: 1; }

    /* === VIOLENCE 5 — STROBE FINALE (quadruple frappe typo) === */
    /* HIT 1: Phosphate display — la masse, miroir */
    81% {
        text-shadow:
            -22px 0 0 rgba(255, 0, 100, 0.9),
             22px 0 0 rgba(0, 255, 100, 0.7);
        color: rgba(255, 255, 255, 0.75);
        filter: hue-rotate(90deg);
        transform: scaleX(-1);
        opacity: 1;
        font-family: Phosphate, Impact, 'Arial Black', sans-serif;
        font-weight: 900;
        font-style: normal;
        letter-spacing: 0.05em;
    }
    /* HIT 2: COUNTER — Copperplate inversé */
    82% {
        filter: invert(1) hue-rotate(270deg);
        opacity: 0.75;
        transform: translateX(3px);
        font-family: Copperplate, 'Copperplate Gothic Bold', fantasy;
        font-weight: 600;
        font-style: normal;
        letter-spacing: 0.2em;
    }
    /* HIT 3: cursif miroir — le baiser final */
    83% {
        text-shadow:
            -28px 0 0 rgba(255, 255, 0, 0.75),
             28px 0 0 rgba(255, 0, 200, 0.75);
        filter: none;
        opacity: 0.6;
        transform: scaleX(-1);
        font-family: 'Snell Roundhand', 'Brush Script MT', cursive;
        font-weight: 700;
        letter-spacing: 0.05em;
    }
    /* HIT 4: Futura géométrique — dernier flash */
    84% {
        text-shadow:
            -15px 0 0 rgba(0, 255, 200, 0.8),
             15px 0 0 rgba(255, 0, 80, 0.8);
        filter: none;
        opacity: 0.25;
        transform: none;
        font-family: Futura, 'Century Gothic', sans-serif;
        font-weight: 800;
        letter-spacing: -0.02em;
    }
    /* snap back to base — comme si rien ne s'était passé */
    85% {
        text-shadow:
            -4px 0 0 rgba(255, 185, 40, 0.45),
             4px 0 0 rgba(255, 80, 20, 0.35),
             0 0 50px rgba(255, 185, 40, 0.16),
             0 0 100px rgba(255, 120, 20, 0.08);
        color: rgba(255, 210, 130, 0.25);
        filter: none;
        opacity: 1;
        transform: none;
        font-family: var(--font-heading);
        font-weight: 200;
        font-style: normal;
        letter-spacing: 0.2em;
    }

    /* dying flicker — le néon agonise */
    92% { opacity: 0.45; }
    93% { opacity: 1; }
    95% { opacity: 0.7; }
    96% { opacity: 1; }
    100% { opacity: 1; }
}

/* Moiré grid slowly drifts — creates living interference pattern */
@keyframes moire-shift {
    0%, 100% { background-position: 0px 0px, 0px 0px; }
    25%      { background-position: 1px -1px, 0px 1px; }
    50%      { background-position: -1px 1px, 1px 0px; }
    75%      { background-position: 1px 0px, -1px -1px; }
}

.hero-letter-mask {
    display: inline-block;
    overflow: visible;
}

.hero-letter {
    display: inline-block;
    transform: translateY(120%);
    animation: letterSlideUp 2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-letter--b {
    animation-delay: 0.5s;
}

@keyframes letterSlideUp {
    to {
        transform: translateY(0);
    }
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 2rem;
    color: var(--text-muted);
}

.hero-tagline {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-top: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* =============================================
   HERO VIDEO (Drone background autoplay)
   ============================================= */
.hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
    scroll-snap-align: start;

}

.hero-video-container {
    position: absolute;
    inset: 0;
}

.hero-video-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh; /* 16:9 */
    height: 100vh;
    min-width: 100%;
    min-height: 56.25vw;
    transform: translate(-50%, -50%);
    border: none;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}

.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(80, 210, 130, 0.6), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
    padding: 8rem 3rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    will-change: transform;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.section-line {
    width: 60px;
    height: 2px;
    background: rgba(80, 210, 130, 0.6);
    box-shadow: 0 0 8px rgba(0, 255, 80, 0.25);
    margin-top: 1.5rem;
}

/* =============================================
   PROJECTS
   ============================================= */
.works {
    position: relative;
}

.project {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.project-parallax-bg {
    position: absolute;
    inset: -20% 0;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 0;
    background: radial-gradient(ellipse 80% 50% at 30% 50%, color-mix(in srgb, var(--accent) 6%, transparent) 0%, transparent 70%);
    will-change: transform;
}

.project-bg-grain {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
}

.project.in-view .project-parallax-bg {
    opacity: 1;
}

.project--reverse .project-parallax-bg {
    background: radial-gradient(ellipse 80% 50% at 70% 50%, color-mix(in srgb, var(--accent) 6%, transparent) 0%, transparent 70%);
}

.project-inner {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.project--reverse .project-inner {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.project--reverse .project-inner > * {
    direction: ltr;
}

.project--reverse .project-info {
    text-align: right;
}

.project--reverse .project-desc,
.project--reverse .project-credits {
    margin-left: auto;
}

.project--reverse .project-tags {
    justify-content: flex-end;
}

/* =============================================
   FULLSCREEN PROJECT (Selected Works)
   ============================================= */
.project--fullscreen {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    padding: 0;
    scroll-snap-align: start;
    overflow: hidden;
}

.project-video-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--bg);
}

/* Default: fit by width (no side cropping) */
.project-video-bg iframe,
.project-video-bg .vimeo-bg iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 56.25vw; /* 16:9 width-fit */
    transform: translate(-50%, -50%);
    border: none;
}

/* Fit by height: fill vertically, may crop sides */
.video-fit-height .project-video-bg iframe,
.video-fit-height .project-video-bg .vimeo-bg iframe {
    width: 177.78vh; /* 16:9 height-fit */
    height: 100%;
    min-width: 100%;
}

.project-video-bg .vimeo-bg {
    position: absolute;
    inset: 0;
}

.project-video-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            to right,
            rgba(5, 5, 8, 0.75) 0%,
            rgba(5, 5, 8, 0.45) 35%,
            rgba(5, 5, 8, 0.15) 100%
        );
}

.project--fullscreen .project-fullscreen-info {
    position: relative;
    z-index: 2;
    max-width: 420px;
    padding: 0 1.5rem;
    will-change: transform;
}


.project--fullscreen .project-year {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.4rem;
}

.project--fullscreen .project-name {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.project--fullscreen .project-type {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.project--fullscreen .project-desc {
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.75);
    max-width: 360px;
    margin-bottom: 1rem;
}

.project--fullscreen .project-credits {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.project--fullscreen .project-credits span {
    display: block;
}

.project--fullscreen .project-release {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
}

.project--fullscreen .project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

.project--fullscreen .project-cta {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project--fullscreen .project-cta:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Sound toggle button (fixed) */
.sound-toggle-fixed {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.sound-toggle-fixed:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.sound-toggle-fixed .sound-on {
    display: none;
}
.sound-toggle-fixed[data-muted="false"] .sound-off {
    display: none;
}
.sound-toggle-fixed[data-muted="false"] .sound-on {
    display: block;
}
.sound-toggle-fixed[data-muted="false"] {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* Separator between fullscreen projects */
.project--fullscreen + .project--fullscreen {
    border-top: none;
}

/* Previous works section */
.previous-works {
    border-top: none;
}

/* Video container */
.video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 0 0 2px rgba(30, 30, 40, 0.8),
        0 0 0 4px rgba(20, 20, 25, 0.6),
        0 0 30px rgba(0, 255, 80, 0.05),
        0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s var(--ease-out-expo);
}

.video-container:hover {
    transform: scale(1.02);
    box-shadow:
        0 0 0 2px rgba(30, 30, 40, 0.8),
        0 0 0 4px rgba(20, 20, 25, 0.6),
        0 0 40px rgba(0, 255, 80, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.6);
}

.video-container--vimeo iframe,
.video-container--youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* YouTube thumbnail click-to-play */
.youtube-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.youtube-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.85);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.youtube-play-btn::after {
    content: '';
    display: block;
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 3px;
}

.youtube-play-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.project-poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poster-gradient {
    position: absolute;
    inset: 0;
    opacity: 0.9;
}

.poster-title {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.15);
}

/* Project info */
.project-info {
    will-change: transform;
}

.project-year {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.75rem;
}

.project-name {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.project-type {
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.project-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.project-credits {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
    margin-bottom: 1rem;
    font-style: italic;
}

.project-cowrite {
    display: block;
    margin-top: 0.4rem;
    font-style: italic;
    opacity: 0.8;
}

.project-release {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.project-views {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.views-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(80, 200, 120, 0.2);
    border-radius: 100px;
    color: rgba(100, 210, 140, 0.75);
    background: rgba(80, 200, 120, 0.04);
    text-shadow: 0 0 4px rgba(0, 255, 80, 0.15);
    transition: all 0.3s ease;
}

.tag:hover {
    border-color: rgba(80, 200, 120, 0.4);
    color: rgba(120, 230, 160, 0.95);
    background: rgba(80, 200, 120, 0.08);
}

.project-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s var(--ease-out-expo);
}

.project-cta:hover {
    border-color: var(--text);
    padding-left: 0.5rem;
}

/* =============================================
   ABOUT
   ============================================= */
.about {
    position: relative;
    padding: 10rem 3rem;
    overflow: hidden;
    scroll-snap-align: start;

}

.about::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(131, 56, 236, 0.04) 0%, transparent 70%);
}

.about-inner {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    will-change: transform;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-top: 2rem;
}

.about-links {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--text);
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width 0.4s var(--ease-out-expo);
}

.social-link:hover::after {
    width: 100%;
}

/* =============================================
   CONTACT
   ============================================= */
.contact {
    position: relative;
    padding: 10rem 3rem;
    scroll-snap-align: start;
    text-align: center;
    overflow: hidden;

}

.contact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(230, 57, 70, 0.06) 0%, transparent 70%);
}

.contact-inner {
    position: relative;
    will-change: transform;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.contact-email {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-block;
    position: relative;
    transition: opacity 0.3s ease;
}

.contact-email::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(80, 210, 130, 0.7);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s var(--ease-out-expo);
}

.contact-email:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
    padding: 2rem 3rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.5;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-social {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.footer-icon {
    color: var(--text-muted);
    transition: color 0.3s ease, opacity 0.3s ease;
    opacity: 0.6;
    display: flex;
    align-items: center;
}

.footer-icon:hover {
    color: var(--text);
    opacity: 1;
}

.footer-icon svg {
    display: block;
}

/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
[data-reveal] {
    opacity: 0;
    transform: translateY(20px) translateX(-2px);
    filter: blur(1px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo), filter 0.6s var(--ease-out-expo);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0) translateX(0);
    filter: blur(0);
}

[data-reveal]:nth-child(2) { transition-delay: 0.1s; }
[data-reveal]:nth-child(3) { transition-delay: 0.2s; }
[data-reveal]:nth-child(4) { transition-delay: 0.3s; }
[data-reveal]:nth-child(5) { transition-delay: 0.4s; }
[data-reveal]:nth-child(6) { transition-delay: 0.5s; }
[data-reveal]:nth-child(7) { transition-delay: 0.6s; }
[data-reveal]:nth-child(8) { transition-delay: 0.7s; }

/* Project media reveal */
.project-media[data-reveal] {
    transform: translateY(60px) scale(0.95);
}

.project-media[data-reveal].revealed {
    transform: translateY(0) scale(1);
}

/* =============================================
   CRT / CATHODE RAY TUBE EFFECTS
   ============================================= */

/* --- Scanlines + Phosphor dot grid --- */
.crt-scanlines {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.07) 2px,
            rgba(0, 0, 0, 0.07) 4px
        ),
        repeating-linear-gradient(
            to right,
            rgba(255, 0, 0, 0.03) 0px,
            rgba(255, 0, 0, 0.03) 1px,
            rgba(0, 255, 0, 0.03) 1px,
            rgba(0, 255, 0, 0.03) 2px,
            rgba(0, 0, 255, 0.03) 2px,
            rgba(0, 0, 255, 0.03) 3px
        );
}

/* --- CRT Vignette / screen curvature --- */
.crt-vignette {
    position: fixed;
    inset: -20px;
    z-index: 9997;
    pointer-events: none;
    border-radius: 14px;
    box-shadow:
        inset 0 0 150px 50px rgba(0, 0, 0, 0.6),
        inset 0 0 60px 15px rgba(0, 0, 0, 0.3);
    background: radial-gradient(
        ellipse 95% 90% at 50% 50%,
        transparent 55%,
        rgba(0, 0, 0, 0.5) 100%
    );
}

/* --- Glass reflection (cursor-reactive) --- */
.crt-reflection {
    position: fixed;
    inset: 0;
    z-index: 9995;
    pointer-events: none;
    background:
        radial-gradient(
            ellipse 35% 25% at var(--reflect-x, 50%) var(--reflect-y, 50%),
            rgba(255, 255, 255, 0.025) 0%,
            transparent 100%
        ),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.035) 0%,
            transparent 25%,
            transparent 75%,
            rgba(255, 255, 255, 0.01) 100%
        );
    mix-blend-mode: screen;
}

/* --- Noise band sweep --- */
.crt-noise-band {
    position: fixed;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9996;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.1) 20%,
        rgba(255, 255, 255, 0.14) 50%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent
    );
    animation: noise-band-sweep 12s linear infinite;
}

@keyframes noise-band-sweep {
    0%, 85% { opacity: 0; top: -5px; }
    86% { opacity: 1; top: -5px; }
    95% { opacity: 1; top: 105vh; }
    96%, 100% { opacity: 0; top: 105vh; }
}

/* --- Chromatic aberration on headings --- */

.project-name,
.section-title {
    text-shadow:
        -2px 0 rgba(255, 0, 0, 0.4),
         2px 0 rgba(0, 255, 255, 0.25),
         0 0 10px rgba(0, 255, 80, 0.12);
    transition: text-shadow 0.3s ease;
}

.project:hover .project-name {
    text-shadow:
        -4px 0 rgba(255, 0, 0, 0.55),
         4px 0 rgba(0, 255, 255, 0.35),
         0 0 20px rgba(0, 255, 80, 0.2);
}

.contact-email a {
    text-shadow:
        -2px 0 rgba(255, 0, 0, 0.3),
         2px 0 rgba(0, 255, 255, 0.2),
         0 0 15px rgba(0, 255, 80, 0.08);
}

/* --- Glitch animation --- */
@keyframes crt-glitch {
    0%, 92%, 96%, 100% {
        transform: translate(0);
        clip-path: none;
    }
    93% {
        transform: translate(-4px, -1px);
        clip-path: inset(10% 0 80% 0);
        text-shadow: 4px 0 rgba(255, 0, 0, 0.8), -4px 0 rgba(0, 255, 255, 0.8);
    }
    94% {
        transform: translate(3px, 1px);
        clip-path: inset(40% 0 40% 0);
        text-shadow: -3px 0 rgba(255, 0, 0, 0.6), 3px 0 rgba(0, 255, 255, 0.6);
    }
    95% {
        transform: translate(-2px, 0);
        clip-path: inset(70% 0 10% 0);
    }
}

.section-title,
.project-name {
    animation: crt-glitch 8s infinite steps(1);
}

/* --- LCD subpixel grid on videos --- */
.video-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.12;
    mix-blend-mode: overlay;
    border-radius: inherit;
    background-image:
        repeating-linear-gradient(
            to right,
            rgba(255, 0, 0, 0.5) 0px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            to bottom,
            transparent 0px,
            transparent 2px,
            rgba(0, 0, 0, 0.3) 2px,
            rgba(0, 0, 0, 0.3) 3px
        );
    background-size: 3px 3px;
}

/* --- Video container CRT glass + chromatic fringe --- */
.video-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
        125deg,
        rgba(255, 255, 255, 0.06) 0%,
        rgba(255, 255, 255, 0.02) 15%,
        transparent 40%
    );
    box-shadow:
        inset -2px 0 6px rgba(255, 0, 0, 0.12),
        inset 2px 0 6px rgba(0, 0, 255, 0.12),
        inset 0 0 30px rgba(0, 255, 80, 0.04);
}

/* --- LCD flicker --- */
@keyframes lcd-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.985; }
}

.video-container {
    animation: lcd-flicker 0.1s infinite;
    will-change: opacity;
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
    body::after,
    body::before,
    .crt-reflection,
    .crt-noise-band {
        display: none;
    }
    .hero-title,
    .section-title,
    .project-name,
    .contact-email a {
        animation: none !important;
        text-shadow: none !important;
    }
    .video-container::before,
    .video-container::after {
        display: none;
    }
    .video-container {
        animation: none;
    }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .project-inner,
    .project--reverse .project-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }

    .project {
        padding: 4rem 0;
    }

    .project--fullscreen .project-fullscreen-info {
        padding: 2rem;
    }

    .section-header {
        padding: 6rem 2rem 3rem;
    }
}

@media (max-width: 768px) {
    .hero-video {
        height: 60vh;
    }

    /* Less aggressive crop on mobile — show more of the video */
    .hero-video-container iframe {
        width: 100%;
        height: 56.25vw;
        min-width: 100%;
        min-height: 100%;
    }

    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .project-inner {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: clamp(5rem, 22vw, 10rem);
    }

    .project-name {
        font-family: var(--font-heading);
        font-size: clamp(1.6rem, 6vw, 2.5rem);
    }

    .section-title {
        font-family: var(--font-heading);
    }

    /* Center all project text on mobile (no alternating left/right) */
    .project-info,
    .project--reverse .project-info {
        text-align: center;
    }

    .project-desc,
    .project--reverse .project-desc,
    .project-credits,
    .project--reverse .project-credits {
        margin-left: auto;
        margin-right: auto;
    }

    .project-tags,
    .project--reverse .project-tags {
        justify-content: center;
    }

    .project-cta {
        display: flex;
        justify-content: center;
    }

    .lang-toggle {
        font-size: 1.1rem;
        padding: 0.3rem 0.45rem;
    }

    .about {
        padding: 6rem 1.5rem;
    }

    .contact {
        padding: 6rem 1.5rem;
    }

    .about-links {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .project--fullscreen {
        height: 100vh;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .project--fullscreen .project-video-bg {
        position: relative;
        flex: 0 0 auto;
        height: 56.25vw;
        overflow: hidden;
        background: transparent;
    }

    .project--fullscreen .project-video-bg iframe,
    .project--fullscreen .project-video-bg .vimeo-bg iframe {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -45%);
        width: 100%;
        height: 120%;
    }

    .project--fullscreen .project-video-overlay {
        background: none;
    }

    .project--fullscreen .project-fullscreen-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 1rem 1.5rem 1.5rem;
        max-width: 100%;
        overflow-y: auto;
    }

    /* Center content via auto margins */
    .project--fullscreen .project-fullscreen-info .project-year {
        margin-top: auto;
    }
    .project--fullscreen .project-fullscreen-info .project-cta,
    .project--fullscreen .project-fullscreen-info .project-tags:last-of-type {
        margin-bottom: auto;
    }

    .cursor-glow {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.7rem;
    }

    .project-name {
        font-size: 1.8rem;
    }

    .section-header {
        padding: 4rem 1.5rem 2rem;
    }
}

/* =============================================
   HORIZONTAL SCROLL SECTION (project index)
   ============================================= */
.project-index {
    position: relative;
    padding: 3rem 0;
    overflow: hidden;
}

.project-index-track {
    display: flex;
    gap: 3rem;
    padding: 0 3rem;
    animation: marquee 30s linear infinite;
}

.project-index-item {
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.3;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.project-index-item:hover {
    opacity: 1;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =============================================
   LOADING STATE
   ============================================= */
body.loading {
    overflow: hidden;
}

.loader {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
    animation: loaderPulse 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
