/* =========================================================
   GARVIT YAGGIK — Portfolio 2026
   Direction: "Darkroom Editorial"
   Warm ink black, paper white, one safelight red.
   Print-designer details: crop marks, frame numbers, rules.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,300..900&family=Instrument+Serif:ital@0;1&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink: #0E0D0B;
  --ink-2: #161412;
  --ink-3: #201D1A;
  --paper: #EDE6D6;
  --paper-dim: #A39B8C;
  --paper-mute: #6B645A;
  --rule: rgba(237, 230, 214, 0.12);
  --rule-strong: rgba(237, 230, 214, 0.28);
  --red: #E5482A;          /* safelight */
  --red-deep: #B8341C;

  --f-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.55;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: var(--ink); }

/* Film grain */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9000;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.07;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%{background-position:0 0} 20%{background-position:-40px 30px} 40%{background-position:30px -50px}
  60%{background-position:-30px -20px} 80%{background-position:50px 40px} 100%{background-position:0 0}
}

/* ---------- type primitives ---------- */
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.serif { font-family: var(--f-serif); font-weight: 400; font-style: italic; letter-spacing: -0.01em; }
.red { color: var(--red); }
.dim { color: var(--paper-dim); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-head {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px;
  padding-bottom: 28px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 48px;
}
.section-head .idx { display: block; margin-bottom: 18px; color: var(--red); }
.section-title {
  font-weight: 800; font-variation-settings: 'wdth' 72;
  font-size: clamp(56px, 10vw, 152px); line-height: 0.86; letter-spacing: -0.02em; text-transform: uppercase;
}
.section-title .serif { text-transform: none; font-size: 0.92em; color: var(--paper-dim); }

/* ---------- link with arrow ---------- */
.arrow-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid var(--rule-strong); padding-bottom: 6px;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.arrow-link::after { content: '→'; transition: transform .3s var(--ease); }
.arrow-link:hover { color: var(--red); border-color: var(--red); }
.arrow-link:hover::after { transform: translateX(4px); }

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 800;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding: 18px var(--gutter);
  mix-blend-mode: difference;
  color: #fff;
}
.topbar .logo {
  font-weight: 900; font-variation-settings: 'wdth' 62; font-size: 22px; letter-spacing: 0.02em;
}
.topbar nav { display: flex; justify-content: center; gap: clamp(16px, 2.4vw, 36px); }
.topbar nav a, .topbar .cta {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  position: relative; padding: 4px 0;
}
.topbar nav a::after, .topbar .cta::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.topbar nav a:hover::after, .topbar .cta:hover::after, .topbar nav a.active::after { transform: scaleX(1); transform-origin: left; }
.menu-btn { display: none; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 850; background: var(--ink); visibility: hidden;
  display: flex; flex-direction: column; justify-content: center; padding: var(--gutter);
  transform: translateY(-100%); transition: transform .6s var(--ease), visibility .6s;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-weight: 800; font-variation-settings: 'wdth' 70; text-transform: uppercase;
  font-size: clamp(48px, 14vw, 88px); line-height: 1; padding: 6px 0; border-bottom: 1px solid var(--rule);
}
.mobile-menu a span { font-family: var(--f-mono); font-size: 12px; color: var(--red); vertical-align: top; margin-right: 12px; font-weight: 400; }
.mobile-menu .close { position: absolute; top: 18px; right: var(--gutter); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100svh; position: relative; overflow: hidden;
  display: flex; flex-direction: column; padding-top: 80px;
}
.hero-glow {
  position: absolute; width: 70vmax; height: 70vmax; right: -20vmax; top: -10vmax;
  background: radial-gradient(closest-side, rgba(229,72,42,0.22), rgba(229,72,42,0.06) 55%, transparent 72%);
  pointer-events: none; filter: blur(10px);
}
.hero-grid { position: relative; flex: 1; width: 100%; }
.hero-meta {
  max-width: 520px; margin-top: clamp(16px, 5vh, 64px);
  display: flex; flex-direction: column; gap: 22px; position: relative; z-index: 4;
}
.status { display: inline-flex; align-items: center; gap: 10px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(229,72,42,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(229,72,42,0); } 100% { box-shadow: 0 0 0 0 rgba(229,72,42,0); } }
.hero-lede { font-size: clamp(20px, 2vw, 28px); line-height: 1.3; max-width: 26ch; font-weight: 400; }
.hero-lede .serif { font-size: 1.15em; color: var(--paper); }
.hero-meta .arrow-link { align-self: flex-start; }

.hero-figure {
  position: absolute; z-index: 3; right: 16%; top: 0; bottom: -7.5vw;
  aspect-ratio: 800 / 1150;
}
.hero-figure img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom;
  opacity: 0; transform: scale(1.02); transition: opacity 1s var(--ease), transform 1.4s var(--ease);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.6));
}
.hero-figure img.on { opacity: 1; transform: scale(1); }
.frame-count {
  position: absolute; right: -22px; top: 10%; writing-mode: vertical-rl;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .2em; color: var(--paper-dim);
}
.crop { position: absolute; width: 18px; height: 18px; border-color: var(--rule-strong); border-style: solid; }
.crop.tl { top: 4%; left: -14px; border-width: 1px 0 0 1px; }
.crop.tr { top: 4%; right: -14px; border-width: 1px 1px 0 0; }
.crop.bl, .crop.br { display: none; }

.hero-name {
  position: relative; z-index: 2;
  font-weight: 900; text-transform: uppercase; line-height: 0.78; letter-spacing: -0.035em;
  font-variation-settings: 'wdth' 62;
  font-size: clamp(64px, 15.8vw, 300px);
  padding: 0 var(--gutter); margin: 0 0 -0.04em; white-space: nowrap;
}
.hero-name .line { display: inline-block; clip-path: inset(-50% -50% 0 -50%); vertical-align: bottom; padding-top: .04em; }
.hero-name .line + .line { margin-left: .18em; }
.hero-name .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.loaded .hero-name .line > span { transform: none; }
.loaded .hero-name .line:nth-child(2) > span { transition-delay: .08s; }
.hero-name .outline { color: transparent; -webkit-text-stroke: 1.5px var(--paper); }

.hero-foot {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 24px; align-items: end;
  padding: 22px var(--gutter) 28px; border-top: 1px solid var(--rule-strong);
  position: relative; z-index: 3; background: linear-gradient(transparent, var(--ink) 40%);
}
.stat b {
  display: block; font-weight: 800; font-variation-settings: 'wdth' 75;
  font-size: clamp(30px, 3.6vw, 52px); line-height: 1; letter-spacing: -0.02em;
}
.stat b sup { color: var(--red); font-size: .5em; vertical-align: top; margin-left: 2px; }
.stat span { display: block; margin-top: 8px; color: var(--paper-dim); }
.scroll-cue { color: var(--paper-dim); display: flex; align-items: center; gap: 10px; }
.scroll-cue::after { content: ''; width: 1px; height: 36px; background: var(--paper-dim); transform-origin: top; animation: cue 2s var(--ease) 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; } }

/* =========================================================
   TICKER
   ========================================================= */
.ticker { border-block: 1px solid var(--rule); overflow: hidden; padding: 18px 0; background: var(--ink-2); }
.ticker-track { display: flex; width: max-content; animation: tick 42s linear infinite; }
.ticker-track span {
  font-weight: 700; font-variation-settings: 'wdth' 70; text-transform: uppercase;
  font-size: clamp(22px, 2.6vw, 34px); letter-spacing: 0; padding-right: 48px; white-space: nowrap;
}
.ticker-track span::after { content: '✳'; color: var(--red); padding-left: 48px; font-size: .7em; vertical-align: middle; }
.ticker-track .serif { text-transform: none; font-weight: 400; color: var(--paper-dim); }
@keyframes tick { to { transform: translateX(-50%); } }

/* =========================================================
   WORK
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.filters button {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper-mute); padding: 6px 0; position: relative; transition: color .3s;
}
.filters button sup { font-size: 9px; margin-left: 3px; color: inherit; }
.filters button:hover { color: var(--paper); }
.filters button.active { color: var(--paper); }
.filters button.active::before { content: '●'; color: var(--red); font-size: 8px; position: absolute; left: -14px; top: 9px; }

.work-grid { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(12, 1fr); gap: clamp(36px, 5vw, 72px) 24px; }
.card { grid-column: span 6; display: block; position: relative; }
.card.xl { grid-column: span 12; }
.card.lg { grid-column: span 7; }
.card.lg + .card.md { grid-column: span 5; }
.card.sm { grid-column: span 4; }
.card.hidden { display: none; }

.card-media {
  position: relative; overflow: hidden; background: var(--ink-3);
  aspect-ratio: 4 / 3;
}
.card.xl .card-media { aspect-ratio: 21 / 9; }
.card.sm .card-media { aspect-ratio: 1 / 1; }
.card-media > img, .card-media > .cover {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease), filter .6s var(--ease);
}
.card:hover .card-media > img, .card:hover .card-media > .cover { transform: scale(1.035); }
.card-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.card-frame {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--paper);
  background: rgba(14,13,11,.72); padding: 4px 8px; backdrop-filter: blur(6px);
}
.card-meta {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; padding-top: 18px; align-items: baseline;
}
.card-title {
  font-weight: 800; font-variation-settings: 'wdth' 78; text-transform: uppercase;
  font-size: clamp(24px, 2.4vw, 38px); line-height: .95; letter-spacing: -0.01em;
  transition: color .3s;
}
.card.xl .card-title { font-size: clamp(32px, 4vw, 64px); }
.card:hover .card-title { color: var(--red); }
.card-year { color: var(--paper-mute); }
.card-kicker { grid-column: 1 / -1; color: var(--paper-dim); font-size: 16px; }
.card-cat { grid-column: 1 / -1; color: var(--paper-mute); }

/* ---------- Typographic covers (used when no image) ---------- */
.cover {
  display: block; overflow: hidden;
  background: var(--c-bg); color: var(--c-ink);
  container-type: size;
}
.cover .cv-stat {
  position: absolute; left: 6%; bottom: 10%;
  font-weight: 900; font-variation-settings: 'wdth' 62; line-height: .82; letter-spacing: -0.04em;
  font-size: min(30cqh, 19cqw);
}
.card.xl .cover .cv-stat { font-size: min(46cqh, 19cqw); }
.cover .cv-label { position: absolute; left: 6%; top: max(52px, 10%); font-family: var(--f-mono); font-size: max(10px, 3.2cqh); letter-spacing: .1em; text-transform: uppercase; opacity: .8; max-width: 60%; }
.cover .cv-sub { position: absolute; left: 6.4%; bottom: 5%; font-family: var(--f-serif); font-style: italic; font-size: max(13px, 5cqh); opacity: .85; }
.cover .cv-art { position: absolute; inset: 0; pointer-events: none; }
.cover .cv-art svg { width: 100%; height: 100%; }
.cover .cv-accent { fill: var(--c-accent); }
.cover .cv-accent-stroke { stroke: var(--c-accent); }
.cover .cv-ink-stroke { stroke: var(--c-ink); }

/* =========================================================
   AI LAB
   ========================================================= */
.lab { background: var(--paper); color: var(--ink); }
.lab .section-head { border-color: rgba(14,13,11,.3); }
.lab .section-title .serif { color: var(--paper-mute); }
.lab-intro { max-width: 44ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; }
.lab-list { }
.lab-row {
  display: grid; grid-template-columns: 64px 1.1fr 1.6fr 1fr 40px; gap: 24px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid rgba(14,13,11,.3); position: relative;
  transition: padding .4s var(--ease);
}
.lab-row::before {
  content: ''; position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: bottom;
  transition: transform .5s var(--ease); z-index: 0;
}
.lab-row > * { position: relative; z-index: 1; transition: color .4s var(--ease); }
a.lab-row:hover::before { transform: scaleY(1); }
a.lab-row:hover > * { color: var(--paper); }
a.lab-row:hover { padding-inline: 20px; }
.lab-row .n { color: var(--red); }
.lab-row h3 { font-weight: 800; font-variation-settings: 'wdth' 75; text-transform: uppercase; font-size: clamp(24px, 2.4vw, 36px); line-height: 1; }
.lab-row p { font-size: 16px; }
.lab-row .stack { color: var(--paper-mute); }
.lab-row .go { font-size: 22px; text-align: right; }

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 48px 24px; }
.about-photo { grid-column: 1 / span 4; position: relative; }
.about-photo .ph { aspect-ratio: 3/4; overflow: hidden; background: var(--ink-3); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .8s var(--ease); }
.about-photo:hover img { filter: grayscale(0); }
.about-photo figcaption { margin-top: 12px; color: var(--paper-mute); }
.about-body { grid-column: 6 / span 7; }
.about-statement {
  font-size: clamp(28px, 3.4vw, 50px); line-height: 1.08; font-weight: 500; letter-spacing: -0.015em;
  font-variation-settings: 'wdth' 90; margin-bottom: 40px;
}
.about-statement .serif { font-weight: 400; color: var(--red); }
.about-copy p { color: var(--paper-dim); max-width: 58ch; margin-bottom: 16px; }
.about-copy p strong { color: var(--paper); font-weight: 600; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--rule); }
.cap-grid h4 { color: var(--red); margin-bottom: 14px; font-weight: 400; }
.cap-grid ul { list-style: none; }
.cap-grid li { padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }

.timeline { margin-top: 56px; }
.tl-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.tl-row b { font-weight: 700; font-size: 19px; }
.tl-row .dim { font-size: 15px; }

/* =========================================================
   JOURNAL (list)
   ========================================================= */
.j-list a {
  display: grid; grid-template-columns: 120px 1fr 160px 80px; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--rule); transition: color .3s, padding .4s var(--ease);
}
.j-list a:first-child { border-top: 1px solid var(--rule); }
.j-list a:hover { color: var(--red); padding-left: 12px; }
.j-list h3 { font-weight: 600; font-size: clamp(20px, 2vw, 28px); line-height: 1.15; letter-spacing: -0.01em; }
.j-list .mono { color: var(--paper-mute); }
.j-list .rt { text-align: right; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding-bottom: 60px; }
.contact-big {
  font-weight: 900; text-transform: uppercase; font-variation-settings: 'wdth' 62;
  font-size: clamp(64px, 14vw, 220px); line-height: .82; letter-spacing: -0.035em; margin: 20px 0 48px;
}
.contact-big .serif { text-transform: none; font-weight: 400; color: var(--red); letter-spacing: -0.02em; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 40px; border-top: 1px solid var(--rule-strong); }
.mail-link {
  display: inline-block; font-size: clamp(22px, 2.6vw, 40px); font-weight: 600; letter-spacing: -0.01em;
  border-bottom: 2px solid var(--red); padding-bottom: 4px; margin-bottom: 32px; word-break: break-all;
  transition: color .3s;
}
.mail-link:hover { color: var(--red); }
.c-links { list-style: none; }
.c-links li { border-bottom: 1px solid var(--rule); }
.c-links a { display: flex; justify-content: space-between; padding: 14px 0; transition: color .3s, padding .4s var(--ease); }
.c-links a:hover { color: var(--red); padding-left: 8px; }
.c-note { margin-top: 28px; color: var(--paper-dim); max-width: 40ch; }

.form { display: grid; gap: 22px; }
.field label { display: block; color: var(--paper-mute); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--rule-strong);
  color: var(--paper); font: inherit; font-size: 18px; padding: 8px 0 12px; outline: none; transition: border-color .3s;
  border-radius: 0;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--red); }
.submit {
  justify-self: start; background: var(--red); color: var(--ink);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  padding: 18px 30px; transition: background .3s, transform .3s var(--ease);
}
.submit:hover { background: var(--paper); }
.form-status { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; min-height: 18px; }

footer.site-foot {
  display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center;
  padding: 28px var(--gutter); border-top: 1px solid var(--rule); color: var(--paper-mute);
}
footer.site-foot nav { display: flex; gap: 24px; }
footer.site-foot a:hover { color: var(--paper); }

/* =========================================================
   CASE STUDY PAGE
   ========================================================= */
.cs-hero { padding-top: clamp(120px, 16vw, 180px); padding-bottom: 40px; }
.cs-back { display: inline-block; margin-bottom: 48px; color: var(--paper-dim); }
.cs-back:hover { color: var(--red); }
.cs-cat { color: var(--red); display: block; margin-bottom: 18px; }
.cs-title {
  font-weight: 900; text-transform: uppercase; font-variation-settings: 'wdth' 62;
  font-size: clamp(56px, 11vw, 170px); line-height: .84; letter-spacing: -0.03em; max-width: 14ch;
}
.cs-kicker { font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.6vw, 38px); color: var(--paper-dim); margin-top: 22px; max-width: 30ch; line-height: 1.15; }
.cs-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule-strong); }
.cs-meta dt { color: var(--paper-mute); margin-bottom: 6px; }
.cs-meta dd { font-size: 16px; }
.cs-cover { position: relative; aspect-ratio: 16/9; margin: 32px 0 0; overflow: hidden; background: var(--ink-3); }
.cs-cover > img, .cs-cover > .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cs-body { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: clamp(64px, 9vw, 120px) 0; }
.cs-block { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding: 36px 0; border-top: 1px solid var(--rule); }
.cs-block > h2 { grid-column: 1 / span 3; color: var(--red); font-weight: 400; }
.cs-block > .content { grid-column: 5 / span 8; }
.cs-block p { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; }
.cs-steps { list-style: none; counter-reset: s; }
.cs-steps li { counter-increment: s; display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
.cs-steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-mono); font-size: 12px; color: var(--paper-mute); padding-top: 5px; }
.cs-outcome { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: end; }
.cs-outcome .big { font-weight: 900; font-variation-settings: 'wdth' 62; font-size: clamp(64px, 9vw, 140px); line-height: .85; color: var(--red); letter-spacing: -0.03em; }
.cs-outcome .big small { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--paper-dim); margin-top: 10px; font-weight: 400; }
.cs-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 80px; }
.cs-gallery img { width: 100%; height: auto; background: var(--ink-3); }
.cs-gallery img:first-child:nth-last-child(odd), .cs-gallery img.wide { grid-column: 1 / -1; }
.cs-pdf { padding-bottom: 80px; }
.cs-pdf iframe { width: 100%; height: 80vh; border: 0; background: var(--ink-3); }
.cs-nda { color: var(--paper-mute); padding-bottom: 60px; max-width: 60ch; }
.cs-next { display: block; border-top: 1px solid var(--rule-strong); padding: 48px 0 72px; }
.cs-next .mono { color: var(--paper-mute); }
.cs-next h3 { font-weight: 900; text-transform: uppercase; font-variation-settings: 'wdth' 62; font-size: clamp(48px, 8vw, 120px); line-height: .9; transition: color .3s; }
.cs-next:hover h3 { color: var(--red); }

/* =========================================================
   JOURNAL ARTICLE + RESUME PAGES
   ========================================================= */
.article { max-width: 820px; margin: 0 auto; padding: clamp(120px, 16vw, 180px) var(--gutter) 80px; }
.article h1 { font-weight: 800; font-variation-settings: 'wdth' 72; text-transform: uppercase; font-size: clamp(44px, 7vw, 92px); line-height: .9; letter-spacing: -0.02em; margin: 16px 0 24px; }
.article .intro { font-family: var(--f-serif); font-style: italic; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.25; color: var(--paper-dim); padding-bottom: 40px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 40px; }
.article h2 { font-weight: 700; font-size: 24px; margin: 40px 0 12px; }
.article p { color: var(--paper-dim); font-size: 18px; line-height: 1.7; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 72px; padding-top: 28px; border-top: 1px solid var(--rule); }
.article-nav a:hover h4 { color: var(--red); }
.article-nav h4 { font-weight: 700; font-size: 20px; margin-top: 8px; transition: color .3s; }
.article-nav .next { text-align: right; }

.resume { padding-top: clamp(120px, 16vw, 180px); padding-bottom: 80px; }
.resume-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--rule-strong); }
.resume-top h1 { font-weight: 900; font-variation-settings: 'wdth' 62; text-transform: uppercase; font-size: clamp(64px, 12vw, 180px); line-height: .82; letter-spacing: -0.03em; }
.r-sec { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; padding: 40px 0; border-bottom: 1px solid var(--rule); }
.r-sec > h2 { grid-column: 1 / span 3; color: var(--red); font-weight: 400; }
.r-sec > .content { grid-column: 4 / span 9; }
.r-job { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.r-job:last-child { border: 0; margin: 0; padding: 0; }
.r-job header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.r-job h3 { font-weight: 700; font-size: 22px; }
.r-job ul { list-style: none; }
.r-job li { color: var(--paper-dim); padding: 5px 0 5px 22px; position: relative; }
.r-job li::before { content: '–'; position: absolute; left: 0; color: var(--red); }
.r-skills p { margin-bottom: 10px; color: var(--paper-dim); }
.r-skills b { color: var(--paper); font-weight: 600; }
.btn-red {
  display: inline-flex; gap: 10px; align-items: center; background: var(--red); color: var(--ink);
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 16px 26px;
  transition: background .3s;
}
.btn-red:hover { background: var(--paper); }

/* =========================================================
   CURSOR + REVEAL
   ========================================================= */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 9500; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--red);
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.cursor span { opacity: 0; transition: opacity .2s; }
.cursor.view { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
.cursor.view span { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-name .line > span { transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .card.lg, .card.lg + .card.md, .card.md { grid-column: span 6; }
  .card.sm { grid-column: span 6; }
  .lab-row { grid-template-columns: 48px 1fr 1.4fr 40px; }
  .lab-row .stack { display: none; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .topbar { grid-template-columns: auto 1fr auto; }
  .topbar nav, .topbar .cta { display: none; }
  .menu-btn { display: block; justify-self: end; grid-column: 3; }
  .hero { padding-top: 64px; }
  .hero-grid { display: flex; flex-direction: column; }
  .hero-meta { margin-top: 12px; }
  .hero-figure { position: relative; right: auto; top: auto; bottom: auto; align-self: center; height: auto; width: min(64vw, 320px); margin-top: 12px; }
  .frame-count { right: -18px; }
  .hero-name { font-size: 24vw; line-height: .8; margin-top: -.45em; white-space: normal; }
  .hero-name .line { display: block; }
  .hero-name .line + .line { margin-left: 0; }
  .hero-foot { grid-template-columns: 1fr 1fr; }
  .scroll-cue { display: none; }
  .section-head { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; gap: 48px; }
  .card, .card.xl, .card.lg, .card.lg + .card.md, .card.md, .card.sm { grid-column: 1 / -1; }
  .card.xl .card-media { aspect-ratio: 4/3; }
  .card.xl .cover .cv-stat { font-size: min(30cqh, 19cqw); }
  .lab-row { grid-template-columns: 36px 1fr 28px; gap: 12px; }
  .lab-row p { grid-column: 2 / -1; grid-row: 2; }
  .lab-row .go { grid-row: 1; grid-column: 3; }
  .about-photo, .about-body { grid-column: 1 / -1; }
  .about-photo { max-width: 340px; }
  .cap-grid { grid-template-columns: 1fr; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
  .j-list a { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .j-list .cat { display: none; }
  .j-list h3 { grid-column: 1 / -1; grid-row: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  footer.site-foot { grid-template-columns: 1fr; }
  footer.site-foot nav { flex-wrap: wrap; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-block > h2, .cs-block > .content, .r-sec > h2, .r-sec > .content { grid-column: 1 / -1; }
  .cs-outcome { grid-template-columns: 1fr; gap: 20px; }
  .cs-gallery { grid-template-columns: 1fr; }
  .article-nav { grid-template-columns: 1fr; }
  .article-nav .next { text-align: left; }
}
.article .cs-back { display: block; width: fit-content; }
.cs-docs { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 20px; }
.card-media > img[data-drive^="assets"], .cs-cover > img[data-drive^="assets"] { object-position: top center; }

/* =========================================================
   IMMERSIVE 3D LAYER
   ========================================================= */
.hero-stage { position: relative; height: var(--stage-h, 480vh); }
.hero-stage .hero { position: sticky; top: 0; height: 100svh; min-height: 0; }
.no-gl .hero-stage, .reduced .hero-stage { height: auto; }
.no-gl .hero-stage .hero, .reduced .hero-stage .hero { position: relative; min-height: 100svh; height: auto; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0; transition: opacity 1.4s var(--ease); }
.gl-ready #gl { opacity: 1; }
.hero-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 60% 45%, transparent 35%, rgba(14,13,11,.55) 70%, var(--ink) 100%); }
.hero-grid, .hero-name, .hero-foot { will-change: transform, opacity; }
.hero-name { transform-origin: 50% 100%; }
.hero-glow { z-index: 1; }
.tunnel-caption {
  position: absolute; left: var(--gutter); bottom: 28px; z-index: 4; display: flex; gap: 16px; align-items: baseline;
  opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none;
}
.tunnel-caption span { color: var(--red); }
.tunnel-caption b { font-family: var(--f-display); font-weight: 800; font-variation-settings: 'wdth' 70; font-size: clamp(24px, 3vw, 44px); text-transform: uppercase; letter-spacing: 0; color: var(--paper); }
.tunnel-on .tunnel-caption { opacity: 1; transform: none; }
.gl-hover #gl { cursor: pointer; }

/* 3D cards */
.card { transform-style: preserve-3d; }
.card.reveal { opacity: 0; transform: perspective(1200px) translate3d(0, 70px, -80px) rotateX(18deg); transform-origin: 50% 100%;
  transition: opacity 1.1s var(--ease) var(--d, 0s), transform 1.3s var(--ease) var(--d, 0s); }
.card.reveal.in { opacity: 1; transform: none; }
.card-media { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease); transform-style: preserve-3d; }
.card.tilting .card-media { transition: transform .12s linear; }
.card-media::before {
  content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(600px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.18), transparent 45%);
  mix-blend-mode: soft-light;
}
.card:hover .card-media::before { opacity: 1; }
.card:hover .card-media { box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(229,72,42,.25); }

/* split-letter 3D titles */
.split { perspective: 800px; }
.split .w { display: inline-block; white-space: nowrap; }
.split .ch { display: inline-block; transform-origin: 50% 100%; transform: translateY(.35em) rotateX(-95deg); opacity: 0;
  transition: transform 1s var(--ease), opacity .7s var(--ease); transition-delay: calc(var(--i) * 28ms); }
.split.in .ch { transform: none; opacity: 1; }

/* 3D ticker + lab + misc */
.ticker { perspective: 900px; }
.ticker-track { transform: rotateX(14deg); transform-origin: 50% 50%; }
.lab-row.reveal { transform: perspective(1000px) translate3d(0, 40px, -60px) rotateX(12deg); }
.lab-row.reveal.in { transform: none; }
a.lab-row:hover { transform: perspective(1000px) translateZ(18px); }
.about-photo .ph { transform: perspective(1000px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); transition: transform .5s var(--ease); }
.cs-cover { transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease); }
.cs-gallery img.reveal { transform: perspective(1200px) translate3d(0, 60px, -80px) rotateX(14deg); transition: opacity 1s var(--ease), transform 1.2s var(--ease); }
.cs-gallery img.reveal.in { transform: none; }

@media (hover: none), (pointer: coarse) {
  .card-media, .about-photo .ph, .cs-cover { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stage { height: auto; }
  .hero-stage .hero { position: relative; }
  .split .ch, .card.reveal, .lab-row.reveal { transform: none !important; opacity: 1 !important; }
}
.hero-stage .hero-grid, .hero-stage .hero-name, .hero-stage .hero-foot { pointer-events: none; }
.hero-stage .hero-meta a, .hero-stage .hero-meta .arrow-link { pointer-events: auto; }
.tunnel-end-text {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; gap: .25em;
  font-weight: 900; font-variation-settings: 'wdth' 62; text-transform: uppercase; font-size: clamp(56px, 11vw, 180px); line-height: 1; letter-spacing: -0.03em;
  opacity: 0; transform: perspective(900px) translateZ(-300px) rotateX(20deg); transition: opacity .8s var(--ease), transform 1.2s var(--ease); pointer-events: none;
}
.tunnel-end-text .serif { text-transform: none; font-weight: 400; color: var(--paper); }
.tunnel-end-text span:not(.serif) { word-spacing: .12em; }
.tunnel-end-text i { font-style: normal; color: var(--red); font-size: .5em; margin-left: .2em; }
.tunnel-end .tunnel-end-text { opacity: 1; transform: none; pointer-events: auto; }
.tunnel-end .tunnel-caption { opacity: 0; }

/* developing-tray info panel */
.dev-panel {
  position: absolute; z-index: 4; right: var(--gutter); top: 50%; width: min(400px, 32vw);
  transform: translate3d(30px, -50%, 0); opacity: 0; transition: opacity .6s var(--ease), transform .8s var(--ease);
  display: flex; flex-direction: column; gap: 14px; pointer-events: none;
  padding: 28px 30px; background: rgba(14,13,11,.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-left: 2px solid var(--red);
}
.panel-on .dev-panel { opacity: 1; transform: translate3d(0, -50%, 0); pointer-events: auto; }
.dp-num { color: var(--paper-mute); }
.dp-kicker { color: var(--red); }
.dp-title { font-weight: 800; font-variation-settings: 'wdth' 72; text-transform: uppercase; font-size: clamp(30px, 3.2vw, 52px); line-height: .92; letter-spacing: -0.01em; }
.dp-text { color: var(--paper-dim); font-size: 17px; line-height: 1.5; }
.dev-panel .arrow-link { align-self: flex-start; margin-top: 6px; }
.panel-on .tunnel-caption { opacity: 0; }
@media (max-width: 860px) {
  .dev-panel { left: 16px; right: 16px; width: auto; top: auto; bottom: 18px; transform: translate3d(0, 20px, 0); padding: 18px 20px; gap: 8px; }
  .panel-on .dev-panel { transform: none; }
  .dp-title { font-size: 28px; }
  .dp-text { font-size: 15px; }
}
.dev-panel [hidden] { display: none !important; }

/* =========================================================
   FEATURED STRIP
   ========================================================= */
.featured { padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 6vw, 80px); position: relative; z-index: 2; background: var(--ink); }
.feat-head { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 28px; }
.feat-title { font-weight: 800; font-variation-settings: 'wdth' 72; text-transform: uppercase; font-size: clamp(28px, 3.4vw, 52px); line-height: .9; letter-spacing: -.01em; }
.feat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 22px; }
.feat:first-child { grid-column: span 2; grid-row: span 2; }
.feat:first-child .feat-media { aspect-ratio: auto; flex: 1; min-height: 0; }
.feat:first-child h3 { font-size: clamp(26px, 2.6vw, 42px); }
.feat { display: flex; flex-direction: column; gap: 14px; transition: opacity .9s var(--ease) var(--d, 0s), transform .9s var(--ease) var(--d, 0s); }
.feat.reveal { opacity: 0; transform: translateY(30px); }
.feat.reveal.in { opacity: 1; transform: none; }
.feat-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); }
.feat-media > img, .feat-media > .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; }
.feat:hover .feat-media > img, .feat:hover .feat-media > .cover { transform: scale(1.05); }
.feat-media::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px var(--rule); pointer-events: none; }
.feat-meta { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; align-items: baseline; }
.feat-n { color: var(--paper-mute); grid-row: 1; }
.feat-stat { grid-row: 1; grid-column: 2; justify-self: end; font-weight: 900; font-variation-settings: 'wdth' 62; font-size: clamp(26px, 2.2vw, 36px); line-height: 1; color: var(--red); }
.feat h3 { grid-column: 1 / -1; font-weight: 800; font-variation-settings: 'wdth' 78; text-transform: uppercase; font-size: clamp(18px, 1.5vw, 24px); line-height: 1; transition: color .3s; }
.feat:hover h3 { color: var(--red); }
.feat p { grid-column: 1 / -1; color: var(--paper-dim); font-size: 15px; }
@media (max-width: 860px) {
  .feat-head { grid-template-columns: 1fr; gap: 10px; }
  .feat-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); gap: 14px; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 6px; scrollbar-width: none; }
  .feat-row::-webkit-scrollbar { display: none; }
  .feat { flex: 0 0 78vw; scroll-snap-align: start; }
  .feat:first-child .feat-media { aspect-ratio: 4 / 3; flex: none; }
  .feat:first-child h3 { font-size: 22px; }
}
