/* ==========================================================================
   Ayush Singh — portfolio. Dark editorial mono. Mobile-first.
   Sections: tokens · base · nav · hero · impact · work · experience ·
             stack · music · contact · footer · motion
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  --bg: #0B0B0C; --surface: #141416; --surface-2: #1B1B1E;
  --line: rgba(237,237,233,.10); --line-2: rgba(237,237,233,.18);
  --text: #EDEDE9; --muted: #9A9A93; /* >= 4.5:1 on --bg */
  --accent: #FF5A36; --warm: #F2B880;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --nav-h: 64px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--sans); overflow-x: clip;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }
/* film grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.2 -.1'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
img, canvas, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; max-width: 68ch; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul, ol, dl { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 4px; }
em { font-style: italic; }
.mono { font-family: var(--mono); letter-spacing: .08em; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--accent); color: #000; padding: 10px 14px; font: 500 .8rem var(--mono); transition: top .2s; }
.skip:focus { top: 12px; }

.eyebrow { font-size: .75rem; text-transform: uppercase; color: var(--muted); margin: 0 0 1.1rem; }
.eyebrow b { color: var(--accent); font-weight: 500; }
.title { font: 400 clamp(2.6rem, 8vw, 5.5rem)/.98 var(--serif); letter-spacing: -.02em; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.title em, .contact__big em { color: var(--accent); }
.section { padding-block: clamp(4.5rem, 11vw, 9rem); border-top: 1px solid var(--line); position: relative; }
.label { font-size: .72rem; text-transform: uppercase; color: var(--muted); margin: 2rem 0 .8rem; font-weight: 400; }
.meta { font-size: .72rem; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; }

/* buttons & links */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px; font: 500 .9rem var(--sans); transition: background .25s, color .25s, border-color .25s; cursor: pointer; }
.btn--accent { background: var(--accent); color: #0B0B0C; }
.btn--accent:hover { background: var(--text); }
.btn--outline { border-color: var(--line-2); color: var(--text); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { min-height: 44px; padding: 0 16px; font-size: .8rem; border-color: var(--accent); color: var(--accent); }
.btn--sm:hover { background: var(--accent); color: #0B0B0C; }
.link-u { position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 6px; font-weight: 500; }
.link-u::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 11px; height: 1px; background: var(--accent); transform: scaleX(.25); transform-origin: left; transition: transform .35s; }
.link-u:hover::after { transform: scaleX(1); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled, body.is-locked .nav { background: rgba(11,11,12,.85); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; max-width: calc(var(--max) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
.nav__brand { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.nav__mono { font: italic 1.35rem/1 var(--serif); color: var(--accent); border: 1px solid var(--line-2); border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center; }
.nav__name { font-size: .9rem; font-weight: 500; }
.nav__links { display: none; align-items: center; gap: 4px; }
.nav__links a:not(.btn) { position: relative; padding: 10px 12px; font-size: .88rem; color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:not(.btn):hover::after, .nav__links a.is-active::after { transform: scaleX(1); }
.nav__links .btn { margin-left: 10px; }
.nav__toggle { width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; color: var(--text); margin-right: -10px; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 1.5px; background: currentColor; transition: transform .3s, top .3s; }
.nav__toggle span:first-child { top: 18px; } .nav__toggle span:last-child { top: 26px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; align-items: center; padding: var(--nav-h) var(--pad) 40px; overflow-y: auto; }
.menu[hidden] { display: none; }
.menu__nav { display: flex; flex-direction: column; width: 100%; }
.menu__nav a { font: 400 clamp(2.4rem, 11vw, 3.6rem)/1.15 var(--serif); padding: 6px 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 14px; min-height: 56px; }
.menu__nav a i { font: 400 .75rem var(--mono); color: var(--accent); font-style: normal; }
.menu__nav a:hover { color: var(--accent); }
.menu__nav .menu__resume { font: 500 .85rem var(--mono); letter-spacing: .08em; text-transform: uppercase; border: 0; color: var(--accent); margin-top: 18px; }

/* ---------- hero ---------- */
.hero { padding-top: var(--nav-h); }
.hero__grid { display: grid; gap: 28px; padding-bottom: clamp(2.5rem, 6vw, 5rem); }
.hero__photo { margin: 0 calc(var(--pad) * -1); position: relative; aspect-ratio: 4/5; background: var(--surface); overflow: hidden; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; filter: grayscale(1) contrast(1.05); }
.hero__photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 35%; background: linear-gradient(to top, var(--bg), transparent); }
.hero__caption { position: absolute; z-index: 2; left: var(--pad); bottom: 14px; font-size: .68rem; color: var(--text); padding-left: 22px; }
.hero__caption::before { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1px; background: var(--accent); }
.hero__text { position: relative; z-index: 2; margin-top: 4px; }
.hero__name { font: 400 clamp(3.5rem, 19vw, 9rem)/.9 var(--serif); letter-spacing: -.035em; margin: 0 0 .25em; white-space: nowrap; }
.hero__lead { font: italic 400 clamp(1.5rem, 3.6vw, 2.3rem)/1.22 var(--serif); max-width: 24ch; margin-bottom: 1.1rem; }
.hero__sub { color: var(--muted); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 1.6rem 0 1.8rem; }
.chip-status { display: inline-flex; align-items: center; gap: 10px; font-size: .72rem; text-transform: uppercase; border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 16px; margin: 0; max-width: 100%; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- impact ---------- */
.impact { border-top: 1px solid var(--line); }
.impact__grid { display: grid; grid-template-columns: 1fr 1fr; }
.stat { padding: 28px 16px 28px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.stat:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--line); padding-right: 0; }
.stat:last-child { grid-column: 1 / -1; border-bottom: 0; padding-left: 0; border-left: 0; }
.stat__n { font: 400 clamp(2.6rem, 11vw, 4.4rem)/1 var(--serif); letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__c { font-size: .68rem; text-transform: uppercase; color: var(--muted); line-height: 1.5; letter-spacing: .06em; }

/* ---------- work ---------- */
.case { padding: clamp(2rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); }
.case + .case { margin-top: 1rem; }
.case__title { font: 400 clamp(2.4rem, 7vw, 4.6rem)/1 var(--serif); letter-spacing: -.02em; margin-bottom: .5rem; }
.case__one { font: italic 400 clamp(1.25rem, 2.6vw, 1.7rem)/1.3 var(--serif); max-width: 40ch; }
.case__body { display: grid; gap: 28px; margin-top: 1.5rem; min-width: 0; }
.case__body > * { min-width: 0; }
.list li { position: relative; padding-left: 22px; margin-bottom: .6em; }
.list li::before { content: ""; position: absolute; left: 0; top: .82em; width: 10px; height: 2px; background: var(--accent); }
.list--sm { font-size: .95rem; color: var(--muted); }
.decisions { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.decisions > div { background: var(--bg); padding: 18px 18px 16px; }
.decisions dt { font-size: .72rem; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.decisions dd { margin: 0; font-size: .95rem; line-height: 1.55; }
.results { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.6rem 0 0; }
.chip-acc { font-size: .72rem; padding: 7px 12px; border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; background: rgba(255,90,54,.07); letter-spacing: .04em; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 1.2rem 0 0; }
.tags li { font-size: .7rem; padding: 6px 10px; border: 1px solid var(--line-2); color: var(--muted); border-radius: 4px; letter-spacing: .04em; }
.role { border-left: 2px solid var(--accent); background: var(--surface); padding: 6px 20px 8px; margin-top: 2rem; }
.role .label { margin-top: .8rem; } .role p { margin-bottom: .6em; }
.flow { counter-reset: s; border-left: 1px solid var(--line-2); margin-left: 6px; }
.flow li { counter-increment: s; position: relative; padding: 0 0 22px 28px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .95rem; }
.flow li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.flow b { font-weight: 500; font-size: .8rem; text-transform: uppercase; color: var(--text); }
.flow b::before { content: counter(s, decimal-leading-zero) "  "; color: var(--accent); white-space: pre; }
.cards { display: grid; gap: 20px; margin-top: clamp(2rem, 5vw, 3.5rem); }
.card { background: var(--surface); border: 1px solid var(--line); padding: clamp(22px, 4vw, 36px); transition: border-color .3s; }
.card:hover { border-color: var(--line-2); }
.card__title { font: 400 clamp(1.6rem, 3.6vw, 2.2rem)/1.1 var(--serif); margin-bottom: .8rem; }
.card__title em { color: var(--muted); }

/* trace demo */
.trace { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; font-size: .78rem; }
.trace__bar { display: flex; align-items: center; gap: 12px; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); min-height: 48px; }
.trace__dots { display: flex; gap: 6px; } .trace__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(237,237,233,.18); }
.trace__title { font-size: .7rem; color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace__replay { background: none; border: 1px solid var(--line-2); color: var(--text); font-size: .68rem; min-height: 44px; padding: 0 12px; border-radius: 6px; cursor: pointer; transition: border-color .2s, color .2s; }
.trace__replay:hover { border-color: var(--accent); color: var(--accent); }
.trace__pipe { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 12px 4px; font-size: .64rem; text-transform: uppercase; }
.trace__pipe li { padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); transition: color .3s, border-color .3s, background .3s; }
.trace__pipe li.is-lit { color: var(--text); border-color: var(--line-2); }
.trace__pipe li.is-you { color: var(--accent); border-color: var(--accent); }
.trace__pipe li.is-you.is-lit { background: var(--accent); color: #0B0B0C; font-weight: 500; }
.trace__log { padding: 10px 12px 6px; }
.trace__log li { display: grid; grid-template-columns: 1.1em 2.9em 3.9em 1fr; gap: 0 8px; padding: 7px 0; line-height: 1.5; letter-spacing: 0; border-bottom: 1px dashed var(--line); transition: opacity .35s, transform .35s; }
.trace__log li:last-child { border: 0; }
.trace__log .g { color: var(--accent); } .trace__log .t { color: var(--muted); } .trace__log .k { color: var(--text); } .trace__log .m { color: #c9c9c3; overflow-wrap: anywhere; min-width: 0; }
.trace__log li.is-pending { opacity: 0; transform: translateY(4px); }
.trace__log li.is-running .g { color: var(--muted); }
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
.trace__cap { padding: 6px 12px 12px; margin: 0; font-size: .64rem; color: var(--muted); }

/* graph demo */
.graph { position: relative; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; padding-bottom: 14px; }
#graphCanvas { width: 100%; height: 320px; touch-action: pan-y; cursor: pointer; }
.graph__info { position: absolute; left: 14px; top: 12px; margin: 0; font-size: .7rem; color: var(--accent); max-width: calc(100% - 120px); letter-spacing: .02em; }
.graph__legend { position: absolute; right: 12px; top: 12px; display: flex; gap: 12px; font-size: .62rem; color: var(--muted); text-transform: uppercase; }
.ln { display: inline-block; width: 16px; border-top: 1.5px solid var(--text); vertical-align: middle; margin-right: 5px; opacity: .6; }
.ln--k { border-top: 1.5px dashed var(--accent); opacity: 1; }
.graph__chips { display: flex; gap: 8px; padding: 0 14px; }
.graph__chips button { min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--line-2); color: var(--muted); font: 500 .75rem var(--mono); letter-spacing: .06em; border-radius: 999px; cursor: pointer; transition: all .2s; }
.graph__chips button:hover { color: var(--text); }
.graph__chips button.is-on { border-color: var(--accent); color: var(--accent); background: rgba(255,90,54,.08); }
.graph__cap { padding: 10px 14px 0; margin: 0; font-size: .9rem; color: var(--muted); min-height: 3.4em; }

/* ---------- experience ---------- */
.timeline { margin-left: 5px; border-left: 1px solid var(--line-2); }
.job { position: relative; padding: 0 0 clamp(2rem, 5vw, 3.2rem) clamp(22px, 4vw, 44px); }
.job::before { content: ""; position: absolute; left: -5px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--accent); }
.job:first-child::before { background: var(--accent); }
.job__head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: .3rem; }
.job__logo { height: 28px; width: auto; max-width: 120px; object-fit: contain; opacity: .9; }
.job__logo--mark { height: 36px; max-width: 40px; opacity: 1; }
.job__co { font: 400 clamp(1.9rem, 4.6vw, 2.8rem)/1.1 var(--serif); }
.job__role { display: flex; flex-wrap: wrap; gap: 2px 16px; align-items: baseline; font-weight: 500; margin-bottom: .6rem; }
.job__role span { font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 400; font-family: var(--mono); letter-spacing: .08em; }
.job__note { color: var(--accent); }
.job__award { font-size: .72rem; color: var(--muted); border-left: 1px solid var(--warm); padding-left: 12px; letter-spacing: .02em; line-height: 1.6; }
.edu { font-size: .75rem; color: var(--muted); text-transform: uppercase; margin-top: 1rem; padding-top: 1.4rem; border-top: 1px solid var(--line); line-height: 1.7; max-width: none; }

/* ---------- stack ---------- */
.stack { display: grid; gap: 2.2rem; }
.stack__heading { font: 400 .75rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.stack__list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 14px 0 11px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .88rem; transition: border-color .25s; }
.pill img { width: 20px; height: 20px; object-fit: contain; opacity: .6; transition: opacity .25s; }
.pill:hover { border-color: var(--accent); } .pill:hover img { opacity: 1; }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 3px 0 7px; }

/* ---------- music ---------- */
.music { --accent: var(--warm); overflow: hidden; }
.music__glow { position: absolute; left: -10%; top: -5%; width: 90%; height: 70%; background: radial-gradient(closest-side, rgba(242,184,128,.18), rgba(242,184,128,.04) 60%, transparent); pointer-events: none; }
.music__top { position: relative; }
.music__title { font: italic 400 clamp(4.2rem, 17vw, 13rem)/.88 var(--serif); letter-spacing: -.035em; margin: 0 0 clamp(1.5rem, 4vw, 3rem); color: var(--warm); }
.music__copy { font-size: clamp(1.02rem, 1.6vw, 1.2rem); max-width: 56ch; color: #cfcfc9; }
.music__copy strong { color: var(--warm); font-weight: 500; }
.strings { position: relative; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
#stringsCanvas { width: 100%; height: 252px; touch-action: pan-y; cursor: crosshair; }
.strings__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .7rem; text-transform: uppercase; color: var(--muted); }
.strings__sound { min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); font: 500 .72rem var(--mono); letter-spacing: .06em; cursor: pointer; transition: all .2s; }
.strings__sound:hover, .strings__sound[aria-pressed="true"] { border-color: var(--warm); color: var(--warm); }
.videos { display: grid; gap: 22px; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.videos:empty { display: none; }
.video { align-self: start; display: block; width: 100%; padding: 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.video__frame { display: block; position: relative; aspect-ratio: 16/9; background: var(--surface); overflow: hidden; border: 1px solid var(--line); transition: border-color .3s; }
.video__frame img, .video__frame iframe { width: 100%; height: 100%; object-fit: cover; border: 0; transition: transform .6s, filter .3s; filter: grayscale(.6) contrast(1.05); }
.video__frame iframe { filter: none; }
.video:hover .video__frame { border-color: var(--warm); } .video:hover img { transform: scale(1.04); filter: none; }
.video__play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(11,11,12,.7); border: 1px solid var(--warm); display: grid; place-items: center; transition: background .25s, transform .25s; }
.video__play::after { content: ""; margin-left: 4px; border-left: 16px solid var(--warm); border-block: 10px solid transparent; }
.video:hover .video__play { background: var(--warm); transform: scale(1.08); } .video:hover .video__play::after { border-left-color: #0B0B0C; }
.video__title { display: block; margin-top: 12px; font: 400 1.25rem/1.25 var(--serif); }
.video-card--playing .video__title { display: none; }
/* Shorts: vertical 9:16 frames. hqdefault is a 4:3 thumb with the vertical video pillarboxed;
   cover on a 9:16 frame crops exactly to the video, so no black bars show. */
.videos__shorts { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); scroll-padding-inline: var(--pad); padding-bottom: 6px; grid-column: 1 / -1; scrollbar-width: none; }
.videos__shorts::-webkit-scrollbar { display: none; }
.video--short { flex: 0 0 62%; max-width: 280px; scroll-snap-align: start; }
.video--short .video__frame { aspect-ratio: 9/16; }
.video--short .video__title { font-size: 1.1rem; }
.video__frame img { display: block; }
.music__cta { margin: clamp(2rem, 5vw, 3rem) 0 0; }
.btn--warm { background: var(--warm); color: #0B0B0C; } .btn--warm:hover { background: var(--text); }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(5rem, 12vw, 10rem); }
.contact__big { font: 400 clamp(3.2rem, 11vw, 9rem)/.95 var(--serif); letter-spacing: -.03em; margin-bottom: 1.5rem; }
.contact__sub { color: var(--muted); font-size: 1.1rem; max-width: 46ch; }
.contact__mail { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin: 2rem 0; max-width: none; }
.mail { display: inline-block; padding-top: 10px; font: 400 clamp(1.35rem, 5.2vw, 3rem)/1.2 var(--serif); overflow-wrap: anywhere; border-bottom: 1px solid var(--accent); padding-bottom: 4px; transition: color .3s; }
.mail:hover { color: var(--accent); }
.copy { min-height: 44px; padding: 0 16px; background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 999px; font-size: .72rem; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.copy:hover, .copy.is-done { border-color: var(--accent); color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: .8rem; text-transform: uppercase; }
.contact__links a { display: inline-flex; align-items: center; min-height: 44px; position: relative; }
.contact__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.contact__links a:hover { color: var(--accent); } .contact__links a:hover::after { transform: scaleX(1); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; font-size: .68rem; color: var(--muted); text-transform: uppercase; line-height: 1.7; }
.footer p { margin: 0; max-width: none; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; } .footer a:hover { color: var(--accent); }

/* ---------- motion ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,54,.55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255,90,54,0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2s infinite; }
  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .hero__photo img { animation: fadeUp 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .hero__text > * { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero__text > :nth-child(2) { animation-delay: .1s; } .hero__text > :nth-child(3) { animation-delay: .2s; }
  .hero__text > :nth-child(4) { animation-delay: .3s; } .hero__text > :nth-child(5) { animation-delay: .4s; } .hero__text > :nth-child(6) { animation-delay: .5s; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- no-JS fallback: inline nav, no toggle ---------- */
html:not(.js) .nav { position: relative; height: auto; }
html:not(.js) .nav__inner { flex-wrap: wrap; padding-block: 8px; gap: 4px 16px; }
html:not(.js) .nav__toggle { display: none; }
html:not(.js) .nav__links { display: flex; flex-wrap: wrap; }

/* ---------- >= 600 ---------- */
@media (min-width: 600px) {
  .decisions { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stack { grid-template-columns: 1fr 1fr; gap: 2.5rem 3rem; }
  .videos { grid-template-columns: 1fr 1fr; }
  .videos__shorts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; overflow: visible; margin-inline: 0; padding-inline: 0; }
  .video--short { max-width: 300px; flex: none; }
  #graphCanvas { height: 340px; }
  .flow { display: grid; grid-template-columns: repeat(3, 1fr); border-left: 0; margin-left: 0; gap: 0 20px; }
  .flow li { padding: 26px 0 16px; border-top: 1px solid var(--line-2); }
  .hero__photo { aspect-ratio: 1/1; }
  .hero__photo img { object-position: 50% 18%; }
  .flow li::before { left: 0; top: -5px; }
}
/* ---------- >= 900 ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 76px; }
  .nav__links { display: flex; } .nav__toggle { display: none; }
  .hero__grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 0; min-height: min(calc(100svh - var(--nav-h)), 900px); padding-block: 2rem 4rem; }
  .hero__photo { aspect-ratio: 4/5; order: 2; margin-inline: 0; max-height: 78vh; justify-self: end; width: 100%; }
  .hero__photo img { object-position: 50% 22%; }
  .hero__photo::after { height: 25%; }
  .hero__caption { left: 18px; }
  .hero__text { order: 1; margin-top: 0; margin-right: -9vw; }
  .hero__name { font-size: clamp(6.5rem, 14vw, 12rem); }
  .impact__grid { grid-template-columns: repeat(5, 1fr); }
  .stat, .stat:nth-child(even), .stat:last-child { padding: 36px 20px 36px 24px; border-bottom: 0; border-left: 1px solid var(--line); grid-column: auto; }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .stat__n { font-size: clamp(2.4rem, 4.2vw, 3.8rem); }
  .case__body { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
  .case--alt .case__demo { order: -1; }
  .decisions { grid-template-columns: repeat(4, 1fr); }
  .cards { gap: 28px; }
  .flow { grid-template-columns: repeat(6, 1fr); gap: 0 18px; }
  .videos { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .videos__shorts { gap: 28px; }
  #stringsCanvas { height: 300px; }
  .timeline { margin-left: 8px; }
}

.chip-status { text-wrap: balance; }

/* ---------- mobile hero: name overlays the photo (< 600px only) ---------- */
@media (max-width: 599.98px) {
  .hero__grid { gap: 0; }
  .hero__photo { aspect-ratio: auto; height: min(70svh, 560px); }
  .hero__photo img { object-position: 50% 12%; }
  .hero__photo::after { height: 65%; background: linear-gradient(to top, var(--bg) 8%, rgba(11,11,12,.75) 40%, transparent); }
  .hero__caption { display: none; }
  .hero__text { margin-top: -150px; }
  .hero__text .eyebrow { margin-bottom: .6rem; font-size: .7rem; white-space: nowrap; }
  .eb-more { display: none; }
  .hero__name { text-shadow: 0 2px 24px rgba(11,11,12,.6); }
}
