/* =========================================================
   NEERAJ — Portfolio
   Pure HTML + CSS. No build step or server runtime required.
   Sections:
   01 Tokens & themes     07 Stats          13 Awards / Education
   02 Base & type         08 Selected work  14 Footer CTA
   03 Utilities           09 Shipped rail   15 Case study pages
   04 Loader & transitions 10 AI workflow   16 Scroll reveal
   05 Navigation          11 Experience     17 Responsive
   06 Hero & marquee      12 About / Skills 18 Reduced motion
   ========================================================= */

/* ---------- 01 Tokens & themes ---------- */
@property --num { syntax: "<integer>"; initial-value: 0; inherits: false; }
@property --pct { syntax: "<integer>"; initial-value: 0; inherits: false; }

:root {
  color-scheme: light;
  --bg: #F2F0EA;
  --bg-2: #E9E6DE;
  --surface: #FFFFFF;
  --ink: #0E0E0C;
  --ink-2: #3A3934;
  --muted: #66635B;
  --line: rgba(14, 14, 12, .12);
  --line-strong: rgba(14, 14, 12, .28);
  --accent: #FF4D17;
  --accent-ink: #0E0E0C;
  --on-accent: #0E0E0C;
  --accent-text: #B4380C;      /* AA on light surfaces */
  --accent-text-inv: #FF4D17;  /* AA on the dark inverted panels */
  --lime: #D4FF3A;
  --invert-bg: #0E0E0C;
  --invert-ink: #F2F0EA;
  --grain: .07;

  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --radius: 22px;
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Dark mode: the checkbox #theme lives at the top of <body> */
html:is(.dark-boot, :has(#theme:checked)) {
  color-scheme: dark;
  --bg: #0B0B0A;
  --bg-2: #131311;
  --surface: #191917;
  --ink: #F2F0EA;
  --ink-2: #CFCCC3;
  --muted: #8E8B82;
  --line: rgba(242, 240, 234, .12);
  --line-strong: rgba(242, 240, 234, .3);
  --accent: #FF5A26;
  --on-accent: #0B0B0A;
  --accent-text: #FF5A26;
  --accent-text-inv: #B4380C;
  --invert-bg: #F2F0EA;
  --invert-ink: #0B0B0A;
  --grain: .09;
}

/* ---------- 02 Base & type ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .6s var(--ease), color .6s var(--ease);
}
/* film grain */
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -2%); } 60% { transform: translate(-2%, -4%); }
  80% { transform: translate(4%, 2%); } 100% { transform: translate(0, 0); }
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.035em; line-height: .95; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 55%, transparent); }
[tabindex="-1"]:focus { outline: none; box-shadow: none; } /* sections focused by in-page links: no ring around the whole section */
.footer :focus-visible, .shipped :focus-visible { outline-color: var(--invert-ink); }

.serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.mono { font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.accent { color: var(--accent-text); }

/* ---------- 03 Utilities ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 12vw, 160px); position: relative; }
.skip { position: fixed; top: -100px; left: 16px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; }
.skip:focus { top: 16px; }

.eyebrow {
  font-weight: 400; line-height: 1.4; margin: 0;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px 40px; margin-bottom: clamp(40px, 6vw, 80px); }
.sec-title { font-size: clamp(44px, 7.4vw, 124px); font-weight: 800; letter-spacing: -.025em; }
.sec-title .serif { font-weight: 400; }
.sec-kicker { max-width: 380px; color: var(--ink-2); margin: 0; }
.sec-head .eyebrow { grid-column: 1 / -1; }

/* Buttons */
.btn {
  --b-bg: var(--ink); --b-ink: var(--bg);
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 24px; border-radius: 999px;
  background: var(--b-bg); color: var(--b-ink);
  font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap;
  border: 1px solid var(--b-bg);
  transition: color .45s var(--ease), border-color .45s var(--ease), transform .3s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent); border-radius: inherit;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover { color: var(--on-accent); border-color: var(--accent); }
.btn:hover::before { transform: translateY(0); }
.btn:active { transform: scale(.97); }
.btn--ghost { --b-bg: transparent; --b-ink: var(--ink); border-color: var(--line-strong); }
.btn--accent { --b-bg: var(--accent); --b-ink: var(--on-accent); }
.btn--accent::before { background: var(--ink); }
.btn--accent:hover { border-color: var(--ink); color: var(--bg); }
.btn .ico { width: 18px; height: 18px; transition: transform .5s var(--ease); }
.btn:hover .ico--dl { transform: translateY(3px); }
.btn:hover .ico--arrow { transform: rotate(-45deg); }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 14px; color: var(--ink-2); white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s;
}
.chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- 04 Loader & page transitions ---------- */
.loader {
  position: fixed; inset: 0; z-index: 150;
  background: var(--invert-bg); color: var(--invert-ink);
  display: grid; place-items: end start; padding: var(--gutter);
  animation: loader-out .9s var(--ease) 1.5s forwards;
  pointer-events: none;
}
.loader__count {
  --num: 100;
  font-size: clamp(90px, 22vw, 320px); font-weight: 800; line-height: .8; letter-spacing: -.035em;
  counter-reset: n var(--num);
  animation: count-up 1.4s var(--ease) both;
}
.loader__count::after { content: counter(n) "%"; }
.loader__name { position: absolute; top: var(--gutter); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; }
.loader__bar { position: absolute; left: 0; bottom: 0; height: 6px; width: 100%; background: var(--accent); transform-origin: left; animation: bar 1.4s var(--ease) both; }
@keyframes count-up { from { --num: 0; } to { --num: 100; } }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes loader-out { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
.loader { clip-path: inset(0 0 0 0); }
html.seen .loader { display: none; }

/* Cross-document page transitions (Chrome/Edge 126+, Safari 18.2+). Graceful elsewhere. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .6s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .7s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6vh) scale(.96); filter: blur(6px); } }
@keyframes vt-in { from { clip-path: inset(100% 0 0 0); transform: translateY(8vh); } to { clip-path: inset(0 0 0 0); transform: none; } }
::view-transition-group(*) { animation-duration: .7s; animation-timing-function: var(--ease); }

/* ---------- 05 Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  animation: nav-in .9s var(--ease-out) 1.6s backwards;
}
html.seen .nav, .case .nav { animation-delay: .1s; }
@keyframes nav-in { from { transform: translateY(-120%); } }
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.04em; }
.logo__mark {
  width: 36px; height: 46px; flex: none; background: var(--ink);
  -webkit-mask: url("../img/logo-mark.svg") center / contain no-repeat; mask: url("../img/logo-mark.svg") center / contain no-repeat;
  transition: transform .6s var(--ease), background .4s;
}
.logo__text { font-size: 19px; letter-spacing: -.02em; line-height: 1; }
.logo__text small { display: block; font-family: var(--f-mono); font-size: 10px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.06); background: var(--accent); }
.logo .dot { color: var(--accent-text); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nav-links a { display: block; padding: 8px 16px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink-2); transition: background .3s, color .3s; }
.nav-links a:hover { background: var(--ink); color: var(--bg); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav .btn { padding: 11px 18px; font-size: 14px; }

.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

/* Theme toggle */
.toggle {
  position: relative; width: 64px; height: 36px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: space-between; padding: 0 9px;
  color: var(--muted);
}
.toggle svg { width: 16px; height: 16px; position: relative; z-index: 1; transition: color .4s; }
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); transition: transform .5s var(--ease), background .5s;
}
.toggle .sun { color: var(--bg); }
html:is(.dark-boot, :has(#theme:checked)) .toggle::after { transform: translateX(28px); }
html:is(.dark-boot, :has(#theme:checked)) .toggle .sun { color: var(--muted); }
html:is(.dark-boot, :has(#theme:checked)) .toggle .moon { color: var(--bg); }
#theme:focus-visible ~ .nav .toggle, #menu:focus-visible ~ .nav .burger { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (min-width: 1101px) { #menu { display: none; } }

.burger { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); cursor: pointer; place-items: center; }
.burger span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: transform .4s var(--ease); }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); transition: transform .4s var(--ease); }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
html:has(#menu:checked) .burger span { background: transparent; }
html:has(#menu:checked) .burger span::before { transform: translateY(6px) rotate(45deg); }
html:has(#menu:checked) .burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 06 Hero & marquee ---------- */
.hero { position: relative; min-height: 100svh; padding-top: 130px; padding-bottom: 40px; display: flex; flex-direction: column; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 40%, #000 20%, transparent 75%);
  animation: grid-pan 30s linear infinite;
}
@keyframes grid-pan { to { background-position: 88px 88px; } }
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.blob--1 { width: 46vw; height: 46vw; right: -10vw; top: -8vw; background: var(--accent); animation: float1 16s ease-in-out infinite alternate; opacity: .35; }
.blob--2 { width: 34vw; height: 34vw; left: 20vw; bottom: -18vw; background: var(--lime); animation: float2 20s ease-in-out infinite alternate; opacity: .4; }
html:is(.dark-boot, :has(#theme:checked)) .blob--2 { opacity: .16; }
html:is(.dark-boot, :has(#theme:checked)) .blob--1 { opacity: .28; }
@keyframes float1 { to { transform: translate(-12vw, 10vw) scale(1.15); } }
@keyframes float2 { to { transform: translate(14vw, -8vw) scale(.9); } }

.hero__top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: clamp(24px, 5vw, 60px); }
.hero__top .mono { color: var(--muted); }

.hero h1 { font-size: clamp(48px, 10.6vw, 180px); font-weight: 800; line-height: .92; letter-spacing: -.025em; }
.hero h1 .dash { display: inline-block; margin: 0 .05em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; animation: rise 1.1s var(--ease-out) both; }
.hero h1 .line:nth-child(1) > span { animation-delay: 1.75s; }
.hero h1 .line:nth-child(2) > span { animation-delay: 1.87s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 1.99s; }
html.seen .hero h1 .line:nth-child(1) > span { animation-delay: .15s; }
html.seen .hero h1 .line:nth-child(2) > span { animation-delay: .27s; }
html.seen .hero h1 .line:nth-child(3) > span { animation-delay: .39s; }
@keyframes rise { from { transform: translateY(110%) rotate(4deg); } }
.hero h1 .serif { font-weight: 400; letter-spacing: -.03em; }
.hero h1 .indent { padding-left: 11vw; }
.hero h1 .pill {
  display: inline-block; vertical-align: middle;
  width: 1.7em; height: .8em; border-radius: 999px; margin: 0 .12em;
  background: var(--accent) url("../img/portrait.webp") center 22% / cover;
  transform: translateY(-.06em);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent);
}

.hero__bottom { margin-top: auto; padding-top: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 32px; align-items: end; }
.fade-up { animation: fade-up 1s var(--ease-out) 2.2s both; }
html.seen .fade-up { animation-delay: .6s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } }

.hero__lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 520px; margin: 0; }
.hero__lede strong { color: var(--ink); font-weight: 600; }

.rotator { display: flex; flex-direction: column; height: 1.3em; overflow: hidden; font-size: 1.45em; letter-spacing: -.03em; margin: 2px 0 4px; color: var(--accent-text); font-weight: 600; }
.rotator span { display: block; height: 1.3em; line-height: 1.3em; animation: rotate-words 12s var(--ease) infinite; }
@keyframes rotate-words {
  0%, 20% { transform: translateY(0); }
  25%, 45% { transform: translateY(-100%); }
  50%, 70% { transform: translateY(-200%); }
  75%, 95% { transform: translateY(-300%); }
  100% { transform: translateY(-400%); }
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* rotating circular badge */
.badge { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.badge__seal { position: absolute; inset: 0; background: var(--ink); -webkit-mask: url("../img/seal.svg") center / contain no-repeat; mask: url("../img/seal.svg") center / contain no-repeat; animation: spin 18s linear infinite; }
.badge__core { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: var(--on-accent); transition: transform .5s var(--ease); }
.badge:hover .badge__core { transform: scale(1.12) rotate(45deg); }
.badge__core svg { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ticker */
.ticker { border-block: 1px solid var(--line); overflow: hidden; padding-block: 22px; background: var(--bg); position: relative; }
.ticker__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker__item { display: inline-flex; align-items: center; gap: 36px; padding-right: 36px; font-size: clamp(26px, 3.4vw, 48px); font-weight: 700; letter-spacing: -.035em; white-space: nowrap; }
.ticker__item .serif { font-weight: 400; color: var(--muted); }
.ticker__item svg { width: .7em; height: .7em; color: var(--accent-text); flex: none; animation: spin 8s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Intro statement ---------- */
.intro__text { font-size: clamp(30px, 4.4vw, 68px); font-weight: 600; line-height: 1.08; letter-spacing: -.035em; max-width: 1200px; }
.intro__text .serif { color: var(--accent-text); }
.intro__text .muted { color: var(--muted); }
.intro__foot { margin-top: clamp(40px, 6vw, 72px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; align-items: center; }
.intro__chips { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 07 Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.stat {
  position: relative; padding: clamp(24px, 3vw, 40px); min-height: 280px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease);
}
.stat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.stat:hover { color: var(--bg); }
.stat:hover::before { transform: scaleY(1); }
.stat:hover .stat__label { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.stat__num { font-size: clamp(64px, 7vw, 120px); font-weight: 800; letter-spacing: -.035em; line-height: .85; display: flex; align-items: flex-start; }
.stat__num .n { counter-reset: n var(--num); animation: count var(--dur, 2s) var(--ease-out) both; }
.stat__num .n::after { content: counter(n); }
.stat__num sup { font-size: .42em; color: var(--accent-text); margin-left: 4px; line-height: 1; top: 0; }
.stat__label { color: var(--muted); font-size: 15px; max-width: 220px; transition: color .5s; }
.stat__label b { display: block; color: inherit; font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.stat:hover .stat__label b { color: var(--bg); }
.stat__label b { color: var(--ink); }
.stat--wide { grid-column: span 2; }
.stat--accent { background: var(--accent); color: var(--on-accent); }
.stat--accent .stat__label, .stat--accent .stat__label b { color: var(--on-accent); }
.stat--accent .stat__num sup { color: var(--on-accent); }
.stat--accent::before { background: var(--ink); }
@keyframes count { from { --num: 0; } }

/* ---------- 08 Selected work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(20px, 2.4vw, 32px); }
.work-card { grid-column: span 6; display: flex; flex-direction: column; gap: 18px; }
.work-card:nth-child(4n+1) { grid-column: span 7; }
.work-card:nth-child(4n+2) { grid-column: span 5; margin-top: 18vh; }
.work-card:nth-child(4n+3) { grid-column: span 5; }
.work-card:nth-child(4n+4) { grid-column: span 7; }
.work-card__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 16 / 11; background: var(--bg-2);
  clip-path: inset(0 round var(--radius));
  transition: clip-path .7s var(--ease);
}
.work-card:nth-child(4n+2) .work-card__media, .work-card:nth-child(4n+3) .work-card__media { aspect-ratio: 4 / 5; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.1s var(--ease); }
.work-card:hover .work-card__media { clip-path: inset(10px round calc(var(--radius) + 8px)); }
.work-card:hover .work-card__media img { transform: scale(1.1); }
.work-card__view {
  position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  font-weight: 600; font-size: 15px; transform: scale(0) rotate(-30deg); transition: transform .6s var(--ease);
}
.work-card:hover .work-card__view { transform: scale(1) rotate(0); }
.work-card__tags { position: absolute; top: 16px; left: 16px; display: flex; gap: 6px; flex-wrap: wrap; }
.work-card__tags span { background: rgba(255, 255, 255, .9); color: #0E0E0C; font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.work-card__meta { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: baseline; }
.work-card__idx { font-family: var(--f-mono); font-size: 13px; color: var(--accent-text); }
.work-card__title { font-size: clamp(26px, 2.6vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.work-card__title .serif { font-weight: 400; color: var(--muted); }
.work-card__year { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.work-card__desc { color: var(--ink-2); margin: 0; grid-column: 2 / -1; font-size: 16px; max-width: 520px; }
.work-more { margin-top: clamp(48px, 7vw, 100px); display: flex; justify-content: center; }

/* ---------- 09 Shipped rail (infinite scroll) ---------- */
.shipped { background: var(--invert-bg); color: var(--invert-ink); border-radius: clamp(28px, 4vw, 56px); margin-inline: clamp(8px, 1vw, 16px); overflow: hidden; }
.shipped .sec-kicker { color: color-mix(in srgb, var(--invert-ink) 70%, transparent); }
.shipped .eyebrow { color: color-mix(in srgb, var(--invert-ink) 60%, transparent); }
.rail { overflow: hidden; padding-block: 12px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.rail + .rail { margin-top: 12px; }
.rail__track { display: flex; gap: 20px; width: max-content; padding-right: 20px; animation: marquee var(--speed, 60s) linear infinite; }
.rail--rev .rail__track { animation-direction: reverse; }
.rail:hover .rail__track, .rail:focus-within .rail__track { animation-play-state: paused; }
.p-card {
  width: clamp(280px, 26vw, 400px); flex: none;
  background: color-mix(in srgb, var(--invert-ink) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--invert-ink) 12%, transparent);
  border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .5s var(--ease), background .4s, border-color .4s;
}
.p-card:hover { transform: translateY(-8px) rotate(-1deg); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.p-card__img { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; }
.p-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.p-card:hover .p-card__img img { transform: scale(1.08); }
.p-card__body { padding: 4px 8px 8px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; }
.p-card__name { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.p-card__cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; grid-column: 1; }
.p-card__desc { grid-column: 1 / -1; font-size: 14px; opacity: .75; margin: 6px 0 0; }
.p-card__go { grid-row: 1 / 3; grid-column: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; opacity: .6; transition: transform .5s var(--ease), opacity .3s; }
.p-card:hover .p-card__go { transform: rotate(-45deg); opacity: 1; background: #fff; color: var(--accent-text); border-color: #fff; }
.p-card__go svg { width: 16px; height: 16px; }
.shipped__foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 48px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }

/* ---------- 10 AI workflow ---------- */
.ai-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tool {
  position: relative; padding: 24px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--line); min-height: 220px; display: flex; flex-direction: column; gap: 14px;
  overflow: hidden; transition: transform .5s var(--ease), border-color .4s;
}
.tool:hover { transform: translateY(-6px); border-color: var(--line-strong); }
.tool::after { content: ""; position: absolute; width: 180px; height: 180px; right: -60px; bottom: -60px; border-radius: 50%; background: var(--c, var(--accent)); filter: blur(50px); opacity: 0; transition: opacity .5s; }
.tool:hover::after { opacity: .35; }
.tool__logo { width: 52px; height: 52px; border-radius: 14px; background: var(--c, var(--accent)); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 20px; letter-spacing: -.04em; }
.tool__logo--dark { color: #0E0E0C; }
.tool h3 { font-size: 22px; letter-spacing: -.03em; line-height: 1.1; }
.tool p { color: var(--muted); font-size: 14.5px; margin: 0; }
.tool__freq { margin-top: auto; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.tool__freq::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--accent)); }

.savings { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 5vw, 80px); align-items: center; padding: clamp(28px, 4vw, 56px); border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); }
.savings__big { font-size: clamp(90px, 13vw, 200px); font-weight: 800; letter-spacing: -.04em; line-height: .8; }
.savings__big .n { counter-reset: n var(--num); animation: count 2.4s var(--ease-out) both; }
.savings__big .n::after { content: counter(n); }
.savings__big sup { font-size: .35em; color: var(--accent-text); }
.savings__copy { color: var(--ink-2); max-width: 400px; margin-top: 18px; }
.bars { display: flex; flex-direction: column; gap: 18px; }
.bar__head { display: flex; justify-content: space-between; font-weight: 500; margin-bottom: 8px; font-size: 15px; }
.bar__head span:last-child { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.bar__track { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar__fill { height: 100%; width: calc(var(--w) * 1%); border-radius: inherit; background: linear-gradient(90deg, var(--ink), var(--accent)); transform-origin: left; animation: grow 1.6s var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } }

.flow { margin-top: 20px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; counter-reset: step; }
.flow__step { position: relative; padding: 20px; border-radius: 16px; border: 1px dashed var(--line-strong); counter-increment: step; }
.flow__step::before { content: "0" counter(step); font-family: var(--f-mono); font-size: 12px; color: var(--accent-text); }
.flow__step h4 { font-size: 19px; margin: 10px 0 6px; letter-spacing: -.02em; line-height: 1.1; }
.flow__step p { font-size: 13.5px; color: var(--muted); margin: 0; }
.flow__step small { display: inline-block; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--bg); }

/* ---------- 11 Experience ---------- */
.xp { border-top: 1px solid var(--line); }
.xp details { border-bottom: 1px solid var(--line); }
.xp summary {
  list-style: none; cursor: pointer; position: relative; isolation: isolate;
  display: grid; grid-template-columns: 170px 1.3fr 1fr 56px; gap: 24px; align-items: center;
  padding: clamp(22px, 3vw, 36px) 0;
  transition: padding .5s var(--ease), color .4s;
}
.xp summary::-webkit-details-marker { display: none; }
.xp summary::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); }
.xp summary:hover { color: var(--on-accent); padding-inline: 20px; }
.xp summary:hover::before { transform: scaleY(1); }
.xp summary:hover .xp__years, .xp summary:hover .xp__co { color: var(--on-accent); }
.xp__years { font-family: var(--f-mono); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.xp__role { font-size: clamp(22px, 2.6vw, 38px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; }
.xp__co { color: var(--ink-2); font-size: 17px; }
.xp__co small { display: block; color: var(--muted); font-size: 13px; font-family: var(--f-mono); letter-spacing: .04em; margin-top: 4px; }
.xp summary:hover .xp__co small { color: var(--on-accent); }
.xp__plus { width: 48px; height: 48px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; justify-self: end; transition: transform .5s var(--ease); }
.xp__plus::before, .xp__plus::after { content: ""; position: absolute; width: 16px; height: 1.5px; background: currentColor; }
.xp__plus::after { transform: rotate(90deg); transition: transform .5s var(--ease); }
.xp__plus { position: relative; }
.xp details[open] .xp__plus { transform: rotate(180deg); }
.xp details[open] .xp__plus::after { transform: rotate(0); }
.xp__body { display: grid; grid-template-columns: 170px 1.3fr 1fr 56px; gap: 24px; padding-bottom: 36px; animation: fade-up .6s var(--ease-out); }
.xp__body ul { grid-column: 2; margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.xp__body li { position: relative; padding-left: 26px; color: var(--ink-2); }
.xp__body li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 1.5px; background: var(--accent); }
.xp__tags { grid-column: 3; display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.xp details::details-content { transition: content-visibility .5s allow-discrete, height .5s var(--ease); height: 0; overflow: clip; }
.xp details[open]::details-content { height: auto; }
.xp { overflow-anchor: none; }   /* site.js keeps the clicked role in place; the browser's own scroll anchoring would double-correct */
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }

.domains { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.domains .chip { font-size: 15px; padding: 10px 18px; }

/* ---------- 12 About / Skills ---------- */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 100px); align-items: start; }
.about__photo { position: sticky; top: 110px; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter .8s var(--ease), transform 1.2s var(--ease); }
.portrait:hover img { filter: grayscale(0); transform: scale(1.04); }
.portrait__tag { position: absolute; left: 16px; bottom: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-radius: 14px; background: rgba(14, 14, 12, .7); color: #fff; backdrop-filter: blur(10px); font-size: 14px; }
.portrait__tag b { font-weight: 600; }
.float-chip { position: absolute; padding: 10px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .3); font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; animation: bob 5s ease-in-out infinite; }
.float-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.float-chip--1 { top: 12%; right: -18px; }
.float-chip--2 { top: 46%; left: -22px; animation-delay: -2s; }
.float-chip--2 i { background: var(--lime); }
@keyframes bob { 50% { transform: translateY(-12px); } }

.about__lead { font-size: clamp(26px, 3vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; margin-bottom: 32px; }
.about__lead .serif { color: var(--accent-text); }
.about__text p { color: var(--ink-2); font-size: 18px; max-width: 640px; }
.principles { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.principle { padding: 24px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); transition: transform .5s var(--ease), background .4s, color .4s; }
.principle:hover { transform: rotate(-1.2deg) translateY(-4px); background: var(--ink); color: var(--bg); }
.principle:hover p { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.principle span { font-family: var(--f-mono); font-size: 12px; color: var(--accent-text); }
.principle .h4 { font-size: 22px; margin: 12px 0 8px; letter-spacing: -.03em; line-height: 1.1; }
.principle p { color: var(--muted); font-size: 15px; margin: 0; transition: color .4s; }

.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-group { padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.skill-group--wide { grid-column: span 2; }
.skill-group--accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.skill-group--accent .chip { border-color: color-mix(in srgb, var(--on-accent) 45%, transparent); color: var(--on-accent); }
.skill-group--accent .chip:hover { background: var(--on-accent); color: var(--accent); }
.skill-group--ink { background: var(--invert-bg); color: var(--invert-ink); border-color: var(--invert-bg); }
.skill-group--ink .chip { border-color: color-mix(in srgb, var(--invert-ink) 30%, transparent); color: var(--invert-ink); }
.skill-group--ink .chip:hover { background: var(--invert-ink); color: var(--invert-bg); }
.skill-group h3 { font-size: 28px; margin-bottom: 8px; letter-spacing: -.035em; }
.skill-group > p { color: inherit; opacity: .85; font-size: 15px; margin-bottom: 22px; }
.skill-group .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-meter { display: grid; gap: 14px; }
.skill-meter div { display: grid; grid-template-columns: 1fr auto; gap: 6px; font-size: 15px; }
.skill-meter div::after { content: ""; grid-column: 1 / -1; height: 4px; border-radius: 4px; background: linear-gradient(90deg, currentColor calc(var(--v) * 1%), color-mix(in srgb, currentColor 20%, transparent) 0); }
.skill-meter span:last-child { font-family: var(--f-mono); font-size: 12px; opacity: .7; }

/* ---------- 13 Awards / Education ---------- */
.list-rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 110px 1fr 1fr auto; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); position: relative; transition: padding .5s var(--ease); }
.row:hover { padding-inline: 16px; }
.row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.row:hover::after { transform: scaleX(1); }
.row__year { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.row__title { font-size: clamp(20px, 2vw, 28px); font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.row__org { color: var(--ink-2); }
.row__icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); color: var(--accent-text); transition: transform .6s var(--ease), background .4s, color .4s; }
.row:hover .row__icon { transform: rotate(360deg); background: var(--accent); color: var(--on-accent); }
.row__icon svg { width: 20px; height: 20px; }

.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(32px, 5vw, 80px); }
.edu-col h3 { font-size: 15px; font-family: var(--f-mono); font-weight: 400; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.edu-card { display: flex; gap: 18px; padding: 24px 0; border-top: 1px solid var(--line); }
.edu-card__icon { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.edu-card__icon svg { width: 24px; height: 24px; }
.edu-card h4 { font-size: 22px; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 6px; }
.edu-card p { margin: 0; color: var(--muted); font-size: 15px; }
.edu-card .tag { display: inline-block; margin-top: 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; background: var(--bg-2); color: var(--ink-2); }

/* ---------- 14 Footer CTA ---------- */
.footer, .shipped, .ai-note div, .skill-group--ink, .loader { --accent-text: var(--accent-text-inv); }
.footer { background: var(--invert-bg); color: var(--invert-ink); border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; margin: 0 clamp(8px, 1vw, 16px); padding-top: clamp(80px, 10vw, 140px); overflow: hidden; position: relative; }
.footer .eyebrow { color: color-mix(in srgb, var(--invert-ink) 60%, transparent); }
.footer__cta { font-size: clamp(52px, 10vw, 176px); font-weight: 800; letter-spacing: -.035em; line-height: .88; margin: 28px 0 48px; }
.footer__cta .serif { font-weight: 400; color: var(--accent-text); }
.footer__cta a { position: relative; display: inline-block; }
.footer__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.footer .btn { --b-bg: var(--invert-ink); --b-ink: var(--invert-bg); }
.footer .btn--ghost { --b-bg: transparent; --b-ink: var(--invert-ink); border-color: color-mix(in srgb, var(--invert-ink) 30%, transparent); }
.mail { font-size: clamp(22px, 3vw, 44px); font-weight: 600; letter-spacing: -.03em; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .6s var(--ease); padding-bottom: 4px; }
.mail:hover { background-size: 100% 2px; color: var(--accent-text); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-top: clamp(64px, 8vw, 120px); padding-block: 40px; border-top: 1px solid color-mix(in srgb, var(--invert-ink) 15%, transparent); }
.footer__grid h3 { margin: 0 0 16px; font-family: var(--f-mono); font-weight: 400; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .5; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__grid a { opacity: .85; transition: opacity .3s, color .3s; }
.footer__grid a:hover { opacity: 1; color: var(--accent-text); }
.footer__grid p { opacity: .7; max-width: 340px; }
.footer__big { font-size: clamp(80px, 24vw, 420px); font-weight: 800; letter-spacing: -.04em; line-height: .75; white-space: nowrap; margin-bottom: -.12em; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--invert-ink) 55%, transparent); text-align: center; padding-bottom: .04em; user-select: none; }
.footer__big span { display: inline-block; transition: color .5s var(--ease), transform .5s var(--ease); }
.footer__big span:hover { color: var(--accent-text); -webkit-text-stroke-color: var(--accent); transform: translateY(-6%); }
.footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 24px; font-size: 13px; opacity: .6; border-top: 1px solid color-mix(in srgb, var(--invert-ink) 15%, transparent); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }
.to-top svg { width: 14px; height: 14px; transition: transform .4s var(--ease); }
.to-top:hover svg { transform: translateY(-4px); }

/* ---------- 15 Case study pages ---------- */
.case-hero { padding-top: 150px; padding-bottom: 60px; }
.back { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); margin-bottom: 40px; }
.back svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }
.back:hover { color: var(--accent-text); }
.back:hover svg { transform: translateX(-4px); }
.case-hero__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.case-hero h1 { font-size: clamp(52px, 9.4vw, 160px); font-weight: 800; letter-spacing: -.03em; line-height: .88; max-width: 14ch; animation: fade-up 1s var(--ease-out) .1s both; }
.case-hero h1 .serif { font-weight: 400; color: var(--accent-text); }
.case-hero__summary { font-size: clamp(20px, 2vw, 28px); color: var(--ink-2); max-width: 820px; margin: 36px 0 0; letter-spacing: -.015em; line-height: 1.35; animation: fade-up 1s var(--ease-out) .25s both; }
.case-meta { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); animation: fade-up 1s var(--ease-out) .35s both; }
.case-meta dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.case-meta dd { margin: 0; font-weight: 500; font-size: 16px; }
.case-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; animation: fade-up 1s var(--ease-out) .45s both; }

.case-cover { margin-inline: clamp(8px, 1vw, 16px); border-radius: clamp(24px, 3vw, 44px); overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-2); }
.case-cover img { width: 100%; height: 100%; object-fit: cover; }

.case-body { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 100px); }
.toc { position: sticky; top: 110px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: flex; gap: 12px; padding: 8px 0; color: var(--muted); font-size: 15px; transition: color .3s, padding .4s var(--ease); counter-increment: toc; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: 12px; padding-top: 2px; color: var(--accent-text); }
.toc a:hover { color: var(--ink); padding-left: 8px; }
.toc__progress { height: 2px; background: var(--line); margin-top: 20px; border-radius: 2px; overflow: hidden; }
.toc__progress i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); animation: grow-x linear both; animation-timeline: scroll(root); }
@keyframes grow-x { to { transform: scaleX(1); } }

.chapter { padding-bottom: clamp(64px, 8vw, 120px); }
.chapter__label { font-weight: 400; line-height: 1.4; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 18px; display: block; }
.chapter .h2 { font-size: clamp(34px, 4.4vw, 68px); font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-bottom: 28px; max-width: 18ch; }
.chapter .h2 .serif { font-weight: 400; color: var(--muted); }
.chapter > p, .chapter .prose p { font-size: 19px; color: var(--ink-2); max-width: 720px; line-height: 1.6; }
.pullquote { margin: 40px 0; padding: 32px 0 32px 32px; border-left: 3px solid var(--accent); font-size: clamp(24px, 2.6vw, 36px); font-weight: 500; letter-spacing: -.025em; line-height: 1.25; max-width: 900px; }
.pullquote .serif { color: var(--accent-text); }

.goals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 32px; }
.goal { padding: 26px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.goal b { font-family: var(--f-mono); font-size: 12px; color: var(--accent-text); font-weight: 400; }
.goal .h4 { font-size: 21px; letter-spacing: -.025em; line-height: 1.15; margin: 12px 0 8px; }
.goal p { margin: 0; color: var(--muted); font-size: 15px; }

.process { margin-top: 32px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.process__step { display: grid; grid-template-columns: 80px 1fr 1.4fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); align-items: start; }
.process__step span { font-family: var(--f-mono); font-size: 13px; color: var(--accent-text); }
.process__step .h4 { font-size: 24px; letter-spacing: -.03em; line-height: 1.1; }
.process__step p { margin: 0; color: var(--ink-2); }

.ai-note { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ai-note div { padding: 24px; border-radius: 18px; background: var(--invert-bg); color: var(--invert-ink); }
.ai-note b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -.05em; color: var(--accent-text); line-height: 1; margin-bottom: 10px; }
.ai-note p { margin: 0; opacity: .8; font-size: 15px; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 32px; }
.gallery figure { margin: 0; border-radius: 20px; overflow: hidden; background: var(--bg-2); }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 14px 18px; font-size: 14px; color: var(--muted); background: var(--surface); }

.proto { margin-top: 32px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.proto__bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.proto__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.proto__bar i:nth-child(1) { background: #FF5F57; } .proto__bar i:nth-child(2) { background: #FEBC2E; } .proto__bar i:nth-child(3) { background: #28C840; }
.proto__bar span { margin-left: 12px; }
.proto__frame { aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: 32px; background: repeating-linear-gradient(45deg, var(--bg-2) 0 12px, var(--bg) 12px 24px); }
.proto__frame iframe { width: 100%; height: 100%; border: 0; }
.proto__frame p { color: var(--muted); max-width: 440px; margin: 16px auto 24px; }

.outcomes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 32px; }
.outcome { padding: 28px 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.outcome:nth-child(1) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.outcome b { display: block; font-size: clamp(44px, 4.4vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: .9; margin-bottom: 14px; }
.outcome p { margin: 0; font-size: 15px; opacity: .8; }

.next { display: block; padding-block: clamp(80px, 12vw, 160px); border-top: 1px solid var(--line); text-align: center; position: relative; overflow: hidden; }
.next .mono { color: var(--muted); }
.next__title { display: block; font-size: clamp(52px, 10vw, 170px); font-weight: 800; letter-spacing: -.035em; line-height: .9; margin-top: 20px; transition: color .5s var(--ease), letter-spacing .6s var(--ease); }
.next:hover .next__title { color: var(--accent-text); letter-spacing: -.045em; }
.next__img { width: min(420px, 70vw); aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; margin: 36px auto 0; transform: scale(.8) rotate(-4deg); opacity: .6; transition: transform .8s var(--ease), opacity .5s; }
.next:hover .next__img { transform: scale(1) rotate(0); opacity: 1; }
.next__img img { width: 100%; height: 100%; object-fit: cover; }

/* 404 */
.nf { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--gutter); }
.nf h1 { font-size: clamp(120px, 30vw, 440px); font-weight: 800; letter-spacing: -.045em; line-height: .8; }
.nf h1 .serif { color: var(--accent-text); font-weight: 400; }
.nf p { color: var(--ink-2); font-size: 20px; margin: 24px 0 32px; }

/* ---------- 16 Scroll reveal (progressive; content is always visible without support) ---------- */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  .reveal-scale { animation: reveal-scale linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
  .reveal-left { animation: reveal-left linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  .stat__num .n, .savings__big .n { animation-timeline: view(); animation-range: entry 10% cover 45%; animation-timing-function: linear; }
  .bar__fill { animation-timeline: view(); animation-range: entry 0% cover 40%; animation-timing-function: linear; }
  .words span { animation: word linear both; animation-timeline: view(); animation-range: cover 10% cover 45%; }
  .case-cover img { animation: cover-zoom linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  .footer__big { animation: big-in linear both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  .work-card__media img { animation: parallax linear both; animation-timeline: view(); }
  .work-card:hover .work-card__media img { animation-play-state: paused; }
}
@keyframes reveal { from { opacity: 0; transform: translateY(70px); } }
@keyframes reveal-scale { from { opacity: 0; transform: scale(.88); } }
@keyframes reveal-left { from { opacity: 0; transform: translateX(-60px); } }
@keyframes word { from { opacity: .14; } }
@keyframes cover-zoom { from { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes big-in { from { transform: translateY(40%); opacity: 0; } }
@keyframes parallax { from { transform: scale(1.08) translateY(-3%); } to { transform: scale(1.08) translateY(3%); } }

/* ---------- 17 Responsive ---------- */
@media (max-width: 1100px) {
  .nav-links { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 8px; border: 0; border-radius: 0; background: var(--bg); padding: var(--gutter);
    clip-path: circle(0 at calc(100% - 40px) 38px); visibility: hidden; transition: clip-path .8s var(--ease), visibility 0s .8s; }
  .nav-links a { font-size: clamp(36px, 9vw, 64px); font-weight: 700; letter-spacing: -.04em; color: var(--ink); padding: 6px 20px; }
  html:has(#menu:checked) .nav-links { clip-path: circle(150% at calc(100% - 40px) 38px); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
  html:has(#menu:checked) { overflow: hidden; }
  .burger { display: grid; }
  .status { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr 1fr; }
  .case-meta { grid-template-columns: repeat(3, 1fr); }
  .outcomes { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero__bottom { grid-template-columns: 1fr; }
  .badge { position: absolute; right: var(--gutter); top: 140px; width: 104px; height: 104px; }
  .hero h1 .indent { padding-left: 0; }
  .sec-head { grid-template-columns: 1fr; }
  .work-card, .work-card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .work-card:nth-child(n) .work-card__media { aspect-ratio: 4 / 3; }
  .savings { grid-template-columns: 1fr; }
  .xp summary { grid-template-columns: 1fr 48px; gap: 6px 16px; }
  .xp__years { grid-column: 1; grid-row: 1; }
  .xp__role { grid-column: 1; }
  .xp__co { grid-column: 1; }
  .xp__plus { grid-column: 2; grid-row: 1 / 4; }
  .xp__body { grid-template-columns: 1fr; }
  .xp__body ul, .xp__tags { grid-column: 1; }
  .about { grid-template-columns: 1fr; }
  .about__photo { position: relative; top: 0; max-width: 460px; }
  .principles { grid-template-columns: 1fr; }
  .skills { grid-template-columns: 1fr; }
  .skill-group--wide { grid-column: auto; }
  .row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .row__year { grid-column: 1; }
  .row__org { grid-column: 1; }
  .row__icon { grid-column: 2; grid-row: 1 / 4; }
  .edu-grid { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .toc { display: none; }
  .goals, .ai-note { grid-template-columns: 1fr; }
  .process__step { grid-template-columns: 50px 1fr; }
  .process__step p { grid-column: 2; }
  .gallery { grid-template-columns: 1fr; }
  .case-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav .btn span { display: none; }
  .nav .btn { padding: 11px; }
  .stats { grid-template-columns: 1fr; }
  .stat--wide { grid-column: auto; }
  .stat { min-height: 200px; }
  .ai-grid, .flow { grid-template-columns: 1fr; }
  .outcomes { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .float-chip--1 { right: 8px; } .float-chip--2 { left: 8px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .badge { display: none; }
}

/* ---------- 18 Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .loader { display: none; }
  .ticker__track, .rail__track { animation: none !important; }
  .rail { overflow-x: auto; }
  @view-transition { navigation: none; }
}

/* ---------- 19 Additions: accessibility controls, brand, impact ---------- */
/* Impact band */
.impact { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; gap: 14px; }
.impact__item { padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.impact__item b { display: block; font-size: clamp(34px, 3.4vw, 52px); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 12px; }
.impact__item b em { font-style: normal; color: var(--accent-text); }
.impact__item p { margin: 0; color: var(--ink-2); font-size: 15px; }
.impact__item small { display: block; margin-top: 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Portrait seal stamp */
.stamp { position: absolute; width: 132px; height: 132px; right: -26px; bottom: 78px; background: var(--accent); -webkit-mask: url("../img/seal.svg") center / contain no-repeat; mask: url("../img/seal.svg") center / contain no-repeat; transform: rotate(-14deg); animation: spin 26s linear infinite; }
.about__photo .portrait img { object-position: center 18%; }

/* Footer brand */
.footer__logo { width: 120px; height: 192px; background: var(--invert-ink); -webkit-mask: url("../img/logo.svg") left top / contain no-repeat; mask: url("../img/logo.svg") left top / contain no-repeat; margin-bottom: 20px; }
.footer__legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer__grid .avail { display: block; margin-top: 10px; font-size: 14px; }

/* Education / cert links */
.edu-card a { text-decoration: underline; text-underline-offset: 3px; }
.edu-card a:hover { color: var(--accent-text); }

/* Compact case study (Behance-only projects) */
.behance-cta { margin-top: 32px; padding: clamp(28px, 4vw, 56px); border-radius: var(--radius); background: var(--invert-bg); color: var(--invert-ink); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.behance-cta h3 { font-size: clamp(26px, 3vw, 42px); letter-spacing: -.03em; line-height: 1.05; max-width: 20ch; }
.behance-cta .btn { --b-bg: var(--invert-ink); --b-ink: var(--invert-bg); }
.behance-cta { --accent-text: var(--accent-text-inv); }
.note { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); margin-top: 18px; }

/* Links that open a new tab get an accessible hint via .sr-only text; underline long text links */
.prose a, .chapter p a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1100px) { .impact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .impact { grid-template-columns: 1fr; }
  .logo__text small { display: none; }
  .stamp { width: 96px; height: 96px; right: -8px; }
}
@media (max-width: 400px) { .logo__text { display: none; } }
@media (prefers-reduced-motion: reduce) { .stamp, .badge__seal { animation: none; } }

/* list resets for semantic lists */
.chips, .intro__chips, .domains, .case-hero__tags, .list-rows, .process { list-style: none; margin: 0; padding: 0; }
.intro__chips, .case-hero__tags { display: flex; flex-wrap: wrap; gap: 10px; }
.domains { margin-top: 40px; }
.process__step .h4, .goal .h4, .principle .h4 { font-weight: 700; }
.shipped__foot a { text-decoration: underline; text-underline-offset: 3px; }
.hero h1 .accent { color: var(--accent); }
.tool__logo { box-shadow: inset 0 0 0 1px var(--line-strong); }
.footer__logo { display: block; }
.footer__grid h3 { opacity: .75; }
.footer__legal { position: relative; background: var(--invert-bg); opacity: 1; color: color-mix(in srgb, var(--invert-ink) 72%, transparent); align-items: center; }

/* ---------- 20 Refinements (round 3) ---------- */
/* Breathing room between digits in big numbers */
.stat__num, .impact__item b, .savings__big, .outcome b, .ai-note b, .loader__count { letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.stat__num sup, .savings__big sup { margin-left: .08em; }

/* Looser display copy */
.footer__cta { letter-spacing: -.012em; line-height: .96; }
.footer__cta .serif { letter-spacing: 0; }

/* Footer name in the serif — cleaner outline than the heavy grotesk */
.footer__big { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; line-height: .9; -webkit-text-stroke-width: 1.2px; }

/* Hero circular badge text */
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 16s linear infinite; }
.badge__ring text { font-family: var(--f-mono); font-size: 10px; letter-spacing: 2.4px; fill: var(--ink); text-transform: uppercase; }

/* Experience: keep the hover highlight clear of the tags below */
.xp summary::before { inset: 6px calc(var(--gutter) * -.5); border-radius: 18px; }
.xp__body { padding-top: 22px; }

/* Brand logos in the AI tools grid */
.tool__logo svg { width: 26px; height: 26px; }

/* Workflow tool chips with "+N more" */
.flow__tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.flow__tools small { margin-top: 0 !important; }
.flow__tools .more { background: transparent !important; color: var(--ink) !important; box-shadow: inset 0 0 0 1px var(--line-strong); cursor: help; }

/* Full case study, hosted on this site */
.story { margin-top: 32px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.story__img { margin: 0; }
.story__img img { display: block; width: 100%; height: auto; }

/* Draggable, auto-scrolling product rail (enabled by site.js; CSS marquee is the no-JS fallback) */
.js .rail { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; }
.js .rail::-webkit-scrollbar { display: none; }
.js .rail__track { animation: none; }
.js .rail.is-dragging { cursor: grabbing; }
.js .rail.is-dragging .p-card { transform: none; }
.rail img { -webkit-user-drag: none; user-select: none; }
.rail { user-select: none; -webkit-user-select: none; }
@media (prefers-reduced-motion: reduce) { .badge__ring { animation: none; } }
.work-grid { row-gap: clamp(56px, 7vw, 110px); }
.footer__big { margin-bottom: 0; padding-bottom: .12em; }
main, .footer { overflow-x: clip; }

/* =========================================================
   22 Rich case study blocks + image zoom
   ========================================================= */
.rich .case-hero h1 { max-width: 18ch; }
.rc-products { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.rc-products li { display: grid; padding: 12px 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); }
.rc-products b { font-size: 16px; } .rc-products span { font-size: 13px; color: var(--muted); }
.rc { min-width: 0; }
.rc-block { padding-bottom: clamp(72px, 9vw, 130px); }
.rc-head { margin-bottom: 36px; max-width: 820px; }
.rc-label { display: inline-flex; gap: 10px; align-items: center; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 18px; }
.rc-label b { font-weight: 500; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #fff; letter-spacing: .04em; }
.rc-title { font-size: clamp(32px, 4.2vw, 64px); font-weight: 750; letter-spacing: -.028em; line-height: 1.02; }
.rc-title em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.rc-lede { font-size: 19px; color: var(--ink-2); margin-top: 20px; line-height: 1.6; max-width: 720px; }
.rc-sub { font-family: var(--f-mono); font-weight: 400; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.rc p { color: var(--ink-2); line-height: 1.65; }
.rc-chips { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rc-pill { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .02em; padding: 5px 10px; border-radius: 8px; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }

.rc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: clamp(72px, 9vw, 120px); }
.rc-stat { padding: 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; }
.rc-stat b { font-size: clamp(34px, 3.6vw, 54px); font-weight: 800; letter-spacing: .01em; line-height: 1; }
.rc-stat span { color: var(--muted); font-size: 14px; }

.rc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.rc-col { padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.rc-col p { margin: 0; }

.rc-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rc-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; list-style: none; padding: 0; margin: 0; }
.rc-card { position: relative; padding: 24px; border-radius: 18px; background-color: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.rc-card h3 { font-size: 20px; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 10px; }
.rc-card p { font-size: 15px; margin: 0; }
.rc-card small { display: block; margin-top: 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rc-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--accent); opacity: 0; transition: opacity .4s; }
.rc-card:hover::before { opacity: 1; }
.rc-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.rc-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.rc-card--broken .rc-tag::before { background: #E5484D; } .rc-card--missing .rc-tag::before { background: #F5A524; } .rc-card--new .rc-tag::before { background: var(--accent); }
.rc-card--broken::before, .rc-card--missing::before, .rc-card--new::before { opacity: 1; }
.rc-card--broken::before { background: #E5484D; } .rc-card--missing::before { background: #F5A524; }

.rc-timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 28px; }
.rc-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); border-radius: 2px; }
.rc-timeline li { position: relative; }
.rc-timeline li::before { content: ""; position: absolute; left: -28px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.rc-when { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; color: var(--accent-text); }
.rc-timeline h4 { font-size: 20px; margin: 6px 0 6px; letter-spacing: -.02em; line-height: 1.2; }
.rc-timeline p { margin: 0; max-width: 760px; }

.rc-role { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.rc-quote { margin-top: 0; font-size: clamp(20px, 2vw, 28px); }
.rc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rc-list li { padding: 14px 16px 14px 44px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); position: relative; color: var(--ink-2); }
.rc-list li::before { content: ""; position: absolute; left: 18px; top: 50%; width: 10px; height: 10px; margin-top: -5px; transform: rotate(45deg); background: var(--accent); border-radius: 2px; }
.rc-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.rc-facts dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.rc-facts dd { margin: 0; font-weight: 600; }

.rc-modules { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.rc-modules li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.rc-num { font-family: var(--f-mono); font-size: 13px; color: var(--accent-text); padding-top: 4px; }
.rc-modules h3 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 8px; line-height: 1.2; }
.rc-modules p { margin: 0; max-width: 820px; }

.rc-dive { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.rc-dive__text p { font-size: 18px; }
.rc-cons, .rc-pros { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.rc-cons li, .rc-pros li { position: relative; padding-left: 32px; color: var(--ink-2); }
.rc-cons li::before, .rc-pros li::before { position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.rc-cons li::before { content: "✕"; background: color-mix(in srgb, #E5484D 16%, transparent); color: #C4262B; }
.rc-pros li::before { content: "✓"; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); }
html:is(.dark-boot, :has(#theme:checked)) .rc-cons li::before { color: #FF8589; }

.rc-fig { margin: 0 0 28px; }
.rc-fig figcaption, .story__img figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.zoom { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #0A0A0B; cursor: zoom-in; color: inherit; font: inherit; }
.zoom img { width: 100%; height: auto; display: block; transition: transform .8s var(--ease); -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
.zoom:hover img { transform: scale(1.015); }
.zoom__hint { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(10, 10, 11, .78); color: #fff; font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.zoom__hint svg { width: 16px; height: 16px; }
.zoom:hover .zoom__hint, .zoom:focus-visible .zoom__hint { opacity: 1; transform: none; }
.story .zoom { border: 0; border-radius: 0; }

.rc-box { padding: clamp(28px, 4vw, 48px); border-radius: 24px; background: var(--invert-bg); color: var(--invert-ink); margin-bottom: 20px; --accent-text: var(--accent-text-inv); }
.rc-box p { color: color-mix(in srgb, var(--invert-ink) 82%, transparent); max-width: 760px; }
.rc-box .rc-title { margin-bottom: 14px; }
.rc-box .chip { color: var(--invert-ink); border-color: color-mix(in srgb, var(--invert-ink) 35%, transparent); }
.rc-box + .rc-grid2 { margin-bottom: 28px; }

.rc-sysstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.rc-spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 0; }
.rc-spec div { padding: 20px; border-radius: 16px; border: 1px dashed var(--line-strong); }
.rc-spec dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 8px; }
.rc-spec dd { margin: 0; font-size: 15px; color: var(--ink-2); }

.rc-fromto { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin: 0 0 12px !important; }
.rc-fromto s { color: var(--muted); font-size: 20px; font-weight: 600; }
.rc-fromto b { font-size: clamp(28px, 2.6vw, 38px); font-weight: 800; letter-spacing: .01em; }
.rc-learn .rc-num { display: block; font-size: 30px; font-family: var(--f-display); font-weight: 800; color: var(--line-strong); margin-bottom: 10px; }
.rc-closing { text-align: center; padding: clamp(40px, 6vw, 80px) 0 20px; max-width: 760px; margin: 0 auto; }
.rc-closing__title { font-size: clamp(38px, 5.4vw, 84px); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--ink) !important; margin-bottom: 24px; }
.rc-closing__title em { font-family: var(--f-serif); font-style: italic; font-weight: 400; }

/* Lightbox (site.js) */
.lb { position: fixed; inset: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 5, 6, .94); color: #fff; overflow: hidden; }
.lb::backdrop { background: rgba(5, 5, 6, .6); backdrop-filter: blur(6px); }
.lb[open] { display: grid; grid-template-rows: auto 1fr auto; animation: lb-in .35s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; } }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.lb__count { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; opacity: .85; }
.lb__tools { display: flex; gap: 8px; }
.lb button { min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; font: 600 15px var(--f-display); cursor: pointer; display: inline-grid; place-items: center; }
.lb button:hover { background: rgba(255, 255, 255, .18); }
.lb button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: none; }
.lb__stage { position: relative; overflow: hidden; touch-action: none; cursor: grab; display: grid; place-items: center; }
.lb__stage.is-panning { cursor: grabbing; }
.lb__img { max-width: 94vw; max-height: calc(100vh - 150px); width: auto; height: auto; transform-origin: center; transition: transform .25s var(--ease-out); user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; pointer-events: none; }
.lb__stage.is-panning .lb__img { transition: none; }
.lb__cap { padding: 12px 18px 18px; text-align: center; font-size: 14px; color: rgba(255, 255, 255, .85); min-height: 22px; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lb__prev { left: 14px; } .lb__next { right: 14px; }

@media (max-width: 1100px) { .rc-stats { grid-template-columns: repeat(2, 1fr); } .rc-grid3 { grid-template-columns: 1fr 1fr; } .rc-sysstats, .rc-spec { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .rc-cols, .rc-role, .rc-dive, .rc-grid2, .rc-grid3 { grid-template-columns: 1fr; } .rc-facts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .rc-stats, .rc-sysstats, .rc-spec, .rc-facts { grid-template-columns: 1fr; } .rc-modules li { grid-template-columns: 1fr; gap: 6px; } .lb__nav { top: auto; bottom: 70px; transform: none; } }
.footer__big { font-size: min(26.5vw, 470px); letter-spacing: .01em; }

/* =========================================================
   23 Refined palette (single Apple-blue accent) + Liquid Glass
   Contrast: white on #0066CC 5.6:1 · #0066CC text on #F5F5F7 5.1:1
             white on #0071E3 4.7:1 · #2997FF text on #050506 6.8:1
   ========================================================= */
:root {
  --bg: #F5F5F7; --bg-2: #EBEBF0; --surface: #FFFFFF;
  --ink: #1D1D1F; --ink-2: #3A3A3C; --muted: #5E5E63;
  --line: rgba(29, 29, 31, .12); --line-strong: rgba(29, 29, 31, .26);
  --accent: #0066CC; --on-accent: #FFFFFF; --accent-ink: #FFFFFF;
  --accent-text: #0066CC; --accent-text-inv: #2997FF;
  --invert-bg: #0A0A0B; --invert-ink: #F5F5F7;
  --grain: .04;
  /* glass */
  --glass-bg: rgba(255, 255, 255, .55);
  --glass-bg-strong: rgba(255, 255, 255, .78);
  --glass-edge: rgba(255, 255, 255, .7);
  --glass-hi: rgba(255, 255, 255, .9);
  --glass-shadow: 0 10px 30px -12px rgba(0, 0, 0, .22), 0 2px 6px -2px rgba(0, 0, 0, .08);
}
html:is(.dark-boot, :has(#theme:checked)) {
  --bg: #050506; --bg-2: #111113; --surface: #161618;
  --ink: #F5F5F7; --ink-2: #D1D1D6; --muted: #98989D;
  --line: rgba(245, 245, 247, .12); --line-strong: rgba(245, 245, 247, .28);
  --accent: #0071E3; --on-accent: #FFFFFF;
  --accent-text: #2997FF; --accent-text-inv: #0066CC;
  --invert-bg: #F5F5F7; --invert-ink: #0A0A0B;
  --glass-bg: rgba(40, 40, 44, .5);
  --glass-bg-strong: rgba(58, 58, 62, .72);
  --glass-edge: rgba(255, 255, 255, .16);
  --glass-hi: rgba(255, 255, 255, .28);
  --glass-shadow: 0 10px 30px -12px rgba(0, 0, 0, .7), 0 2px 6px -2px rgba(0, 0, 0, .4);
  --grain: .06;
}
.footer, .shipped, .loader, .behance-cta, .skill-group--ink, .rc-box { --accent-text: var(--accent-text-inv); }
::selection { background: var(--accent); color: #fff; }

/* ---- Liquid glass material ---- */
.glass, .toggle, .burger, .btn--ghost, .nav .btn, .badge, .status, .float-chip, .rc-products li, .zoom__hint, .lb button, .flow__tools .more {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(185%); backdrop-filter: blur(20px) saturate(185%);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 1px rgba(255, 255, 255, .06), var(--glass-shadow);
}
.nav::before { background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(22px) saturate(185%); backdrop-filter: blur(22px) saturate(185%); }
.status { padding: 8px 14px; border-radius: 999px; }
/* specular highlight */
.btn--ghost, .nav .btn, .badge, .toggle, .burger { position: relative; isolation: isolate; }
.btn--ghost::after, .nav .btn::after, .badge::after, .toggle::before, .burger::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(160deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .18) 100%);
  opacity: .55; mix-blend-mode: soft-light;
}
.toggle::before { z-index: 0; }
.burger { display: none; }
@media (max-width: 1100px) { .burger { display: grid; } }

/* Active nav item (scroll-spy in site.js) */
.nav-links a { position: relative; transition: background-color .35s var(--ease-out), color .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.nav-links a:hover { background: var(--glass-bg-strong); color: var(--ink); }
.nav-links a.is-active, .nav-links a[aria-current] { background: var(--glass-bg-strong); color: var(--ink); box-shadow: inset 0 1px 0 var(--glass-hi), 0 4px 14px -6px rgba(0, 0, 0, .25); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.toc a.is-active { color: var(--ink); padding-left: 8px; font-weight: 600; }

/* ---- Buttons: smooth, no sliding fills, no movement ---- */
.btn { transition: background-color .35s var(--ease-out), color .35s var(--ease-out), border-color .35s var(--ease-out), box-shadow .35s var(--ease-out); transform: none !important; translate: none !important; }
.btn::before { display: none; }
.btn:hover { color: var(--b-ink); }
.btn:not(.btn--ghost):not(.btn--accent):hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent { --b-bg: var(--accent); --b-ink: #fff; background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 86%, #000); border-color: transparent; color: #fff; }
.btn--ghost { color: var(--ink); }
.btn--ghost:hover { background: var(--glass-bg-strong); color: var(--ink); }
.nav .btn { background: var(--glass-bg); color: var(--ink); }
.nav .btn:hover { background: var(--glass-bg-strong); color: var(--ink); border-color: var(--glass-edge); }
.footer .btn--ghost { --b-ink: var(--invert-ink); color: var(--invert-ink); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); }
html:is(.dark-boot, :has(#theme:checked)) .footer .btn--ghost { background: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, .18); }
.footer .btn--ghost:hover { background: rgba(255, 255, 255, .16); color: var(--invert-ink); }
.footer .btn:not(.btn--ghost):not(.btn--accent) { background: var(--invert-ink); color: var(--invert-bg); }
.footer .btn:not(.btn--ghost):not(.btn--accent):hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Hero ---- */
.hero h1 .serif { color: var(--accent-text); padding: 0 .1em .12em 0; margin-right: -.06em; }
.hero h1 .line { padding-bottom: .14em; margin-bottom: -.08em; }
.hero h1 .accent { color: var(--accent); }
.hero h1 .pill { border: 3px solid var(--glass-edge); box-shadow: var(--glass-shadow); background: url("../img/portrait.webp") center 22% / cover; animation: none; }
.blob--1 { background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%); opacity: .28; }
.blob--2 { background: radial-gradient(circle, rgba(160, 160, 170, .5), transparent 70%); opacity: .35; }
html:is(.dark-boot, :has(#theme:checked)) .blob--1 { opacity: .3; }
html:is(.dark-boot, :has(#theme:checked)) .blob--2 { opacity: .12; }
.rotator { color: var(--accent-text); }
.badge { border-radius: 50%; translate: none !important; }
.badge__ring text { fill: var(--ink); }
.badge__core { background: var(--accent); color: #fff; transition: background-color .35s var(--ease-out); }
.badge:hover .badge__core { transform: none; background: color-mix(in srgb, var(--accent) 86%, #000); }
.ticker__item svg { color: var(--accent); }

/* ---- Single-accent details ---- */
.eyebrow::before, .float-chip i, .float-chip--2 i { background: var(--accent); }
.loader__bar, .toc__progress i { background: var(--accent); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; background: var(--accent); transform-origin: left; transform: scaleX(0); pointer-events: none; }
@supports (animation-timeline: scroll()) { .progress { animation: grow-x linear both; animation-timeline: scroll(root); } }
@supports not (animation-timeline: scroll()) { .progress { display: none; } }
.stat__num sup, .savings__big sup { color: var(--ink); opacity: .45; font-weight: 700; }
.intro__text .serif, .about__lead .serif, .case-hero h1 .serif, .pullquote .serif, .nf h1 .serif, .chapter .h2 .serif, .rc-title em { color: var(--accent-text); }
.footer__cta .serif { color: var(--accent-text); }
.impact__item b em { font-style: normal; color: var(--accent-text); }
.rc-big { color: var(--ink); }
.rc-closing__title em { color: var(--accent-text); }

/* Stat highlight card: solid, calm */
.stat--accent { background: var(--invert-bg); color: var(--invert-ink); }
.stat--accent .stat__label, .stat--accent .stat__label b { color: var(--invert-ink); }
.stat--accent .stat__num sup { color: var(--invert-ink); }
.stat--accent::before { background: var(--accent); }
.stat--accent:hover .stat__label, .stat--accent:hover .stat__label b, .stat--accent:hover .stat__num sup { color: #fff; }
.stat:hover::before { background: var(--accent); }
.stat:hover, .stat:hover .stat__label b { color: #fff; }
.stat:hover .stat__label { color: rgba(255, 255, 255, .9); }
.stat:hover .stat__num sup { color: #fff; opacity: .8; }

/* Skills */
.skill-group--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.skill-group--accent .chip { color: #fff; border-color: rgba(255, 255, 255, .5); }
.skill-group--accent .chip:hover { background: #fff; color: #0066CC; border-color: #fff; }

/* ---- Hover states that fully reset (no leftover colour) ---- */
.tool, .impact__item, .principle, .goal, .rc-card, .p-card { background-image: none !important; }
.tool::after { display: none; }
.tool { transition: transform .45s var(--ease-out), border-color .35s, box-shadow .45s var(--ease-out); }
.tool:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--glass-shadow); }
.p-card, .p-card:hover { background: color-mix(in srgb, var(--invert-ink) 6%, transparent); color: inherit; }
.p-card { transition: transform .45s var(--ease-out), border-color .35s, box-shadow .45s var(--ease-out); }
.p-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent-text) 70%, transparent); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); }
.p-card:hover .p-card__go { transform: rotate(-45deg); opacity: 1; background: var(--accent); color: #fff; border-color: var(--accent); }
.principle:hover { transform: translateY(-4px); background: var(--surface); color: inherit; box-shadow: var(--glass-shadow); }
.principle:hover p { color: var(--muted); }
.work-card__view { background: var(--accent); color: #fff; }
.row:hover .row__icon { background: var(--accent); color: #fff; }
.bar__fill { background: var(--accent); }

/* Experience: no layout shift, calm highlight */
.xp summary, .xp summary:hover { padding-inline: 0; }
.xp summary::before { inset: 4px calc(var(--gutter) * -.4); border-radius: 18px; background: var(--glass-bg-strong); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow); transform: none; opacity: 0; transition: opacity .35s var(--ease-out); }
.xp summary:hover::before { transform: none; opacity: 1; }
.xp summary:hover, .xp summary:hover .xp__years, .xp summary:hover .xp__co { color: inherit; }
.xp summary:hover .xp__years, .xp summary:hover .xp__co small { color: var(--muted); }
.xp summary:hover .xp__co { color: var(--ink-2); }
.xp summary:hover .xp__plus { color: var(--accent-text); }

/* About: seal readable on any background */
.stamp { background: var(--accent); filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)) drop-shadow(0 0 1px rgba(255, 255, 255, .9)); }

/* Flow "+N more": instant tooltip on hover or keyboard focus */
.flow__tools .more { position: relative; color: var(--ink) !important; cursor: default; }
.flow__tools .more::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); translate: -50% 4px; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 11px; letter-spacing: .02em; opacity: 0; pointer-events: none; transition: opacity .2s, translate .2s; z-index: 5; }
.flow__tools .more:hover::after, .flow__tools .more:focus-visible::after { opacity: 1; translate: -50% 0; }

/* Footer name: 60% visible, cropped by the bottom edge; letters stay visible on hover */
.footer { position: relative; }
.footer__big { font-family: var(--f-display); font-style: normal; font-weight: 800; text-transform: uppercase; font-size: min(26.5vw, 470px); letter-spacing: .01em; line-height: .78;
  color: color-mix(in srgb, var(--invert-ink) 92%, transparent); background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-stroke: 0;
  animation: none; white-space: nowrap; text-align: center; margin: clamp(32px, 5vw, 64px) 0 -.3em; padding: 0; overflow: visible; }
.footer__big span { display: inline-block; color: inherit; transition: transform .5s var(--ease-out), color .35s; }
.footer__big span:hover { color: var(--accent-text); transform: translateY(-6%); }
.footer { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .footer__big span:hover { transform: none; } }
/* Counters are animated by site.js (text is the no-JS fallback) */
.stat__num .n, .savings__big .n { animation: none !important; counter-reset: none; }
.stat__num .n::after, .savings__big .n::after { content: none !important; }

/* Glass menu pill on desktop only (mobile uses the full-screen menu) */
@media (min-width: 1101px) {
  .nav-links { position: relative; isolation: isolate; background: var(--glass-bg); -webkit-backdrop-filter: blur(20px) saturate(185%); backdrop-filter: blur(20px) saturate(185%);
    border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow); }
}
@media (max-width: 1100px) {
  .nav-links { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); }
  .nav-links a.is-active::after { bottom: auto; top: 50%; left: 2px; margin: -3px 0 0; width: 6px; height: 6px; }
}
.skill-group--accent > p { opacity: 1; }

/* =========================================================
   24 Orange (back by request) + Apple-style Liquid Glass, no shadows
   Contrast: white on #D03D0B 4.8:1 · #B4380C text on #F2F0EA 5.3:1 · #FF6A3D text on #0B0B0A 6.9:1
   ========================================================= */
:root {
  --bg: #F2F0EA; --bg-2: #E9E6DE; --surface: #FFFFFF;
  --ink: #0E0E0C; --ink-2: #3A3934; --muted: #66635B;
  --line: rgba(14, 14, 12, .12); --line-strong: rgba(14, 14, 12, .28);
  --accent: #D03D0B;            /* fills with white text */
  --accent-vivid: #FF4D17;      /* decoration only */
  --accent-text: #B4380C; --accent-text-inv: #FF6A3D;
  --on-accent: #FFFFFF; --accent-ink: #FFFFFF;
  --accent-tint: rgba(255, 77, 23, .1);
  --invert-bg: #0E0E0C; --invert-ink: #F2F0EA;
  --glass-shadow: none;
  --lg-tint: rgba(255, 255, 255, .22);
  --lg-edge-hi: rgba(255, 255, 255, .95);
  --lg-edge-lo: rgba(255, 255, 255, .35);
  --grain: .06;
}
html:is(.dark-boot, :has(#theme:checked)) {
  --bg: #0B0B0A; --bg-2: #131311; --surface: #191917;
  --ink: #F2F0EA; --ink-2: #CFCCC3; --muted: #8E8B82;
  --line: rgba(242, 240, 234, .12); --line-strong: rgba(242, 240, 234, .3);
  --accent: #D03D0B; --accent-vivid: #FF5A26;
  --accent-text: #FF6A3D; --accent-text-inv: #B4380C;
  --accent-tint: rgba(255, 90, 38, .14);
  --invert-bg: #F2F0EA; --invert-ink: #0B0B0A;
  --glass-shadow: none;
  --lg-tint: rgba(255, 255, 255, .06);
  --lg-edge-hi: rgba(255, 255, 255, .55);
  --lg-edge-lo: rgba(255, 255, 255, .14);
  --grain: .08;
}
/* No drop shadows anywhere */
*, *::before, *::after { box-shadow: none; }

/* ---- Liquid Glass ----
   .lg-on (Chromium: real refraction via SVG displacement on the backdrop)
   fallback (Safari/Firefox): clear tint + specular edge, no blur haze */
.nav-links, .toggle, .burger, .btn--ghost, .nav .btn, .badge, .status, .float-chip, .rc-products li, .zoom__hint, .lb button, .flow__tools .more {
  background: var(--lg-tint);
  -webkit-backdrop-filter: saturate(1.5) brightness(1.04); backdrop-filter: saturate(1.5) brightness(1.04);
  border: 1px solid var(--lg-edge-lo);
  box-shadow: inset 1.5px 1.5px 0 -0.5px var(--lg-edge-hi), inset -1px -1px 0 -0.5px var(--lg-edge-lo), inset 0 0 14px rgba(255, 255, 255, .14) !important;
}
@media (max-width: 1100px) {
  .nav-links { background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: none !important; border: 0; }
  .lg-on .nav-links { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
}
.nav::before { background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
/* remove the old soft-light sheen layer */
.btn--ghost::after, .nav .btn::after, .badge::after, .toggle::before, .burger::after { display: none; }
.nav-links a.is-active, .nav-links a[aria-current] { background: var(--lg-tint); box-shadow: inset 1px 1px 0 -0.5px var(--lg-edge-hi), inset -1px -1px 0 -0.5px var(--lg-edge-lo) !important; color: var(--ink); }
.nav-links a:hover { background: var(--lg-tint); color: var(--ink); }
.nav-links a.is-active::after { background: var(--accent-vivid); }

/* ---- Buttons ---- */
.btn:not(.btn--ghost):not(.btn--accent):hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent { --b-bg: var(--accent); background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { background: color-mix(in srgb, var(--accent) 85%, #000); color: #fff; }
.btn--ghost:hover, .nav .btn:hover { background: color-mix(in srgb, var(--lg-tint) 60%, var(--accent-tint)); color: var(--ink); }
.footer .btn:not(.btn--ghost):not(.btn--accent):hover { background: var(--accent); color: #fff; }
/* Download arrow: drops out the bottom, re-enters from the top */
.ico-clip { display: inline-grid; overflow: hidden; width: 18px; height: 18px; }
.ico-clip .ico--dl { transform: none !important; }
.btn:hover .ico-clip .ico--dl, .btn:focus-visible .ico-clip .ico--dl { animation: dl-drop .7s var(--ease-out); }
@keyframes dl-drop { 0% { transform: translateY(0); } 42% { transform: translateY(120%); } 43% { transform: translateY(-120%); } 100% { transform: translateY(0); } }

/* ---- Orange details ---- */
.eyebrow::before, .float-chip i, .float-chip--2 i, .loader__bar, .toc__progress i, .progress, .bar__fill { background: var(--accent-vivid); }
.hero h1 .serif, .rotator, .intro__text .serif, .about__lead .serif, .case-hero h1 .serif, .pullquote .serif, .nf h1 .serif, .chapter .h2 .serif, .rc-title em, .footer__cta .serif, .impact__item b em, .rc-closing__title em { color: var(--accent-text); }
.hero h1 .accent, .ticker__item svg { color: var(--accent-vivid); }
.badge__core { background: var(--accent); }
.badge:hover .badge__core { background: color-mix(in srgb, var(--accent) 85%, #000); }
.blob--1 { background: var(--accent-vivid); opacity: .32; }
.blob--2 { background: #FFB38A; opacity: .3; }
html:is(.dark-boot, :has(#theme:checked)) .blob--1 { opacity: .26; }
html:is(.dark-boot, :has(#theme:checked)) .blob--2 { opacity: .12; }
.hero h1 .pill { border: 2px solid var(--lg-edge-lo); }
.stat--accent { background: var(--accent); color: #fff; }
.stat--accent .stat__label, .stat--accent .stat__label b, .stat--accent .stat__num sup { color: #fff; }
.stat--accent .stat__num sup { opacity: .85; }
.stat--accent::before { background: var(--ink); }
.stat--accent:hover { color: var(--bg); }
.stat--accent:hover .stat__label, .stat--accent:hover .stat__label b, .stat--accent:hover .stat__num sup { color: var(--bg); }
.stat:not(.stat--accent):hover::before { background: var(--accent); }
.skill-group--accent { background: var(--accent); border-color: var(--accent); }
.skill-group--accent .chip:hover { color: var(--accent); }
.work-card__view, .row:hover .row__icon, .p-card:hover .p-card__go { background: var(--accent); }

/* ---- Cards: orange glow follows the pointer and fades out on leave; subtle tilt ---- */
.tool, .impact__item, .principle, .goal, .rc-card, .rc-stat, .stat { position: relative; isolation: isolate; }
.tool::before, .impact__item::before, .principle::before, .rc-card::after, .rc-stat::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent-vivid) 16%, transparent), transparent 65%);
  opacity: 0; transition: opacity .45s var(--ease-out);
}
.tool:hover::before, .impact__item:hover::before, .principle:hover::before, .rc-card:hover::after, .rc-stat:hover::before { opacity: 1; }
.tool, .impact__item, .principle, .rc-card, .p-card { transition: transform .5s var(--ease-out), border-color .35s, background-color .35s, color .35s; }
.tool:hover, .impact__item:hover, .rc-card:hover { transform: translateY(-4px) rotate(-1deg); border-color: color-mix(in srgb, var(--accent-vivid) 45%, transparent); }
.principle:hover { transform: translateY(-4px) rotate(-1.2deg); background: var(--surface); }

/* Brand bubble on AI tool cards (bottom-right, opposite the logo) */
.tool::after { display: block; content: ""; position: absolute; width: 190px; height: 190px; right: -70px; bottom: -80px; border-radius: 50%;
  background: var(--c); filter: blur(46px); opacity: .22; z-index: -1; transition: opacity .45s var(--ease-out), transform .6s var(--ease-out); pointer-events: none; }
.tool:hover::after { opacity: .42; transform: scale(1.1); }
.tool { overflow: hidden; }

/* Shipped cards: orange with white text on hover, back to normal on leave */
.p-card:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-8px) rotate(-1deg); }
.p-card:hover .p-card__cat, .p-card:hover .p-card__desc { color: #fff; opacity: .92; }
.p-card:hover .p-card__go { background: #fff; color: var(--accent); border-color: #fff; }

/* Experience hover: flat orange tint, no shadow, no movement */
.xp summary::before { background: var(--accent-tint); box-shadow: none !important; }
.xp summary:hover .xp__plus { color: var(--accent-text); }

/* Awards icon: small tilt instead of a full spin */
.row__icon { transition: transform .45s var(--ease-out), background-color .3s, color .3s; }
.row:hover .row__icon { transform: rotate(-14deg) scale(1.06); }

/* About: seal in the logo ink colour */
.stamp { background: var(--ink); filter: none; }

/* "Loading" sheen when a card first scrolls into view (site.js adds .is-in) */
.loadin { position: relative; overflow: hidden; }
.loadin::selection { background: var(--accent); }
.loadin > .sheen { position: absolute; inset: 0; pointer-events: none; z-index: 3; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 70%, transparent) 50%, transparent 80%); transform: translateX(-120%); }
.loadin.is-in > .sheen { animation: sheen 1.1s var(--ease-out) forwards; }
@keyframes sheen { to { transform: translateX(120%); } }
/* Bars/meters start empty and fill when in view */
.js .bar__fill { width: 0; animation: none; transition: width 1.8s var(--ease-out); }
.js .bar.is-in .bar__fill { width: calc(var(--w) * 1%); }
.js .skill-meter div::after { background: linear-gradient(90deg, currentColor calc(var(--vv, 0) * 1%), color-mix(in srgb, currentColor 20%, transparent) 0); transition: --vv 1.6s var(--ease-out); }
@property --vv { syntax: "<number>"; initial-value: 0; inherits: true; }
.js .skill-meter div.is-in { --vv: var(--v); }

/* Footer: name sits right above the copyright bar and is cropped by it */
.footer__big { margin: clamp(32px, 5vw, 64px) 0 -.3em; position: relative; z-index: 0; }
.footer__legal { position: relative; z-index: 1; background: var(--invert-bg); border-top: 1px solid color-mix(in srgb, var(--invert-ink) 15%, transparent); }
.footer__big span:hover { color: var(--accent-text); transform: translateY(-4%); }

@media (prefers-reduced-motion: reduce) {
  .loadin > .sheen { display: none; }
  .btn:hover .ico-clip .ico--dl { animation: none; }
  .js .bar__fill { width: calc(var(--w) * 1%); transition: none; }
}
.p-card:hover { box-shadow: none; } .js .skill-meter div { transition: --vv 1.6s var(--ease-out); } .js .skill-meter div::after { transition: none; }
/* Case: platform modules as a full-width grid */
.rc-modgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.rc-modgrid .rc-num { display: block; font-family: var(--f-mono); font-size: 12px; color: var(--accent-text); margin-bottom: 12px; }
.rc-modgrid .rc-card { display: flex; flex-direction: column; }
.rc-modgrid .rc-chips { margin-top: auto; padding-top: 16px; }
@media (min-width: 1300px) { .rc-modgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .rc-modgrid { grid-template-columns: 1fr; } }
/* Floating Liquid Glass controls (no frosted header bar behind them) */
.nav::before { display: none; }
.logo { padding: 6px 16px 6px 10px; border-radius: 999px; background: var(--lg-tint); border: 1px solid var(--lg-edge-lo);
  box-shadow: inset 1.5px 1.5px 0 -0.5px var(--lg-edge-hi), inset -1px -1px 0 -0.5px var(--lg-edge-lo), inset 0 0 14px rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: saturate(1.5) brightness(1.04); backdrop-filter: saturate(1.5) brightness(1.04); }
.logo__mark { width: 30px; height: 38px; }
@media (max-width: 400px) { .logo { padding: 6px 10px; } }
/* Readable Liquid Glass: enough tint behind text, refraction stays visible at the rim */
:root { --lg-tint: rgba(250, 249, 246, .62); }
html:is(.dark-boot, :has(#theme:checked)) { --lg-tint: rgba(28, 28, 26, .58); }
/* Visible "loading" pace for bars and meters */
.js .bar__fill { transition: width 2.2s cubic-bezier(.45, .05, .25, 1); }
.js .bar:nth-child(2) .bar__fill { transition-delay: .12s; } .js .bar:nth-child(3) .bar__fill { transition-delay: .24s; }
.js .bar:nth-child(4) .bar__fill { transition-delay: .36s; } .js .bar:nth-child(5) .bar__fill { transition-delay: .48s; }
.js .skill-meter div { transition: --vv 2s cubic-bezier(.45, .05, .25, 1); }

/* =========================================================
   25 Final fixes: stat cards, unified solid header
   ========================================================= */
/* Stat cards: highlight card is black by default; every card fills orange (white text) on hover */
.stats .stat::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); transform: scaleY(0); transform-origin: bottom; transition: transform .55s var(--ease); }
.stats .stat:hover::before { transform: scaleY(1); }
.stats .stat, .stats .stat .stat__label, .stats .stat .stat__label b, .stats .stat .stat__num sup { transition: color .4s var(--ease); }
.stats .stat:hover, .stats .stat:hover .stat__label b, .stats .stat:hover .stat__num sup { color: #fff; }
.stats .stat:hover .stat__label { color: rgba(255, 255, 255, .92); }
.stats .stat--accent { background: var(--invert-bg); color: var(--invert-ink); }
.stats .stat--accent .stat__label, .stats .stat--accent .stat__label b, .stats .stat--accent .stat__num sup { color: var(--invert-ink); }
.stats .stat--accent:hover, .stats .stat--accent:hover .stat__label, .stats .stat--accent:hover .stat__label b, .stats .stat--accent:hover .stat__num sup { color: #fff; }
/* ---- Unified header: one solid bar, no transparency, no shadow ---- */
.nav { top: 12px; left: var(--gutter); right: var(--gutter); padding: 8px 10px 8px 12px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.nav::before { display: none; }
.nav .logo, .nav .nav-links, .nav .toggle, .nav .burger, .nav .btn, .nav .status {
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }
.nav .logo { padding: 2px 8px 2px 2px; background: transparent; border: 0; }
.nav .status { background: transparent; border: 0; padding: 0 6px; }
.nav .toggle { background: var(--bg-2); border: 1px solid var(--line); }
.nav .burger { background: var(--bg-2); border: 1px solid var(--line); }
.nav .btn { background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.nav .btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (min-width: 1101px) {
  .nav .nav-links { background: transparent; border: 0; padding: 0; gap: 2px; }
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { background: var(--bg-2); color: var(--ink); }
.nav-links a.is-active, .nav-links a[aria-current] { background: var(--accent-tint); color: var(--accent-text); box-shadow: none !important; }
.nav-links a.is-active::after { display: none; }
@media (max-width: 1100px) {
  .nav .nav-links { background: var(--surface); border: 0; border-radius: 0; }
  .nav-links a.is-active { background: transparent; }
}
html:has(#menu:checked) .nav { border-color: transparent; }
/* Mobile: hide the "Resume" label but keep the download icon visible */
@media (max-width: 560px) { .nav .btn .ico-clip { display: inline-grid; } .nav .btn { width: 44px; height: 44px; justify-content: center; padding: 0; } }

/* =========================================================
   26 Motion layer — ideas from Motion-Primitives, Vengeance UI & Haikei,
   rebuilt in plain CSS/JS (no React needed on shared hosting)
   ========================================================= */

/* 1 · Selected work as a sticky card stack (Elastic Stack / sticky stack) */
.work-stack { display: block; }
.work-stack .work-card, .work-stack .work-card:nth-child(n) {
  position: sticky; top: calc(96px + var(--i, 0) * 16px); margin: 0 0 8vh; grid-column: auto;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 48px); align-items: center;
  padding: clamp(12px, 1.4vw, 20px); background: var(--surface); border: 1px solid var(--line); border-radius: 30px;
  transform: scale(calc(1 - var(--p, 0) * .06)); transform-origin: 50% 0; filter: brightness(calc(1 - var(--p, 0) * .18));
  transition: border-color .4s; will-change: transform;
}
.work-stack .work-card:last-child { margin-bottom: 0; }
.work-stack .work-card .work-card__media, .work-stack .work-card:nth-child(n) .work-card__media { aspect-ratio: 16 / 10; border-radius: 20px; clip-path: none; }
.work-stack .work-card:hover .work-card__media { clip-path: none; }
.work-stack .work-card__meta { grid-template-columns: 1fr; gap: 14px; padding: 8px 12px 8px 0; align-content: center; }
.work-stack .work-card__idx { font-size: 14px; }
.work-stack .work-card__title { font-size: clamp(28px, 3.2vw, 52px); }
.work-stack .work-card__desc { grid-column: 1; font-size: 17px; }
.work-stack .work-card__year { order: -1; }
@media (max-width: 860px) {
  .work-stack .work-card, .work-stack .work-card:nth-child(n) { grid-template-columns: 1fr; top: calc(84px + var(--i, 0) * 10px); gap: 14px; }
  .work-stack .work-card__meta { padding: 4px 6px 10px; }
}

/* 2 · Border Trail — an orange light travelling around the edge */
@keyframes trail { to { --ang: 360deg; } }
.work-stack .work-card::after, .footer .btn--accent::after, .hero__cta .btn:not(.btn--ghost)::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--ang), transparent 0 72%, var(--accent-vivid) 86%, #FFB38A 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity .4s; animation: trail 3.2s linear infinite;
}
.work-stack .work-card:hover::after, .hero__cta .btn:hover::after, .footer .btn--accent::after { opacity: 1; }
.hero__cta .btn, .footer .btn--accent { position: relative; }

/* 3 · Blur / stagger word reveal for section titles (Text Effect) */
.js .split .w { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(.28em);
  transition: opacity .8s var(--ease-out), filter .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .split.is-in .w { opacity: 1; filter: blur(0); transform: none; }

/* 4 · Text Scramble / decode (small mono labels) */
.scr { font-variant-numeric: tabular-nums; }
.scr .x { color: var(--accent-text); }

/* 5 · Text Roll (letters roll up on hover) */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.25; }
.roll__a, .roll__b { display: inline-block; white-space: pre; }
.roll__b { position: absolute; left: 0; top: 0; }
.roll i { display: inline-block; font-style: normal; white-space: pre; transition: transform .5s var(--ease-out); transition-delay: calc(var(--i, 0) * 16ms); }
.roll__b i { transform: translateY(115%); }
:is(a, .btn):hover .roll__a i, :is(a, .btn):focus-visible .roll__a i { transform: translateY(-115%); }
:is(a, .btn):hover .roll__b i, :is(a, .btn):focus-visible .roll__b i { transform: translateY(0); }

/* 6 · Text Shimmer on availability */
.nav .status { background: linear-gradient(100deg, var(--ink-2) 42%, var(--accent-text) 50%, var(--ink-2) 58%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3.4s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (forced-colors: active) { .nav .status { color: CanvasText; background: none; } }

/* 7 · Line hover links (footer) */
.footer__grid a { opacity: 1; color: color-mix(in srgb, var(--invert-ink) 88%, transparent);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease-out), color .3s; padding-bottom: 2px; }
.footer__grid a:hover { background-size: 100% 1px; color: var(--accent-text); opacity: 1; }

/* 8 · Haikei-style blurry gradient blob behind the footer CTA */
.footer::before { content: ""; position: absolute; width: min(60vw, 820px); aspect-ratio: 1; right: -12vw; top: -18vw; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--accent-vivid), rgba(255, 179, 138, .6) 45%, transparent 70%); filter: blur(70px); opacity: .28;
  pointer-events: none; animation: blob-float 18s ease-in-out infinite alternate; z-index: 0; }
.footer > .wrap { position: relative; z-index: 1; }
@keyframes blob-float { to { transform: translate(-8vw, 6vw) scale(1.1); } }

@media (prefers-reduced-motion: reduce) {
  .work-stack .work-card { transform: none; filter: none; }
  .work-stack .work-card::after, .footer .btn--accent::after, .hero__cta .btn::after, .nav .status, .footer::before { animation: none; }
  .nav .status { color: var(--ink-2); background: none; }
  .js .split .w { opacity: 1; filter: none; transform: none; transition: none; }
  .roll i { transition: none; }
}
/* Button labels: centre the rolling text exactly on the icon's axis */
.btn > span:not(.ico-clip):not(.sr-only):not(.ico) { display: inline-flex; align-items: center; }
.btn .roll { display: block; vertical-align: middle; }

/* "See it live" CTA near the end of each case study */
.visit { position: relative; overflow: hidden; isolation: isolate; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px;
  margin: 0 0 clamp(48px, 6vw, 80px); padding: clamp(28px, 4vw, 56px); border-radius: 28px; background: var(--invert-bg); color: var(--invert-ink);
  --accent-text: var(--accent-text-inv); }
.visit::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-vivid), transparent 65%); opacity: .35; filter: blur(40px); pointer-events: none; }
.visit__text { max-width: 620px; }
.visit .eyebrow { color: color-mix(in srgb, var(--invert-ink) 70%, transparent); }
.visit__title { font-size: clamp(30px, 3.6vw, 54px); font-weight: 750; letter-spacing: -.025em; line-height: 1.02; margin: 14px 0 12px; }
.visit__title .serif { color: var(--accent-text); }
.visit p { margin: 0; color: color-mix(in srgb, var(--invert-ink) 82%, transparent); font-size: 17px; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.visit .btn--ghost { color: var(--invert-ink); background: rgba(255, 255, 255, .08); border-color: color-mix(in srgb, var(--invert-ink) 28%, transparent); }
.visit .btn--ghost:hover { background: color-mix(in srgb, var(--invert-ink) 14%, transparent); color: var(--invert-ink); }
.visit .btn--accent::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 72%, var(--accent-vivid) 86%, #FFB38A 92%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: trail 3.2s linear infinite; }
.visit .btn--accent { position: relative; }
.rich .visit { margin-top: 12px; }
@media (max-width: 560px) { .visit__actions, .visit__actions .btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .visit .btn--accent::after { animation: none; } }
/* JS handles eased anchor scrolling; CSS smooth-scroll stays as the no-JS fallback */
html.js { scroll-behavior: auto; }

/* =========================================================
   27 Cinematic layer (ideas from Scrolltide): tide shader, focus reveal, hero exit
   ========================================================= */
/* Hero tide: flowing mesh gradient behind the grid (WebGL; the CSS blobs remain the fallback) */
.hero__tide { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.tide-on .hero__tide { opacity: 1; }
.tide-on .hero .blob { display: none; }
.tide-on .hero__grid { opacity: .55; }

/* Focus Reveal: each word of the profile statement sharpens out of a blur as you scroll */
@supports (animation-timeline: view()) {
  .words span { animation: focus-in linear both; animation-timeline: view();
    animation-range: entry calc(20% + var(--i, 0) * 1.4%) cover calc(38% + var(--i, 0) * 1.1%); }
}
@keyframes focus-in { from { opacity: .1; filter: blur(10px); } to { opacity: 1; filter: blur(0); } }

@media (prefers-reduced-motion: reduce) {
  .words span, .hero h1, .hero__bottom, .hero__tide { animation: none !important; opacity: 1; filter: none; }
}
.hero__top .mono { color: var(--ink-2); }
/* Phones: icon-only Resume button (accessible name comes from aria-label) */
@media (max-width: 560px) { .nav .btn > span:not(.ico-clip) { display: none !important; } }

/* =========================================================
   28 MotionSites-inspired: hover "video" previews + glowing word
   ========================================================= */
/* Flipbook preview inside card media (site.js builds .pv on hover) */
.p-card__img { position: relative; }
.pv { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .45s var(--ease-out); pointer-events: none; background: #0E0E0C; }
.pv.is-on { opacity: 1; }
.pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease-out), transform 2.4s linear; }
.pv img.on { opacity: 1; transform: scale(1); }
.pv__bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 4px; z-index: 2; }
.pv__bar i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.pv__bar i::after { content: ""; display: block; height: 100%; width: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.pv__bar i.done::after { transform: scaleX(1); }
.pv__bar i.now::after { animation: pv-fill var(--pv-dur, 1.2s) linear forwards; }
@keyframes pv-fill { to { transform: scaleX(1); } }
.work-card__tags, .work-card__view { z-index: 2; }

/* Glowing headline word: solid orange with a soft breathing halo (a blurred copy behind) */
.glow { position: relative; display: inline-block; isolation: isolate; }
.glow::before { content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1; color: var(--accent-vivid); filter: blur(18px); opacity: .55;
  animation: glow-breathe 4.5s ease-in-out infinite; pointer-events: none; white-space: nowrap; }
@keyframes glow-breathe { 50% { opacity: .9; filter: blur(24px); } }
html:not(.dark-boot):not(:has(#theme:checked)) .glow::before { opacity: .35; }
.footer__cta .glow::before { filter: blur(20px); }
@media (prefers-reduced-motion: reduce) { .glow::before { animation: none; } .pv img { transition: none; } }

/* =========================================================
   29 Deep-dive layer (Scrolltide + MotionSites)
   ========================================================= */
/* Particle wave ribbon across the lower hero */
.hero__wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72%; display: block; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.wave-on .hero__wave { opacity: 1; }
@media (max-width: 860px) { .hero__wave { height: 55%; } }
/* Curved 3D "Shipped & live" gallery (site.js sets --ry / --tz / --sc per card) */
.js .rail.is-curved { perspective: 1400px; perspective-origin: 50% 50%; padding-block: 28px; }
.js .rail.is-curved .rail__track { transform-style: preserve-3d; }
.js .rail.is-curved .p-card { transform: rotateY(var(--ry, 0deg)) translateZ(var(--tz, 0px)) scale(var(--sc, 1)); transform-origin: 50% 50%;
  transition: background-color .35s, border-color .35s, color .35s; will-change: transform; }
.js .rail.is-curved .p-card:hover { transform: rotateY(var(--ry, 0deg)) translateZ(calc(var(--tz, 0px) + 30px)) scale(var(--sc, 1)); }
@media (prefers-reduced-motion: reduce) { .js .rail.is-curved .p-card { transform: none; } }
/* Kinetic ticker (site.js drives the transform) */
.kinetic .ticker__track { animation: none; will-change: transform; }

/* Focus brackets: hovering a word in the profile statement frames it (Scrolltide "Focus Reveal") */
.words span { position: relative; }
.words span::before { content: ""; position: absolute; inset: -.02em -.08em; pointer-events: none; opacity: 0; transition: opacity .25s, inset .35s var(--ease-out);
  --b: var(--accent-vivid); --l: .32em; --w: 2px;
  background:
    linear-gradient(var(--b), var(--b)) 0 0 / var(--l) var(--w), linear-gradient(var(--b), var(--b)) 0 0 / var(--w) var(--l),
    linear-gradient(var(--b), var(--b)) 100% 0 / var(--l) var(--w), linear-gradient(var(--b), var(--b)) 100% 0 / var(--w) var(--l),
    linear-gradient(var(--b), var(--b)) 0 100% / var(--l) var(--w), linear-gradient(var(--b), var(--b)) 0 100% / var(--w) var(--l),
    linear-gradient(var(--b), var(--b)) 100% 100% / var(--l) var(--w), linear-gradient(var(--b), var(--b)) 100% 100% / var(--w) var(--l);
  background-repeat: no-repeat; }
.words span:hover::before { opacity: 1; inset: -.1em -.16em; }

/* =========================================================
   30 Type tracking tokens, pager, solution ticks, footer name reveal
   ========================================================= */
/* One place to tune headline letter-spacing site-wide:
   --tr-display  huge words (hero, case titles, footer CTA, next/previous, 404)
   --tr-heading  section and card titles
   --tr-title    small titles and labels in bold */
:root { --tr-display: -.012em; --tr-heading: -.01em; --tr-title: -.005em; }
h1, h2, h3, h4,
.hero h1, .hero h1 .serif, .case-hero h1, .footer__cta, .footer__big, .nf h1, .savings__big, .pager__title, .next__title, .next:hover .next__title,
.intro__text, .about__lead, .ai-note b, .impact__item b, .stat__num, .outcome b, .mail, .ticker__item, .rotator, .nav-links a { letter-spacing: var(--tr-display); }
.sec-title, .chapter .h2, .rc-title, .rc-closing__title, .visit__title, .behance-cta h3, .pullquote, .work-card__title, .p-card__name, .xp__role, .skill-group h3, .row__title { letter-spacing: var(--tr-heading); }
.tool h3, .flow__step h4, .principle .h4, .edu-card h4, .goal .h4, .process__step .h4, .rc-card h3, .rc-timeline h4, .rc-modules h3, .logo__text, .case-hero__summary { letter-spacing: var(--tr-title); }
.serif, .footer__cta .serif, .rc-title em { letter-spacing: 0; }

/* Word reveal: drop the filter once settled (a lingering blur(0) clips descenders like the "g" in "intelligent") */
.js .split.is-in .w { filter: none; }
.js .split .w { padding-bottom: .14em; margin-bottom: -.14em; padding-right: .04em; margin-right: -.04em; }

/* Case hero: more air between the tag pills and the title */
.case-hero__tags { margin-bottom: clamp(36px, 4.4vw, 64px); }

/* Problem = red cross, what I designed = green tick (everywhere these lists appear) */
:root { --good: #177245; --good-bg: color-mix(in srgb, #1FA463 16%, transparent); --bad: #C4262B; --bad-bg: color-mix(in srgb, #E5484D 16%, transparent); }
html:is(.dark-boot, :has(#theme:checked)) { --good: #4ADE80; --good-bg: color-mix(in srgb, #22C55E 20%, transparent); --bad: #FF8589; }
.rc-cons li::before { background: var(--bad-bg); color: var(--bad); }
.rc-pros li::before { background: var(--good-bg); color: var(--good); }

/* Previous / next case study */
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.pager__link { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-block: clamp(64px, 9vw, 130px); padding-inline: 0 clamp(16px, 3vw, 48px); position: relative; overflow: hidden; }
.pager__link--next { align-items: flex-end; text-align: right; padding-inline: clamp(16px, 3vw, 48px) 0; border-left: 1px solid var(--line); }
.pager__link .mono { color: var(--muted); }
.pager__title { font-size: clamp(40px, 6vw, 104px); font-weight: 800; line-height: .95; transition: color .45s var(--ease); }
.pager__link:hover .pager__title, .pager__link:focus-visible .pager__title { color: var(--accent-text); }
.pager__img { display: block; width: min(340px, 80%); aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; transform: scale(.86) rotate(-3deg); opacity: .55; transition: transform .8s var(--ease), opacity .5s; }
.pager__link--next .pager__img { transform: scale(.86) rotate(3deg); }
.pager__link:hover .pager__img, .pager__link:focus-visible .pager__img { transform: none; opacity: 1; }
.pager__img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  .pager { grid-template-columns: 1fr; }
  .pager__link, .pager__link--next { padding-inline: 0; align-items: flex-start; text-align: left; }
  .pager__link--next { border-left: 0; border-top: 1px solid var(--line); order: -1; }
}

/* =========================================================
   31 Alignment + hero control backdrops + AI glow
   ========================================================= */
/* Menu labels: the rolling text takes the link's own line height so it sits dead-centre in the pill */
.nav-links a .roll { line-height: inherit; vertical-align: top; }
/* Footer "intelligent": Apple Intelligence-style rim. Two gradient copies of the word sit behind the orange text:
   a tight blur that reads as a glowing outline, and a wide blur that spreads it out and fades.
   Only this word gets the AI colours; the brand accent stays orange everywhere else. */
.footer__cta .glow::before, .footer__cta .glow::after { content: attr(data-text); position: absolute; left: 0; top: 0; z-index: -1; white-space: nowrap; pointer-events: none;
  color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: .3em transparent;
  background: linear-gradient(90deg, #0894FF, #C959DD, #FF2E54, #FF9004, #0894FF) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text;
  animation: ai-glow 6s linear infinite; }
.footer__cta .glow::before { filter: blur(20px); opacity: var(--ai-rim, .2); }
.footer__cta .glow::after { filter: blur(70px); opacity: var(--ai-halo, .17); animation: ai-glow 6s linear infinite, ai-breathe 3.6s ease-in-out infinite; }
@keyframes ai-glow { to { background-position: -200% 0; } }
@keyframes ai-breathe { 50% { opacity: calc(var(--ai-halo, .17) + .08); filter: blur(84px); } }
html:not(.dark-boot):not(:has(#theme:checked)) .footer__cta .glow { --ai-rim: .26; --ai-halo: .22; }
html:not(.dark-boot):not(:has(#theme:checked)) .footer__cta .glow::before { opacity: var(--ai-rim); }
@media (prefers-reduced-motion: reduce) { .footer__cta .glow::before, .footer__cta .glow::after { animation: none; } }
/* Hero controls carry their own backdrop, shaped exactly like them (circle for the badge, pill for the ghost button),
   so the moving hero background never needs a dimmed patch around them */
.hero .badge { background: color-mix(in srgb, var(--bg) 86%, transparent); border-radius: 50%; }
.hero__cta .btn--ghost { background-color: color-mix(in srgb, var(--bg) 78%, transparent); }
/* Hero "Designer": solid orange only. Its blurred halo read as a smudge/patch over the calmer hero background */
.hero .glow::before { content: none; }

/* =========================================================
   32 Word stories (profile), custom cursor
   ========================================================= */
/* Words with a story: brackets + orange on hover, stay framed while open */
.words [data-fact] { cursor: pointer; transition: color .25s; }
.words [data-fact]:hover, .words [data-fact].is-fact { color: var(--accent-text); }
.words [data-fact].is-fact::before { opacity: 1; inset: -.1em -.16em; }
.facts-hint { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--ink-2); font: 500 12px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color .3s, color .3s; }
.facts-hint:hover { border-color: var(--accent); color: var(--ink); }
.facts-hint__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-vivid); animation: fh-pulse 2s ease-in-out infinite; }
@keyframes fh-pulse { 50% { transform: scale(1.6); opacity: .5; } }

/* The story popover */
.fact-pop { position: absolute; z-index: 90; width: min(420px, calc(100vw - 32px)); padding: 18px 20px 16px; border-radius: 20px;
  background: var(--ink); color: var(--bg); border: 1px solid color-mix(in srgb, var(--bg) 14%, transparent); outline: none; }
.fact-pop.is-in { animation: fp-in .45s var(--ease-out) both; }
@keyframes fp-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.fact-pop__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fact-pop__spark { width: 18px; height: 18px; flex: none; border-radius: 50%; background: conic-gradient(from 0deg, #0894FF, #C959DD, #FF2E54, #FF9004, #0894FF); animation: spin 3s linear infinite; }
.fact-pop__word { font-family: var(--f-serif); font-style: italic; font-size: 22px; line-height: 1; color: var(--accent-text-inv); }
.fact-pop__count { margin-left: auto; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; opacity: .7; }
.fact-pop__x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.fact-pop__text { position: relative; margin: 0; font-size: 17px; line-height: 1.5; }
.fact-pop__ghost { visibility: hidden; }
.fact-pop__live { position: absolute; inset: 0; }
.fact-pop__live span { animation: fp-word .35s var(--ease-out) both; }
@keyframes fp-word { from { opacity: 0; filter: blur(4px); } }
.fact-pop.is-thinking .fact-pop__live::before { content: ""; display: inline-block; width: 42px; height: 10px;
  background: radial-gradient(circle, currentColor 3px, transparent 3.5px) 0 50% / 14px 10px repeat-x; animation: fp-think .9s steps(3) infinite; opacity: .8; }
@keyframes fp-think { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.fact-pop__nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.fact-pop__nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); background: transparent; color: inherit; font-size: 16px; cursor: pointer; transition: background-color .25s, border-color .25s; }
.fact-pop__nav button:hover, .fact-pop__x:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.fact-pop :focus-visible { outline: 2px solid var(--accent-vivid); outline-offset: 2px; }
@media (max-width: 599px) { .fact-pop { position: fixed; left: 16px; right: 16px; bottom: 16px; top: auto; width: auto; } }
@media (prefers-reduced-motion: reduce) { .fact-pop.is-in, .fact-pop__live span, .fact-pop__spark, .facts-hint__dot { animation: none; } }


/* =========================================================
   33 AI twin (cursor-driven character video)
   Always dark: the panel colour is the video's own black (#090909), so there is no visible video edge.
   ========================================================= */
.twin { position: relative; isolation: isolate; overflow: hidden; margin-inline: clamp(8px, 1vw, 16px); border-radius: clamp(28px, 4vw, 56px);
  height: min(100svh, 920px); min-height: 640px; background: #090909; color: #F2F0EA; --tw-accent: #FF6A3D; }
.twin__video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; pointer-events: none; }
/* scrim: text side and top/bottom fade into the panel colour */
.twin__scrim { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, #090909 0%, rgba(9, 9, 9, .82) 30%, rgba(9, 9, 9, 0) 58%),
              linear-gradient(0deg, #090909 0%, rgba(9, 9, 9, 0) 22%), linear-gradient(180deg, #090909 0%, rgba(9, 9, 9, 0) 14%); }
.twin__content { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: min(600px, 42vw); padding-inline: var(--gutter) 0; padding-left: clamp(24px, 6vw, 96px); box-sizing: content-box; }
.twin__eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; font: 500 12px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--tw-accent); }
.twin__live { width: 8px; height: 8px; border-radius: 50%; background: var(--tw-accent); animation: fh-pulse 1.6s ease-in-out infinite; }
/* intro label starts out of focus and sharpens once the twin has "spoken" */
.twin__intro { margin: 0 0 20px; font-size: clamp(19px, 2vw, 26px); font-weight: 400; line-height: 1.3; letter-spacing: 0; color: rgba(242, 240, 234, .9); filter: blur(4px); transition: filter .8s var(--ease-out) .15s, color .8s var(--ease-out) .15s; }
/* sharpens the moment the section comes into view (not after the typing) */
.twin.is-live .twin__intro { filter: none; color: #F2F0EA; }
.twin__type { position: relative; margin: 0 0 28px; font-size: clamp(20px, 2.3vw, 32px); line-height: 1.3; font-weight: 500; }
.twin__rest { color: transparent; }
/* zero-width caret (drawn with a shadow) so it never pushes the text around */
.twin__typed::after { content: ""; display: inline-block; width: 0; height: 1.05em; vertical-align: -.15em; box-shadow: 2px 0 0 var(--tw-accent); animation: tw-blink 1s step-end infinite; }
.twin.is-done .twin__typed::after { opacity: 0; animation: none; transition: opacity .6s .8s; }
@keyframes tw-blink { 50% { opacity: 0; } }
.twin__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 8px 18px; border-radius: 999px; border: 1px solid transparent;
  background: #F2F0EA; color: #0B0B0A; font: 500 15px/1 var(--f-display); white-space: nowrap; cursor: pointer; text-decoration: none;
  opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out), background-color .2s, color .2s, border-color .2s; }
.twin.is-live .pill { opacity: 1; transform: none; transition-delay: calc(.4s + var(--i, 0) * 70ms), calc(.4s + var(--i, 0) * 70ms), 0s, 0s, 0s; }
.pill:hover, .pill:focus-visible { background: #D03D0B; color: #fff; }
.pill--ghost { background: transparent; color: #F2F0EA; border-color: rgba(242, 240, 234, .6); }
.pill--ghost u { text-underline-offset: 2px; }
.pill--ghost:hover, .pill--ghost:focus-visible { background: #F2F0EA; color: #0B0B0A; border-color: #F2F0EA; }
.pill.is-copied { background: #177245; border-color: #177245; color: #fff; }
.pill:focus-visible { outline: 2px solid var(--tw-accent); outline-offset: 3px; }
/* HUD: head direction readout + track */
.twin__hud { position: absolute; right: clamp(24px, 4vw, 56px); bottom: clamp(24px, 4vw, 48px); display: grid; justify-items: end; gap: 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(242, 240, 234, .72); }
.twin__read b { color: var(--tw-accent); font-weight: 600; }
.twin__track { position: relative; width: 160px; height: 1px; background: rgba(242, 240, 234, .3); }
.twin__track i { position: absolute; top: 50%; left: 40%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--tw-accent); transition: left .25s var(--ease-out); }
.twin__hint--touch, .twin-touch .twin__hint--fine { display: none; }
.twin-touch .twin__hint--touch { display: inline; }
@media (max-width: 760px) {
  .twin { height: auto; min-height: 0; aspect-ratio: auto; }
  .twin__video { position: relative; z-index: 0; display: block; height: 62vw; min-height: 300px; object-position: 70% 20%; }
  .twin__scrim { background: linear-gradient(0deg, #090909 0%, #090909 calc(100% - 62vw), rgba(9, 9, 9, 0) calc(100% - 62vw + 90px)); }
  .twin__content { height: auto; max-width: none; padding: 0 20px 32px; margin-top: -40px; }
  .twin__hud { position: relative; right: auto; bottom: auto; justify-items: start; padding: 0 20px 28px; }
}
@media (prefers-reduced-motion: reduce) { .twin__intro { filter: none; } .pill { opacity: 1; transform: none; transition: background-color .2s, color .2s; } .twin__live { animation: none; } }
/* AI twin: "looking up / down" layers sit exactly on top of the level video; site.js sets their opacity from cursor y */
.twin__video--row { opacity: 0; transition: opacity .15s linear; }
@media (max-width: 760px) { .twin__video--row { position: absolute; left: 0; top: 0; width: 100%; } }
/* AI twin, centred layout: he looks out from the middle of the panel, copy sits below his face */
@media (min-width: 761px) {
  .twin__video { object-position: 50% 18%; }
  .twin__scrim { background:
    linear-gradient(0deg, #090909 0%, rgba(9, 9, 9, .9) 26%, rgba(9, 9, 9, .55) 40%, rgba(9, 9, 9, 0) 56%),
    linear-gradient(180deg, #090909 0%, rgba(9, 9, 9, 0) 12%),
    linear-gradient(90deg, #090909 0%, rgba(9, 9, 9, 0) 16%, rgba(9, 9, 9, 0) 84%, #090909 100%); }
  .twin__content { justify-content: flex-end; align-items: center; text-align: center; max-width: 780px; margin-inline: auto; box-sizing: border-box;
    padding: 0 var(--gutter) clamp(36px, 6vh, 72px); }
  .twin__intro { margin-bottom: 12px; }
  .twin__type { margin-bottom: 22px; }
  .twin__pills { justify-content: center; }
  .twin__hud { top: clamp(24px, 4vw, 44px); bottom: auto; }
}
@media (max-width: 760px) {
  /* fade the video into the panel on every edge so its rectangle never shows */
  .twin__video { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 72%, transparent 100%), linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
    -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 72%, transparent 100%), linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%); mask-composite: intersect; object-position: 50% 15%; }
  .twin__scrim { display: none; }
}
/* the video is framed wide (head + upper body); on phones zoom in on the face */
@media (max-width: 760px) { .twin__video { transform: scale(1.7); transform-origin: 50% 20%; } .twin { overflow: hidden; } }
/* AI twin, desktop: size the video by the panel HEIGHT (top 86%, centred, edges fading into the panel) so the face
   always sits in the upper part at a consistent size, and keep the copy compact underneath it */
@media (min-width: 761px) {
  .twin__video { inset: 0 auto auto 50%; height: 86%; width: auto; aspect-ratio: 16 / 9; max-width: none; transform: translateX(-50%); object-position: 50% 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%), linear-gradient(180deg, #000 0, #000 62%, transparent 100%);
    -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 84%, transparent 100%), linear-gradient(180deg, #000 0, #000 62%, transparent 100%); mask-composite: intersect; }
  .twin__scrim { background: linear-gradient(0deg, #090909 0%, rgba(9, 9, 9, .92) 22%, rgba(9, 9, 9, .6) 34%, rgba(9, 9, 9, 0) 46%); }
  .twin__content { max-width: 1000px; padding-bottom: clamp(28px, 4.5vh, 56px); }
  .twin__eyebrow { margin-bottom: 14px; }
  .twin__intro { font-size: clamp(16px, 1.35vw, 20px); margin-bottom: 10px; max-width: 640px; }
  .twin__type { font-size: clamp(18px, 1.75vw, 26px); line-height: 1.32; max-width: 660px; margin: 0 auto 20px; }
  .twin__pills { gap: 8px; }
  .pill { font-size: 14px; min-height: 38px; padding: 7px 16px; }
}

/* =========================================================
   34 Theme cursor: the system cursor with an orange arrow / hand image, so it moves at native speed (no lag)
   ========================================================= */
@media (hover: hover) and (pointer: fine) {
  html { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2728%27%20viewBox%3D%270%200%2028%2028%27%3E%3Cpath%20d%3D%27M4%203v19l5-4.6%203.6%208.2%203.4-1.5-3.5-8H20z%27%20fill%3D%27none%27%20stroke%3D%27%23fff%27%20stroke-width%3D%273.5%27%20stroke-linejoin%3D%27round%27%2F%3E%3Cpath%20d%3D%27M4%203v19l5-4.6%203.6%208.2%203.4-1.5-3.5-8H20z%27%20fill%3D%27%23FF5A26%27%20stroke%3D%27%230B0B0A%27%20stroke-width%3D%271.4%27%20stroke-linejoin%3D%27round%27%2F%3E%3C%2Fsvg%3E") 4 3, auto; }
  :is(a, button, label, summary, select, [role="button"], [data-fact], .pill):not(.zoom) { cursor: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2728%27%20height%3D%2728%27%20viewBox%3D%270%200%2028%2028%27%3E%3Cpath%20d%3D%27M10%202.5c1%200%201.8.8%201.8%201.8V12h.9v-1.6c0-1%20.8-1.8%201.8-1.8s1.8.8%201.8%201.8V12h.5v-.9c0-1%20.8-1.8%201.8-1.8s1.8.8%201.8%201.8V12.2c0-.9.7-1.6%201.6-1.6s1.6.7%201.6%201.6v5.6c0%204-3.2%207.2-7.2%207.2h-1.3c-2.3%200-4.3-1.2-5.5-3.1L4.8%2016.9c-.5-.8-.3-1.9.5-2.4.8-.5%201.9-.3%202.4.5l.5.9V4.3c0-1%20.8-1.8%201.8-1.8z%27%20fill%3D%27none%27%20stroke%3D%27%23fff%27%20stroke-width%3D%273%27%20stroke-linejoin%3D%27round%27%2F%3E%3Cpath%20d%3D%27M10%202.5c1%200%201.8.8%201.8%201.8V12h.9v-1.6c0-1%20.8-1.8%201.8-1.8s1.8.8%201.8%201.8V12h.5v-.9c0-1%20.8-1.8%201.8-1.8s1.8.8%201.8%201.8V12.2c0-.9.7-1.6%201.6-1.6s1.6.7%201.6%201.6v5.6c0%204-3.2%207.2-7.2%207.2h-1.3c-2.3%200-4.3-1.2-5.5-3.1L4.8%2016.9c-.5-.8-.3-1.9.5-2.4.8-.5%201.9-.3%202.4.5l.5.9V4.3c0-1%20.8-1.8%201.8-1.8z%27%20fill%3D%27%23FF5A26%27%20stroke%3D%27%230B0B0A%27%20stroke-width%3D%271.3%27%20stroke-linejoin%3D%27round%27%2F%3E%3C%2Fsvg%3E") 10 3, pointer !important; }
}

/* =========================================================
   35 Ask NRJ (scripted answers) + spacing after the twin
   ========================================================= */
.twin { margin-bottom: clamp(72px, 9vw, 128px); }          /* breathing room before "Impact" (it has no top padding) */
.pill--ask[aria-pressed="true"] { background: #D03D0B; color: #fff; }
.twin.is-answering .twin__typed::after { opacity: 1; animation: tw-blink 1s step-end infinite; transition: none; }
.twin__cta { display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 18px; font: 600 15px/1.2 var(--f-display); color: #FF6A3D;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; opacity: 0; transform: translateY(6px); transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.twin__cta.is-in { opacity: 1; transform: none; }
.twin__cta[hidden] { display: inline-flex; visibility: hidden; } /* keeps its slot, so the buttons never move */
.twin__cta:hover, .twin__cta:focus-visible { color: #F2F0EA; }
.twin__note { margin: 14px 0 0; font: 500 11px/1.4 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: rgba(242, 240, 234, .62); }
@media (prefers-reduced-motion: reduce) { .twin__cta { transition: none; } }

/* Profile: supporting paragraph under the big statement (same hover / click word stories) */
.intro__text--sub { font-size: clamp(19px, 1.85vw, 28px); font-weight: 500; line-height: 1.42; max-width: 62ch; margin-top: clamp(28px, 3vw, 44px); color: var(--ink-2); letter-spacing: var(--tr-title); }
.intro__text--sub .serif { font-weight: 400; }

/* Profile words: reveal once when the paragraph comes into view (site.js adds .is-in), then stay fully sharp.
   Replaces the scroll-linked focus effect, which left the end of each paragraph blurred until it reached the top. */
.words span { animation: none !important; }
.js .words span { opacity: 0; filter: blur(8px); transform: translateY(.18em); --d: min(calc(var(--i, 0) * 14ms), 650ms);
  transition: opacity .55s var(--ease-out) var(--d), filter .55s var(--ease-out) var(--d), transform .55s var(--ease-out) var(--d), color .25s; }
.js .words.is-in span { opacity: 1; filter: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .words span { opacity: 1; filter: none; transform: none; transition: color .2s; } }

/* Impact: 3 × 2 stat grid (scale / leadership) and 3 × 2 outcomes */
.stats { grid-template-columns: repeat(3, 1fr); }
.stats .stat--wide { grid-column: auto; }
.stat__num--word { font-size: clamp(52px, 5.6vw, 96px); }
.impact { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1100px) { .impact { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats, .impact { grid-template-columns: 1fr; } }

/* AI twin, desktop: the video has a fixed height at the top; the copy always starts at chest level below the chin
   (60% down the video) and the panel grows downwards for longer answers, so text never climbs over the face */
@media (min-width: 761px) {
  .twin { --vh: min(76svh, 720px); height: auto; min-height: 0; }
  .twin__video { height: var(--vh); }
  .twin__scrim { background: linear-gradient(180deg, rgba(9, 9, 9, 0) 0, rgba(9, 9, 9, 0) calc(var(--vh) * .5), rgba(9, 9, 9, .85) calc(var(--vh) * .7), #090909 var(--vh)); }
  .twin__content { height: auto; justify-content: flex-start; margin-top: calc(var(--vh) * .6); padding-bottom: clamp(40px, 6vh, 72px); }
  .twin__type { font-size: clamp(17px, 1.45vw, 22px); line-height: 1.4; max-width: 760px; }
}
/* copied state wins over the ghost button's hover colours (the pointer is usually still on it) */
.pill.pill--ghost.is-copied, .pill.pill--ghost.is-copied:hover, .pill.pill--ghost.is-copied:focus-visible { background: #177245; border-color: #177245; color: #fff; justify-content: center; }

/* =========================================================
   36 Hire me on (platform profiles) + Toptal badge
   Neutral at rest; a linked button fills with the platform's brand colour on hover (--brand / --brand-fg from data.js).
   ========================================================= */
.hire { margin-top: 28px; }
.hire__label { margin: 0 0 12px; font: 500 12px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--invert-ink) 72%, transparent); }
.hire__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hire__btn, .toptal-badge { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 14px 6px 7px; border-radius: 999px; font: 500 14px/1 var(--f-display); text-decoration: none;
  transition: background-color .25s, color .25s, border-color .25s; }
.hire__btn { border: 1px solid color-mix(in srgb, var(--invert-ink) 24%, transparent); color: var(--invert-ink); }
.hire__btn img, .toptal-badge img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.hire__btn b { padding: 4px 7px; border-radius: 999px; font: 600 11px/1 var(--f-mono); letter-spacing: .06em; background: var(--brand); color: var(--brand-fg); transition: background-color .25s, color .25s; }
a.hire__btn:hover, a.hire__btn:focus-visible { background: var(--brand); color: var(--brand-fg); border-color: color-mix(in srgb, var(--brand) 70%, var(--invert-ink)); }
a.hire__btn:hover b, a.hire__btn:focus-visible b { background: var(--brand-fg); color: var(--brand); }
.hire__btn.is-soon { opacity: .62; cursor: default; }
.hire__btn.is-soon::after { content: "soon"; font: 500 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
/* hero badge: solid pill (its own backdrop, so the moving hero background never lowers its contrast) */
.toptal-badge { flex-basis: auto; margin-top: 4px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink); font-size: 13px; }
.hero__cta .toptal-badge { order: 3; }
a.toptal-badge:hover, a.toptal-badge:focus-visible { background: var(--brand); border-color: var(--brand); color: var(--brand-fg); }
@media (max-width: 560px) { .hero__cta .toptal-badge { flex: 0 0 auto; } }

/* Case study: "Why this, not that" + "Result" callout under a deep dive, and the reading-time chip */
.rc-why { display: grid; gap: 14px; margin: 28px 0 8px; padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 3px solid var(--accent-vivid); background: var(--surface); }
.rc-why p { margin: 0; color: var(--ink-2); }
.rc-why b { display: block; margin-bottom: 4px; font: 600 12px/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.chip--time { border-style: dashed; }
.rc-chips li { max-width: 100%; white-space: normal; }   /* long chips (e.g. research methods) wrap instead of overflowing */

/* Case-study galleries: two columns of uniform 16:10 tiles (top of each screen); the zoom viewer shows the full image */
.rc-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); margin-top: 32px; }
.rc-gallery .rc-fig { margin: 0; }
.rc-gallery .zoom { aspect-ratio: 16 / 10; }
.rc-gallery .zoom img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (max-width: 700px) { .rc-gallery { grid-template-columns: 1fr; } }

/* ---------- Live screens: scripted cursor, toasts, typing… over a screenshot (site.js liveScreens) ---------- */
.live { position: relative; display: block; width: 100%; height: 100%; }
.live__layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; font-family: Inter, system-ui, sans-serif; text-align: left; letter-spacing: 0; }
.zoom img, .zoom .live__layer { transition: transform .8s var(--ease); }
.zoom:hover .live__layer { transform: scale(1.015); }
.work-card__media .live__layer { transform: scale(1.02); transition: transform 1.1s var(--ease), opacity .3s; }
.work-card:hover .work-card__media .live__layer { opacity: 0; }
@supports (animation-timeline: view()) {
  .case-cover .live__layer { animation: cover-zoom linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  .work-card__media .live__layer { animation: parallax linear both; animation-timeline: view(); }
}
.live__stage { position: absolute; transition: opacity .5s; }
.live__stage.is-out { opacity: 0; }
.live__stage > * { position: absolute; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); font-style: normal; }
.lv-cover { display: block; }
.lv-text { width: auto; height: auto; white-space: nowrap; font-size: calc(var(--fs) * var(--u)); line-height: 1; font-weight: 400; }
.lv-caret::after { content: ''; display: inline-block; width: max(1px, calc(2 * var(--u))); height: 1em; margin-left: 1px; vertical-align: -.12em; background: currentColor; animation: lv-blink .9s steps(1) infinite; }
.lv-clone { background-repeat: no-repeat; background-size: calc(var(--iw) * var(--u)) auto; background-position: calc(var(--fx) * var(--u) * -1) calc(var(--fy) * var(--u) * -1); opacity: 0; transition: opacity .35s; }
.lv-clone.is-on, .lv-lift { opacity: 1; }
.lv-lift { transition: left ease-in-out, top ease-in-out, transform .3s, opacity .35s; transform: rotate(-2.5deg) scale(1.03); filter: drop-shadow(0 calc(18 * var(--u)) calc(30 * var(--u)) rgba(17, 39, 68, .22)); }
.lv-lift.lv-drop { transform: none; opacity: 0; }
/* cursor: a fixed, readable size whatever the screenshot's scale */
.lv-cur { z-index: 3; width: clamp(14px, calc(40 * var(--u)), 26px); height: auto; margin: -2px 0 0 -4px; opacity: 0; transition: left cubic-bezier(.45, .05, .25, 1), top cubic-bezier(.45, .05, .25, 1), opacity .3s; }
.lv-cur svg { display: block; width: 100%; height: auto; transition: transform .15s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.lv-cur.is-on { opacity: 1; }
.lv-cur.is-down svg { transform: scale(.82); }
.lv-ripple, .lv-pulse { width: 0; height: 0; }
.lv-ripple::after, .lv-pulse::after { content: ''; position: absolute; left: 0; top: 0; width: clamp(28px, calc(90 * var(--u)), 60px); aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; border: 2px solid #FF5A26; animation: lv-ring .7s ease-out forwards; }
.lv-pulse::after { border-color: #7C5CFF; animation-duration: 1.1s; }
.lv-box { display: grid; place-items: center; opacity: 0; transition: opacity .3s; }
.lv-box.is-on { opacity: 1; }
.lv-check { background: rgb(39, 60, 87); color: #fff; border-radius: calc(7 * var(--u)); }
.lv-check svg { width: 70%; }
.lv-btn { background: rgb(39, 60, 87); color: #fff; border-radius: 999px; font-size: calc(26 * var(--u)); font-weight: 500; }
.lv-outline { border: calc(3.5 * var(--u)) solid rgb(31, 193, 107); border-radius: calc(22 * var(--u)); }
.lv-spin { border-radius: 50%; border: calc(3.5 * var(--u)) solid currentColor; border-right-color: transparent; scale: .8; animation: lv-rot .8s linear infinite; }
.lv-scan { overflow: hidden; }
.lv-scan::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18%; background: linear-gradient(to bottom, rgba(255, 90, 38, 0), rgba(255, 90, 38, .28) 80%, #FF5A26); animation: lv-scan var(--ms) ease-in-out forwards; }
/* toasts and tips: readable on a big hero, still in proportion on a small card */
.lv-toast { height: auto; display: flex; gap: .6em; align-items: flex-start; padding: .75em .9em; background: #fff; color: rgb(17, 39, 68); border: 1px solid rgba(17, 39, 68, .08); border-radius: .7em; box-shadow: 0 .6em 1.5em rgba(17, 39, 68, .18); width: max(calc(var(--w) * var(--u)), 230px); font-size: max(11.5px, calc(var(--fs) * var(--u))); line-height: 1.35; opacity: 0; transform: translateY(calc(-14 * var(--u))) scale(.97); transition: opacity .35s, transform .45s cubic-bezier(.2, .9, .3, 1.2); z-index: 2; }
.lv-toast.is-on { opacity: 1; transform: none; }
.lv-toast b { display: block; font-weight: 600; }
.lv-toast b + span { display: block; color: rgb(82, 88, 102); }
.lv-toast__ico { flex: none; display: grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: rgb(220, 252, 231); color: rgb(22, 163, 74); }
.lv-toast__ico svg { width: 62%; }
.lv-toast__ico--ai { background: rgb(237, 233, 254); color: rgb(109, 74, 255); font-size: .9em; }
.lv-toast--tip { background: rgb(17, 39, 68); color: #fff; border: 0; }
.lv-toast--tip b + span { color: rgba(255, 255, 255, .78); }
@keyframes lv-ring { from { opacity: 1; scale: .2; } to { opacity: 0; scale: 1; } }
@keyframes lv-rot { to { rotate: 360deg; } }
@keyframes lv-blink { 50% { opacity: 0; } }
@keyframes lv-scan { from { top: -18%; } to { top: 100%; } }
.rc-gallery .rc-fig:has(.live) { grid-column: 1 / -1; } /* live screens get the full width */
/* a cover with its own headline is shown whole: no crop, no zoom */
.case-cover--full { aspect-ratio: 16 / 10; }
.case-cover--full img, .case-cover--full .live__layer { animation: none !important; transform: none; }
