/* Portfolio v2. One dark field; sections scroll over a live particle canvas.
   Palette: near-black ground, warm off-white, and one signal amber. */
@font-face {
  font-family: "Anek Latin";
  src: url("../fonts/anek-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Anek Tamil";
  src: url("../fonts/anek-tamil-subset.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 125%;
  font-display: swap;
  unicode-range: U+0B80-0BFF;
}
@font-face {
  font-family: "Martian Mono";
  src: url("../fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --bg: #0c0c0b;
  --fg: #edeae3;
  --soft: #cfcbc2;
  --muted: #8e8b84;
  --line: #262624;
  --amber: #ffb547;
  --ink-on-amber: #14120e;
  --display: "Anek Latin", "Arial Narrow", Arial, sans-serif;
  --tamil: "Anek Tamil", "Nirmala UI", Latha, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3vw, 40px);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-swap: cubic-bezier(0.7, 0, 0.2, 1);
  color-scheme: dark;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
* { box-sizing: border-box; }
html { background: var(--bg); }
html:not(.motion) { scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 18px/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--amber); color: var(--ink-on-amber); }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-style: normal; }
img { display: block; max-width: 100%; height: auto; }
.mono { font: 400 12px/1.7 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.accent, .hl { color: var(--amber); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: var(--gutter); top: 12px; z-index: 200; padding: 10px 16px; background: var(--amber); color: var(--ink-on-amber); transform: translateY(-160%); }
.skip:focus { transform: none; }

/* Layers */
#field { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, footer { position: relative; z-index: 1; }
.grain {
  position: fixed; inset: -50%; z-index: 70; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.motion .grain { animation: grain 0.9s steps(4) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); } }

/* Loader (home, first visit) */
.loader { display: none; }
.motion .loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(28px + env(safe-area-inset-top, 0px)) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  animation: failsafe 0s linear 8s forwards;
}
.skip-loader .loader { display: none; }
.loader .count { font: 700 clamp(96px, 20vw, 300px)/0.8 var(--display); font-stretch: 75%; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.loader .bar { height: 1px; background: var(--line); margin-top: 18px; }
.loader .bar i { display: block; height: 100%; width: 0; background: var(--amber); }
.loader-row { display: flex; justify-content: space-between; gap: 16px; }
.loader { cursor: pointer; }
@keyframes failsafe { to { visibility: hidden; } }

/* Page transition curtain */
.curtain {
  position: fixed; inset: 0; z-index: 95; background: var(--bg); clip-path: inset(100% 0% 0% 0%);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 18px;
  padding: var(--gutter) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--amber);
}
.pt-in .curtain { clip-path: inset(0% 0% 0% 0%); animation: lift 0s linear 6s forwards; }
@keyframes lift { to { clip-path: inset(0% 0% 100% 0%); } }
.curtain-title { font: 700 clamp(56px, 11vw, 200px)/0.84 var(--display); font-stretch: 75%; letter-spacing: -0.02em; overflow-wrap: anywhere; }

/* Header */
.hdr {
  position: fixed; z-index: 20; left: 0; right: 0; top: 0;
  padding: calc(20px + env(safe-area-inset-top, 0px)) var(--gutter) 20px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  color: #fff; mix-blend-mode: difference;
}
.hdr { transition: transform 0.5s var(--ease-swap); }
.hdr.is-hidden { transform: translateY(-110%); }
.hdr .brand { display: flex; gap: 10px; align-items: baseline; }
.hdr .brand b { font: 600 15px/1 var(--display); letter-spacing: 0; text-transform: none; }
.hdr .brand span { font: 500 14px/1 var(--tamil); }
.hdr nav { display: flex; gap: 28px; }
.hdr nav a, .ulink { position: relative; padding: 6px 0; }
.hdr nav a::after, .ulink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-swap); }
.hdr nav a:hover::after, .ulink:hover::after, .hdr nav a[aria-current]::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; justify-self: end; min-height: 44px; padding: 0 4px; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.menu { position: fixed; inset: 0; z-index: 19; background: var(--bg); display: flex; flex-direction: column; justify-content: flex-end; gap: 36px; padding: 96px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); }
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 4px; }
.menu nav a { font: 700 clamp(48px, 15vw, 96px)/0.95 var(--display); font-stretch: 75%; letter-spacing: -0.02em; }
.menu nav a:active { color: var(--amber); }
.menu .menu-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hdr .clock { justify-self: end; font-variant-numeric: tabular-nums; }
html:not(.js) .clock, html:not(.js) [data-clock] { visibility: hidden; }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 21; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left; }

/* Word reveals */
.wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.wi { display: inline-block; will-change: transform; }

/* Hero (home and project pages) */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--gutter) 28px; }
.name-slot { position: absolute; left: var(--gutter); right: var(--gutter); top: 17vh; height: min(19vw, 34vh); }
.hero-name { position: absolute; left: var(--gutter); right: var(--gutter); top: 17vh; font: 800 clamp(64px, 16vw, 300px)/0.82 var(--display); font-stretch: 75%; letter-spacing: -0.02em; text-transform: uppercase; overflow-wrap: anywhere; }
.motion:not(.no-gl) .hero-name { opacity: 0; }
.hero-foot { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: end; border-top: 1px solid var(--line); padding-top: 22px; }
.hero-meta { display: grid; gap: 4px; }
.hero-meta b { color: var(--fg); font-weight: 500; }
/* Shown to mouse users until they have tried holding once. */
.hold-hint { display: none; align-items: center; gap: 10px; margin-top: 14px; color: var(--soft); }
.has-cursor:not(.no-gl) .hold-hint:not(.done) { display: flex; }
.hold-hint i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(255, 181, 71, 0.5); animation: hold-ping 2.4s var(--ease-out) infinite; }
@keyframes hold-ping { 0% { box-shadow: 0 0 0 0 rgba(255, 181, 71, 0.5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(255, 181, 71, 0); } }
.holding, .holding * { user-select: none; -webkit-user-select: none; }
.tagline { font: 500 clamp(30px, 4vw, 64px)/1 var(--display); font-stretch: 87.5%; letter-spacing: -0.025em; text-wrap: balance; }
.tagline em { color: var(--amber); }
.hero .actions { margin-top: 26px; }
.scroll-cue { display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.scroll-cue i { display: block; width: 64px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--amber); animation: cue 2.2s var(--ease-swap) infinite; }
@keyframes cue { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }

/* Statement */
.statement { position: relative; }
.statement .sticky { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 16vh var(--gutter); }
.motion .statement { height: 200vh; }
.motion .statement .sticky { position: sticky; top: 0; height: 100svh; padding-block: 0; }
.statement p { font: 500 clamp(32px, 5vw, 84px)/1.02 var(--display); font-stretch: 87.5%; letter-spacing: -0.03em; max-width: 21ch; }
/* A soft shadow in the page colour keeps the words readable where the glowing wave passes behind them. */
.motion .statement p { text-shadow: 0 0 22px var(--bg), 0 0 6px var(--bg); }
.statement .w { opacity: 0.2; }
.statement .w.hl { color: var(--amber); }

/* Numbers */
.numbers { padding: 16vh var(--gutter); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.num { border-top: 1px solid var(--line); padding: 20px 20px 0 0; }
.num b { display: block; font: 700 clamp(64px, 8.5vw, 150px)/0.85 var(--display); font-stretch: 75%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.num span { display: block; margin-top: 16px; }

/* Featured case study */
.st-head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: end; padding: 16vh var(--gutter) 6vh; }
.big-title { font: 700 clamp(64px, 10vw, 180px)/0.8 var(--display); font-stretch: 75%; letter-spacing: -0.02em; }
.st-head p { max-width: 46ch; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips li { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; }
.lane { position: relative; }
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5vw; }
.rail { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.rail i { position: absolute; inset: 0; background: var(--amber); transform: scaleX(0); transform-origin: left; }
html:not(.motion) .rail i { transform: none; }
.stage { position: relative; z-index: 2; border: 1px solid var(--line); background: rgba(12, 12, 11, 0.86); padding: 18px; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; transition: border-color 0.4s; }
.stage::before { content: ""; position: absolute; left: 50%; top: -71px; width: 1px; height: 70px; background: var(--line); transition: background 0.4s; }
.stage b { font: 600 clamp(20px, 2vw, 30px)/1.05 var(--display); font-stretch: 87.5%; }
.stage.on { border-color: var(--amber); }
.stage.on::before { background: var(--amber); }
.stage.on .mono { color: var(--amber); }
/* Its four chapters. Without motion or WebGL they read as a plain list; with them, scrolling plays one at a time
   beside the particles while the scene stays in place. */
.st-scene { padding: 6vh var(--gutter) 12vh; }
.chapters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.chapter { border-top: 1px solid var(--line); padding-top: 18px; }
.chapter span { color: var(--amber); }
.chapter b { display: block; margin-top: 14px; font: 700 clamp(32px, 3.4vw, 60px)/0.9 var(--display); font-stretch: 75%; letter-spacing: -0.02em; text-wrap: balance; }
.chapter p { margin-top: 18px; max-width: 30ch; color: var(--soft); }
.st-steps, .st-visual { display: none; }
.motion:not(.no-gl) .st-scroll { height: 420vh; }
.motion:not(.no-gl) .st-scene { position: sticky; top: 0; height: 100svh; padding-block: 12vh 10vh; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.6fr); gap: 5vw; align-items: center; }
.motion:not(.no-gl) .chapters { grid-template-columns: 1fr; }
.motion:not(.no-gl) .chapter { grid-area: 1 / 1; border: 0; padding: 0; opacity: 0; transform: translateY(28px); transition: opacity 0.45s, transform 0.8s var(--ease-out); }
.motion:not(.no-gl) .chapter b { font-size: clamp(44px, 5.2vw, 96px); }
.motion:not(.no-gl) .chapter.on { opacity: 1; transform: none; transition-delay: 0.12s; }
.motion:not(.no-gl) .st-steps { display: flex; gap: 6px; margin-top: 44px; max-width: 220px; }
.st-steps i { flex: 1; height: 2px; background: var(--line); transition: background 0.4s; }
.st-steps i.on { background: var(--amber); }
.motion:not(.no-gl) .st-visual { display: block; position: relative; height: 72svh; }
.st-label { position: absolute; left: var(--x); top: var(--y); transform: translate(var(--ax), -100%); padding-bottom: 10px; white-space: nowrap; color: var(--soft); opacity: 0; transition: opacity 0.5s; }
.st-visual[data-stage="2"] [data-at="2"], .st-visual[data-stage="3"] [data-at="3"] { opacity: 1; }

/* Selected work */
.work { position: relative; }
.work-track { display: flex; flex-direction: column; }
.panel { position: relative; border-top: 1px solid var(--line); padding: 48px var(--gutter); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.panel.intro { border-top: 0; }
.panel .glyph { position: absolute; right: 6%; top: 12%; width: 44%; height: 34%; pointer-events: none; }
.panel h3 { font: 700 clamp(48px, 6.2vw, 112px)/0.86 var(--display); font-stretch: 75%; letter-spacing: -0.02em; transition: font-stretch 0.7s var(--ease-out), color 0.3s; }
.panel:hover h3, .panel:focus-within h3, .panel.is-live h3 { font-stretch: 96%; color: var(--amber); }
.panel p { max-width: 38ch; color: var(--soft); margin-top: 18px; }
.panel .links { display: flex; flex-wrap: wrap; gap: 24px; }
.panel .links a { border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color 0.3s, color 0.3s; }
.panel .links a:hover { border-color: var(--amber); color: var(--amber); }
.work.hscroll { overflow: hidden; }
.hscroll .work-track { flex-direction: row; height: 100svh; will-change: transform; }
.hscroll .panel { flex: 0 0 auto; width: min(46vw, 700px); overflow: hidden; border-top: 0; border-left: 1px solid var(--line); padding: 16vh 40px 9vh; cursor: pointer; }
.hscroll .panel.intro { width: min(44vw, 620px); border-left: 0; padding-left: var(--gutter); cursor: auto; }
.work-progress, .work-count, .work:not(.hscroll) .h-hint { display: none; }
.hscroll .work-count { display: block; position: absolute; right: var(--gutter); bottom: 48px; font-variant-numeric: tabular-nums; }
.h-hint a { border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.h-hint a:hover { color: var(--amber); border-color: var(--amber); }
.hscroll .work-progress { display: block; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 32px; height: 1px; background: var(--line); }
.work-progress i { display: block; height: 100%; background: var(--amber); transform: scaleX(0); transform-origin: left; }

/* Skills ticker */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 3vh 0; white-space: nowrap; }
.mq-row { display: inline-flex; font: 700 clamp(56px, 9vw, 150px)/1 var(--display); font-stretch: 125%; letter-spacing: -0.02em; color: transparent; -webkit-text-stroke: 1px rgba(237, 234, 227, 0.4); }
.mq-row span { padding-right: 0.5em; }
.mq-row span:nth-child(3n) { color: var(--amber); -webkit-text-stroke: 0; }

/* Experience */
.exp { padding: 18vh var(--gutter); }
.section-label { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.row { position: relative; isolation: isolate; display: grid; grid-template-columns: 200px 1.2fr 1fr; gap: 28px; align-items: baseline; padding: 30px 0; border-top: 1px solid var(--line); transition: color 0.4s; }
.row:last-child { border-bottom: 1px solid var(--line); }
.row::before { content: ""; position: absolute; inset: 0 calc(-1 * var(--gutter)); background: var(--amber); transform: scaleY(0); transform-origin: bottom; transition: transform 0.55s var(--ease-swap); z-index: -1; }
.row:hover { color: var(--ink-on-amber); }
.row:hover::before { transform: scaleY(1); }
.row:hover .muted, .row:hover .mono { color: var(--ink-on-amber); }
.row h3 { font: 600 clamp(28px, 3.4vw, 54px)/1 var(--display); font-stretch: 87.5%; letter-spacing: -0.02em; }
.row p { opacity: 0.85; }

/* About */
.about { min-height: 100svh; display: grid; grid-template-columns: 1fr 0.9fr; gap: 6vw; align-items: center; padding: 16vh var(--gutter); }
.about h2 { font: 700 clamp(56px, 7.5vw, 132px)/0.84 var(--display); font-stretch: 75%; letter-spacing: -0.02em; margin: 18px 0 32px; }
.about .body { max-width: 50ch; color: #d8d4cb; font-size: 20px; }
.about .body p + p { margin-top: 18px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 22px; }
.facts, .facts dd { margin: 0; }
.facts b { display: block; font: 500 20px/1.2 var(--display); color: var(--fg); margin-top: 6px; text-transform: none; letter-spacing: 0; }
.portrait-slot { position: relative; width: 100%; max-width: 560px; aspect-ratio: 4 / 5; justify-self: end; }
.portrait-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; transition: opacity 0.9s ease; }
.motion:not(.no-gl) .portrait-slot img { opacity: 0; }
.motion .portrait-slot.denoised img { opacity: 1; }
.portrait-slot .hint { position: absolute; left: 0; bottom: -34px; }
html:not(.motion) .portrait-slot .hint, .no-gl .portrait-slot .hint { display: none; }

/* Contact */
.contact { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 9vh; padding: 16vh var(--gutter) 0; }
.hello-slot { position: relative; height: 34vh; }
.hello-word { font: 700 clamp(72px, 15vw, 260px)/1 var(--tamil); color: var(--amber); }
.motion:not(.no-gl) .hello-word { position: absolute; opacity: 0; }
.mail { display: inline-block; font: 700 clamp(34px, 7.2vw, 132px)/0.9 var(--display); font-stretch: 75%; letter-spacing: -0.02em; transition: font-stretch 0.7s var(--ease-out), color 0.3s; overflow-wrap: anywhere; }
.mail:hover { font-stretch: 95%; color: var(--amber); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 1px solid var(--line); border-radius: 99px; background: none; color: var(--fg); font: 400 11px/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.pill:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill.primary { background: var(--amber); border-color: var(--amber); color: var(--ink-on-amber); }

/* Project pages */
.p-hero .name-slot { height: min(24vw, 40vh); }
.p-hero .hero-name { font-size: clamp(56px, 11vw, 200px); }
.p-foot { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 40px; align-items: end; border-top: 1px solid var(--line); padding-top: 22px; }
.p-foot .tagline { font-size: clamp(26px, 3vw, 46px); }
.p-section { display: grid; grid-template-columns: 1fr 2.2fr; gap: 48px; padding: 16vh var(--gutter); border-top: 1px solid var(--line); }
.p-section > .mono, .p-side > .mono { padding-top: 10px; }
.p-side { display: grid; align-content: start; gap: 44px; }
.emblem-slot { width: min(100%, 280px); aspect-ratio: 1; }
html:not(.motion) .emblem-slot, .no-gl .emblem-slot { display: none; }
.lead { font: 500 clamp(28px, 3.6vw, 60px)/1.06 var(--display); font-stretch: 87.5%; letter-spacing: -0.025em; max-width: 26ch; }
.steps { position: relative; display: grid; grid-template-rows: 90px auto; }
.steps .stages { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3vw; }
.steps .stage::before { top: -46px; height: 45px; }
.steps .stage b { font-size: clamp(20px, 1.8vw, 28px); }
.stack { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.stack li { font: 600 clamp(24px, 2.8vw, 44px)/1.1 var(--display); font-stretch: 87.5%; letter-spacing: -0.02em; }
.stack li:not(:last-child)::after { content: " /"; color: var(--muted); }
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.glance dt { margin-bottom: 8px; }
.glance dd { margin: 0; font: 500 clamp(20px, 1.8vw, 26px)/1.25 var(--display); color: var(--fg); }
.glance dd a { border-bottom: 1px solid var(--line); }
.glance dd a:hover { color: var(--amber); border-color: var(--amber); }
.pn { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.pn .next { border-top: 0; }
.pn .next + .next { border-left: 1px solid var(--line); text-align: right; }
.pn .big-title { font-size: clamp(40px, 6vw, 110px); }
.next { display: block; padding: 14vh var(--gutter); border-top: 1px solid var(--line); }
.next .big-title { display: block; margin-top: 18px; transition: font-stretch 0.8s var(--ease-out), color 0.3s; }
.next:hover .big-title { font-stretch: 100%; color: var(--amber); }

/* Footer */
footer { border-top: 1px solid var(--line); margin-top: 10vh; overflow: hidden; }
.big-name { display: block; padding: 6vh var(--gutter) 0; font: 800 clamp(64px, 15.6vw, 290px)/0.8 var(--display); font-stretch: 75%; letter-spacing: -0.02em; white-space: nowrap; color: var(--fg); }
.big-name .bn span { --w: 75; font-stretch: calc(var(--w) * 1%); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding: 7vh var(--gutter) 5vh; border-top: 1px solid var(--line); margin-top: 6vh; }
.foot-grid h2 { margin-bottom: 14px; }
.foot-grid ul { display: grid; gap: 6px; }
.foot-grid li a, .foot-mail { font: 500 20px/1.3 var(--display); color: var(--fg); }
.foot-grid li a:hover, .foot-mail:hover { color: var(--amber); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.motion-toggle { background: none; border: 1px solid var(--line); border-radius: 99px; min-height: 36px; padding: 0 14px; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.motion-toggle:hover { border-color: var(--fg); color: var(--fg); }

/* Cursor */
.cursor, .ring { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; border-radius: 50%; display: none; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor .cursor { display: block; }
.has-cursor .ring { display: grid; }
.cursor { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; mix-blend-mode: difference; }
.ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid #fff; mix-blend-mode: difference; place-items: center; font: 500 9px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-on-amber); transition: width 0.35s, height 0.35s, margin 0.35s, background 0.35s, border-color 0.35s; }
.ring.link { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
.ring.view { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: var(--amber); border-color: var(--amber); mix-blend-mode: normal; }
.ring.hold { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--amber); border-color: var(--amber); mix-blend-mode: normal; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .hdr { grid-template-columns: 1fr auto; }
  .hdr nav, .hide-sm { display: none; }
  html:not(.js) .hdr nav { display: flex; flex-wrap: wrap; gap: 4px 16px; grid-column: 1 / -1; }
  .js .menu-btn { display: block; }
  .hdr .clock { display: none; }
  .glance { grid-template-columns: 1fr; }
  .pn { grid-template-columns: 1fr; }
  .pn .next + .next { border-left: 0; border-top: 1px solid var(--line); text-align: left; }
  .foot-grid { grid-template-columns: 1fr; }
  .name-slot, .hero-name { top: 14vh; }
  .name-slot { height: 74vw; }
  .p-hero .name-slot { height: 84vw; }
  .hero-foot, .p-foot { grid-template-columns: 1fr; gap: 20px; }
  .motion .statement { height: 170vh; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .st-head { grid-template-columns: 1fr; gap: 20px; padding: 12vh var(--gutter) 4vh; }
  .chapters { grid-template-columns: 1fr; }
  .motion:not(.no-gl) .st-scene { grid-template-columns: 1fr; gap: 22px; }
  .motion:not(.no-gl) .st-scroll { height: 340vh; }
  .motion:not(.no-gl) .st-scene { grid-template-rows: auto minmax(0, 1fr); align-content: stretch; padding-block: 84px 28px; }
  .motion:not(.no-gl) .st-steps { margin-top: 24px; }
  .motion:not(.no-gl) .st-visual { height: 100%; }
  .chapter b, .motion:not(.no-gl) .chapter b { font-size: clamp(40px, 12vw, 64px); margin-top: 10px; }
  .chapter p { margin-top: 12px; }
  .steps { grid-template-rows: auto; }
  .stages, .steps .stages { grid-template-columns: 1fr; gap: 12px; }
  .lane, .stage::before { display: none; }
  .stage { min-height: 0; }
  .panel .glyph { position: relative; right: auto; top: auto; width: 100%; height: 150px; margin-bottom: -8px; }
  html:not(.motion) .panel .glyph, .no-gl .panel .glyph { display: none; }
  .emblem-slot { width: 150px; }
  .p-side { gap: 28px; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .about { grid-template-columns: 1fr; }
  .portrait-slot { justify-self: stretch; }
  .facts { grid-template-columns: 1fr; }
  .hello-slot { height: 24vw; }
  .p-section { grid-template-columns: 1fr; gap: 20px; padding-block: 10vh; }
  .foot-row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue i::after, .grain { animation: none; }
}
