/* ==========================================================================
   Apoorv Arora — Portfolio V2
   Same visual language as V1 (Outfit, soft blue-grey ground, indigo glow),
   rebuilt around decision stories, outcomes, and one clear call to action.
   ========================================================================== */

/* ---------- Fonts (self-hosted, metric-matched fallbacks to avoid layout shift) ---------- */
@font-face {
  font-family: "Outfit"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20B9, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 98.71%; ascent-override: 101.31%; descent-override: 26.34%; line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Tight Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 95.83%; ascent-override: 101.09%; descent-override: 25.17%; line-gap-override: 0%;
}

:root {
  --bg: #f5f8fd;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --text: #060608;
  --text-2: #4f4f5e;
  --text-3: #66677d;
  --border-strong: #80829a;
  --focus: #3f3bf2;
  --border: #dfe3ec;
  --accent: #3f3bf2;
  --accent-ink: #ffffff;
  --accent-soft: #e6e6ff;
  --accent-text: #2d29c9;
  --positive: #0a7d55;
  --glow-opacity: 0.12;
  --shadow: 0 1px 2px rgba(16, 20, 40, .04), 0 8px 24px rgba(16, 20, 40, .06);

  --font-display: "Outfit", "Outfit Fallback", Arial, sans-serif;
  --font-alt: "Inter Tight", "Inter Tight Fallback", Arial, sans-serif;

  --container: 1200px;
  --measure: 720px;
  --gutter: 120px;
  --nav-h: 76px;
  --radius: 16px;
  --radius-lg: 24px;

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #060608;
  --surface: #14141c;
  --surface-2: #1c1c27;
  --text: #ededf0;
  --text-2: #b9b9c3;
  --text-3: #9a9aa3;
  --border-strong: #6e6e84;
  --text-3-large: #86868f;
  --focus: #b3b1ff;
  --border: #2b2b38;
  --accent: #8b89ff;
  --accent-ink: #0a0a12;
  --accent-soft: #23224a;
  --accent-text: #b3b1ff;
  --positive: #3fd6a0;
  --glow-opacity: 0.22;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .3s ease, color .3s ease;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 15px;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.measure { max-width: var(--measure); }

/* ---------- Type helpers ---------- */
.label {
  font-family: var(--font-alt);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.label--accent { color: var(--accent-text); }
.section-head { display: grid; gap: 12px; margin-bottom: 40px; }
.section-title {
  font-size: 48px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.section-intro { color: var(--text-2); max-width: 640px; }
strong { font-weight: 600; color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn--primary { background: var(--text); color: var(--bg); }
.btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn--ghost:hover { border-color: var(--text-3); }
.btn--sm { min-height: 40px; padding: 10px 18px; font-size: 15px; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; color: var(--text);
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
          backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: transform .35s ease, border-color .3s ease, background-color .3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__inner {
  height: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: 100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav__logo { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; justify-self: start; }
.nav__links { display: flex; gap: 32px; list-style: none; }
.nav__links a { font-size: 16px; color: var(--text-2); transition: color .2s ease; }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--text); }
.nav__links a.btn--primary, .nav__links a.btn--primary:hover { color: var(--bg); }
.nav__actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.nav__cta-mobile { display: none; }
/* Dimmed, blurred layer behind the open mobile menu */
.menu-scrim {
  position: fixed; inset: 0; z-index: 45;
  background: color-mix(in srgb, var(--bg) 35%, rgba(6, 6, 8, .35));
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.menu-scrim.is-visible { opacity: 1; visibility: visible; }
html.menu-open { overflow: hidden; }

.theme-toggle { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.theme-toggle__inner {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(143deg, #d3e6fc 0%, #c8d2f2 100%);
  display: grid; place-items: center; color: #060608;
  transition: transform .4s ease;
}
:root[data-theme="dark"] .theme-toggle__inner { background: linear-gradient(143deg, #2a2f45 0%, #1f2336 100%); color: #ededf0; }
.theme-toggle:hover .theme-toggle__inner { transform: rotate(30deg); }
.theme-toggle svg { width: 13px; height: 13px; fill: currentColor; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.menu-toggle { display: none; width: 36px; height: 36px; place-items: center; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text);
  position: relative; transition: transform .3s ease, background-color .3s ease;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.nav.is-open .menu-toggle span { background: transparent; }
.nav.is-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.glow {
  position: absolute;
  z-index: -1;
  top: 0; left: 0;
  width: 100%;
  height: 1000px;
  overflow: hidden;
  pointer-events: none;
}
.glow svg {
  position: absolute;
  top: -320px;
  left: 50%;
  width: 1100px;
  max-width: none;
  transform: translateX(-60%);
  opacity: var(--glow-opacity);
  filter: blur(100px);
}
.glow path { fill: var(--accent); }

.hero { padding-block: 112px 88px; }
.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.3;
  color: var(--text-2);
}
.availability__dot {
  position: relative;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--positive);
  flex: none;
}
.availability__dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--positive); opacity: 0;
  animation: ping 2.4s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

.hero__eyebrow { margin-top: 36px; }
.hero__title {
  margin-top: 16px;
  max-width: 1040px;
  font-size: 72px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.hero__title em { font-style: normal; color: var(--text-3-large, #7e7e97); }
.hero__sub {
  margin-top: 28px;
  max-width: 680px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__meta {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  list-style: none;
  font-size: 18px;
  color: var(--text-3);
}
.hero__meta li { display: flex; align-items: center; gap: 10px; }
.hero__meta li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }

/* ---------- Proof strip ---------- */
.proof {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.proof__item { padding: 28px 28px 26px; position: relative; }
.proof__item + .proof__item::before {
  content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; background: var(--border);
}
.proof__num { font-size: 44px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.proof__what { margin-top: 10px; font-size: 16px; line-height: 1.4; color: var(--text); }
.proof__where { margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--text-3); }

/* ---------- Sections ---------- */
.section { padding-block: 120px 0; }
.section:last-of-type { padding-bottom: 0; }

/* Case cards (home) */
.cases { display: grid; gap: 32px; }
.case-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  padding: 24px 24px 24px 48px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.case-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,20,40,.05), 0 16px 40px rgba(16,20,40,.1); }
.case-card__body { padding-block: 24px; }
.case-card__title { margin-top: 12px; font-size: 32px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.case-card__dek { margin-top: 14px; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.case-card__fork {
  margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2);
  font-size: 15px; line-height: 1.55; color: var(--text-2);
}
.case-card__fork b { display: block; margin-bottom: 4px; font-family: var(--font-alt); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); font-weight: 600; }
.case-card .link-arrow { margin-top: 24px; }
.case-card__visual {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}
.case-card__visual > img { width: 100%; height: 100%; object-fit: cover; }
.case-card__status {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  padding: 6px 10px; border-radius: 999px; font-size: 13px; line-height: 1;
  background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
}

/* Outcome pills */
.outcomes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; list-style: none; }
.outcomes li {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 14px; line-height: 1.3; font-weight: 500;
}
.outcomes li b { font-weight: 700; }

/* Big-number visual inside case cards (real metrics only) */
.case-card__visual--stat {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px;
  padding: 48px;
  background:
    radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 60%),
    var(--surface-2);
}
.case-card__visual--green {
  background:
    radial-gradient(120% 80% at 0% 100%, color-mix(in srgb, var(--positive) 18%, transparent) 0%, transparent 60%),
    var(--surface-2);
}
.big-stat { font-size: 140px; line-height: .9; font-weight: 500; letter-spacing: -0.04em; }
.big-stat__label { font-size: 20px; line-height: 1.4; color: var(--text-2); max-width: 320px; }

/* ---------- Point of view ---------- */
.pov {
  padding: 72px;
  border-radius: var(--radius-lg);
  background: var(--text);
  color: var(--bg);
}
.pov .label { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.pov__lead { margin-top: 20px; font-size: 36px; line-height: 1.3; font-weight: 400; letter-spacing: -0.01em; max-width: 920px; }
.pov__lead em { font-style: normal; color: color-mix(in srgb, var(--bg) 55%, transparent); }
.pov__body { margin-top: 24px; font-size: 18px; color: color-mix(in srgb, var(--bg) 72%, transparent); max-width: 760px; }
.opinions { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; }

/* ---------- Other work ---------- */
.other { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.other-card h3 { font-size: 22px !important; }
.other-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.other-card__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.other-card__img img { width: 100%; height: 100%; object-fit: cover; }
.other-card__body { padding: 28px; }
.other-card h3 { margin-top: 10px; font-size: 24px; line-height: 1.3; font-weight: 500; }
.other-card p { margin-top: 10px; color: var(--text-2); font-size: 16px; line-height: 1.6; }

/* Coming-soon card */
.other-card--soon { box-shadow: none; background: transparent; border: 1.5px dashed var(--border); display: flex; }
.soon { padding: 32px; display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 100%; }
.soon h3 { margin-top: 0; }
.soon .link-arrow { margin-top: 10px; font-size: 16px; }

/* ---------- Skills ---------- */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill {
  display: flex; flex-direction: column; gap: 12px;
  padding: 28px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow);
}
.skill__num { font-family: var(--font-alt); font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--accent-text); }
.skill__title { font-size: 24px; line-height: 1.25; font-weight: 500; }
.skill__value { font-size: 16px; line-height: 1.6; color: var(--text-2); flex: 1; }
.skill__proof {
  padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
  font-size: 14px; line-height: 1.5; color: var(--text-2);
}
.skill__proof b { display: block; margin-bottom: 2px; font-family: var(--font-alt); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--positive); font-weight: 600; }
.toolkit { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.toolkit li { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 14px; line-height: 1.2; color: var(--text-2); }

/* ---------- Off the clock ---------- */
.hobbies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hobby { display: flex; flex-direction: column; gap: 10px; padding: 32px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.hobby__icon {
  --tint-a: #ffe3d6; --tint-b: #ffd0ea;
  position: relative;
  width: 88px; height: 88px; margin-bottom: 12px;
  border-radius: 26px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--tint-a), var(--tint-b));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -6px 12px rgba(0, 0, 0, .06),
    0 10px 24px -10px color-mix(in srgb, var(--tint-b) 90%, #000 10%);
  transform: rotate(-4deg);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.hobby__icon img {
  width: 64px; height: 64px;
  filter: drop-shadow(0 6px 8px rgba(16, 20, 40, .18));
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.hobby__icon--code   { --tint-a: #d7ecff; --tint-b: #dcd6ff; transform: rotate(3deg); }
.hobby__icon--camera { --tint-a: #fff2c2; --tint-b: #e7dcff; }
.hobby:hover .hobby__icon { transform: rotate(0deg) translateY(-3px); }
.hobby:hover .hobby__icon img { transform: scale(1.08) rotate(-6deg); }
:root[data-theme="dark"] .hobby__icon {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tint-a) 34%, var(--surface-2)),
    color-mix(in srgb, var(--tint-b) 44%, var(--surface-2)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 -6px 12px rgba(0, 0, 0, .25),
    0 10px 24px -12px rgba(0, 0, 0, .6);
}
:root[data-theme="dark"] .hobby__icon img { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
@media (prefers-reduced-motion: reduce) {
  .hobby__icon, .hobby__icon img { transition: none; }
  .hobby:hover .hobby__icon, .hobby:hover .hobby__icon img { transform: none; }
}
.hobby h3 { font-size: 26px; line-height: 1.25; font-weight: 500; letter-spacing: -0.01em; }
.hobby > p { font-size: 16px; line-height: 1.6; color: var(--text-2); }
.hobby__links { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.hobby__links .link-arrow { font-size: 16px; }

/* ---------- Experience ---------- */
.xp { list-style: none; border-top: 1px solid var(--border); }
.xp li {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 32px; align-items: baseline;
  padding-block: 28px; border-bottom: 1px solid var(--border);
}
.xp__company { font-size: 28px; line-height: 1.2; font-weight: 500; }
.xp__role { font-size: 18px; color: var(--text); font-weight: 500; }
.xp__note { margin-top: 4px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.xp__dates { font-family: var(--font-alt); font-size: 14px; color: var(--text-3); white-space: nowrap; }

/* ---------- Contact ---------- */
.contact { padding-block: 140px 48px; }
.contact__card {
  position: relative;
  padding: 72px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.contact__card::before {
  content: ""; position: absolute; z-index: -1; right: -120px; top: -160px; width: 520px; height: 520px; border-radius: 50%;
  background: var(--accent); opacity: var(--glow-opacity); filter: blur(90px);
}
.contact__title { margin-top: 16px; font-size: 64px; line-height: 1.1; font-weight: 500; letter-spacing: -0.02em; max-width: 860px; }
.contact__sub { margin-top: 20px; font-size: 20px; line-height: 1.6; color: var(--text-2); max-width: 640px; }
.contact__actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.contact__links { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; }
.contact__links a { font-family: var(--font-alt); font-size: 18px; color: var(--text-3); transition: color .2s ease; }
.contact__links a:hover { color: var(--text); }
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 32px 40px; font-size: 14px; color: var(--text-3);
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 15px;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Case study pages ---------- */
.back {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 48px;
  color: var(--text-3); font-size: 16px; line-height: 1; transition: color .2s ease;
}
.back svg { width: 16px; height: 16px; transition: transform .2s ease; }
.back:hover { color: var(--text); }
.back:hover svg { transform: translateX(-3px); }

.cs-hero { padding-block: 40px 0; }
.cs-title { margin-top: 16px; font-size: 60px; line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; max-width: 1000px; }
.cs-dek { margin-top: 20px; font-size: 22px; line-height: 1.55; color: var(--text-2); max-width: 760px; }
.cs-meta {
  margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
  padding-top: 24px; border-top: 1px solid var(--border); list-style: none;
}
.cs-meta li { display: grid; gap: 6px; font-size: 16px; line-height: 1.45; color: var(--text); }

.stats { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; }
.stat {
  padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.stat__num { font-size: 52px; line-height: 1; font-weight: 500; letter-spacing: -0.02em; }
.stat__num small { font-size: 28px; }
.stat__label { margin-top: 12px; font-size: 16px; line-height: 1.45; color: var(--text-2); }

.chapter { margin-top: 112px; }
.chapter__head { display: grid; gap: 10px; margin-bottom: 24px; }
.chapter__title { font-size: 40px; line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.prose { max-width: var(--measure); }
.prose p { color: var(--text-2); }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 18px; }
.prose ul { list-style: none; }
.prose li { position: relative; padding-left: 28px; color: var(--text-2); }
.prose li + li { margin-top: 10px; }
.prose li::before { content: ""; position: absolute; left: 8px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }


.options { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 920px; }
.option {
  position: relative; padding: 24px 24px 22px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg);
}
.option--chosen { border-color: var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.option__tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-alt); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
}
.option--chosen .option__tag { color: var(--accent-text); }
.option__note { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.option h3 { margin-top: 10px; font-size: 20px; line-height: 1.35; font-weight: 500; }
.option ul { margin-top: 12px; list-style: none; display: grid; gap: 6px; }
.option li { font-size: 15px; line-height: 1.5; color: var(--text-2); padding-left: 22px; position: relative; }
.option li::before { position: absolute; left: 0; top: 0; font-weight: 600; }
.option li.pro::before { content: "+"; color: var(--positive); }
.option li.con::before { content: "–"; color: var(--text-3); }

.argue {
  margin-top: 112px; padding: 64px 72px; border-radius: var(--radius-lg);
  background: var(--text); color: var(--bg);
}
.argue .label { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.argue blockquote { margin-top: 20px; font-size: 34px; line-height: 1.35; letter-spacing: -0.01em; max-width: 960px; }
.argue blockquote em { font-style: normal; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); }

.status {
  margin-top: 28px; padding: 20px 24px; border-radius: var(--radius); max-width: var(--measure);
  background: var(--surface-2); border: 1px solid var(--border); font-size: 16px; line-height: 1.6; color: var(--text-2);
}
.status b { color: var(--text); }

.figure { margin-top: 32px; }
.figure .media { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.figure .media img { width: 100%; height: 100%; object-fit: cover; }
.figure figcaption { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-rich { display: grid; grid-template-columns: 696fr 472fr; gap: 24px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.media { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }
.component { grid-template-columns: minmax(0, 1fr); }
.stack > .figure { margin-top: 0; }
.embed { position: relative; aspect-ratio: 584 / 587; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-tile { aspect-ratio: 584 / 700; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; }
.components-mobile { display: none; }
.component { display: grid; gap: 12px; }
.component + .component { margin-top: 40px; }
.component__name { font-size: 22px; line-height: 1.3; font-weight: 600; }
.component__note { font-size: 15px; color: var(--text-3); }
a.other-card { display: flex; flex-direction: column; transition: transform .3s ease, box-shadow .3s ease; }
a.other-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(16,20,40,.05), 0 16px 40px rgba(16,20,40,.1); }
.other-card__body { display: flex; flex-direction: column; flex: 1; }
.other-card__body .link-arrow { margin-top: auto; padding-top: 20px; font-size: 16px; }


.sub-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sub-card { padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.sub-card h3 { margin-top: 10px; font-size: 22px; line-height: 1.3; font-weight: 500; }
.sub-card p { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.sub-card .outcomes { margin-top: 16px; }

.taxonomy { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; }
.taxonomy li { padding: 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 15px; line-height: 1.5; color: var(--text-2); }
.taxonomy b { display: block; font-size: 17px; color: var(--text); font-weight: 600; }

.next-case {
  margin-top: 112px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 36px 40px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow);
}
.next-case h2 { margin-top: 8px; font-size: 28px; line-height: 1.3; font-weight: 500; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .availability__dot::after { animation: none; }
  .case-card:hover, .btn--primary:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  :root { --gutter: 48px; }
  .nav__inner { padding-inline: var(--gutter); }
  .hero__title { font-size: 60px; }
  .case-card { padding-left: 36px; gap: 36px; }
  .opinions { grid-template-columns: 1fr; }
  .skills, .hobbies { grid-template-columns: repeat(2, 1fr); }
  .other { grid-template-columns: repeat(2, 1fr); }
  .xp li { grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; }
  .taxonomy { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 899px) {
  .nav__links { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .menu-toggle { display: grid; }
  .nav__cta-desktop { display: none; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav.is-open .nav__links a:not(.btn) { display: block; padding-block: 14px; font-size: 20px; color: var(--text); }
  .nav.is-open .nav__cta-mobile .btn { min-height: 52px; font-size: 17px; }
  .nav.is-open .nav__cta-mobile { display: block; padding-top: 12px; }
  .nav.is-open .nav__cta-mobile .btn { width: 100%; }

  .proof { grid-template-columns: repeat(2, 1fr); }
  .proof__item:nth-child(3)::before { display: none; }
  .proof__item:nth-child(n+3) { border-top: 1px solid var(--border); }
  .case-card { grid-template-columns: 1fr; padding: 16px; gap: 8px; }
  .case-card__body { padding: 16px 12px 12px; order: 2; }
  .case-card__visual { aspect-ratio: 4 / 3; }
  .other, .skills, .hobbies { grid-template-columns: 1fr; }
  .xp li { grid-template-columns: 1fr; gap: 6px; }
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .options, .sub-grid, .grid-2, .grid-rich { grid-template-columns: 1fr; }
  .components-desktop { display: none; }
  .components-mobile { display: block; }
  .big-stat { font-size: 96px; }
  .case-card__visual--stat { padding: 32px; }
}

@media (max-width: 639px) {
  :root { --gutter: 20px; --nav-h: 64px; }
  body { font-size: 17px; }
  .hero { padding-block: 56px 56px; }
  .availability { font-size: 13px; }
  .hero__eyebrow { margin-top: 28px; }
  .hero__title { font-size: 40px; line-height: 1.12; }
  .hero__sub { font-size: 17px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__meta { font-size: 16px; gap: 8px 20px; }
  .proof__item { padding: 20px; }
  .proof__num { font-size: 32px; }
  .proof__what { font-size: 14px; }
  .section { padding-top: 88px; }
  .section-title { font-size: 34px; }
  .section-head { margin-bottom: 28px; }
  .case-card__title { font-size: 24px; }
  .big-stat { font-size: 80px; }
  .big-stat__label { font-size: 17px; }
  .pov, .contact__card, .argue { padding: 36px 24px; }
  .pov__lead { font-size: 26px; }
    .xp__company { font-size: 24px; }
  .contact { padding-top: 96px; }
  .contact__title { font-size: 38px; }
  .contact__sub { font-size: 17px; }
  .contact__actions .btn { flex: 1 1 auto; }
  .cs-title { font-size: 36px; }
  .cs-dek { font-size: 18px; }
  .stats { grid-template-columns: 1fr; }
  .stat__num { font-size: 44px; }
  .chapter { margin-top: 80px; }
  .chapter__title { font-size: 30px; }
      .argue { margin-top: 80px; }
  .argue blockquote { font-size: 24px; }
  .taxonomy { grid-template-columns: 1fr; }
  .next-case { padding: 28px 24px; margin-top: 80px; }
}


/* ==========================================================================
   Skim, progressive disclosure & accessibility layer
   - Phones / touch: tap-to-expand disclosures keep pages short.
   - Desktop with a mouse: secondary details appear on hover or keyboard focus,
     inside fixed-size boxes (opacity/transform only) so nothing shifts.
   ========================================================================== */

/* ---------- Focus & shared helpers ---------- */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.pov :focus-visible, .argue :focus-visible { outline-color: var(--bg); }
.btn--ghost { border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--text); }
.nav__menu { display: contents; }

/* Stretched link: whole card is clickable, but the link's name is just the title */
.stretched { color: inherit; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.stretched:focus-visible { outline: none; }
.case-card:has(.stretched:focus-visible), .other-card:has(.stretched:focus-visible), .next-case:has(.stretched:focus-visible) {
  outline: 2px solid var(--focus); outline-offset: 4px;
}
.case-card, .other-card { position: relative; }
a.case-card, a.other-card { color: inherit; }

/* Disclosure buttons */
.toggle-icon { width: 18px; height: 18px; flex: none; color: var(--text-2); }
.toggle-icon__v { transform-origin: center; transition: transform .25s ease; }
[aria-expanded="true"] .toggle-icon__v { transform: scaleY(0); }

/* Collapsible body: animates height without JS measurement; hidden from AT when closed */
.disclosure__body { display: grid; grid-template-rows: 1fr; }
.disclosure__inner { min-height: 0; overflow: hidden; }
.js [data-disclosure]:not(.is-open) > .disclosure__body,
.js [data-disclosure]:not(.is-open) > * > .disclosure__body {
  grid-template-rows: 0fr; visibility: hidden;
}
.js .disclosure__body { transition: grid-template-rows .3s ease, visibility 0s linear .3s; }
.js [data-disclosure].is-open .disclosure__body { transition: grid-template-rows .3s ease, visibility 0s; }

/* ---------- Skills ---------- */
.skill { position: relative; gap: 0; }
.skill__head { margin: 0; font: inherit; }
.skill__toggle {
  width: 100%; display: flex; align-items: flex-start; gap: 12px; text-align: left;
  color: var(--text); cursor: pointer;
}
.skill__toggle .skill__num { padding-top: 6px; }
.skill__title { flex: 1; }

@media (min-width: 900px) {
  .skill { padding: 28px 28px 24px; min-height: 100%; }
  .skill__toggle { flex-direction: column; gap: 12px; cursor: default; }
  .skill__toggle .skill__num { padding-top: 0; }
  .skill__toggle .toggle-icon { display: none; }
  .skill__toggle::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); }
  .skill__toggle:focus-visible { outline: none; }
  .skill:has(.skill__toggle:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
  /* Body is always visible on desktop */
  .js .skill .disclosure__body { grid-template-rows: 1fr !important; visibility: visible !important; }
  .skill__value { margin-top: 12px; }
  /* Fixed-height "In practice" slot: hint and proof cross-fade in the same box */
  .skill__practice { position: relative; margin-top: 20px; height: 140px; }

}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {

}
@media (min-width: 900px) and (hover: none) {

  .skill__toggle { cursor: pointer; }
}

@media (max-width: 899px) {
  .skills { display: block; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 4px 20px; }
  .skill { padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .skill + .skill { border-top: 1px solid var(--border); }
  .skill__toggle { min-height: 56px; padding-block: 16px; align-items: center; }
  .skill__toggle .skill__num { padding-top: 0; min-width: 22px; }
  .skill__title { font-size: 18px; }
  .skill__value { font-size: 16px; }
  .skill__proof { margin: 12px 0 18px; }
  .toolkit { display: none; }
}

/* ---------- Case cards ---------- */
.case-card__visual { isolation: isolate; }
.case-card__front { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .3s ease, transform .4s ease; }
img.case-card__front { object-fit: cover; }
.case-card__stat {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; padding: 48px;
  background: radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 60%), var(--surface-2);
}
.case-card__stat--green { background: radial-gradient(120% 80% at 0% 100%, color-mix(in srgb, var(--positive) 18%, transparent) 0%, transparent 60%), var(--surface-2); }
.case-card__fork {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 40px;
  background: var(--text); color: var(--bg);
  opacity: 0; transition: opacity .3s ease;
}
.case-card__fork-label { font-family: var(--font-alt); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: color-mix(in srgb, var(--bg) 70%, transparent); }
.case-card__fork-q { font-size: 28px; line-height: 1.3; letter-spacing: -0.01em; }
.case-card__peek {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  padding: 8px 12px; border-radius: 999px; font-size: 14px; line-height: 1.2;
  background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
  transition: opacity .3s ease;
}
.case-card:focus-within .case-card__fork { opacity: 1; }
.case-card:focus-within .case-card__peek { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .case-card:hover .case-card__fork { opacity: 1; }
  .case-card:hover .case-card__peek { opacity: 0; }
  .case-card:hover .case-card__front { transform: scale(1.03); }
  .case-card.is-dismissed .case-card__fork { opacity: 0 !important; }
}
@media (hover: none) {
  /* Touch: no hover, so show the fork as a caption strip over the visual */
  .case-card__peek { display: none; }
  .case-card__fork { inset: auto 0 0 0; opacity: 1; padding: 20px 24px; background: color-mix(in srgb, var(--text) 92%, transparent); }
  .case-card__fork-q { font-size: 18px; }
}
.case-card__title a { text-decoration: none; }

@media (max-width: 639px) {
  .case-card { padding: 20px; gap: 0; }
  .case-card__body { padding: 0; }
  .case-card__visual { display: none; }
  .case-card__dek { display: none; }
  .case-card__title { font-size: 22px; margin-top: 8px; }
  .case-card .outcomes { margin-top: 14px; }
  .case-card .link-arrow { margin-top: 16px; }
  .cases { gap: 16px; }
}

/* ---------- Other work ---------- */
.other-card__img { position: relative; }
.other-card__desc {
  position: absolute; inset: 0; margin: 0; padding: 28px;
  display: flex; align-items: flex-end;
  font-size: 16px; line-height: 1.55; color: var(--bg);
  background: linear-gradient(to top, color-mix(in srgb, var(--text) 92%, transparent) 55%, color-mix(in srgb, var(--text) 40%, transparent));
  opacity: 0; transition: opacity .3s ease;
}
.other-card:focus-within .other-card__desc { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .other-card:hover .other-card__desc { opacity: 1; }
  .other-card.is-dismissed .other-card__desc { opacity: 0 !important; }
}
.other-card h3 a { text-decoration: none; }
@media (hover: none) and (min-width: 640px) {
  .other-card__desc { position: static; opacity: 1; background: none; color: var(--text-2); padding: 20px 28px 0; display: block; }
  .other-card__img { aspect-ratio: auto; }
  .other-card__img img { aspect-ratio: 16 / 10; }
}
.section-head--sub { margin-top: 96px; }
.section-title--sub { font-size: 36px; }

@media (max-width: 639px) {
  .section-head--sub { margin-top: 56px; }
  .section-title--sub { font-size: 28px; }
  .other { gap: 12px; }
  .other-card { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: var(--radius); }
  .other-card__img { aspect-ratio: 1 / 1; border-radius: 12px; }
  .other-card__desc { display: none; }
  .other-card__body { padding: 0; }
  .other-card__body .label { font-size: 11px; }
  .other-card h3 { font-size: 17px; margin-top: 4px; }
  .other-card .outcomes, .other-card__body .link-arrow { display: none; }
  .other-card--soon { display: block; padding: 0; }
  .soon { padding: 18px; gap: 6px; }
  .soon h3 { font-size: 17px; }
  .soon p { font-size: 15px; margin-top: 0; }
  .soon .link-arrow { margin-top: 4px; font-size: 15px; }
}

/* ---------- Point of view ---------- */
.pov h2.label { margin: 0; }
.opinions-wrap { margin-top: 40px; }
.opinions-head { margin: 0; font: inherit; }
.opinions-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left;
  font-size: 16px; color: color-mix(in srgb, var(--bg) 78%, transparent); cursor: default;
}
.opinions-toggle .toggle-icon { display: none; color: inherit; }
@media (min-width: 900px) {
  .js .opinions-wrap .disclosure__body { grid-template-rows: 1fr !important; visibility: visible !important; }
  .opinions-toggle { pointer-events: none; }
}
@media (max-width: 899px) {
  .opinions-wrap { margin-top: 24px; border-top: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); }
  .opinions-toggle { min-height: 56px; padding-top: 16px; cursor: pointer; color: var(--bg); font-weight: 500; }
  .opinions-toggle .toggle-icon { display: block; }
    }

/* ---------- Experience ---------- */
.xp__item { padding: 0 !important; border-bottom: 1px solid var(--border); display: block !important; }
.xp__head { margin: 0; font: inherit; }
.xp__toggle {
  width: 100%; text-align: left; color: var(--text);
  display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 32px; align-items: baseline;
  padding-top: 28px; cursor: default;
}
.xp__toggle .toggle-icon { display: none; }
.xp__body { padding-left: 272px; padding-bottom: 28px; }
.xp__note { margin-top: 4px; }
@media (min-width: 900px) {
  .js .xp__item .disclosure__body { grid-template-rows: 1fr !important; visibility: visible !important; }
  .xp__toggle { pointer-events: none; }
  .xp__role { grid-column: 2; }
}
@media (max-width: 1199px) and (min-width: 900px) {
  .xp__toggle { grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; }
  .xp__body { padding-left: 204px; }
}
@media (max-width: 899px) {
  .xp__toggle {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "company icon" "role icon" "dates icon";
    gap: 2px 16px; align-items: center; padding-block: 16px; min-height: 56px; cursor: pointer;
  }
  .xp__company { grid-area: company; font-size: 22px; }
  .xp__role { grid-area: role; font-size: 16px; }
  .xp__dates { grid-area: dates; }
  .xp__toggle .toggle-icon { display: block; grid-area: icon; }
  .xp__body { padding: 0 0 0 0; }
  .xp__note { margin: 0 0 18px; font-size: 15px; }
}

/* ---------- Hobbies (compact on phones) ---------- */
@media (max-width: 639px) {
  .hobbies { gap: 12px; }
  .hobby { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; row-gap: 4px; padding: 18px; align-items: start; }
  .hobby__icon { grid-row: span 3; width: 64px; height: 64px; border-radius: 20px; margin: 0; }
  .hobby__icon img { width: 44px; height: 44px; }
  .hobby h3 { font-size: 19px; }
  .hobby > p { font-size: 15px; }
  .hobby__links { padding-top: 4px; }
}

/* ---------- Tighter vertical rhythm on phones ---------- */
@media (max-width: 639px) {
  .section { padding-top: 64px; }
  .section-head { margin-bottom: 20px; gap: 8px; }
  .section-intro { font-size: 16px; }
  .hero { padding-block: 40px 40px; }
  .hero__sub { margin-top: 20px; }
  .hero__actions { margin-top: 28px; }
  .hero__meta { margin-top: 28px; }
  .contact { padding-top: 64px; }
  .contact__card { padding: 28px 22px; }
  .contact__title { font-size: 32px; }
  .contact__actions { margin-top: 24px; }
  .contact__links { margin-top: 24px; }
  .pov { padding: 28px 22px; }
  .pov__lead { font-size: 22px; }
  .pov__body { font-size: 16px; }
}

/* ---------- Target sizes (WCAG 2.5.8) ---------- */
.contact__links a, .hobby__links a, .footer a, .back, .link-arrow { min-height: 24px; display: inline-flex; align-items: center; }

/* ---------- Case study pages: skimming aids ---------- */
.more-btn { display: none; }
.js .figure__more { display: inline-flex; }
@media (max-width: 899px) {
  .js .more-list:not(.is-open) .more-hidden { display: none; }
  .js .prose .more-btn { display: inline-flex; }
}
.more-btn {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); font-size: 15px; color: var(--text);
}
.figure--tall .media { position: relative; }
.js .figure--tall:not(.is-open) .media { max-height: 560px; }
.js .figure--tall:not(.is-open) .media::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 160px;
  background: linear-gradient(to top, var(--bg), transparent);
}
.js .figure--tall:not(.is-open) .media img { object-position: top; }
.figure--tall .figure__more { position: relative; z-index: 2; margin-top: -8px; }
@media (max-width: 639px) {
  .js .figure--tall:not(.is-open) .media { max-height: 380px; }
  .stats { gap: 10px; }
  .stat { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 14px; padding: 16px 18px; }
  .stat__num { font-size: 32px; }
  .stat__label { margin-top: 0; font-size: 15px; }
  .cs-meta { gap: 16px; margin-top: 28px; }
  .cs-hero { padding-top: 24px; }
  .cs-dek { margin-top: 14px; }
  .chapter { margin-top: 64px; }
}

/* Component explorer (tabs) */
.explorer { margin-top: 8px; }
.explorer__tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.explorer__tab {
  flex: none; min-height: 44px; padding: 10px 16px; border-radius: 999px; font-size: 15px; white-space: nowrap;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.explorer__tab[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.explorer__panel { margin-top: 8px; }
.explorer__panel[hidden] { display: none !important; }
.explorer__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.explorer__img { aspect-ratio: 5 / 2; }
.explorer__img--mobile { display: none; aspect-ratio: 1 / 1; }
@media (max-width: 899px) {
  .explorer__grid { grid-template-columns: 1fr; gap: 16px; }
  .explorer__img { display: none; }
  .explorer__img--mobile { display: block; }
}

/* Video pause control (WCAG 2.2.2) */
.video-tile { position: relative; }
.video-toggle {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px;
  border-radius: 999px; background: color-mix(in srgb, #060608 80%, transparent); color: #fff; font-size: 14px;
}
.video-toggle svg { width: 14px; height: 14px; fill: currentColor; }

@media (prefers-reduced-motion: reduce) {
  .disclosure__body, .case-card__fork, .case-card__front, .other-card__desc { transition: none !important; }
  .case-card:hover .case-card__front { transform: none; }
}
.availability__dot::after { animation-iteration-count: 3; }

/* ---------- Fixes: desktop vs phone headers, legacy overrides, dismiss ---------- */
.case-card__fork { margin: 0; border-radius: 0; font-size: inherit; }
.case-card__peek { pointer-events: none; }
.opinions-label { margin: 0; font-size: 16px; font-weight: 400; color: color-mix(in srgb, var(--bg) 78%, transparent); }
.xp__static { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; gap: 32px; align-items: baseline; padding-top: 28px; }
.xp__static h3.xp__company { margin: 0; }
.xp__mobile-only, .opinions-head { display: none; }
@media (max-width: 1199px) and (min-width: 900px) {
  .xp__static { grid-template-columns: 180px minmax(0, 1fr) auto; gap: 24px; }
}
@media (max-width: 899px) {
  .xp__static, .opinions-label { display: none; }
  .xp__mobile-only, .opinions-head { display: block; }
}
@media (min-width: 900px) {
  .js .xp__item .disclosure__body, .js .opinions-wrap .disclosure__body { grid-template-rows: 1fr !important; visibility: visible !important; }
}
.case-card.is-dismissed .case-card__fork, .other-card.is-dismissed .other-card__desc { opacity: 0 !important; }
.case-card.is-dismissed .case-card__peek { opacity: 1 !important; }

.next-case { position: relative; }
.next-case h2 a { text-decoration: none; }
.explorer__panel:focus-visible { outline-offset: 6px; }
.component__name { margin: 0 0 8px; }

/* "Jump to" list on long case studies */
.toc { margin-top: 40px; padding: 20px 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.toc ul { list-style: none; margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); font-size: 15px; line-height: 1.2; color: var(--text); text-decoration: none;
}
.toc a:hover { background: var(--surface-2); }
@media (max-width: 639px) {
  .toc { margin-top: 28px; padding: 16px; }
  .toc ul { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .toc a { white-space: nowrap; }
}

/* Other work: taller image area on desktop so the hover description always fits */
@media (min-width: 640px) {
  .other-card__img { aspect-ratio: 4 / 3; }
  .other-card__desc { padding: 22px; font-size: 15px; line-height: 1.5; }
}

/* Tablets: shorter case-card visuals */
@media (min-width: 640px) and (max-width: 899px) {
  .case-card__visual { aspect-ratio: 16 / 9; }
}


/* ---------- Opinion cards (Point of view) ---------- */
.opinions { margin-top: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; }
.opinion {
  position: relative;
  display: flex; flex-direction: column; gap: 20px;
  padding: 28px 28px 24px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.opinion__mark {
  width: 28px; height: 28px; flex: none;
  color: color-mix(in srgb, var(--bg) 45%, transparent);
}
.opinion q {
  quotes: none; flex: 1;
  font-size: 21px; line-height: 1.4; letter-spacing: -0.005em;
  color: var(--bg);
}
.opinion__from {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--bg) 14%, transparent);
  font-size: 14px; line-height: 1.3;
  color: color-mix(in srgb, var(--bg) 72%, transparent);
  text-decoration: none; min-height: 24px;
}
.opinion__from::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.opinion__arrow {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
  transition: transform .25s ease, background-color .25s ease, color .25s ease;
}
.opinion__arrow svg { width: 14px; height: 14px; }
.opinion:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); border-color: color-mix(in srgb, var(--bg) 32%, transparent); }
.opinion:hover .opinion__from { color: var(--bg); }
.opinion:hover .opinion__arrow { background: var(--bg); color: var(--text); transform: translateX(2px); }
.opinion__from:focus-visible { outline: none; }
.opinion:has(.opinion__from:focus-visible) { outline: 2px solid var(--bg); outline-offset: 3px; }
@media (max-width: 1199px) { .opinions { grid-template-columns: 1fr; } .opinion q { font-size: 19px; } }
@media (max-width: 899px) {
  .opinion { padding: 20px; gap: 14px; }
  .opinion__mark { width: 22px; height: 22px; }
  .opinion q { font-size: 17px; }
  .opinion__from { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .opinion, .opinion__arrow { transition: none; } .opinion:hover .opinion__arrow { transform: none; } }

/* ---------- Decision callout ("The fork") on case studies ---------- */
.fork {
  position: relative; max-width: 920px;
  padding: 32px 36px 34px 64px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}
.fork::before {
  content: ""; position: absolute; left: 32px; top: 36px; bottom: 36px; width: 4px; border-radius: 4px;
  background: linear-gradient(to bottom, var(--accent), color-mix(in srgb, var(--accent) 35%, transparent));
}
.fork__label { display: inline-flex; align-items: center; gap: 8px; }
.fork__icon {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.fork__icon svg { width: 15px; height: 15px; }
.fork__q { margin-top: 14px; font-size: 26px; line-height: 1.38; font-weight: 400; letter-spacing: -0.01em; color: var(--text); text-wrap: pretty; }
@media (max-width: 639px) {
  .fork { padding: 22px 20px 24px 40px; }
  .fork::before { left: 20px; top: 26px; bottom: 26px; width: 3px; }
  .fork__q { font-size: 20px; margin-top: 10px; }
}

/* ---------- Skill cards: tinted "peek" slot ---------- */
.skill { --tint: #ebe6ff; --tint-label: #08664a; }
.skill:nth-child(6n+1) { --tint: #ffe9dd; }
.skill:nth-child(6n+2) { --tint: #e0efff; }
.skill:nth-child(6n+3) { --tint: #fff1c9; }
.skill:nth-child(6n+4) { --tint: #dcf3e8; }
.skill:nth-child(6n+5) { --tint: #ebe6ff; }
.skill:nth-child(6n+6) { --tint: #ffe2ec; }
:root[data-theme="dark"] .skill { --tint-label: var(--positive); }

.skill__proof { background: var(--tint); }
:root[data-theme="dark"] .skill__proof { background: color-mix(in srgb, var(--tint) 20%, var(--surface-2)); }
.skill__proof b { color: var(--tint-label); }
.skill__peek { display: none; }

@media (min-width: 900px) {
  .skill .disclosure__body { flex: 1; }
  .skill .disclosure__inner { display: flex; flex-direction: column; height: 100%; }
  .skill__practice {
    margin-top: auto; height: 140px; position: relative; border-radius: 16px; overflow: hidden;
    background: var(--tint);
  }
  :root[data-theme="dark"] .skill__practice { background: color-mix(in srgb, var(--tint) 20%, var(--surface-2)); }
  :root[data-theme="dark"] .skill__peek { background: var(--text); color: var(--bg); }
  :root[data-theme="dark"] .skill__peek svg { color: #3f3bf2; }
  .skill__value { margin-bottom: 20px; }
  .skill__proof {
    position: absolute; inset: 0; margin: 0; padding: 16px 18px; border-radius: 0;
    background: transparent !important;
    filter: blur(5px); opacity: .6; user-select: none;
    transition: filter .45s ease, opacity .45s ease;
  }
  .skill__peek {
    position: absolute; left: 50%; top: 50%; z-index: 2;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px 9px 12px; border-radius: 999px;
    background: var(--surface); color: var(--text); box-shadow: 0 6px 18px -6px rgba(16, 20, 40, .25);
    font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
    transform: translate(-50%, -50%) rotate(-3deg);
    transition: opacity .3s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1);
    pointer-events: none;
  }
  .skill:nth-child(even) .skill__peek { transform: translate(-50%, -50%) rotate(2deg); }
  .skill__peek svg { width: 18px; height: 18px; color: var(--accent-text); }
  .skill__peek-tap { display: none; }

  .skill.is-pinned .skill__proof,
  .skill:focus-within .skill__proof { filter: none; opacity: 1; user-select: text; }
  .skill.is-pinned .skill__peek,
  .skill:focus-within .skill__peek { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-12deg); }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .skill:hover .skill__proof { filter: none; opacity: 1; user-select: text; }
  .skill:hover .skill__peek { opacity: 0; transform: translate(-50%, -50%) scale(.6) rotate(-12deg); }
  .skill.is-dismissed .skill__proof { filter: blur(5px) !important; opacity: .6 !important; }
  .skill.is-dismissed .skill__peek { opacity: 1 !important; transform: translate(-50%, -50%) rotate(-3deg) !important; }
}
@media (min-width: 900px) and (hover: none) {
  .skill__peek-hover { display: none; }
  .skill__peek-tap { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .skill__proof, .skill__peek { transition: opacity .2s linear !important; }
  .skill .skill__peek, .skill:nth-child(even) .skill__peek,
  .skill.is-pinned .skill__peek, .skill:focus-within .skill__peek, .skill:hover .skill__peek { transform: translate(-50%, -50%) !important; }
}

/* ---------- Other work: solid, AA-safe description panel ---------- */
.other-card .other-card__desc {
  margin: 0;
  background: var(--text); color: var(--bg);
  align-items: center;
  opacity: 0;
  transition: opacity .25s ease;
}
.other-card:focus-within .other-card__desc { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .other-card:hover .other-card__desc { opacity: 1; }
}
.other-card.is-dismissed .other-card__desc { opacity: 0 !important; }
@media (hover: none) and (min-width: 640px) {
  .other-card .other-card__desc { background: none; color: var(--text-2); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .other-card .other-card__desc { transition: none; }
}

/* ---------- Header links: clear hover vs. current section (desktop) ---------- */
@media (min-width: 900px) {
  .nav__links { gap: 6px; }
  .nav__links a:not(.btn) {
    position: relative;
    display: inline-flex; align-items: center; min-height: 40px;
    padding: 8px 16px; border-radius: 999px;
    color: var(--text-2);
    transition: background-color .2s ease, color .2s ease;
  }
  .nav__links a:not(.btn):hover {
    background: var(--accent-soft);
    color: var(--accent-text);
  }
  .nav__links a:not(.btn):active { background: color-mix(in srgb, var(--accent) 22%, var(--accent-soft)); }
  .nav__links a[aria-current="true"] { color: var(--text); }
  .nav__links a[aria-current="true"]::after {
    content: ""; position: absolute; left: 50%; bottom: 3px;
    width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
    background: var(--accent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav__links a:not(.btn) { transition: none; }
}

/* ---------- Glows as gradients (Safari clips very large CSS blur filters) ---------- */
.glow svg { display: none; }
.glow::before {
  content: ""; position: absolute;
  left: 50%; top: 335px;
  width: 1320px; height: 820px;
  margin-left: calc(-116px - 660px); margin-top: -410px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--accent) 95%, transparent) 0%,
    color-mix(in srgb, var(--accent) 62%, transparent) 30%,
    color-mix(in srgb, var(--accent) 26%, transparent) 62%,
    transparent 100%);
  opacity: calc(var(--glow-opacity) * 1.45);
  transform: rotate(22deg);
  pointer-events: none;
}
@media (max-width: 639px) {
  .glow::before { width: 900px; height: 600px; top: 230px; margin-left: calc(-80px - 450px); margin-top: -300px; }
}
.contact__card::before {
  filter: none;
  width: 900px; height: 900px; right: -340px; top: -380px;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--accent) 95%, transparent) 0%,
    color-mix(in srgb, var(--accent) 55%, transparent) 35%,
    color-mix(in srgb, var(--accent) 18%, transparent) 68%,
    transparent 100%);
}
