/* ==========================================================================
   Fidan Farajullayeva — portfolio
   Tokens are built strictly from design-dna.json
   ========================================================================== */

:root {
  /* colour — sampled from the reference, one accent swap (logo cobalt) */
  --canvas: #faf9f5;
  --card: #ffffff;
  --surface: #f4f1eb;
  --surface-2: #fbf9f7;
  --line: #e2e2e2;
  --line-strong: #c6c6c6;
  --ink: #1a1c1c;
  --ink-body: #454747;
  --ink-soft: #5d5f5f;
  --ink-muted: #6a6b6b;
  --dark: #121212;
  --dark-2: #1a1c1c;
  --accent: #4170ff;
  --accent-dark: #799aff;
  --peach: #ffc9b0;
  --peach-light: #ffdbca;
  /* art chapter — measured from Fidan's own work */
  --art-ground: #191118;
  --art-ground-soft: #282833;
  --art-ochre: #bc8550;
  --art-terracotta: #ad6238;
  --art-ink: #f4f1eb;
  --art-ink-soft: #cdbfae;

  /* type */
  --font-display: "Syne", "Manrope", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --t-display: clamp(2.25rem, 1rem + 3.8vw, 4.5rem);
  --t-h1: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  --t-h2: clamp(1.625rem, 1.1rem + 1.8vw, 2.75rem);
  --t-h3: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --t-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --t-small: 0.9375rem;
  --t-caption: 0.8125rem;
  --t-overline: 0.75rem;

  /* spacing (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px; --s-11: 160px;
  --section: clamp(4rem, 3rem + 6vw, 10rem);
  --gutter: clamp(16px, 1rem + 2vw, 48px);
  --gap: clamp(12px, 0.5rem + 1.2vw, 32px);
  --container: 1440px;

  /* shape / elevation */
  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-pill: 100px;
  --shadow-low: 0 1px 2px rgba(26, 28, 28, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-mid: 0 2px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  --shadow-high: 0 24px 60px -20px rgba(26, 28, 28, 0.35);

  /* motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --d-micro: 150ms; --d-normal: 300ms; --d-macro: 600ms;

  --nav-h: 84px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink-body);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }

/* grain — a tiled SVG noise, rendered once as an image */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9990; pointer-events: none;
  opacity: 0.045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
h1 em, h2 em, .display em, .statement em { font-style: normal; font-weight: 800; color: var(--accent); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: italic; }
::selection { background: var(--peach); color: var(--ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10001;
  padding: 12px 18px; background: var(--ink); color: #fff; border-radius: var(--r-pill);
  transform: translateY(-200%); transition: transform var(--d-micro) var(--ease-out);
  font-weight: 600;
}
.skip-link:focus-visible { transform: none; outline-color: var(--peach); }

/* type utilities */
.mono {
  font-family: var(--font-mono); font-size: var(--t-overline); font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.mono--ink { color: var(--ink); }
.display { font-family: var(--font-display); font-size: var(--t-display); font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.h1 { font-size: var(--t-h1); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; }
.h2 { font-size: var(--t-h2); line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; }
.h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.015em; font-weight: 600; }
.lede { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); line-height: 1.55; color: var(--ink-body); max-width: 62ch; }
.small { font-size: var(--t-small); line-height: 1.55; }
.measure { max-width: 62ch; }

/* layout */
.container { max-width: var(--container); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
@media (min-width: 1920px) { :root { --gutter: 80px; } }

.section { padding-block: var(--section); position: relative; }
.section__head { display: grid; gap: var(--s-4); margin-bottom: clamp(2rem, 1.5rem + 3vw, 4.5rem); }
.section__head .h2 { max-width: 20ch; }
.section__index { display: flex; align-items: center; gap: var(--s-3); }
.section__index::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
@media (min-width: 1024px) {
  .section__head { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .section__head .section__index { grid-column: 1 / -1; }
  .section__head .h2 { grid-column: 1 / 8; }
  .section__head .lede { grid-column: 8 / 13; }
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* buttons + chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--t-small); line-height: 1; white-space: nowrap;
  transition: transform var(--d-micro) var(--ease-out), background-color var(--d-micro), color var(--d-micro), border-color var(--d-micro);
  touch-action: manipulation;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--dark); transform: translateY(-1px); }
.btn--ghost { border: 1px solid var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn--light { background: var(--art-ink); color: var(--dark); }
.btn--light:hover { background: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 16px; height: 16px; }

.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: var(--t-small); white-space: nowrap;
  border: 1px solid transparent;
}

.link {
  position: relative; color: var(--ink); font-weight: 500;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size var(--d-normal) var(--ease-out);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.link--accent { color: var(--accent); }

/* --------------------------------------------------------------------------
   Nav — a wide hairline bar at the top that morphs into a floating pill on
   scroll; a gliding indicator under the active link
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; top: 12px; left: 50%; z-index: 1000; transform: translateX(-50%);
  width: calc(100% - 24px); max-width: 800px; height: 64px;
  display: flex; align-items: center;
  background: transparent; box-shadow: none;
  border-radius: var(--r-pill);
  transition: max-width 600ms var(--ease-out), height 400ms var(--ease-out), background-color var(--d-normal), box-shadow var(--d-normal);
}
.nav.is-scrolled { max-width: 800px; height: 60px; }
/* the frame: materialises from above, opening from the centre */
.nav__bg {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: rgba(255, 255, 255, 0.58); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--shadow-mid), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0; transform: translateY(-14px) scaleX(0.82) scaleY(0.9); transform-origin: 50% 0;
  transition: transform 320ms var(--ease-in), opacity 240ms ease-in, background-color var(--d-normal), box-shadow var(--d-normal);
}
.nav.is-scrolled .nav__bg { opacity: 1; transform: none; transition: transform 780ms cubic-bezier(0.22, 1.25, 0.36, 1), opacity 300ms ease-out, background-color var(--d-normal), box-shadow var(--d-normal); }
.nav__inner > * { transition: transform 600ms var(--ease-out); }
.nav.is-scrolled .nav__inner > * { transform: translateY(-1px); }
.nav.is-dark .nav__bg { background: rgba(34, 26, 34, 0.7); box-shadow: 0 2px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.12); }
.nav__inner { position: relative; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); padding: 0 8px 0 10px; }
.nav__brand { display: flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: var(--r-pill); }
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 34px; width: auto; transition: height 400ms var(--ease-out); }
.nav__links { position: relative; display: none; align-items: center; gap: 2px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-pill);
  font-weight: 600; font-size: var(--t-small); color: var(--ink); transition: color var(--d-normal);
}
/* text roll: the label slides up and its twin arrives from below */
.nav__link .roll { position: relative; display: block; height: 1.25em; line-height: 1.25em; overflow: hidden; }
.nav__link .roll > span { display: block; transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1); }
.nav__link .roll > span + span { position: absolute; left: 0; top: 100%; }
.nav__link:hover .roll > span { transform: translateY(-100%); }
.nav__link[aria-current="true"] { color: var(--ink); }
.nav__link:not([aria-current="true"]) { color: var(--ink-muted); }
.nav__link:hover { color: var(--ink); }
.nav__link:focus-visible { outline-offset: -2px; }
.nav__cta { display: none; background: var(--ink); color: #fff; }
.nav__cta:hover { background: var(--dark); }
.nav__cta svg { width: 18px; height: 18px; }
.nav__burger { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; }
.nav__burger svg { width: 20px; height: 20px; }
.nav__burger .x { display: none; }
.nav__burger[aria-expanded="true"] .bars { display: none; }
.nav__burger[aria-expanded="true"] .x { display: block; }
.nav.is-dark { background: transparent; box-shadow: none; }
.nav.is-dark .nav__link { color: var(--art-ink); }
.nav.is-dark .nav__link[aria-current="true"] { color: #fff; }
.nav.is-dark .nav__link:not([aria-current="true"]) { color: var(--art-ink-soft); }
.nav.is-dark .nav__link:hover { color: #fff; }
.nav.is-dark .nav__cta { background: var(--art-ink); color: var(--dark); }
.nav.is-dark .nav__cta:hover { background: #fff; }
/* progressive blur under the header: strong at the top edge, gone by ~110px */
.nav-veil {
  position: fixed; inset: 0 0 auto 0; height: 118px; z-index: 995; pointer-events: none;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 34%, rgba(0,0,0,0.6) 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 34%, rgba(0,0,0,0.6) 62%, transparent 100%);
  background: linear-gradient(to bottom, rgba(250, 249, 245, 0.7), rgba(250, 249, 245, 0));
  opacity: 0; transition: opacity var(--d-normal), background-color var(--d-normal);
}
.nav-veil.is-on { opacity: 1; }
.nav-veil.is-dark { background: linear-gradient(to bottom, rgba(25, 17, 24, 0.7), rgba(25, 17, 24, 0)); }
.nav-veil.is-menu { opacity: 0; }
@media (max-width: 767.98px) { .nav-veil { height: 104px; } }
.nav__readout { display: none; position: fixed; top: 22px; right: var(--gutter); z-index: 999; opacity: 0; transition: opacity var(--d-normal); }
.nav.is-scrolled + .nav__readout { opacity: 1; }
@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; min-height: 44px; padding: 0 18px 0 14px; }
  .nav__burger { display: none; }
}
@media (min-width: 1280px) { .nav__readout { display: block; } .nav__readout.is-dark { color: var(--art-ink-soft); } }
@media (prefers-reduced-motion: reduce) { .nav, .nav__logo img, .nav__bg, .nav__inner > *, .nav__link .roll > span { transition: none; } }

.overlay {
  position: fixed; inset: 0; z-index: 990; background: var(--dark); color: #c6c6c6; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-6); padding: 100px var(--gutter) max(28px, env(safe-area-inset-bottom));
  clip-path: circle(0px at calc(100% - 34px) 42px); visibility: hidden;
  transition: clip-path 640ms var(--ease-in), visibility 0s 640ms;
}
.overlay.is-open { clip-path: circle(150vmax at calc(100% - 34px) 42px); visibility: visible; transition: clip-path 820ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s; }
.overlay__water { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46svh; pointer-events: none; opacity: 0.9; }
.overlay__list, .overlay__foot, .overlay__copy, .overlay__who { position: relative; z-index: 1; }
.overlay__who { display: grid; gap: var(--s-2); justify-items: start; opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease-out) 260ms, transform 600ms var(--ease-out) 260ms; }
.overlay.is-open .overlay__who { opacity: 1; transform: none; }
.overlay__portrait { width: clamp(96px, 26vw, 140px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--dark-2); box-shadow: 0 0 0 3px var(--dark), 0 0 0 4px rgba(255,255,255,0.25); margin-bottom: var(--s-2); }
.overlay__portrait img { width: 100%; height: 100%; object-fit: cover; }
.overlay__name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.25rem; line-height: 1.1; color: #fff; }
.overlay__role { color: #909191; }
@media (max-height: 700px) { .overlay__who { display: none; } }
.overlay__list { display: grid; gap: 0; }
.overlay__link {
  display: flex; align-items: baseline; gap: var(--s-4); min-height: 64px; padding: var(--s-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.12); font-family: var(--font-display); font-weight: 700; letter-spacing: -0.03em; font-size: clamp(2.25rem, 10vw, 3.5rem); line-height: 1; color: #fff;
  opacity: 0; transform: translateY(18px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out);
}
.overlay__link .mono { transform: translateY(-0.6em); color: #909191; }
.overlay.is-open .overlay__link { opacity: 1; transform: none; }
.overlay.is-open .overlay__list li:nth-child(1) .overlay__link { transition-delay: 220ms; }
.overlay.is-open .overlay__list li:nth-child(2) .overlay__link { transition-delay: 290ms; }
.overlay.is-open .overlay__list li:nth-child(3) .overlay__link { transition-delay: 360ms; }
.overlay.is-open .overlay__list li:nth-child(4) .overlay__link { transition-delay: 430ms; }
.overlay__foot { margin-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-2); opacity: 0; transform: translateY(14px); transition: opacity 500ms var(--ease-out) 520ms, transform 600ms var(--ease-out) 520ms; }
.overlay.is-open .overlay__foot { opacity: 1; transform: none; }
.overlay .social { color: #fff; border-color: rgba(255,255,255,0.3); }
.overlay .social:hover { background: #fff; color: var(--dark); border-color: #fff; }
.overlay__copy { margin-top: var(--s-5); color: #909191; font-size: var(--t-small); opacity: 0; transition: opacity 500ms 640ms; }
.overlay.is-open .overlay__copy { opacity: 1; }
.nav.is-menu .nav__burger { background: rgba(255, 255, 255, 0.1); color: #fff; }
.nav.is-menu .nav__bg { opacity: 1; transform: none; background: rgba(30, 30, 32, 0.92); box-shadow: 0 2px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.08); transition: opacity 300ms ease-out, background-color 300ms, box-shadow 300ms; }
.overlay:focus { outline: none; }
@media (prefers-reduced-motion: reduce) { .overlay, .overlay__link, .overlay__foot, .overlay__copy, .overlay__who { transition: none; } .overlay__water { display: none; } }
@media (min-width: 768px) { .overlay { display: none; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; padding-top: calc(var(--nav-h) + var(--s-6)); padding-bottom: var(--s-6);
  display: flex; flex-direction: column; justify-content: flex-end; overflow: clip;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; -webkit-mask-image: linear-gradient(to bottom, #000 62%, rgba(0,0,0,0.5) 82%, transparent 100%); mask-image: linear-gradient(to bottom, #000 62%, rgba(0,0,0,0.5) 82%, transparent 100%); }
.hero__wash {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 55% at 84% 8%, var(--peach-light) 0%, rgba(255, 219, 202, 0.35) 40%, rgba(255, 219, 202, 0) 72%),
    radial-gradient(40% 40% at 6% 92%, rgba(255, 201, 176, 0.5) 0%, rgba(255, 201, 176, 0) 70%);
}
.hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--line); }
.hero__grid line { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hero__grid .cross { stroke: var(--line-strong); }

.hero__inner { position: relative; z-index: 1; display: grid; gap: var(--s-5); width: 100%; } /* width: auto margins would shrink-wrap it inside the flex column */
.hero__copy { display: grid; gap: var(--s-4); }
.hero__title { overflow-wrap: anywhere; }
.hero__eyebrow { display: flex; align-items: center; gap: var(--s-3); }
.hero__eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--ink-muted); }
.hero__name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.25rem, 1rem + 1.2vw, 2rem); line-height: 1; letter-spacing: -0.02em; color: var(--ink-soft); }
.hero__title { max-width: 17ch; font-size: clamp(1.875rem, 0.8rem + 3vw, 3.6rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.03em; }
@media (max-width: 767.98px) {
  .hero__title { font-size: 1.85rem; max-width: 15ch; }
  .hero__name { margin-top: var(--s-2); }
  .hero__grid { opacity: 0.55; }
  .hero__grid line:not(:nth-child(3n)) { display: none; }
  .turn__grid { opacity: 0.45; }
  .turn__grid line:nth-child(-n+11):not(:nth-child(3n)) { display: none; }
}
.hero__title em { font-style: normal; font-weight: 800; color: var(--accent); }
.hero__intro { max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* foreground: stacked cards (same 16:10 frame, front largest, two behind stepped up-right) */
.hero__planes { position: relative; z-index: 0; }
.stack { position: relative; width: 100%; aspect-ratio: 16 / 10; touch-action: pan-y; outline: none; }
.stack:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; border-radius: var(--r-m); }
.stack__card {
  position: absolute; inset: 0; margin: 0; display: block; appearance: none; border: 0; padding: 0; font: inherit; text-align: left; color: inherit; cursor: pointer;
  -webkit-user-drag: none; user-select: none; -webkit-tap-highlight-color: transparent;
  border-radius: var(--r-m); overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-high), 0 0 0 1px rgba(26, 28, 28, 0.08); transform-origin: 50% 50%;
  transition: transform 700ms cubic-bezier(0.22, 1.18, 0.36, 1), opacity 480ms var(--ease-out); will-change: transform;
}
.stack__card[data-pos="0"] { z-index: 3; transform: translate(0, 0) scale(1) rotate(0deg); }
.stack__card[data-pos="1"] { z-index: 2; transform: translate(7%, -9%) scale(0.94) rotate(2.5deg); }
.stack__card[data-pos="2"] { z-index: 1; transform: translate(14%, -18%) scale(0.88) rotate(5deg); }
.stack__card.is-leaving { z-index: 4; transform: translate(-16%, 14%) scale(0.96) rotate(-6deg); opacity: 0; }
.stack__card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.stack__tilt { display: block; width: 100%; height: 100%; transition: transform 320ms var(--ease-out); transform-style: preserve-3d; }
.stack { perspective: 1200px; }
.stack__card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stack__tag { display: block; position: absolute; left: 12px; bottom: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(250, 249, 245, 0.9); color: var(--ink); font-size: 0.6875rem; }
.stack__card[data-pos="1"] .stack__tag, .stack__card[data-pos="2"] .stack__tag { opacity: 0; }
.stack__dots { position: absolute; right: 12px; top: 12px; z-index: 5; display: flex; gap: 6px; padding: 6px 8px; border-radius: var(--r-pill); background: rgba(250, 249, 245, 0.9); pointer-events: none; transition: opacity var(--d-normal); }
.stack__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: background-color var(--d-normal), transform var(--d-normal) var(--ease-out); }
.stack__dot.is-on { background: var(--ink); transform: scale(1.25); }

/* fanned: a vertical cascade inside the column. Front card lowest; each back card shows its top strip and label.
   --co = step between cards (fraction of a card's height), --cs = card scale; js/main.js lowers them if the cascade
   would not fit the hero (offset first, then width, never below 80 % of the column). Desktop centres the cascade on the
   stack box; mobile anchors the front card and steps the back cards up. */
.stack[data-fanned] { --co: 22%; --cs: 1; }
.stack[data-fanned] .stack__card { transform: translate(0, var(--ty)) scale(var(--cs)) rotate(var(--cr)) translateY(var(--lift, 0px)); }
.stack[data-fanned] .stack__card[data-pos="0"] { --ty: var(--co); --cr: 0deg; z-index: 3; }
.stack[data-fanned] .stack__card[data-pos="1"] { --ty: 0%; --cr: -2deg; z-index: 2; }
.stack[data-fanned] .stack__card[data-pos="2"] { --ty: calc(var(--co) * -1); --cr: 2deg; z-index: 1; }
.stack[data-fanned] .stack__card:not([data-pos="0"]):hover { --lift: -12px; }
.stack[data-fanned] .stack__card.is-leaving { opacity: 1; }
.stack[data-fanned] .stack__tag { opacity: 1; top: 12px; bottom: auto; }
.stack[data-fanned] .stack__tilt { transform: none !important; }
.stack[data-fanned] .stack__dots { opacity: 0; }
@media (max-width: 1023.98px) {
  .hero__planes { padding-top: 18%; padding-bottom: 6px; }   /* room above for the cascade */
  .stack[data-fanned] .stack__card[data-pos="0"] { --ty: 0%; }
  .stack[data-fanned] .stack__card[data-pos="1"] { --ty: calc(var(--co) * -1); }
  .stack[data-fanned] .stack__card[data-pos="2"] { --ty: calc(var(--co) * -2); }
}
@media (prefers-reduced-motion: reduce) { .stack__card, .stack__tilt { transition: none; } }

/* mobile: same stack scaled to the column width, room above for the stepped cards */
.hero__planes { margin-top: var(--s-6); padding: 12% 12% 0 0; }

.hero__marquee { position: relative; z-index: 1; background: var(--canvas); margin-top: var(--s-6); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: var(--s-3); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee { display: flex; gap: var(--s-2); width: max-content; animation: marquee 38s linear infinite; animation-play-state: paused; }
.marquee.is-live { animation-play-state: running; }
.marquee:hover, .marquee:focus-within { animation-play-state: paused; }
.marquee .chip { background: transparent; border-color: var(--line); }
.marquee .chip .mono { margin-right: 10px; color: var(--ink-muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (min-width: 768px) {
  .hero { padding-bottom: var(--s-7); justify-content: center; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero { min-height: 0; padding-top: calc(var(--nav-h) + var(--s-6)); }
  .hero__inner { align-items: center; }
  .hero__title { max-width: 16ch; }
}
@media (min-width: 768px) {
  .hero__copy { gap: var(--s-5); }
}
@media (min-width: 1024px) {
  .hero { padding-top: calc(var(--nav-h) + var(--s-7)); justify-content: center; }
  .hero { min-height: min(100svh, 920px); }
  .hero__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
  .hero__copy { grid-column: 1 / 8; display: grid; gap: var(--s-5); }
  .hero__planes { grid-column: 8 / 13; margin: 0; padding: 12% 8% 0 0; }
  .hero__title { max-width: 17ch; }
}

/* --------------------------------------------------------------------------
   Work list (Selected Projects)
   -------------------------------------------------------------------------- */
.work { background: var(--canvas); }
.work-list { border-top: 1px solid var(--line); }
.work-row {
  position: relative; display: grid; gap: var(--s-3);
  padding: var(--s-5) 0; border-bottom: 1px solid var(--line);
  grid-template-columns: 96px 1fr; grid-template-areas: "thumb head" "thumb body" "thumb meta";
  transition: background-color var(--d-normal) var(--ease-out);
}
.work-row__thumb { grid-area: thumb; width: 96px; aspect-ratio: 16 / 10; border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.work-row__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--d-macro) var(--ease-out); }
.work-row__head { grid-area: head; display: flex; align-items: baseline; gap: var(--s-3); }
.work-row__index { flex: 0 0 auto; }
.work-row__title { font-size: var(--t-h3); }
.work-row__title a::after { content: ""; position: absolute; inset: 0; }
.work-row__body { grid-area: body; color: var(--ink-body); max-width: 58ch; }
.work-row__meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.work-row__arrow { display: none; }
.work-row__index--col { display: none; }
.work-row:hover .work-row__thumb img { transform: scale(1.04); }
.work-row:focus-within { background: var(--surface-2); }

@media (min-width: 768px) {
  .work-row { grid-template-columns: 180px 1fr; padding: var(--s-6) 0; gap: var(--s-3) var(--s-6); }
  .work-row__thumb { width: 180px; }
}
@media (min-width: 1024px) {
  .work-row {
    grid-template-columns: 4rem 1fr 22rem 200px 3rem; grid-template-areas: "index head meta thumb arrow" "index body meta thumb arrow";
    align-items: start; padding: var(--s-6) var(--s-4); margin-inline: calc(var(--s-4) * -1);
    border-radius: var(--r-m); border-bottom: 0;
  }
  .work-row::after { content: ""; position: absolute; left: var(--s-4); right: var(--s-4); bottom: 0; height: 1px; background: var(--line); }
  .work-row__head .work-row__index { display: none; }
  .work-row__index--col { display: block; grid-area: index; padding-top: 0.5em; }
  .work-row__meta { grid-area: meta; flex-direction: column; gap: var(--s-2); padding-top: 0.45em; }
  .work-row__thumb { grid-area: thumb; width: 200px; }
  .work-row { grid-template-rows: auto 1fr; }
  .work-row__arrow { grid-area: arrow; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink); transition: background-color var(--d-micro), color var(--d-micro), transform var(--d-normal) var(--ease-out); }
  .work-row__arrow svg { width: 18px; height: 18px; }
  .work-row:hover { background: var(--card); box-shadow: var(--shadow-low); }
  .work-row:hover .work-row__arrow { background: var(--ink); color: #fff; transform: rotate(-45deg); }
  .work-row__title { font-size: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem); }
  .work-row.is-hovered .work-row__thumb { opacity: 0.35; }
}
@media (min-width: 1024px) and (pointer: fine) {
  .work-row__thumb { transition: opacity var(--d-normal); }
}

/* mobile: swipeable strip with real thumbnails */
.work-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 320px); gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; padding: var(--s-2) var(--gutter) var(--s-5); margin-inline: calc(var(--gutter) * -1); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.work-strip::-webkit-scrollbar { display: none; }
.work-card { position: relative; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.work-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface); }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.work-card__body { padding: var(--s-4); display: grid; gap: var(--s-2); align-content: start; }
.work-card__title { font-size: 1.375rem; }
.work-card__title a::after { content: ""; position: absolute; inset: 0; }
.work-card__meta { display: flex; justify-content: space-between; gap: var(--s-3); }
.work-strip__hint { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-3); }
.work-strip__hint svg { width: 14px; height: 14px; }
@media (min-width: 768px) {
  .work-strip__hint { display: none; }
  .work-strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; gap: var(--s-5); overflow: visible; scroll-snap-type: none; padding: 0; margin-inline: 0; }
}
@media (min-width: 1024px) { .work-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .work-strip { display: none; } }
@media (max-width: 1279.98px) { .work-list { display: none; } }

/* cursor-aware floating cover */
.cursor-frame {
  position: fixed; left: 0; top: 0; z-index: 900; width: 360px; height: 270px; max-height: 60vh;
  border-radius: var(--r-m); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-high);
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(0.92);
  transition: opacity var(--d-normal) var(--ease-out), transform var(--d-normal) var(--ease-out);
  display: none;
}
.cursor-frame.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor-frame img { width: 100%; height: 100%; object-fit: contain; background: var(--dark); }
.cursor-frame__bar { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cursor-frame__bar .mono { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.cursor-frame__track { flex: 1; height: 2px; background: rgba(255, 255, 255, 0.4); border-radius: 2px; overflow: hidden; }
.cursor-frame__track i { display: block; height: 100%; width: var(--p, 0%); background: #fff; }
@media (min-width: 1024px) and (pointer: fine) { .cursor-frame { display: block; } }

/* --------------------------------------------------------------------------
   The Turn — signature move
   -------------------------------------------------------------------------- */
.turn { position: relative; background: var(--canvas); }
.turn__stage { position: relative; height: 100svh; min-height: 560px; overflow: clip; display: grid; place-items: center; }
.turn__wipe { position: absolute; inset: 0; z-index: 1; background: var(--art-ground); clip-path: inset(0 0 0 0); }
.turn__grid { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; color: var(--line-strong); opacity: 0.7; } /* under the wipe: the grid ends where the dark begins */
.turn__grid line { stroke: currentColor; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.turn__words { position: relative; z-index: 2; text-align: center; display: grid; gap: var(--s-4); padding-inline: var(--gutter); }
.turn__word { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(3rem, 1.6rem + 8.5vw, 8rem); line-height: 1; letter-spacing: -0.04em; }
.turn__stack { position: relative; display: grid; place-items: center; }
.turn__stack .turn__word { grid-area: 1 / 1; }
.turn__word--a { color: var(--ink); opacity: 0; }
.turn__word--b { color: var(--art-ink); font-weight: 800; }
.turn__index { color: var(--art-ink-soft); }
.turn__caption { color: var(--art-ink-soft); max-width: 36ch; margin-inline: auto; font-size: var(--t-small); }
.turn.is-armed .turn__wipe { clip-path: inset(100% 0 0 0); }
.turn.is-armed .turn__grid line { stroke-dashoffset: 0; }
.turn.is-armed .turn__word--a { opacity: 1; }
.turn.is-armed .turn__word--b { clip-path: inset(0 0 100% 0); }
.turn.is-armed .turn__index, .turn.is-armed .turn__caption { color: var(--ink-muted); }
/* touch / no-GSAP fallback: a state change on entering view, not a scrub */
.turn.is-lite .turn__stage { height: auto; min-height: 0; padding: clamp(6rem, 18svh, 12rem) 0; }
.turn.is-lite .turn__wipe { transition: clip-path 1100ms var(--ease-out); }
.turn.is-lite .turn__grid line { transition: stroke-dashoffset 900ms var(--ease-out); }
.turn.is-lite .turn__word--a { transition: opacity 400ms var(--ease-in), transform 400ms var(--ease-in); }
.turn.is-lite .turn__word--b { transition: clip-path 700ms var(--ease-out) 350ms, transform 700ms var(--ease-out) 350ms; transform: translateY(8%); }
.turn.is-lite .turn__index, .turn.is-lite .turn__caption { transition: color 500ms 400ms; }
.turn.is-lite.is-turned .turn__wipe { clip-path: inset(0 0 0 0); }
.turn.is-lite.is-turned .turn__grid line { stroke-dashoffset: 1; }
.turn.is-lite.is-turned .turn__word--a { opacity: 0; transform: translateY(-30%); }
.turn.is-lite.is-turned .turn__word--b { clip-path: inset(0 0 0 0); transform: none; }
.turn.is-lite.is-turned .turn__index, .turn.is-lite.is-turned .turn__caption { color: var(--art-ink-soft); }

/* --------------------------------------------------------------------------
   Art & Illustration
   -------------------------------------------------------------------------- */
.art { background: var(--art-ground); color: var(--art-ink-soft); --line: rgba(244, 241, 235, 0.14); --line-strong: rgba(244, 241, 235, 0.3); --ink: var(--art-ink); --ink-muted: var(--art-ink-soft); --ink-body: var(--art-ink-soft); --surface: var(--art-ground-soft); --card: #221a22; --accent: var(--accent-dark); }
.art h2, .art h3 { color: var(--art-ink); }
.art .lede { color: var(--art-ink-soft); }
.art .section__head { margin-bottom: clamp(2.5rem, 2rem + 3vw, 5.5rem); }
.art-grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); }
.art-piece { position: relative; display: grid; gap: var(--s-4); }
.art-piece__media { position: relative; border-radius: var(--r-l); overflow: hidden; background: var(--art-ground-soft); }
.art-piece__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.art-piece:hover .art-piece__media img { transform: scale(1.025); }
.art-piece__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none; }
.art-piece__caption { display: grid; gap: var(--s-2); }
.art-piece__title { font-size: var(--t-h3); }
.art-piece__title a::after { content: ""; position: absolute; inset: 0; }
.art-piece__title a:hover { color: var(--art-ochre); }
.art-piece__row { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: baseline; }
.art-piece__award { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(188, 133, 80, 0.18); color: #e8c9a5; font-size: var(--t-caption); font-weight: 600; }
.art-piece__award svg { width: 14px; height: 14px; }
.art-piece--wide .art-piece__media { aspect-ratio: 16 / 10; }
.art-piece--sq .art-piece__media { aspect-ratio: 1; }
.art-piece--land .art-piece__media { aspect-ratio: 4 / 3; }
.art-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.art-thumbs img { aspect-ratio: 1; object-fit: cover; object-position: 50% 12%; border-radius: var(--r-s); }
.art-piece--14 .art-piece__media { background: #f5f6f8; }
.art-piece--14 .art-piece__media img { object-fit: contain; }
@media (min-width: 768px) {
  .art-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: start; }
  .art-piece--11 { grid-column: 1 / 4; grid-row: 1 / 3; }
  .art-piece--12 { grid-column: 4 / 7; grid-row: 1; }
  .art-piece--13 { grid-column: 4 / 7; grid-row: 2; align-self: end; }
  .art-piece--14 { grid-column: 1 / 7; grid-row: 3; grid-template-columns: 1fr; }
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .art-piece--14 { margin-inline: calc(var(--gutter) * -1); }
  .art-piece--14 .art-piece__media { border-radius: 0; aspect-ratio: 16 / 9; }
  .art-piece--14 .art-piece__caption { padding-inline: var(--gutter); }
}
@media (min-width: 768px) and (max-width: 1279.98px) {
  /* the drawing fills whatever height the two stacked pieces on the right take, so the columns end together */
  .art-piece--11 { align-self: stretch; grid-template-rows: minmax(0, 1fr) auto auto; }
  .art-piece--11 .art-piece__media { aspect-ratio: auto; min-height: 0; }
  .art-piece--11 .art-piece__media img { object-position: 50% 15%; }
}
@media (min-width: 1024px) {
  .art-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; row-gap: clamp(4rem, 3rem + 4vw, 7rem); }
  /* big drawing on the left, two 4:3 pieces stacked on the right so both columns end together; the shawl full width below */
  .art-piece--11 { grid-column: 1 / 8; grid-row: 1 / 3; }
  .art-piece--12 { grid-column: 9 / 13; grid-row: 1; align-self: start; }
  .art-piece--13 { grid-column: 9 / 13; grid-row: 2; align-self: end; }
  .art-piece--14 { grid-column: 1 / 13; grid-row: 3; }
  .art-piece--14 .art-piece__media { aspect-ratio: 16 / 9; }
}
.art__foot { margin-top: clamp(3rem, 2rem + 4vw, 6rem); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4); padding-top: var(--s-5); border-top: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Profile — statement + portrait, facts strip, labelled bio columns
   -------------------------------------------------------------------------- */
.profile { background: var(--canvas); }
.profile__lead { display: grid; gap: var(--s-6); align-items: start; }
.statement { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.625rem, 1.1rem + 2.2vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); max-width: 24ch; }
.statement .w { display: inline-block; transition: opacity 500ms var(--ease-out); transition-delay: calc(var(--i) * 28ms); }
.js .statement:not(.is-in) .w { opacity: 0.5; }
.who { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: center; }
.who__portrait { width: 96px; max-width: 160px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 4px var(--canvas), 0 0 0 5px var(--line); }
.who__portrait img { width: 100%; height: 100%; object-fit: cover; }
.who__name { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; font-size: 1.25rem; line-height: 1.1; color: var(--ink); }
.who__role { color: var(--ink-body); font-size: var(--t-small); margin-top: 4px; }
.who__socials { display: flex; gap: var(--s-2); margin-top: var(--s-3); }
.who__socials .social { min-height: 40px; width: 40px; padding: 0; justify-content: center; }
.who__socials .social span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: var(--s-8); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { display: grid; gap: var(--s-3); padding: var(--s-5) var(--s-4) var(--s-5) 0; border-bottom: 1px solid var(--line); }
.fact:nth-child(odd) { border-right: 1px solid var(--line); }
.fact:nth-child(even) { padding-left: var(--s-4); }
.fact:nth-last-child(-n+2) { border-bottom: 0; }
.fact__num { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.04em; font-size: clamp(2.5rem, 1.8rem + 2.4vw, 4rem); line-height: 0.9; color: var(--ink); font-variant-numeric: tabular-nums; }
.fact__num sup { font-size: 0.4em; vertical-align: top; color: var(--accent); margin-left: 2px; font-weight: 600; }
.fact__label { display: grid; gap: 2px; color: var(--ink-body); font-size: var(--t-small); }

.bio { display: grid; gap: var(--s-6); margin-top: var(--s-8); }
.bio__item { display: grid; gap: var(--s-3); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.bio__item p { max-width: 60ch; }
.bio__item .h3 { font-size: 1.125rem; }
.bio__life { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.bio__life .chip { min-height: 36px; }
@media (min-width: 768px) {
  .profile__lead { grid-template-columns: 1fr auto; }
  .who { grid-template-columns: 1fr; text-align: center; justify-items: center; width: 200px; }
  .who__portrait { width: 160px; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .fact, .fact:nth-child(even) { padding: var(--s-6) var(--s-5); border-bottom: 0; border-right: 1px solid var(--line); }
  .fact:first-child { padding-left: 0; }
  .fact:last-child { border-right: 0; padding-right: 0; }
  .bio__item { grid-template-columns: 11rem 1fr; gap: var(--s-2) var(--s-6); align-items: start; }
  .bio__item .h3 { grid-row: 1 / 3; white-space: nowrap; }
}
@media (min-width: 1024px) {
  .profile__lead { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .statement { grid-column: 1 / 9; }
  .who { grid-column: 10 / 13; width: auto; }
  .bio__item { grid-template-columns: 3fr 6fr 3fr; }
  .bio__item .h3 { grid-column: 1; }
  .bio__item p, .bio__item .bio__life { grid-column: 2; }
}

/* CV blocks — one rhythm, full width, table-like rows */
.cv { margin-top: var(--section); display: grid; gap: clamp(3rem, 2rem + 4vw, 6rem); }
.cv__block { display: grid; gap: var(--s-5); }
.cv__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-4); border-bottom: 1px solid var(--ink); }
.cv__head .h3 { display: flex; align-items: baseline; gap: var(--s-3); }
.cv__rows { display: grid; }
.row { display: grid; gap: var(--s-2); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); }
.row__when { color: var(--ink-muted); }
.row__role { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.2; color: var(--ink); }
.row__org { color: var(--ink-body); font-size: var(--t-small); }
.row__desc { color: var(--ink-body); font-size: var(--t-small); line-height: 1.55; max-width: 60ch; }
@media (min-width: 768px) {
  .row { grid-template-columns: 10rem 1fr; gap: var(--s-1) var(--s-6); }
  .row__when { grid-row: 1 / 4; padding-top: 0.35em; }
}
@media (min-width: 1024px) {
  .row { grid-template-columns: 2fr 4fr 6fr; gap: var(--s-1) var(--gap); align-items: start; }
  .row__when { grid-row: 1 / 3; grid-column: 1; }
  .row__role { grid-column: 2; }
  .row__org { grid-column: 2; }
  .row__desc { grid-column: 3; grid-row: 1 / 3; }
}
.certs { display: grid; gap: var(--s-3); }
.certs > li { display: grid; }
.cert { position: relative; width: 100%; display: grid; grid-template-columns: 1fr auto; gap: var(--s-2) var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); min-height: 88px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); transition: transform var(--d-normal) var(--ease-out), box-shadow var(--d-normal); }
.cert:hover { transform: translateY(-2px); box-shadow: var(--shadow-mid); }
.cert__title { color: var(--ink); font-weight: 600; font-size: var(--t-small); grid-column: 1; }
.cert__meta { grid-column: 1; }
.cert__go { grid-column: 2; grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink); transition: background-color var(--d-micro), color var(--d-micro), transform var(--d-normal) var(--ease-out); }
.cert__go svg { width: 16px; height: 16px; }
.cert:hover .cert__go { background: var(--ink); color: #fff; transform: rotate(-45deg); }
@media (min-width: 768px) { .certs { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); } }
.langs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lang { display: grid; gap: 4px; padding: var(--s-4) var(--s-4) var(--s-4) 0; border-bottom: 1px solid var(--line); }
.lang:nth-child(odd) { border-right: 1px solid var(--line); }
.lang:nth-child(even) { padding-left: var(--s-4); }
.lang:nth-last-child(-n+2) { border-bottom: 0; }
.lang__name { color: var(--ink); font-weight: 600; }
@media (min-width: 768px) {
  .langs { grid-template-columns: repeat(4, 1fr); }
  .lang, .lang:nth-child(even) { padding: var(--s-5) var(--s-4); border-bottom: 0; border-right: 1px solid var(--line); }
  .lang:first-child { padding-left: 0; } .lang:last-child { border-right: 0; }
}

/* --------------------------------------------------------------------------
   Services — scroll-driven 3D drum. The section pins; one full scroll pass
   turns the drum one revolution, then the page moves on.
   -------------------------------------------------------------------------- */
.services { background: var(--canvas); overflow: clip; padding-top: 0; }
.services__pin { height: 340svh; }
.services__sticky { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(1rem, 2vh, 2.5rem); padding-top: 72px; }
@media (min-width: 768px) and (max-width: 1023.98px) { .services__sticky { height: auto; min-height: 0; top: max(0px, calc((100svh - 760px) / 2)); padding-top: 84px; padding-bottom: var(--s-6); } }
.section__head--center { text-align: center; justify-items: center; margin-bottom: 0; }
.section__head--center .h2 { max-width: 18ch; margin-inline: auto; }
@media (min-width: 1024px) { .section__head--center { display: grid; grid-template-columns: 1fr; } .section__head--center .h2, .section__head--center .lede { grid-column: auto; } }
.drum-stage {
  --card-w: 380px; --card-h: 400px; --radius: 620px;
  position: relative; height: calc(var(--card-h) + 40px); perspective: 1400px; perspective-origin: 50% 50%;
}
.drum { position: absolute; left: 50%; top: 50%; width: var(--card-w); height: var(--card-h); margin: calc(var(--card-h) / -2) 0 0 calc(var(--card-w) / -2); transform-style: preserve-3d; transform: translateZ(calc(var(--radius) * 0.72)) rotateY(var(--angle, 0deg)); will-change: transform; }
.scard {
  position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; gap: var(--s-3); padding: var(--s-5);
  background: linear-gradient(160deg, #222424 0%, var(--dark-2) 55%, #141516 100%); color: #c6c6c6; border-radius: var(--r-l); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transform: rotateY(var(--a)) translateZ(calc(var(--radius) * -1)) scale(var(--s, 1));
  box-shadow: 0 30px 60px -30px rgba(26, 28, 28, 0.5);
  transition: filter 200ms, transform var(--d-macro) var(--ease-out), background-color 200ms, color 200ms;
  filter: brightness(0.72) saturate(0.85);
}
.scard.is-front { --s: 1.04; filter: none; box-shadow: 0 40px 80px -30px rgba(26, 28, 28, 0.55); }
.scard.is-front .scard__ghost { color: rgba(121, 154, 255, 0.10); }
.scard.is-front .scard__index { color: var(--accent-dark); }
.scard.is-front::before { background: radial-gradient(70% 60% at 0% 0%, rgba(65, 112, 255, 0.16), rgba(65, 112, 255, 0) 70%); }
.scard::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 0% 0%, rgba(255,255,255,0.08), rgba(255,255,255,0) 70%); pointer-events: none; }
.scard::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); pointer-events: none; transition: box-shadow var(--d-normal); }
.scard.is-front::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10), inset 0 1.5px 0 var(--accent-dark); }
.scard__head { display: flex; align-items: flex-start; justify-content: space-between; }
.scard__icon { position: relative; width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent-dark); }
.scard__icon svg { width: 24px; height: 24px; }
.scard__icon::before, .scard__icon::after { content: ""; position: absolute; width: 13px; height: 13px; border: 1.5px solid currentColor; opacity: 0.8; }
.scard__icon::before { left: 0; top: 0; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.scard__icon::after { right: 0; bottom: 0; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.scard__index { color: #909191; }
.scard__body { display: grid; gap: var(--s-3); align-content: start; }
.scard__title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.15; color: #fff; transition: color var(--d-normal); }
.scard__desc { font-size: var(--t-small); line-height: 1.55; color: #c6c6c6; }
.scard__ghost { position: absolute; right: -6px; bottom: -22px; font-family: var(--font-display); font-weight: 800; font-size: 7.5rem; line-height: 1; letter-spacing: -0.06em; color: rgba(255,255,255,0.045); pointer-events: none; user-select: none; }
.scard__foot { display: flex; align-items: center; gap: var(--s-2); color: #909191; }
.scard__foot i { flex: 1; height: 1px; background: rgba(255,255,255,0.12); }
.drum-readout { display: flex; align-items: center; justify-content: center; gap: var(--s-4); }
.drum-progress { width: 160px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.drum-progress i { display: block; height: 100%; width: 100%; background: var(--ink); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
@media (min-width: 768px) { .drum-stage { --card-w: 420px; --card-h: 400px; --radius: 700px; } }
@media (min-width: 1440px) { .drum-stage { --card-w: 440px; --card-h: 420px; --radius: 740px; } }
@media (max-width: 767.98px) {
  .services__pin { height: 220svh; }
  .services__sticky { height: auto; min-height: 0; padding: 92px 0 var(--s-6); gap: var(--s-5); justify-content: flex-start; }
  .drum-stage { --card-w: 240px; --card-h: 292px; --radius: 470px; perspective: 900px; height: calc(var(--card-h) + 16px); }
  .scard__title { font-size: 1.125rem; }
  .scard__desc { font-size: 0.875rem; }
  .scard { padding: var(--s-4); gap: var(--s-2); }
  .scard.is-front { --s: 1.02; }
  .scard__ghost { font-size: 5rem; right: -4px; bottom: -16px; }
  .scard__icon { width: 44px; height: 44px; }
  .drum-readout { padding-inline: var(--gutter); gap: var(--s-3); }
  .drum-readout .mono { font-size: 0.6875rem; letter-spacing: 0.1em; white-space: nowrap; }
  .drum-progress { width: 72px; flex: 0 0 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .services__pin { height: auto; } .services__sticky { position: static; height: auto; padding-top: var(--section); }
  .drum-stage { height: auto; perspective: none; padding-inline: var(--gutter); }
  .drum { position: static; width: auto; height: auto; margin: 0; transform: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); max-width: var(--container); margin-inline: auto; }
  .scard, .scard.is-front { position: relative; transform: none; filter: none; min-height: 300px; box-shadow: none; }
  .scard.is-front::after { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07); } .scard.is-front::before { background: none; }
  .drum-readout { display: none; }
}

.process { margin-top: 0; display: grid; gap: var(--s-6); padding-top: var(--section); border-top: 1px solid var(--line); }
.process__head { display: grid; gap: var(--s-3); }
.process__steps { display: grid; gap: 0; counter-reset: step; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 3.5rem 1fr; gap: var(--s-3); padding: var(--s-5) 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.step__title { font-family: var(--font-display); font-weight: 600; font-size: var(--t-h3); color: var(--ink); line-height: 1.15; }
.step__desc { color: var(--ink-body); font-size: var(--t-small); max-width: 52ch; grid-column: 2; }
@media (min-width: 1024px) {
  .process { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .process__head { grid-column: 1 / 5; align-content: start; position: sticky; top: calc(var(--nav-h) + var(--s-5)); }
  .process__steps { grid-column: 6 / 13; }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact { background: var(--canvas); }
.contact__inner { display: grid; gap: var(--s-7); }
.contact__copy { display: grid; gap: var(--s-4); align-content: start; }
.contact__socials { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.form { display: grid; gap: var(--s-5); position: relative; }
.form__row { display: grid; gap: var(--s-5); }
.field { display: grid; gap: var(--s-2); }
.field label { color: var(--ink); font-weight: 500; font-size: var(--t-small); }
.field label .req { color: var(--accent); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line-strong); background: transparent;
  font: inherit; color: var(--ink); border-radius: 0; transition: border-color var(--d-micro);
}
.field textarea { min-height: 128px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-bottom: 2px solid var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-muted); }
.field__error { color: #a3321f; font-size: var(--t-caption); min-height: 1.2em; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #a3321f; }
.form__actions { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.form__note { color: var(--ink-muted); font-size: var(--t-caption); }
.form__success {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: var(--s-3);
  background: var(--canvas); opacity: 0; visibility: hidden; transition: opacity var(--d-normal), visibility 0s var(--d-normal);
}
.form.is-sent .form__success { opacity: 1; visibility: visible; transition: opacity var(--d-normal), visibility 0s; }
.form__success .h2 { font-weight: 700; }
.form__success svg { width: 40px; height: 40px; margin-inline: auto; color: var(--accent); }
@media (min-width: 768px) { .form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1440px) {
  .contact__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .contact__copy { grid-column: 1 / 6; }
  .form { grid-column: 7 / 13; }
}

.social {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); color: var(--ink); font-weight: 500; font-size: var(--t-small);
  transition: background-color var(--d-micro), color var(--d-micro), border-color var(--d-micro);
}
.social svg { width: 18px; height: 18px; }
.social:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { position: relative; overflow: hidden; background: var(--dark); color: #c6c6c6; --ink: #ffffff; --line: rgba(255, 255, 255, 0.12); --line-strong: rgba(255, 255, 255, 0.3); --ink-muted: #909191; padding-top: var(--section); }
/* water band — pixel ripples across the bottom of the footer */
.footer__water { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 320px; pointer-events: none; image-rendering: auto; opacity: 0.9; }
.footer__inner { position: relative; z-index: 1; }
@media (max-width: 767.98px) { .footer__water { height: 220px; } }
@media (prefers-reduced-motion: reduce) { .footer__water { display: none; } }
.footer__cta { display: grid; gap: var(--s-7); padding-bottom: var(--section); border-bottom: 1px solid var(--line); align-items: end; }
.footer__cta .display { color: #fff; max-width: 12ch; }
.footer__cta .display em { color: var(--accent-dark); font-weight: 800; }
.footer__index { display: grid; gap: var(--s-4); align-self: end; }
.footer__index ul { display: grid; gap: 2px; }
.footer__index a { display: inline-flex; align-items: baseline; gap: var(--s-3); min-height: 44px; color: #c6c6c6; font-weight: 500; font-size: var(--t-small); transition: color var(--d-micro), transform var(--d-normal) var(--ease-out); }
.footer__index a .mono { color: #8d8e8e; }
.footer__index a:hover { color: #fff; transform: translateX(4px); }
.footer__index a:hover .mono { color: var(--accent-dark); }
/* back to top badge: rotating ring of type, arrow core */
.totop { position: relative; display: grid; place-items: center; width: 132px; height: 132px; justify-self: end; color: #fff; border-radius: 50%; }
.totop__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: totop-spin 22s linear infinite; }
.totop__ring text { font-family: var(--font-mono); font-size: 9.6px; letter-spacing: 0.22em; fill: #c6c6c6; }
.totop__core { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: var(--dark); overflow: hidden; transition: background-color var(--d-normal), transform var(--d-normal) var(--ease-out); }
.totop__core svg { width: 22px; height: 22px; transition: transform 500ms var(--ease-out); }
.totop:hover .totop__core { background: var(--accent-dark); transform: scale(1.06); }
.totop:hover .totop__core svg { animation: totop-launch 600ms var(--ease-out); }
.totop:hover .totop__ring { animation-duration: 6s; }
.totop:focus-visible { outline-color: var(--accent-dark); }
@keyframes totop-spin { to { transform: rotate(360deg); } }
@keyframes totop-launch { 0% { transform: translateY(0); } 45% { transform: translateY(-140%); } 50% { transform: translateY(140%); } 100% { transform: translateY(0); } }
@media (min-width: 768px) {
  .footer__cta { grid-template-columns: 1fr auto; }
  .footer__cta .display { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .footer__cta { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer__cta .display { grid-column: 1 / 8; }
  .footer__index { grid-column: 8 / 11; }
  .totop { grid-column: 11 / 13; }
}
@media (prefers-reduced-motion: reduce) { .totop__ring { animation: none; } .totop:hover .totop__core svg { animation: none; } }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-4); padding-block: var(--s-6); }
.footer__socials { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.footer .social { color: #fff; }
.footer .social:hover { background: #fff; color: var(--dark); border-color: #fff; }
.footer__copy { color: #909191; font-size: var(--t-small); }
.footer__logo { display: inline-flex; align-items: center; min-height: 44px; }
.footer__logo img { height: 34px; width: auto; }
@media (min-width: 1024px) {
  .footer__cta { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .footer__cta .display { grid-column: 1 / 8; }
  .footer__cta-row { grid-column: 8 / 13; justify-content: flex-end; }
}

/* --------------------------------------------------------------------------
   Dialog (projects + certificates share it)
   -------------------------------------------------------------------------- */
.dialog {
  width: min(100vw - 24px, 1120px); max-height: min(100svh - 24px, 960px); padding: 0; border: 0; border-radius: var(--r-l);
  background: var(--canvas); color: var(--ink-body); box-shadow: var(--shadow-high); overflow: hidden;
  margin: auto;
}
.dialog::backdrop { background: rgba(18, 18, 18, 0.6); backdrop-filter: blur(4px); }
.dialog[open] { animation: dialog-in var(--d-normal) var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.dialog__scroll { max-height: inherit; overflow-y: auto; overscroll-behavior: contain; }
.dialog__head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); background: rgba(250, 249, 245, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.dialog__close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink); transition: background-color var(--d-micro), color var(--d-micro); }
.dialog__close:hover { background: var(--ink); color: #fff; }
.dialog__close svg { width: 18px; height: 18px; }
.dialog__body { padding: var(--s-5); display: grid; gap: var(--s-6); }
.dialog__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); }
.dialog__meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.dialog__desc { display: grid; gap: var(--s-3); max-width: 68ch; }
.dialog__gallery { position: relative; }
.g-item { position: absolute; left: 0; top: 0; margin: 0; border-radius: var(--r-m); overflow: hidden; background: var(--surface); }
.g-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.g-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.g-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.g-open img { transition: transform var(--d-macro) var(--ease-out); }
.g-open:hover img { transform: scale(1.015); }
.dialog__gallery--single .g-item { position: relative; transform: none !important; width: 100% !important; height: auto !important; }
.dialog__gallery--single .g-item img { height: auto; }

.lightbox { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(18, 18, 18, 0.96); color: #fff; }
.lightbox::backdrop { background: rgba(18, 18, 18, 0.6); }
.lightbox__fig { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; padding: calc(64px + env(safe-area-inset-top)) calc(var(--s-5) + env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) calc(var(--s-5) + env(safe-area-inset-left)); box-sizing: border-box; touch-action: none; overflow: hidden; }
.lightbox__fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: var(--r-s); transform-origin: center; transition: transform 160ms var(--ease-out); will-change: transform; }
.lightbox.is-zoomed img { transition: none; cursor: grab; }
.lightbox__count { position: absolute; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); color: #c6c6c6; }
.lightbox__btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(18, 18, 18, 0.6); color: #fff; display: grid; place-items: center; transition: background-color var(--d-micro), border-color var(--d-micro); }
.lightbox__btn:hover { background: #fff; color: var(--ink); }
.lightbox__btn svg { width: 18px; height: 18px; }
.lightbox__close { top: calc(16px + env(safe-area-inset-top)); right: calc(16px + env(safe-area-inset-right)); }
.lightbox__prev { left: calc(12px + env(safe-area-inset-left)); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: calc(12px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); }
.dialog__links { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.dialog__cert { border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); background: #fff; }
@media (min-width: 768px) {
  .dialog__body { padding: var(--s-6); grid-template-columns: 1fr; }
}

/* odometer counters */
.odo { display: inline-flex; align-items: flex-start; }
.odo__digit { display: inline-block; height: 1em; line-height: 1; overflow: hidden; }
.odo__strip { display: block; transform: translateY(0); transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1); transition-delay: calc(var(--i) * 120ms); }
.odo__strip span { display: block; height: 1em; line-height: 1; }
.is-rolled .odo__strip { transform: translateY(calc(var(--d) * -1em)); }
.fact__num, .stat__num { line-height: 1; }

/* --------------------------------------------------------------------------
   Reveal (scroll-triggered entrances)
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--d-macro) var(--ease-out), transform var(--d-macro) var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-group > * { opacity: 0; transform: translateY(20px); transition: opacity var(--d-macro) var(--ease-out), transform var(--d-macro) var(--ease-out); }
.js .reveal-group.is-in > * { opacity: 1; transform: none; }
.js .reveal-group.is-in > *:nth-child(2) { transition-delay: 40ms; }
.js .reveal-group.is-in > *:nth-child(3) { transition-delay: 80ms; }
.js .reveal-group.is-in > *:nth-child(4) { transition-delay: 120ms; }
.js .reveal-group.is-in > *:nth-child(5) { transition-delay: 160ms; }
.js .reveal-group.is-in > *:nth-child(6) { transition-delay: 200ms; }
.js .reveal-group.is-in > *:nth-child(n+7) { transition-delay: 240ms; }

/* --------------------------------------------------------------------------
   Reduced motion — still designed, just still
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .marquee { animation: none; width: auto; flex-wrap: wrap; }
  .marquee > [aria-hidden="true"] { display: none; }
  .js .reveal, .js .reveal-group > * { opacity: 1; transform: none; }
  .cursor-frame { display: none !important; }
  .turn__stage { height: auto; min-height: 0; padding: var(--section) 0; }
  .turn.is-armed .turn__wipe { clip-path: none; }
  .turn.is-armed .turn__grid line { stroke-dashoffset: 1; }
  .turn.is-armed .turn__word--a { opacity: 0; }
  .turn.is-armed .turn__word--b { clip-path: none; }
  .turn.is-armed .turn__index, .turn.is-armed .turn__caption { color: var(--art-ink-soft); }
}

/* --------------------------------------------------------------------------
   Mobile rhythm: tighter section spacing
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  :root { --section: 3.25rem; }
  .section__head { margin-bottom: 1.75rem; }
  .art .section__head { margin-bottom: 2rem; }
  .art-grid { gap: 2.5rem; }
  .art__foot { margin-top: 2.5rem; }
  .facts { margin-top: 2.5rem; }
  .bio { margin-top: 2.5rem; gap: 1.5rem; }
  .cv { margin-top: 3rem; gap: 2.5rem; }
  .process { padding-top: 3rem; }
  .contact__inner { gap: 2.5rem; }
  .footer { padding-top: 2.75rem; }
  .footer__cta { padding-bottom: 2.25rem; gap: 1.75rem; grid-template-columns: 1fr auto; align-items: end; }
  .footer__cta .display { grid-column: 1 / -1; }
  .footer__index a { min-height: 44px; }
  .totop { width: 108px; height: 108px; align-self: end; }
  .totop__core { width: 46px; height: 46px; }
  .totop__ring text { font-size: 10.5px; }
  .footer__bottom { padding-block: var(--s-5); gap: var(--s-3); }
  .hero { min-height: 0; padding-top: calc(var(--nav-h) + var(--s-5)); }
  .hero__marquee { margin-top: var(--s-5); }
}

/* mobile: social buttons as an even 2x2 grid */
@media (max-width: 767.98px) {
  .footer__socials, .overlay__foot, .contact__socials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2); width: 100%; }
  .footer__socials .social, .overlay__foot .social, .contact__socials .social { width: 100%; justify-content: center; }
  .footer__bottom { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: var(--s-4); }
  .footer__copy { text-align: left; }
}
