/* ===================================================
   Bhomik Verma — bhomikverma.com
   Near-black monochrome. Left-aligned editorial.
   Inspired by gustavobatista.dev; not centered, no audio.
   =================================================== */

:root {
    --bg:       #0e0e0e;
    --bg-2:     #151515;
    --line:     #292929;
    --line-2:   #383838;
    --muted:    #7c7c7c;
    --text:     #b9b9b9;
    --bright:   #ededed;
    --white:    #ffffff;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

    --nav-h: 68px;
    --wrap:  1180px;
    --ease:  cubic-bezier(.16, 1, .3, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    /* keep a consistent gutter so Windows' chunky scrollbar doesn't reflow the page */
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--line-2) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
    background: var(--line-2);
    border: 2px solid var(--bg);
    border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-synthesis: none;   /* never fake-bold Fraunces on Windows */
}

/* ===== GSAP ScrollSmoother ===== */
#smooth-wrapper { position: relative; z-index: 1; }
/* GSAP sets the transform/fixed positioning; this is a no-JS fallback */
.no-smooth #smooth-wrapper, .no-smooth #smooth-content { transform: none !important; }

/* ===== BACKGROUND LAYERS ===== */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}
/* glowing orb, top-centre of the hero — the light source behind the flow field */
#hero-orb {
    position: absolute;
    top: -14vh;
    left: 50%;
    width: 52vw;
    max-width: 680px;
    aspect-ratio: 1;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 45%,
        rgba(255,255,255,.34) 0%,
        rgba(255,255,255,.11) 15%,
        rgba(255,255,255,.04) 35%,
        transparent 66%);
    animation: orbPulse 7s ease-in-out infinite alternate;
}
@keyframes orbPulse {
    from { opacity: .75; transform: translateX(-50%) scale(1); }
    to   { opacity: 1;   transform: translateX(-50%) scale(1.06); }
}
/* film grain — static, above content, very faint */
#grain {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* bottom vignette so content sits on solid ground */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}

/* ===== CUSTOM CURSOR ===== */
.cursor-dot, .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    opacity: 0;
}
.cursor-dot {
    width: 6px; height: 6px;
    margin: -3px 0 0 -3px;
    background: #fff;
}
.cursor-ring {
    width: 34px; height: 34px;
    margin: -17px 0 0 -17px;
    border: 1px solid #fff;
    transition: width .28s var(--ease), height .28s var(--ease),
                margin .28s var(--ease), background .28s var(--ease);
}
body.has-custom-cursor { cursor: none; }
body.has-custom-cursor a,
body.has-custom-cursor button { cursor: none; }
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring { opacity: 1; }
body.cursor-hidden .cursor-dot,
body.cursor-hidden .cursor-ring { opacity: 0; }
body.cursor-hover .cursor-ring {
    width: 58px; height: 58px;
    margin: -29px 0 0 -29px;
    background: rgba(255, 255, 255, .12);
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: var(--bright);
    z-index: 200;
    transition: width .1s linear;
}

/* ===== LAYOUT ===== */
.wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--wrap);
    margin: 0;                       /* not centered */
    padding: 0 clamp(1.5rem, 7vw, 7rem);
}

main, section, footer { position: relative; z-index: 2; }

section { padding: clamp(5rem, 12vh, 9rem) 0; border-top: 1px solid var(--line); }

/* ===== TYPE HELPERS ===== */
.kicker {
    font-family: var(--font-mono);
    font-size: .72rem;
    font-weight: 400;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2.4rem;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.7rem, 3.6vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.015em;
    color: var(--bright);
    max-width: 16ch;
    margin-bottom: clamp(3rem, 7vw, 5rem);
}
.work-head .section-title { margin-bottom: 1.1rem; }
.section-note {
    max-width: 42ch;
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .04em;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: clamp(3rem, 7vw, 5rem);
}

/* ===== LINKS ===== */
a { color: var(--bright); text-decoration: none; }

.project-links a, .contact-links a, .about-text a {
    position: relative;
    color: var(--bright);
    background-image: linear-gradient(var(--muted), var(--muted));
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: 0 1.15em;
    transition: background-image .25s var(--ease), color .25s var(--ease);
}
.project-links a:hover, .contact-links a:hover, .about-text a:hover {
    color: var(--white);
    background-image: linear-gradient(var(--white), var(--white));
}
/* external links carry an arrow so it's clear they leave the page */
.project-links a[target="_blank"]::after,
.contact-links a[target="_blank"]::after {
    content: " \2197";
    display: inline-block;
    margin-left: .12em;
    font-size: .82em;
    color: var(--muted);
    transition: transform .25s var(--ease), color .25s var(--ease);
}
.project-links a[target="_blank"]:hover::after,
.contact-links a[target="_blank"]:hover::after {
    color: var(--white);
    transform: translate(1px, -1px);
}

.sep { color: var(--line-2); margin: 0 .7rem; }

/* ===== NAV ===== */
#site-nav {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(1.5rem, 7vw, 7rem);
    z-index: 100;
    background: rgba(14, 14, 14, 0);
    border-bottom: 1px solid transparent;
    transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
}
#site-nav.scrolled {
    background: rgba(14, 14, 14, .72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom-color: var(--line);
}
.nav-logo {
    font-family: var(--font-mono);
    font-size: .8rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--bright);
}
.nav-right { display: flex; gap: clamp(1.2rem, 3vw, 2.4rem); }
.nav-right a {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .25s var(--ease);
}
.nav-right a:hover { color: var(--bright); }


/* ===== HERO ===== */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--nav-h);
    padding-bottom: 8vh;
}
.hero .wrap { max-width: 1120px; }

.hero-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.3rem, 6vw, 4.4rem);
    line-height: 1.06;
    letter-spacing: -0.025em;
    color: var(--bright);
    margin: 1.6rem 0 0;
    text-wrap: balance;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .line:nth-child(1) { color: var(--muted); }
.hero-title .line-in {
    display: block;
    transform: translateY(102%);
}
.no-motion .hero-title .line-in { transform: none; }

.hero-sub {
    margin-top: 1.9rem;
    max-width: 46ch;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.7;
    color: var(--muted);
}
.hero-sub::first-line { color: var(--text); }

.hero-cta { margin-top: 2.6rem; }

.btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: .78rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--bright);
    padding: 1.05rem 2rem;
    border: 1px solid var(--line-2);
    border-radius: 2px;
    background: rgba(255,255,255,.015);
    transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover {
    border-color: var(--muted);
    background: rgba(255,255,255,.05);
    color: var(--white);
    transform: translateY(-2px);
}

.scroll-hint {
    align-self: flex-start;
    margin: 5rem 0 0 clamp(1.5rem, 7vw, 7rem);
    width: 26px;
    height: 42px;
    border: 1px solid var(--line-2);
    border-radius: 14px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}
.scroll-hint span {
    width: 3px;
    height: 8px;
    border-radius: 2px;
    background: var(--muted);
    animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot {
    0%   { opacity: 0; transform: translateY(-4px); }
    35%  { opacity: 1; }
    70%  { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0; }
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: clamp(2rem, 6vw, 5.5rem);
    align-items: start;
}
.about-photo {
    position: relative;
}
/* faint ground so the cut-out figure doesn't float in a void */
.about-photo::before {
    content: '';
    position: absolute;
    left: 4%; right: 4%; bottom: 0;
    height: 62%;
    background: radial-gradient(120% 90% at 50% 100%, rgba(255,255,255,.05), transparent 70%);
    pointer-events: none;
}
.about-photo img {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(1) contrast(1.06) brightness(.95);
    -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 82%, transparent 100%);
}
.about-text {
    max-width: 54ch;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.12rem;
    line-height: 1.75;
    color: var(--text);
    padding-top: .4rem;
}
.about-text p:first-child {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.3vw, 1.7rem);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--bright);
}

/* ===== WORK ===== */
.projects { list-style: none; }

.project {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.4rem, 4vw, 3rem);
    padding: clamp(2.6rem, 5vw, 4rem) 0;
    border-top: 1px solid var(--line);
    align-items: start;
}
.project:first-child { border-top: none; padding-top: 0; }

.project:has(.project-media) {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
}

/* ghost index for text-only cards — fills the asymmetric void */
.project:not(:has(.project-media)) .project-copy { max-width: 52ch; }
.project:not(:has(.project-media))::after {
    content: attr(data-n);
    position: absolute;
    top: clamp(2rem, 5vw, 3.6rem);
    right: 2%;
    font-family: var(--font-display);
    font-size: clamp(5rem, 13vw, 11rem);
    line-height: 1;
    color: var(--bright);
    opacity: .045;
    pointer-events: none;
    user-select: none;
}

.project-copy { max-width: 46ch; }

.project-idx {
    display: block;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .18em;
    color: var(--muted);
    margin-bottom: 1rem;
}
.project h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    color: var(--bright);
    margin-bottom: .5rem;
}
.project .meta {
    font-family: var(--font-mono);
    font-size: .74rem;
    letter-spacing: .06em;
    color: var(--muted);
    margin-bottom: 1.1rem;
}
.project p:not(.meta):not(.project-links) { color: var(--text); margin-bottom: .9rem; }
.project code {
    font-family: var(--font-mono);
    font-size: .85em;
    color: var(--bright);
    background: var(--bg-2);
    padding: .1em .35em;
    border-radius: 2px;
}
.project-links {
    font-family: var(--font-mono);
    font-size: .76rem;
    letter-spacing: .04em;
    margin-top: 1.2rem;
}

.project-media {
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-2);
    align-self: center;
}
.project-media img {
    display: block;
    width: 100%;
    height: auto;
    filter: grayscale(1) contrast(1.08) brightness(.82);
    opacity: 1;
    transform-origin: 50% 45%;
    transition: filter .4s var(--ease);
    animation: kenburns 26s ease-in-out infinite alternate;
    animation-play-state: paused;
}
.project-media.in-view img { animation-play-state: running; }
.project:nth-child(even) .project-media img { animation-duration: 32s; animation-delay: -8s; }
.project:nth-child(3n) .project-media img   { animation-duration: 22s; animation-delay: -14s; transform-origin: 65% 40%; }
.project:hover .project-media img { filter: grayscale(1) contrast(1.08) brightness(.98); }

@keyframes kenburns {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to   { transform: scale(1.13) translate3d(-2%, -1.5%, 0); }
}

/* --- archigreendesigns.com project reveal: circular iris clip on the media
       (their .projectImage: clip-path circle 25%->100%, power2.out, plays once).
       Vertical fallback below; the horizontal rail (desktop) drives the same
       clip via GSAP containerAnimation — see .work-rail + script.js §0d. --- */
.media-reveal {
    transform: none;
    clip-path: circle(22% at 50% 47%);
    transition: opacity .6s var(--ease),
                clip-path 1.5s cubic-bezier(.22, .61, .36, 1);
}
.media-reveal.is-visible { clip-path: circle(130% at 50% 47%); }

/* ===== WORK — HORIZONTAL PROJECTS RAIL (archigreendesigns.com) =====
   Their setup: .projectsCont pinned at "top top"; an inner flex track
   translated x: 0 -> -(scrollWidth - viewport), ease none, scrub 1, 1:1 with
   scroll. Gap between panels 120px, ScrollSmoother smooth 1.2.
   Here: plain flat horizontal scroll; each panel's media iris-opens as it
   slides in (script.js §0d). .work-rail is a plain .wrap-width
   container until JS adds .is-rail on desktop — so no-JS / reduced-motion /
   mobile all fall back to the vertical list unchanged. */
.work-rail {
    position: relative;
    width: 100%;
    max-width: var(--wrap);
    margin: 0;
    padding: 0 clamp(1.5rem, 7vw, 7rem);
}
.work-hint { display: none; }

@media (min-width: 1001px) {
    .work-rail.is-rail {
        max-width: none;
        padding: 0;
        height: 100vh;
        overflow: hidden;
    }
    .work-rail.is-rail .work-track {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        width: max-content;
        height: 100vh;
        gap: clamp(4rem, 9vw, 9rem);
        padding: 0 34vw 0 clamp(1.5rem, 7vw, 7rem);
    }
    .work-rail.is-rail .work-track .project {
        flex: 0 0 auto;
        width: min(56vw, 640px);
        display: grid;
        grid-template-columns: 1fr;
        grid-auto-rows: min-content;
        gap: clamp(1rem, 2vw, 1.6rem);
        padding: 0;
        border-top: none;
        align-content: center;
    }
    .work-rail.is-rail .work-track .project::after { display: none; } /* ghost index */
    .work-rail.is-rail .work-track .project-copy { max-width: 46ch; order: 2; }
    .work-rail.is-rail .work-track .project-media,
    .work-rail.is-rail .work-track .video-embed {
        order: 1;
        align-self: stretch;
        width: 100%;
        max-height: 40vh;
    }
    .work-rail.is-rail .work-track .project-media img {
        height: 40vh;
        object-fit: cover;
    }
    .work-rail.is-rail .work-track .video-embed { aspect-ratio: auto; height: 40vh; }
    /* GSAP drives the iris clip in the rail (§0d) — no CSS transition on it */
    .work-rail-on .work-track .media-reveal { transition: none; }

    /* scroll cue, bottom-left of the pinned rail */
    .work-rail.is-rail .work-hint {
        display: block;
        position: absolute;
        left: clamp(1.5rem, 7vw, 7rem);
        bottom: 2.4rem;
        z-index: 4;
        font-family: var(--font-mono);
        font-size: .68rem;
        letter-spacing: .22em;
        text-transform: uppercase;
        color: var(--muted);
        pointer-events: none;
    }
    .work-rail.is-rail .work-hint span::after {
        content: " \2192";
        display: inline-block;
        animation: workHint 1.8s var(--ease) infinite;
    }
}
@keyframes workHint {
    0%, 100% { transform: translateX(0); opacity: .5; }
    50%      { transform: translateX(5px); opacity: 1; }
}

/* --- Infinium framed link --- */
.media-frame { display: block; position: relative; }
.media-frame::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.35));
    opacity: 0;
    transition: opacity .35s var(--ease);
}
.media-frame:hover::after { opacity: 1; }
/* Infinium is a real client site — keep it legible, not a grey blur */
.media-frame img { filter: grayscale(1) contrast(1.08) brightness(.98); }
.media-frame:hover img { filter: grayscale(.55) contrast(1.05) brightness(1.02); }
.media-empty-label { display: none; }

.project-media.is-empty {
    aspect-ratio: 16 / 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(-45deg, transparent 0 11px, rgba(255,255,255,.018) 11px 12px),
        var(--bg-2);
}
.project-media.is-empty img { display: none; }
.project-media.is-empty .media-empty-label {
    display: block;
    font-family: var(--font-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    color: var(--muted);
}

/* --- Video card: poster + play button, opens the Loom player in a lightbox --- */
.video-embed {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    min-height: 170px;          /* fallback so it never collapses if aspect-ratio is ignored */
    overflow: hidden;
    cursor: pointer;
    background:
        radial-gradient(120% 120% at 50% 38%, rgba(255,255,255,.055), transparent 70%),
        var(--bg-2);
}
/* centre play button */
.video-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 66px; height: 66px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.35);
    background: rgba(14, 14, 14, .45);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.video-play svg { width: 21px; height: 21px; fill: var(--white); margin-left: 3px; }
.video-embed:hover .video-play { background: rgba(255,255,255,.14); border-color: #fff; transform: translate(-50%,-50%) scale(1.05); }
/* faux scrubber so the frame reads as a video */
.video-embed::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    z-index: 3;
    background: linear-gradient(90deg, var(--muted) 22%, rgba(255,255,255,.12) 22%);
}

/* higher specificity than `.project-media img` (which sets height:auto) */
.video-embed img.video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05) brightness(.5);
    transform-origin: 50% 45%;
    animation: kenburns 28s ease-in-out infinite alternate;
}

.video-tag {
    position: absolute;
    left: 12px; bottom: 10px;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: .64rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(14, 14, 14, .5);
    padding: .4em .7em;
    pointer-events: none;
}

/* --- Loom lightbox (mounted on <body>, outside the 3D rail) --- */
.lightbox-open { overflow: hidden; }   /* stop native scroll behind it (no-smooth path) */
.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 5vw, 4rem);
    background: rgba(8, 8, 8, .9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.video-lightbox.is-in { opacity: 1; }
.video-lightbox .lb-frame {
    position: relative;
    width: min(100%, 1080px);
    aspect-ratio: 16 / 9;
    background: #000;
    border: 1px solid var(--line-2);
    transform: translateY(8px) scale(.99);
    transition: transform .3s var(--ease);
}
.video-lightbox.is-in .lb-frame { transform: none; }
.video-lightbox iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-lightbox .lb-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 38px; height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    cursor: pointer;
    transition: background .2s var(--ease);
}
.video-lightbox .lb-close:hover { background: rgba(255,255,255,.18); }
.video-lightbox .lb-close svg { width: 16px; height: 16px; stroke: var(--bright); stroke-width: 2; fill: none; }
body.has-custom-cursor .video-lightbox,
body.has-custom-cursor .video-lightbox * { cursor: auto; }
@media (max-width: 680px) {
    .video-lightbox { padding: 1rem; }
    .video-lightbox .lb-close { top: -2.6rem; right: 50%; transform: translateX(50%); }
}

/* ===== APPROACH ===== */
#approach { border-top: 1px solid var(--line); }
.approach-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.6rem, 4vw, 3.5rem);
}
.approach-item { border-top: 1px solid var(--line-2); padding-top: 1.4rem; }
.approach-item h3 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    color: var(--bright);
    margin-bottom: .7rem;
}
.approach-item p { font-size: .98rem; color: var(--text); }

/* ===== SCRUBBED TEXT-FILL (archigreen-style) ===== */
.fill-text { color: var(--muted); }
.fill-text .fw {
    color: var(--muted);
    transition: color .4s var(--ease);
    will-change: color;
}
.fill-text .fw.on { color: var(--bright); }
.no-motion .fill-text,
.no-motion .fill-text .fw { color: var(--bright); }

/* ===== CONTACT ===== */
#contact { padding-bottom: clamp(6rem, 14vh, 11rem); }
.contact-offer {
    max-width: 46ch;
    margin-top: 1.4rem;
    font-size: 1.06rem;
    line-height: 1.7;
    color: var(--text);
}
.contact-line {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--bright);
    margin-bottom: 2.2rem;
}
.contact-links {
    font-family: var(--font-mono);
    font-size: .82rem;
    letter-spacing: .06em;
    margin-top: 2rem;
}

/* ===== FOOTER ===== */
footer {
    padding: 2.4rem clamp(1.5rem, 7vw, 7rem);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
    font-family: var(--font-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ===== ENTRANCE ANIMATION ===== */
.fade-in { opacity: 0; }
.is-loaded .fade-in { animation: fadeUp .9s var(--ease) forwards; }
.is-loaded .d1 { animation-delay: .05s; }
.is-loaded .d2 { animation-delay: .18s; }
.is-loaded .d3 { animation-delay: .30s; }
.is-loaded .d4 { animation-delay: .42s; }

.is-loaded .hero-title .line-in {
    animation: lineUp 1s var(--ease) forwards;
}
.is-loaded .hero-title .line:nth-child(1) .line-in { animation-delay: .12s; }
.is-loaded .hero-title .line:nth-child(2) .line-in { animation-delay: .22s; }
.is-loaded .hero-title .line:nth-child(3) .line-in { animation-delay: .32s; }

@keyframes lineUp { to { transform: translateY(0); } }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL REVEAL ===== */
.sr {
    opacity: 0;
    transition: opacity .7s var(--ease), transform .7s var(--ease);
    transition-delay: var(--sr-delay, 0s);
    will-change: opacity, transform;
}
.sr-up   { transform: translateY(56px) scale(.965); }
.sr-left { transform: translateX(-48px) scale(.985); }
.sr.is-visible { opacity: 1; transform: none; }

/* ===== REDUCED MOTION ===== */
.no-motion .fade-in,
.no-motion .sr { opacity: 1 !important; transform: none !important; animation: none !important; }
.no-motion .hero-title .line-in { transform: none !important; animation: none !important; }
.no-motion .scroll-hint span { animation: none; }
.no-motion #bg-canvas,
.no-motion #grain { display: none; }
.no-motion #hero-orb { animation: none; opacity: .8; }
.no-motion .project-media img,
.no-motion .video-poster { animation: none !important; transform: scale(1.03); }
.no-motion .media-reveal { clip-path: none !important; transition: none !important; }
.no-motion .cursor-dot,
.no-motion .cursor-ring { display: none; }
.no-motion.has-custom-cursor,
.no-motion.has-custom-cursor a,
.no-motion.has-custom-cursor button { cursor: auto; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in, .sr { opacity: 1 !important; transform: none !important; animation: none !important; }
    .hero-title .line-in { transform: none !important; }
    .scroll-hint span { animation: none; }
    #bg-canvas, #grain { display: none; }
    #hero-orb { animation: none; opacity: .8; }
    .project-media img, .video-poster { animation: none !important; transform: scale(1.03); }
    .media-reveal { clip-path: none !important; transition: none !important; }
    .cursor-dot, .cursor-ring { display: none; }
}

/* No custom cursor on coarse pointers (touch) */
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .about-grid { grid-template-columns: 1fr; gap: 2.4rem; }
    .about-photo { max-width: 300px; }
    .project,
    .project:has(.project-media) { grid-template-columns: 1fr; gap: 1.6rem; }
    .project-media { order: -1; align-self: start; }      /* stacked above the text */
    .video-embed { width: 100%; }                          /* keep its 16:9 box */
    .project:not(:has(.project-media))::after { display: none; }
    .project:not(:has(.project-media)) .project-copy,
    .project-copy { max-width: 60ch; }
    .approach-list { grid-template-columns: 1fr; gap: 1.9rem; }
    .approach-item p { max-width: 60ch; }
}

@media (max-width: 680px) {
    body { font-size: 1rem; }
    .nav-right { gap: 1.1rem; }
    .nav-right a { font-size: .66rem; letter-spacing: .08em; }
    .nav-logo { font-size: .74rem; }

    .hero { padding-bottom: 12vh; }
    .hero-title { font-size: clamp(1.85rem, 8.4vw, 3rem); line-height: 1.14; }
    .hero-sub { font-size: 1rem; max-width: 40ch; }
    .hero-sub::first-line { color: var(--muted); }        /* wraps unpredictably on mobile */
    .btn { padding: .95rem 1.5rem; font-size: .72rem; letter-spacing: .12em; }
    .scroll-hint { display: none; }

    .kicker { margin-bottom: 1.8rem; }
    .section-title { margin-bottom: 2.4rem; max-width: none; }
    .about-text { font-size: 1rem; gap: 1.2rem; }
    .about-text p:first-child { font-size: 1.2rem; }

    .project { padding: 2.4rem 0; }
    .project-idx { margin-bottom: .7rem; }

    #bg-canvas { opacity: .55; }
    #grain { display: none; }
    #hero-orb { opacity: .5; width: 78vw; }

    .contact-line { font-size: clamp(2rem, 9.5vw, 3.2rem); }
    .contact-links { font-size: .78rem; line-height: 2.2; }
    .contact-links .sep { margin: 0 .45rem; }

    footer { flex-direction: column; gap: .35rem; font-size: .62rem; }
}

/* very small phones */
@media (max-width: 380px) {
    .wrap { padding: 0 1.25rem; }
    #site-nav { padding: 0 1.25rem; }
    .hero-title { font-size: 1.7rem; }
}
