/* ==========================================================================
   Aneek Ahmed — portfolio
   Colours come from the CV and showreel: electric blue + lime on deep ink.
   ========================================================================== */
:root {
  --bg: #06061a;
  --bg-2: #0b0b24;
  --surface: #10102c;
  --surface-2: #17173d;
  --line: rgba(150, 146, 255, 0.14);
  --line-strong: rgba(150, 146, 255, 0.32);
  --text: #eeeef8;
  --muted: #a3a3c2;
  --accent: #0600e4;
  --accent-bright: #2a22ff;
  --accent-soft: #8e8aff;
  --lime: #c2e02f;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(96px, 12vw, 168px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--bg); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; border-radius: 6px; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 200; padding: 10px 16px; background: var(--lime); color: var(--bg); border-radius: 999px; font-weight: 600; text-decoration: none; transform: translateY(-180%); }
.skip-link:focus { transform: none; }

/* Film grain + glow backdrop */
.grain { position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-grid { position: absolute; inset: -10% 0; height: 140%;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='384' height='384'%3E%3Cpath d='M192 185v14M185 192h14' stroke='%238e8aff' stroke-width='1.2' opacity='.7'/%3E%3C/svg%3E"),
    linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 384px 384px, 96px 96px, 96px 96px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 10%, transparent 80%); mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 10%, transparent 80%);
  opacity: .45; }

/* ---------------- Header ---------------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 60; transition: background-color .4s, border-color .4s; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(6, 6, 26, .7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-stretch: 112%; letter-spacing: -0.01em; }
.brand svg { width: 34px; height: auto; }
.brand svg path { fill: var(--accent-soft); transition: fill .3s; }
.brand:hover svg path { fill: var(--lime); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: clamp(14px, 2.4vw, 36px); }
.site-nav a { text-decoration: none; font-size: .95rem; color: var(--muted); position: relative; padding-block: 6px; transition: color .25s; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.header-clock { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-clock time { color: var(--text); }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; background: none; transition: background-color .3s, color .3s, border-color .3s, box-shadow .4s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 40px -10px rgba(6, 0, 228, .9); }
.btn-primary:hover { background: var(--accent-bright); box-shadow: 0 14px 50px -8px rgba(40, 34, 255, 1); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-lime { background: var(--lime); color: var(--bg); }
.btn-lime:hover { background: #d4f04a; }
.btn .play { width: 22px; height: 22px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; }
.btn .play svg { width: 8px; margin-left: 2px; }

.section-title { font-weight: 300; font-stretch: 125%; font-size: clamp(2.3rem, 1.4rem + 4vw, 5.4rem); line-height: 1; letter-spacing: -0.04em; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 48px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-note { color: var(--muted); max-width: 38ch; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 999px; background: rgba(194, 224, 47, .14); color: var(--lime); font-size: .78rem; font-weight: 600; border: 1px solid rgba(194, 224, 47, .35); }
.ai-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); }

/* ---------------- Home hero (3D) ---------------- */
.hero { position: relative; height: 200vh; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(6, 6, 26, .85) 100%); }
.hero-fallback { position: absolute; z-index: 0; left: 50%; top: 44%; width: min(40vw, 440px); transform: translate(-50%, -50%); filter: drop-shadow(0 0 70px rgba(6, 0, 228, .9)); transition: opacity .8s; }
.hero-fallback path { fill: var(--accent); }
.webgl-ok .hero-fallback { opacity: 0; }
.hero-ui { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none; }
.hero-ui > .wrap { pointer-events: none; padding-bottom: clamp(36px, 7vh, 88px); }
.hero-ui a, .hero-ui button { pointer-events: auto; }
.hero-name { font-weight: 300; font-stretch: 125%; font-size: clamp(3rem, 9.5vw, 9rem); line-height: .9; letter-spacing: -0.045em; margin-left: -0.04em; }
.hero-name span { display: block; }
.hero-name span + span { padding-left: .55em; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 14px; margin-top: clamp(22px, 3.2vh, 36px); }
.hero-reel { min-height: 58px; border-radius: 18px; background: rgba(16, 16, 44, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero-row .scroll-cue { margin-left: auto; }
.hero-role { display: flex; align-items: center; gap: 12px; color: var(--muted); margin-bottom: 14px; }
.hero-role strong { color: var(--text); font-weight: 600; }
.hero-role .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 6px rgba(194, 224, 47, .14); }

/* The AI "prompt" bar */
.prompt { display: flex; align-items: center; gap: 10px; width: min(560px, 100%); padding: 8px 8px 8px 18px; border-radius: 18px; background: rgba(16, 16, 44, .72); border: 1px solid var(--line-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 20px 60px -20px rgba(6, 0, 228, .6), inset 0 1px 0 rgba(255, 255, 255, .05); position: relative; overflow: hidden; }
.prompt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(90deg, transparent, rgba(194, 224, 47, .7), rgba(142, 138, 255, .8), transparent); background-size: 200% 100%; animation: prompt-border 4s linear infinite; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
@keyframes prompt-border { to { background-position: -200% 0; } }
.prompt-icon { flex: none; width: 22px; height: 22px; color: var(--lime); }
.prompt-text { flex: 1; min-width: 0; font-family: var(--mono); font-size: clamp(.82rem, .78rem + .2vw, .95rem); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-text .muted { color: var(--muted); }
.prompt-caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -0.18em; background: var(--lime); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.prompt .btn { min-height: 42px; padding: 0 18px; border-radius: 12px; font-size: .92rem; flex: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.scroll-cue { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--muted); }
.scroll-cue i { display: block; width: 1px; height: 44px; background: linear-gradient(var(--accent-soft), transparent); transform-origin: top; animation: cue 2.4s var(--ease-out) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.hero-tip { position: fixed; z-index: 70; top: 0; left: 0; pointer-events: none; padding: 8px 14px; border-radius: 12px; background: rgba(6, 6, 26, .85); border: 1px solid var(--line-strong); font-size: .88rem; white-space: nowrap; opacity: 0; transform: translate(-50%, -140%); transition: opacity .25s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-tip.is-on { opacity: 1; }
.hero-tip b { font-weight: 600; }
.hero-tip span { color: var(--lime); margin-left: 8px; font-size: .8rem; }

/* ---------------- Stacking project cards ---------------- */
.work { position: relative; padding-top: var(--section); }
.stack { position: relative; }
.stack-item { position: sticky; top: calc(var(--header-h) + 16px + var(--i, 0) * 14px); height: calc(100vh - var(--header-h) - 48px); height: calc(100svh - var(--header-h) - 48px); min-height: 460px; margin-bottom: 14vh; perspective: 1600px; }
.stack-item:last-child { margin-bottom: 0; }
.stack-card { position: relative; display: block; height: 100%; border-radius: 30px; overflow: hidden; text-decoration: none; background: var(--surface); border: 1px solid var(--line); transform-origin: 50% 0%; will-change: transform, filter; box-shadow: 0 -30px 80px -40px rgba(0, 0, 0, .9), 0 40px 120px -40px rgba(6, 0, 228, .55); isolation: isolate; }
.stack-media { position: absolute; inset: 0; overflow: hidden; }
.stack-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12) translate3d(var(--mx, 0), var(--my, 0), 0); transition: transform 1.2s var(--ease-out), filter .6s; }
.stack-card:hover .stack-media img { transform: scale(1.06) translate3d(var(--mx, 0), var(--my, 0), 0); }
.stack-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(6, 6, 26, .55) 0%, transparent 28%, transparent 45%, rgba(6, 6, 26, .92) 100%); }
.stack-card::after { /* scan line on hover */ content: ""; position: absolute; left: 0; right: 0; top: -20%; height: 18%; z-index: 1; background: linear-gradient(180deg, transparent, rgba(194, 224, 47, .16) 60%, rgba(194, 224, 47, .55) 98%, transparent); opacity: 0; mix-blend-mode: screen; pointer-events: none; }
.stack-card:hover::after { animation: scan 1.4s var(--ease-out) forwards; }
@keyframes scan { 0% { top: -20%; opacity: 1; } 100% { top: 110%; opacity: 0; } }
.stack-top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: clamp(18px, 2.4vw, 32px); font-size: .92rem; }
.stack-count { font-variant-numeric: tabular-nums; color: var(--text); opacity: .85; }
.stack-bottom { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 20px 32px; padding: clamp(20px, 3vw, 44px); }
.stack-title { font-weight: 400; font-stretch: 118%; font-size: clamp(1.8rem, 1rem + 3.4vw, 4.4rem); line-height: 1; letter-spacing: -0.035em; max-width: 18ch; text-wrap: balance; }
.stack-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.stack-meta li { font-size: .85rem; padding: 6px 12px; border-radius: 999px; background: rgba(6, 6, 26, .55); border: 1px solid rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.stack-open { display: grid; place-items: center; width: clamp(64px, 7vw, 96px); aspect-ratio: 1; border-radius: 50%; background: var(--lime); color: var(--bg); font-weight: 700; font-size: .9rem; transition: transform .5s var(--ease-out); }
.stack-card:hover .stack-open { transform: scale(1.1) rotate(-8deg); }

/* ---------------- More projects list with floating preview ---------------- */
.archive { padding-top: var(--section); }
.archive-list { border-top: 1px solid var(--line-strong); }
.archive-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) 80px 40px; align-items: center; gap: 16px 32px; padding: clamp(22px, 3vw, 36px) 8px; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding-left .5s var(--ease-out), background-color .4s; }
.archive-row:hover { padding-left: 28px; background: linear-gradient(90deg, rgba(6, 0, 228, .22), transparent 70%); }
.archive-row h3 { font-size: clamp(1.4rem, 1rem + 1.6vw, 2.6rem); font-weight: 400; font-stretch: 115%; letter-spacing: -0.03em; line-height: 1.05; }
.archive-row .d { color: var(--muted); }
.archive-row .y { color: var(--muted); font-variant-numeric: tabular-nums; }
.archive-row .arrow { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; transition: background-color .3s, border-color .3s, transform .5s var(--ease-out); }
.archive-row:hover .arrow { background: var(--lime); border-color: var(--lime); color: var(--bg); transform: rotate(-45deg); }
.archive-thumb { display: none; }
.float-preview { position: fixed; top: 0; left: 0; z-index: 40; width: clamp(240px, 24vw, 380px); aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.6); box-shadow: 0 40px 100px -20px rgba(6, 0, 228, .8); }
.float-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.float-preview img.is-on { opacity: 1; }

/* ---------------- Floating 3D frames (horizontal) ---------------- */
.frames { position: relative; padding-top: var(--section); overflow: hidden; }
.frames-pin { height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.frames-track { display: flex; gap: clamp(40px, 6vw, 110px); padding-inline: 12vw; width: max-content; perspective: 1400px; perspective-origin: 50% 50%; }
.frame { position: relative; flex: none; width: clamp(220px, 26vw, 380px); aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; text-decoration: none; transform-style: preserve-3d; will-change: transform; background: var(--surface); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.frame:nth-child(3n+2) { width: clamp(260px, 30vw, 440px); aspect-ratio: 1; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 10px 14px; border-radius: 12px; background: rgba(6, 6, 26, .7); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); font-size: .88rem; display: flex; justify-content: space-between; gap: 8px; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .5s var(--ease-out); }
.frame:hover figcaption, .frame:focus-visible figcaption { opacity: 1; transform: none; }
.frame figcaption span { color: var(--lime); }
.frames-head { margin-bottom: clamp(28px, 4vh, 48px); }

/* ---------------- Clients ---------------- */
.clients { padding-block: clamp(48px, 7vw, 88px); border-block: 1px solid var(--line); margin-top: var(--section); background: linear-gradient(180deg, rgba(16, 16, 44, .6), rgba(6, 6, 26, .2)); }
.clients-title { font-size: 1rem; font-weight: 500; color: var(--muted); margin-bottom: 26px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee + .marquee { margin-top: 12px; }
.marquee-track { display: flex; width: max-content; }
.marquee ul { display: flex; flex-shrink: 0; align-items: center; }
.marquee li { display: flex; align-items: center; white-space: nowrap; font-size: clamp(1.2rem, 1rem + 1.1vw, 1.9rem); font-stretch: 112%; letter-spacing: -0.02em; }
.marquee[data-dir="right"] li { color: var(--muted); font-weight: 300; }
.marquee li::after { content: ""; width: 12px; height: 11px; margin-inline: clamp(22px, 3vw, 40px); background: var(--accent-soft); clip-path: polygon(50% 0, 100% 100%, 0 100%); opacity: .8; }
.marquee.is-running .marquee-track { animation: marquee var(--duration, 70s) linear infinite; }
.marquee.is-running[data-dir="right"] .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:not(.is-running) { -webkit-mask-image: none; mask-image: none; }
.marquee:not(.is-running) .marquee-track { width: auto; padding-inline: var(--gutter); max-width: var(--wrap); margin-inline: auto; }
.marquee:not(.is-running) ul { flex-wrap: wrap; row-gap: 6px; }

/* ---------------- About + experience ---------------- */
.about { padding-top: var(--section); }
.about-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.portrait-wrap { position: sticky; top: 110px; }
.portrait { position: relative; width: min(100%, 260px); aspect-ratio: 2 / 3; border-radius: 22px; overflow: hidden; background: var(--accent); }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15) brightness(.95); mix-blend-mode: luminosity; opacity: .95; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 0, 228, .15), rgba(6, 6, 26, .55)); mix-blend-mode: multiply; }
.portrait-caption { margin-top: 16px; font-size: .95rem; color: var(--muted); max-width: 28ch; }
.about-lead { margin-top: clamp(26px, 4vw, 40px); font-size: clamp(1.35rem, 1.05rem + 1.1vw, 2.05rem); line-height: 1.35; letter-spacing: -0.015em; max-width: 30ch; }
.about-body { margin-top: 22px; color: var(--muted); max-width: 58ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chips li { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .95rem; transition: border-color .3s, color .3s; }
.chips li:hover { border-color: var(--lime); color: var(--lime); }
.timeline { margin-top: clamp(44px, 6vw, 72px); border-top: 1px solid var(--line-strong); }
.role { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3.4fr) minmax(0, 2.2fr); gap: 6px 28px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.role-years { color: var(--muted); font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.role-years::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--accent-soft); }
.role.is-current .role-years::before { background: var(--lime); border-color: var(--lime); box-shadow: 0 0 0 5px rgba(194, 224, 47, .15); }
.role h3 { font-size: 1.08rem; font-weight: 500; }
.role-org { color: var(--accent-soft); }

/* ---------------- Contact + footer ---------------- */
.contact { position: relative; padding-top: var(--section); margin-top: var(--section); border-top: 1px solid var(--line); overflow: hidden; }
.contact .orb { position: absolute; z-index: -1; width: 80vmax; height: 80vmax; left: 50%; margin-left: -40vmax; bottom: -52vmax; border-radius: 50%; background: radial-gradient(closest-side, rgba(6, 0, 228, .6), transparent); filter: blur(20px); pointer-events: none; }
.contact-title { font-weight: 300; font-stretch: 125%; font-size: clamp(2.3rem, 1.2rem + 5vw, 6rem); line-height: 1; letter-spacing: -0.045em; max-width: 14ch; }
.contact-email { display: inline-block; margin-top: clamp(32px, 5vw, 60px); font-size: clamp(1.35rem, .6rem + 4.2vw, 4.6rem); font-weight: 500; font-stretch: 105%; letter-spacing: -0.03em; text-decoration: none; background: linear-gradient(var(--lime), var(--lime)) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease-out), color .3s; padding-bottom: 6px; overflow-wrap: anywhere; }
.contact-email:hover { background-size: 100% 2px; color: var(--lime); }
.contact-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.contact-phone { font-size: 1.15rem; text-decoration: none; }
.contact-phone:hover { color: var(--lime); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.socials a { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); text-decoration: none; font-size: .95rem; transition: border-color .3s, color .3s; }
.socials a:hover { border-color: var(--lime); color: var(--lime); }
.socials svg { width: 18px; height: 18px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: clamp(64px, 9vw, 112px) 32px; font-size: .9rem; color: var(--muted); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--lime); }
.footer time { color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------- Project page ---------------- */
.p-hero { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px)); }
.p-back { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); text-decoration: none; font-size: .95rem; margin-bottom: clamp(28px, 4vw, 48px); }
.p-back:hover { color: var(--lime); }
.p-back svg { width: 16px; transition: transform .4s var(--ease-out); }
.p-back:hover svg { transform: translateX(-4px); }
.p-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 22px; color: var(--muted); font-size: .95rem; }
.p-title { font-weight: 300; font-stretch: 122%; font-size: clamp(2.4rem, 1.2rem + 5.4vw, 7.2rem); line-height: .98; letter-spacing: -0.045em; max-width: 16ch; text-wrap: balance; }
.p-intro { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px clamp(40px, 6vw, 96px); margin-top: clamp(36px, 5vw, 64px); align-items: start; }
.p-summary { font-size: clamp(1.2rem, 1rem + .8vw, 1.7rem); line-height: 1.4; letter-spacing: -0.01em; max-width: 36ch; }
.p-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.p-meta dt { font-size: .85rem; color: var(--accent-soft); margin-bottom: 4px; }
.p-meta dd { margin: 0; }
.p-meta .tags { grid-column: span 2; }
.p-meta .tags ul { display: flex; flex-wrap: wrap; gap: 8px; }
.p-meta .tags li { font-size: .85rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); }
.p-cover-wrap { margin-top: clamp(48px, 7vw, 96px); perspective: 1600px; }
.p-cover { position: relative; border-radius: 30px; overflow: hidden; aspect-ratio: 16 / 9; max-height: 86vh; width: 100%; background: var(--surface); transform-origin: 50% 100%; will-change: transform; box-shadow: 0 60px 140px -40px rgba(6, 0, 228, .6); }
.p-cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); will-change: transform; }
.p-cover.is-tall { aspect-ratio: 4 / 3; }
.p-body { padding-top: var(--section); }
.blk + .blk { margin-top: clamp(56px, 8vw, 120px); }
.blk-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px clamp(40px, 6vw, 96px); }
.blk-text h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem); font-weight: 400; font-stretch: 115%; letter-spacing: -0.03em; line-height: 1.1; }
.blk-text p { color: var(--muted); max-width: 62ch; }
.blk-text p:first-child { color: var(--text); font-size: 1.15em; }
.blk-text p + p { margin-top: 16px; }
.shots { display: grid; gap: clamp(14px, 2vw, 28px); perspective: 1400px; }
.shots.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shot { position: relative; border-radius: 22px; overflow: hidden; background: var(--surface); cursor: zoom-in; transform-origin: 50% 50%; will-change: transform; transform-style: preserve-3d; }
.shot img { width: 100%; height: auto; transition: transform 1s var(--ease-out); }
.shot:hover img { transform: scale(1.03); }
.shot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); pointer-events: none; }
.shots.n2 .shot img, .shots.n3 .shot img { height: 100%; object-fit: cover; }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.highlight { padding: clamp(22px, 2.6vw, 36px); border-radius: 22px; background: linear-gradient(180deg, var(--surface), rgba(16, 16, 44, .4)); border: 1px solid var(--line); position: relative; overflow: hidden; }
.highlight::before { content: ""; position: absolute; inset: auto -30% -60% auto; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(6, 0, 228, .45), transparent); }
.highlight h3 { font-size: 1.3rem; font-weight: 500; font-stretch: 112%; margin-bottom: 10px; position: relative; }
.highlight p { color: var(--muted); position: relative; }
.process { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 2.2fr); align-items: center; gap: clamp(16px, 2vw, 28px); }
.process-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.process-in .shot { border-radius: 14px; aspect-ratio: 9 / 14; }
.process-in .shot img { height: 100%; object-fit: cover; }
.process-beam { position: relative; height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--lime), var(--accent-soft)); border-radius: 2px; overflow: visible; }
.process-beam::after { content: ""; position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 18px var(--lime); animation: beam 2.2s var(--ease-out) infinite; }
@keyframes beam { from { left: 0; opacity: 0; } 15% { opacity: 1; } to { left: 100%; opacity: 0; } }
.process-beam span { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); font-family: var(--mono); font-size: .75rem; color: var(--lime); white-space: nowrap; }
.process-label { margin-bottom: 20px; color: var(--muted); }
.process-cap { display: flex; justify-content: space-between; margin-top: 12px; font-size: .88rem; color: var(--muted); }
.pairs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.pair { position: relative; }
.pair .shot { aspect-ratio: 3 / 4; }
.pair .shot img { height: 100%; object-fit: cover; }
.pair-ref { position: absolute; z-index: 3; left: -10px; bottom: 54px; width: 44%; padding: 7px 7px 26px; background: #f4f4f8; border-radius: 6px; transform: rotate(-6deg); box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .7); transition: transform .6s var(--ease-out), width .6s var(--ease-out); cursor: zoom-in; }
.pair-ref img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.pair-ref span { position: absolute; left: 9px; bottom: 5px; font-size: .7rem; color: #444; font-family: var(--mono); }
.pair:hover .pair-ref { transform: rotate(-2deg) translateY(-6px); width: 52%; }
.pair figcaption { margin-top: 12px; font-size: .95rem; color: var(--muted); }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden; background: #000; }
.video button { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; background: #000; }
.video button img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .4s, transform 1s var(--ease-out); }
.video button:hover img { opacity: 1; transform: scale(1.03); }
.video .play-badge { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; box-shadow: 0 10px 40px -6px rgba(6, 0, 228, .9); }
.video .play-badge svg { width: 20px; margin-left: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.p-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: var(--section); padding-block: 36px; border-block: 1px solid var(--line); }
.p-cta p { font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem); }
.next { padding-top: var(--section); }
.next-label { color: var(--muted); margin-bottom: 18px; }
.next-card { position: relative; display: block; height: clamp(360px, 70vh, 720px); border-radius: 30px; overflow: hidden; text-decoration: none; isolation: isolate; }
.next-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.2); will-change: transform; }
.next-card::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(6, 6, 26, .2), rgba(6, 6, 26, .88)); }
.next-card div { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: clamp(22px, 3vw, 44px); display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.next-card h2 { font-weight: 300; font-stretch: 122%; font-size: clamp(2rem, 1rem + 4.4vw, 5.6rem); line-height: 1; letter-spacing: -0.04em; max-width: 16ch; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; background: rgba(4, 4, 16, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 14px; box-shadow: 0 40px 120px -20px rgba(6, 0, 228, .6); }
.lb-btn { position: absolute; min-width: 48px; height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(6, 6, 26, .7); color: var(--text); cursor: pointer; font-size: .95rem; }
.lb-btn:hover { border-color: var(--lime); color: var(--lime); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

/* Showreel dialog */
.reel { width: min(1100px, 92vw); max-width: none; padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.reel::backdrop { background: rgba(4, 4, 16, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.reel-frame { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 40px 120px -20px rgba(6, 0, 228, .7); }
.reel-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.reel-close { position: absolute; top: -56px; right: 0; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(6, 6, 26, .7); cursor: pointer; }
.reel-close:hover { border-color: var(--lime); color: var(--lime); }

/* Page transition */
.transition { position: fixed; inset: 0; z-index: 180; pointer-events: none; display: grid; place-items: center; background: var(--accent); transform: translateY(0); }
.transition svg { width: 96px; }
.transition svg path { fill: #fff; }
.transition.is-hidden { transform: translateY(-101%); }
html:not(.js) .transition { display: none; }

/* Custom cursor */
.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; opacity: 0; transition: opacity .3s; }
.cursor.is-visible .cursor-dot, .cursor.is-visible .cursor-ring { opacity: 1; }
.cursor-dot { width: 7px; height: 7px; background: var(--lime); }
.cursor-ring { width: 38px; height: 38px; border: 1px solid rgba(238, 238, 248, .55); display: grid; place-items: center; transition: opacity .3s, width .45s var(--ease-out), height .45s var(--ease-out), background-color .35s, border-color .35s; }
.cursor.is-hover .cursor-ring { width: 62px; height: 62px; border-color: var(--lime); }
.cursor.has-label .cursor-ring { width: 92px; height: 92px; background: var(--lime); border-color: var(--lime); }
.cursor.has-label .cursor-dot { opacity: 0; }
.cursor-label { font-size: .85rem; font-weight: 600; color: var(--bg); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cursor.has-label .cursor-label { opacity: 1; }

/* Motion-only initial states (removed if scripts fail) */
.motion [data-reveal] { opacity: 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .about-grid, .p-intro, .blk-text { grid-template-columns: 1fr; }
  .portrait-wrap { position: static; display: flex; align-items: flex-end; gap: 20px; }
  .portrait { width: 150px; flex: none; }
  .role { grid-template-columns: 1fr; gap: 2px; }
  .archive-row { grid-template-columns: 76px minmax(0, 1fr) 36px; }
  .archive-row .d { display: none; }
  .archive-row .y { grid-column: 2; grid-row: 2; font-size: .9rem; }
  .archive-row h3 { grid-column: 2; }
  .archive-row .arrow { grid-column: 3; grid-row: 1 / span 2; }
  .archive-thumb { display: block; grid-row: 1 / span 2; width: 76px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
  .archive-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .highlights { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .process-beam { height: 60px; width: 2px; margin-inline: auto; background: linear-gradient(var(--line-strong), var(--lime), var(--accent-soft)); }
  .process-beam::after { left: 50%; top: 0; margin: 0 0 0 -5px; animation-name: beam-v; }
  @keyframes beam-v { from { top: 0; opacity: 0; } 15% { opacity: 1; } to { top: 100%; opacity: 0; } }
  .process-beam span { top: 50%; left: 18px; transform: translateY(-50%); }
  .pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .header-clock { display: none; }
  .brand span { display: none; }
  .site-nav ul { gap: 18px; }
  .hero { height: 170vh; }
  .hero-name { font-size: min(15.5vw, 5rem); }
  .hero-row { gap: 18px; }
  .prompt { padding-left: 14px; }
  .prompt .btn { padding: 0 14px; }
  .scroll-cue { display: none; }
  .stack-item { top: calc(var(--header-h) + 8px + var(--i, 0) * 8px); height: calc(100svh - var(--header-h) - 28px); min-height: 420px; }
  .stack-card { border-radius: 22px; }
  .stack-bottom { grid-template-columns: 1fr; }
  .stack-open { position: absolute; right: 20px; top: -70px; width: 64px; }
  .shots.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots.n3 .shot:first-child { grid-column: span 2; }
  .pairs { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; }
  .p-meta { grid-template-columns: 1fr 1fr; }
  .p-cover { aspect-ratio: 4 / 5; border-radius: 22px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-count { bottom: 28px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .grain { display: none; }
  .hero { height: auto; }
  .hero-stage { position: relative; }
  .transition { display: none; }
}
