/* ============================================================
   Portfolio — design system
   Identity: dark ink base · cream paper · orange accent
   ============================================================ */

:root {
  --ink: #0b0b0c;
  --ink-2: #131315;
  --ink-3: #1c1c1f;
  --paper: #fafaf8;
  --paper-2: #f0efeb;
  --accent: #f4562a;
  --accent-soft: #ffa06b;
  --muted: #71716d;
  --muted-dark: #9a9a96;
  --line: rgba(11, 11, 12, .12);
  --line-inv: rgba(250, 250, 248, .14);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius: 20px;
  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- theme sections ---------- */
.sec { padding-block: clamp(72px, 10vw, 128px); }
.sec--dark { background: var(--ink); color: var(--paper); }
.sec--dark ::selection { background: var(--paper); color: var(--ink); }

.sec-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.sec-title .dot { color: var(--accent); }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted);
}
.sec--dark .eyebrow { color: var(--muted-dark); }
.eyebrow b { color: var(--accent); font-weight: 600; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 16px; left: 50%; translate: -50% 0; z-index: 1000;
  width: min(calc(100% - 32px), 1080px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px;
  background: rgba(11, 11, 12, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-inv);
  border-radius: 999px;
  color: var(--paper);
  transition: translate .5s var(--ease), opacity .5s;
}
.nav.nav--hidden { translate: -50% -120%; opacity: 0; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; }
.nav-links a { position: relative; opacity: .85; transition: opacity .3s; }
.nav-links a:hover { opacity: 1; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform .35s var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (max-width: 640px) { .nav-links { gap: 16px; font-size: 13px; } .nav-links a:nth-child(3) { display: none; } }

/* ============================================================
   HERO (home)
   ============================================================ */
.hero {
  position: relative;
  background: var(--ink); color: var(--paper);
  min-height: 84svh;
  display: flex; align-items: center;
  padding-block: clamp(120px, 15vh, 160px) clamp(72px, 10vh, 112px);
  overflow: hidden;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 6vw, 80px); align-items: center;
  width: 100%;
}
.hero-copy .eyebrow { margin-bottom: 22px; }
.hero-title {
  font-size: clamp(32px, 4.3vw, 60px);
  font-weight: 750;
  letter-spacing: -.03em;
}
.hero-sub { margin-top: 28px; max-width: 44ch; color: var(--muted-dark); font-size: clamp(17px, 1.4vw, 19px); }

.hero-media { position: relative; }
.hero-media::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border: 1.5px solid var(--accent); border-radius: var(--radius);
  z-index: 0; transition: inset .5s var(--ease);
}
.hero-media:hover::before { inset: 8px -8px -8px 8px; }
.hero-photo {
  position: relative; z-index: 1;
  width: 100%; aspect-ratio: 4/4.5; object-fit: cover;
  border-radius: var(--radius);
  filter: grayscale(1) contrast(1.04);
  transition: filter .7s var(--ease);
}
.hero-media:hover .hero-photo { filter: none; }
@media (hover: none) { .hero-photo { filter: none; } }

#mi-particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.mi-glow {
  position: absolute; left: 4%; top: 8%; width: 58vmin; height: 58vmin; border-radius: 50%;
  pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(244, 86, 42, .5) 0%, rgba(244, 86, 42, 0) 62%);
  filter: blur(56px); mix-blend-mode: screen; opacity: .5;
  animation: mi-drift 16s ease-in-out infinite alternate;
}
@keyframes mi-drift { from { translate: -8% -5%; scale: 1; } to { translate: 16% 12%; scale: 1.18; } }

/* living letters */
.mi-w { display: inline-block; white-space: pre; }
.mi-ch { display: inline-block; transition: translate .3s var(--ease), rotate .3s var(--ease), color .3s; }
.mi-js .mi-split .mi-ch {
  opacity: 0; translate: 0 .55em; rotate: 4deg;
  animation: chrise .7s var(--ease) var(--chd, 0ms) forwards;
}
@keyframes chrise { to { opacity: 1; translate: 0 0; rotate: 0deg; } }
.mi-ch.mi-pop { translate: 0 -.14em; rotate: var(--rot, 6deg); color: var(--accent); }

.mi-uword { position: relative; }
.mi-uword svg { position: absolute; left: -2%; bottom: -.14em; width: 104%; height: .3em; overflow: visible; pointer-events: none; }
.mi-uword path {
  fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke;
  stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 420;
  animation: draw 1.1s var(--ease) 1.5s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.mi-js .rise { opacity: 0; translate: 0 30px; animation: rise .9s var(--ease) var(--d, 0ms) forwards; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }
.mi-js .float-in { animation: rise .9s var(--ease) var(--d, 0ms) forwards, floaty 7s ease-in-out 1.8s infinite; }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -9px; } }

@media (max-width: 860px) {
  .hero { min-height: auto; padding-bottom: clamp(56px, 9vh, 88px); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 420px; }
}

/* ============================================================
   BUTTONS / CHIPS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 24px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  border: 1.5px solid transparent;
  transition: translate .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s;
}
.btn:hover { translate: 0 -3px; box-shadow: 0 14px 28px -14px rgba(244, 86, 42, .55); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--ghost { border-color: var(--line-inv); color: var(--paper); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn .arr { transition: translate .3s var(--ease); }
.btn:hover .arr { translate: 4px 0; }

.chip {
  display: inline-flex; padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 550; letter-spacing: .02em;
  border: 1px solid var(--line-inv); color: var(--muted-dark);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.tagpill {
  display: inline-flex; padding: 9px 16px; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 550;
  transition: translate .3s var(--ease), box-shadow .3s var(--ease);
}
.tagpill:hover { translate: 0 -3px; box-shadow: 0 10px 18px -10px rgba(11, 11, 12, .3); }

/* ============================================================
   WORK CARDS (Selected work)
   ============================================================ */
.work-list { display: grid; gap: clamp(24px, 3vw, 40px); }
.work-card {
  display: grid; grid-template-columns: 1fr 1.1fr;
  background: var(--paper-2); border-radius: var(--radius); overflow: hidden;
  transition: translate .45s var(--ease), box-shadow .45s var(--ease);
}
.work-card:hover { translate: 0 -6px; box-shadow: 0 28px 56px -24px rgba(11, 11, 12, .35); }
.work-card-body { padding: clamp(24px, 3.4vw, 48px); display: flex; flex-direction: column; gap: 18px; }
.work-card-title { font-size: clamp(21px, 2.3vw, 30px); font-weight: 680; line-height: 1.15; }
.work-card-metric { margin-top: auto; display: flex; align-items: baseline; gap: 12px; }
.work-card-metric b { font-family: var(--font-display); font-size: clamp(28px, 3vw, 40px); font-weight: 750; color: var(--accent); letter-spacing: -.02em; }
.work-card-metric span { font-size: 14px; color: var(--muted); }
.work-card-media { overflow: hidden; min-height: 280px; }
.work-card-media img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease); }
.work-card:hover .work-card-media img { scale: 1.045; }
.work-card-go {
  width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-size: 18px;
  transition: background .3s, translate .35s var(--ease);
}
.work-card:hover .work-card-go { background: var(--accent); translate: 6px 0; }
.work-card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
@media (max-width: 820px) {
  .work-card { grid-template-columns: 1fr; }
  .work-card-media { order: -1; min-height: 220px; max-height: 300px; }
}

/* ============================================================
   LAB — carousel (contained in .wrap; edge fades + arrows)
   ============================================================ */
.lab-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(32px, 5vw, 64px); }
.lab-head .sec-title { margin-bottom: 0; }
.lab-nav { display: flex; gap: 10px; }
.lab-arrow {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line-inv); color: var(--paper);
  font: 500 18px/1 var(--font-body); cursor: pointer;
  transition: border-color .3s, color .3s, background .3s, opacity .3s;
}
.lab-arrow:hover:not(:disabled), .lab-arrow:focus-visible { border-color: var(--accent); color: var(--accent); }
.lab-arrow:disabled { opacity: .3; cursor: default; }
.lab-nav.is-hidden { visibility: hidden; }

/* fades are masks on the scroller: shown only on the side that has more cards */
.lab-carousel { --fade: clamp(40px, 8vw, 120px); }
.lab-row {
  --fl: 0px; --fr: var(--fade);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
          mask-image: linear-gradient(to right, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
}
.lab-row::-webkit-scrollbar { display: none; }
.lab-row:focus-visible { outline-offset: 6px; border-radius: var(--radius); }
.lab-carousel.at-start .lab-row { --fl: 0px; }
.lab-carousel:not(.at-start) .lab-row { --fl: var(--fade); }
.lab-carousel.at-end .lab-row { --fr: 0px; }
.lab-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(340px, 78vw);
  gap: 20px; width: max-content; padding: 8px 0 24px; /* top room for the hover lift */
}
/* position dots: one per scroll stop; the active one stretches into a pill */
.lab-dots { display: flex; justify-content: center; gap: 2px; margin-top: 4px; }
.lab-dots:empty { display: none; }
.lab-dot { padding: 8px 4px; background: none; border: 0; cursor: pointer; }
.lab-dot::before {
  content: ""; display: block; width: 8px; height: 8px; border-radius: 999px; background: var(--line-inv);
  transition: width .35s var(--ease), background .35s;
}
.lab-dot:hover::before { background: var(--muted-dark); }
.lab-dot[aria-current="true"]::before { width: 24px; background: var(--accent); }
@media (max-width: 640px) { .lab-arrow { width: 42px; height: 42px; } }

.lab-card {
  scroll-snap-align: start;
  background: var(--ink-2); border: 1px solid var(--line-inv); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: translate .45s var(--ease), border-color .45s;
}
.lab-card:hover { translate: 0 -6px; border-color: rgba(244, 86, 42, .55); }
.lab-card-media { aspect-ratio: 16/10; overflow: hidden; }
.lab-card-media img { width: 100%; height: 100%; object-fit: cover; transition: scale .9s var(--ease); }
.lab-card:hover .lab-card-media img { scale: 1.05; }
.lab-card-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.lab-card-title { font-size: 17.5px; font-weight: 620; line-height: 1.3; }
.lab-card-foot { margin-top: auto; font-size: 12.5px; color: var(--muted-dark); display: flex; justify-content: space-between; align-items: center; }
.lab-card-foot .ext { color: var(--accent); transition: translate .3s var(--ease); }
.lab-card:hover .lab-card-foot .ext { translate: 3px -3px; }

/* ============================================================
   WRITING — list rows
   ============================================================ */
.rowlist { border-top: 1px solid var(--line-inv); }
.rowlist a, .rowlist .row {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 6px; border-bottom: 1px solid var(--line-inv);
  transition: translate .35s var(--ease), background .3s;
}
.rowlist a:hover { translate: 6px 0; }
.row-title { font-size: clamp(17px, 2vw, 21px); font-weight: 600; }
.row-meta { font-size: 13px; color: var(--muted-dark); margin-top: 4px; }
.row-ico { color: var(--muted-dark); font-size: 18px; transition: translate .3s var(--ease), color .3s; flex: none; }
.rowlist a:hover .row-ico { translate: 3px -3px; color: var(--accent); }

/* light theme rowlist (Background section) */
.sec--paper .rowlist { border-color: var(--line); }
.sec--paper .rowlist a, .sec--paper .rowlist .row { border-color: var(--line); }
.sec--paper .row-meta, .sec--paper .row-ico { color: var(--muted); }

/* ============================================================
   BACKGROUND section
   ============================================================ */
.bg-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: start; }
.panel { background: var(--paper-2); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 36px); }
.panel + .panel { margin-top: 24px; }
.panel-label { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }

/* entries: experience / education / awards / books / certifications — separated by
   spacing, no rules. Left: title → org → (optional) description.
   Right: the date, or a "Cert" button when the row has no date. */
.entries { display: grid; gap: 22px; }
.entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; row-gap: 3px; padding-inline: 4px; }
.entry > * { grid-column: 1; }
.entry > .entry-meta, .entry > .entry-btn { grid-column: 2; grid-row: 1 / span 2; align-self: start; justify-self: end; }
.entry-title { font-family: var(--font-display); font-size: 17.5px; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
.entry-org { font-size: 14.5px; font-weight: 500; color: var(--ink); }
.entry-org.todo { color: var(--muted); font-style: italic; font-weight: 450; }
.entry-meta { font-size: 13px; color: var(--muted); letter-spacing: .01em; line-height: 1.35; padding-top: 2px; text-align: right; white-space: nowrap; }
.entry-dur::before { content: " · "; }
.entry-desc { font-size: 14.5px; color: var(--muted); margin: 6px 0 0; max-width: 56ch; }

/* certificate link button */
.entry-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink); white-space: nowrap;
  transition: color .3s, border-color .3s, background .3s;
}
.entry-btn span { transition: translate .3s var(--ease); }
.entry-btn:hover, .entry-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.entry-btn:hover span, .entry-btn:focus-visible span { translate: 2px -2px; }
/* placeholder (no URL yet) */
.entry-btn.is-todo { color: var(--muted); border-style: dashed; }

@media (max-width: 860px) { .bg-grid { grid-template-columns: 1fr; } }
/* narrow screens: duration drops under the date so titles keep their width */
@media (max-width: 560px) {
  .entry { column-gap: 14px; }
  .entry-dur { display: block; }
  .entry-dur::before { content: none; }
}

/* ============================================================
   OFF SCREEN
   ============================================================ */
/* sub-section label: eyebrow + hairline */
.sub-head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.sub-head .eyebrow { flex: none; }
.sub-head::after { content: ""; flex: 1; height: 1px; background: var(--line-inv); }
.bento + .sub-head { margin-top: clamp(48px, 6vw, 72px); }

/* bento: 6 columns on desktop; tile positions by source order */
.bento {
  display: grid; grid-template-columns: repeat(6, 1fr);
  /* rows only grow past the base height for the playlist tile (its embed needs 352px) */
  grid-auto-rows: minmax(clamp(120px, 15.5vw, 196px), auto); gap: 12px;
}
.tile { position: relative; margin: 0; border-radius: 16px; overflow: hidden; background: var(--ink-2); min-width: 0; min-height: 0; }
.tile img {
  position: absolute; inset: 0; /* absolute so image intrinsic size never inflates the rows */
  width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35);
  transition: filter .6s var(--ease), scale .8s var(--ease);
}
.tile:hover img { filter: none; scale: 1.035; }
.bento > :nth-child(1)  { grid-area: 1 / 1 / 3 / 3; }  /* falconry — hero tile */
.bento > :nth-child(2)  { grid-area: 1 / 3 / 2 / 5; }  /* zipline — wide */
.bento > :nth-child(3)  { grid-area: 1 / 5 / 2 / 6; }  /* concert */
.bento > :nth-child(4)  { grid-area: 1 / 6 / 3 / 7; }  /* race + Burj Khalifa — tall */
.bento > :nth-child(5)  { grid-area: 2 / 3 / 3 / 5; }  /* Dubai event — wide */
.bento > :nth-child(6)  { grid-area: 2 / 5 / 3 / 6; }  /* snow */
.bento > :nth-child(7)  { grid-area: 3 / 1 / 5 / 2; }  /* desert — tall */
.bento > :nth-child(8)  { grid-area: 3 / 2 / 5 / 4; }  /* mosque — big */
.bento > :nth-child(9)  { grid-area: 3 / 4 / 5 / 5; }  /* pendulum — tall */
.bento > :nth-child(10) { grid-area: 3 / 5 / 5 / 7; }  /* playlist — big */
.bento > :nth-child(11) { grid-area: 5 / 1 / 6 / 3; }  /* Madrid — wide */
.bento > :nth-child(12) { grid-area: 5 / 3 / 6 / 4; }  /* Paris */
.bento > :nth-child(13) { grid-area: 5 / 4 / 6 / 5; }  /* Barcelona */
.bento > :nth-child(14) { grid-area: 5 / 5 / 6 / 7; }  /* London — wide */

/* playlist tile: same surface as lab cards, embed fills the tile */
.tile--playlist {
  display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 12px;
  border: 1px solid var(--line-inv);
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2) 70%);
  transition: border-color .45s;
}
.tile--playlist:hover { border-color: rgba(244, 86, 42, .55); }
.tile-playlist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tile-playlist-badge {
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper); padding: 4px 9px; border-radius: 999px; background: rgba(250, 250, 248, .08);
}
.tile--playlist iframe { flex: 1; min-height: 352px; width: 100%; border: 0; border-radius: 12px; }

@media (max-width: 640px) {
  /* 2-column bento; taller rows so faces keep their headroom */
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(44vw, auto); gap: 8px; }
  .tile { border-radius: 12px; }
  .bento > :nth-child(1)  { grid-area: 1 / 1 / 3 / 2; }   /* falconry — tall */
  .bento > :nth-child(2)  { grid-area: 1 / 2 / 2 / 3; }   /* zipline */
  .bento > :nth-child(3)  { grid-area: 2 / 2 / 3 / 3; }   /* concert */
  .bento > :nth-child(4)  { grid-area: 3 / 1 / 5 / 2; }   /* race — tall */
  .bento > :nth-child(5)  { grid-area: 3 / 2 / 4 / 3; }   /* Dubai event */
  .bento > :nth-child(6)  { grid-area: 4 / 2 / 5 / 3; }   /* snow */
  .bento > :nth-child(7)  { grid-area: 5 / 1 / 6 / 2; }   /* desert */
  .bento > :nth-child(8)  { grid-area: 5 / 2 / 7 / 3; }   /* mosque — tall */
  .bento > :nth-child(9)  { grid-area: 6 / 1 / 7 / 2; }   /* pendulum */
  .bento > :nth-child(10) { grid-area: 7 / 1 / 9 / 3; }   /* playlist — full width */
  .bento > :nth-child(11) { grid-area: 9 / 1 / 10 / 3; }  /* Madrid — wide */
  .bento > :nth-child(12) { grid-area: 10 / 1 / 11 / 2; } /* Paris */
  .bento > :nth-child(13) { grid-area: 10 / 2 / 11 / 3; } /* Barcelona */
  .bento > :nth-child(14) { grid-area: 11 / 1 / 12 / 3; } /* London — wide */
  .bento > :nth-child(1) img { object-position: 45% 18%; }
  .bento > :nth-child(2) img { object-position: 50% 30%; }
  .bento > :nth-child(11) img, .bento > :nth-child(14) img { object-position: 50% 62%; }
  .tile--playlist { padding: 14px 14px 10px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--paper); padding: clamp(64px, 9vw, 110px) 0 40px; }
.footer-talk { font-size: clamp(36px, 5.4vw, 64px); font-weight: 720; }
.footer-mail {
  display: inline-block; margin-top: 18px; font-size: clamp(17px, 2vw, 22px);
  color: var(--muted-dark); border-bottom: 1.5px solid var(--line-inv);
  transition: color .3s, border-color .3s;
}
.footer-mail:hover { color: var(--accent); border-color: var(--accent); }
.footer-row {
  margin-top: clamp(40px, 6vw, 72px);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line-inv); padding-top: 28px;
  font-size: 13px; color: var(--muted-dark);
}
.footer-social { display: flex; gap: 22px; font-weight: 550; }
.footer-social a { transition: color .3s, translate .3s var(--ease); }
.footer-social a:hover { color: var(--accent); translate: 0 -3px; }

/* ============================================================
   CASE PAGES — shared
   ============================================================ */
.case-hero {
  background: var(--ink); color: var(--paper);
  padding: clamp(140px, 18vh, 200px) 0 clamp(48px, 6vw, 80px);
  position: relative; overflow: hidden;
}
.case-kicker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.case-title {
  font-size: clamp(32px, 4.6vw, 62px); font-weight: 740; letter-spacing: -.03em;
  max-width: 22ch;
}
.case-lede { margin-top: 24px; max-width: 58ch; font-size: clamp(16px, 1.6vw, 19px); color: var(--muted-dark); }
.case-facts {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px;
}
.fact { border-top: 1.5px solid var(--line-inv); padding-top: 14px; }
.fact:first-child { border-color: var(--accent); }
.fact b { display: block; font-family: var(--font-display); font-size: clamp(26px, 3vw, 40px); font-weight: 750; letter-spacing: -.02em; }
.fact b.up { color: var(--accent); }
.fact span { font-size: 13.5px; color: var(--muted-dark); }
.case-hero-media { margin-top: clamp(40px, 6vw, 64px); }
.case-hero-media img { width: 100%; border-radius: var(--radius); }

.prose { max-width: 68ch; }
.prose-narrow { max-width: 60ch; }
.lead { font-size: clamp(17px, 1.8vw, 20px); }

.exec {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px);
}
.exec > div { border-top: 1.5px solid var(--line); padding-top: 18px; }
.exec h3 { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 650; margin-bottom: 12px; }
.exec p { font-size: 15.5px; }
@media (max-width: 820px) { .exec { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat { background: var(--paper-2); border-radius: 16px; padding: 24px 22px; }
.sec--dark .stat { background: var(--ink-2); border: 1px solid var(--line-inv); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 760; letter-spacing: -.02em; color: var(--accent); }
.stat span { font-size: 13.5px; color: var(--muted); line-height: 1.4; display: inline-block; margin-top: 6px; }
.sec--dark .stat span { color: var(--muted-dark); }

.figure { margin: 0; }
.figure img { width: 100%; border-radius: var(--radius); cursor: zoom-in; }
.figure figcaption { font-size: 13.5px; color: var(--muted); margin-top: 12px; max-width: 60ch; }
.sec--dark .figure figcaption { color: var(--muted-dark); }
.fig-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .fig-duo { grid-template-columns: 1fr; } }
.fig-label {
  display: inline-block; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
}
.fig-label--before { background: rgba(11,11,12,.08); color: var(--muted); }
.fig-label--after { background: var(--accent); color: #fff; }
.sec--dark .fig-label--before { background: var(--ink-3); color: var(--muted-dark); }

/* decision moments (onboarding editorial) */
.moment { display: grid; grid-template-columns: 64px 1fr; gap: clamp(18px, 3vw, 36px); padding-block: clamp(36px, 5vw, 56px); border-top: 1px solid var(--line); }
.moment-num {
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent);
  border: 1.5px solid var(--accent); width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
}
.moment h3 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 700; margin-bottom: 18px; letter-spacing: -.02em; }
.epath { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 22px 0; }
.epath > div { background: var(--paper-2); border-radius: 14px; padding: 18px; font-size: 14.5px; }
.epath b { display: block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.sec--dark .epath > div { background: var(--ink-2); border: 1px solid var(--line-inv); color: var(--muted-dark); }
@media (max-width: 640px) { .moment { grid-template-columns: 1fr; } .moment-num { width: 40px; height: 40px; } }

.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.evi { background: var(--ink-2); border: 1px solid var(--line-inv); border-radius: var(--radius); overflow: hidden; }
.evi img { width: 100%; cursor: zoom-in; }
.evi-body { padding: 20px 22px; }
.evi-body b { font-size: 15.5px; font-weight: 650; display: block; margin-bottom: 6px; }
.evi-body p { font-size: 14px; color: var(--muted-dark); margin: 0; }

.note-review {
  border: 1.5px dashed rgba(244, 86, 42, .6); border-radius: 12px;
  padding: 14px 18px; font-size: 13.5px; color: var(--muted);
  background: rgba(244, 86, 42, .05);
}
.note-review b { color: var(--accent); }

.case-next { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.case-next a { display: flex; flex-direction: column; gap: 6px; transition: translate .35s var(--ease); }
.case-next a span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-dark); }
.case-next a b { font-size: clamp(17px, 2vw, 22px); font-weight: 650; }
.case-next a:hover { translate: 0 -4px; color: var(--accent); }

.chart-frame { width: 100%; aspect-ratio: 16/10; border: 0; border-radius: var(--radius); background: #0d1524; }
.chart-facade { position: relative; width: 100%; aspect-ratio: 16/10; border: 1px solid var(--line); border-radius: var(--radius); background: #0d1524; display: grid; place-items: center; overflow: hidden; }
.chart-facade button { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 999px; border: 1.5px solid rgba(244,86,42,.6); background: rgba(244,86,42,.12); color: #fff; font: 600 14px/1 "Inter", system-ui, sans-serif; cursor: pointer; transition: background .3s, translate .3s var(--ease); }
.chart-facade button:hover { background: var(--accent); translate: 0 -3px; }
.chart-facade small { position: absolute; bottom: 14px; color: rgba(251,251,249,.45); font-size: 12px; }

/* ============================================================
   micro-interactions: cursor, progress, reveal, lightbox, sparks
   ============================================================ */
#mi-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 9998; pointer-events: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  transform: scaleX(0); transform-origin: 0 50%;
}
#mi-dot, #mi-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; opacity: 0; transition: opacity .3s; }
#mi-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--accent); transition: opacity .3s, scale .3s var(--ease); }
#mi-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid #fff; mix-blend-mode: difference;
  transition: opacity .3s, width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s;
}
html.mi-cursor, html.mi-cursor * { cursor: none !important; }
html.mi-cursor.mi-on #mi-dot, html.mi-cursor.mi-on #mi-ring { opacity: 1; }
html.mi-cursor.mi-hov #mi-ring { width: 52px; height: 52px; margin: -26px 0 0 -26px; background: rgba(255,255,255,.92); border-color: transparent; }
html.mi-cursor.mi-hov #mi-dot { opacity: 0; }
html.mi-cursor.mi-down #mi-ring { width: 24px; height: 24px; margin: -12px 0 0 -12px; }

.mi-js .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s var(--ease), translate .8s var(--ease); transition-delay: var(--rd, 0ms); }
.mi-js .reveal.in { opacity: 1; translate: 0 0; }

.mi-spark { position: fixed; z-index: 9997; pointer-events: none; border-radius: 50%; animation: spark .75s var(--ease) forwards; }
@keyframes spark { to { translate: var(--bx) var(--by); opacity: 0; scale: .15; rotate: 160deg; } }

#lightbox {
  position: fixed; inset: 0; z-index: 10000; background: rgba(11, 11, 12, .94);
  display: grid; place-items: center; padding: 4vmin;
  opacity: 0; pointer-events: none; transition: opacity .35s;
  cursor: zoom-out !important;
}
#lightbox.open { opacity: 1; pointer-events: auto; }
#lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; scale: .96; transition: scale .35s var(--ease); }
#lightbox.open img { scale: 1; }

/* ============================================================
   CASE NAV — "In this case" (assets/js/case-nav.js)
   Desktop: sticky rail beside the copy · Mobile: pill + bottom sheet
   ============================================================ */
:root { --casenav-w: 208px; --casenav-gap: 32px; --casenav-top: 96px; }

.case-body { position: relative; }
.case-body > section:focus-visible, .case-body > .case-hero:focus-visible { outline: none; }   /* focus target after a menu jump */
.case-rail { display: none; }

/* ---- shared list ---- */
.casenav-list { list-style: none; margin: 0; padding: 0; }
.casenav-link {
  position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 6px; align-items: baseline;
  padding: 8px 10px 8px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.35; font-weight: 500; color: var(--muted-dark);
  transition: color .25s, background .25s;
}
.casenav-link::before {
  content: ""; position: absolute; left: 0; top: 50%; translate: 0 -50%;
  width: 2px; height: 0; border-radius: 2px; background: var(--accent);
  transition: height .3s var(--ease);
}
.casenav-link:hover { color: var(--paper); background: rgba(250, 250, 248, .06); }
.casenav-link.is-active { color: var(--paper); }
.casenav-link.is-active::before { height: 58%; }
.casenav-link.is-active .casenav-num { color: var(--accent); }
.casenav-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 12px; }
.casenav-num {
  font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--muted); transition: color .25s;
}

/* ---- mobile pill ---- */
.casenav-pill {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 900;
  display: inline-flex; align-items: center; gap: 10px; max-width: calc(100% - 32px);
  padding: 11px 18px 11px 14px; border-radius: 999px; border: 1px solid var(--line-inv);
  background: rgba(11, 11, 12, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--paper); font: 600 13px/1.2 var(--font-body); letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 14px 32px -14px rgba(0, 0, 0, .55);
  opacity: 0; translate: -50% 18px; pointer-events: none;
  transition: opacity .35s, translate .5s var(--ease), border-color .3s;
}
.casenav-pill.is-visible { opacity: 1; translate: -50% 0; pointer-events: auto; }
.casenav-pill:hover { border-color: rgba(244, 86, 42, .6); }
.casenav-pill-icon { display: grid; color: var(--accent); }
.casenav-pill-title { white-space: nowrap; }
.casenav-pill-current {
  color: var(--muted-dark); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-left: 1px solid var(--line-inv); padding-left: 10px;
}
.casenav-pill-current:empty { display: none; }

/* ---- mobile bottom sheet ---- */
.casenav-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none;
  max-height: min(78svh, 78vh); overflow: auto; overscroll-behavior: contain;
  border: 0; border-radius: 24px 24px 0 0;
  background: var(--ink-2); color: var(--paper);
  padding: 8px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, .7);
}
.casenav-sheet::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; margin: 4px auto 6px;
  background: var(--line-inv);
}
.casenav-sheet[open] { animation: casenav-sheet-in .4s var(--ease); }
@keyframes casenav-sheet-in { from { translate: 0 28px; opacity: 0; } }
.casenav-sheet::backdrop { background: rgba(11, 11, 12, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.casenav-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 8px 12px; }
.casenav-sheet-title {
  margin: 0; font-family: var(--font-body); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--muted-dark); line-height: 1.4;
}
.casenav-sheet-close, .casenav-toggle {
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-inv); background: transparent; color: var(--paper);
  transition: border-color .3s, color .3s, background .3s;
}
.casenav-sheet-close { width: 40px; height: 40px; }
.casenav-sheet-close:hover, .casenav-toggle:hover { border-color: var(--accent); color: var(--accent); }
.casenav-sheet .casenav-link { font-size: 15.5px; padding: 12px 12px 12px 14px; min-height: 46px; grid-template-columns: 30px 1fr; }
.casenav-sheet .casenav-num { font-size: 12px; }

/* ---- desktop rail ---- */
@media (min-width: 1024px) {
  .casenav-pill { display: none; }
  .case-rail {
    display: block; position: absolute; top: 0; bottom: 0; z-index: 20; pointer-events: none;
    left: calc(max(0px, (100% - var(--maxw)) / 2) + var(--gutter));
    width: var(--casenav-w);
  }
  /* copy moves right so the rail never sits on top of text or images */
  .case-body .sec > .wrap, .case-body .case-hero > .wrap { padding-left: calc(var(--gutter) + var(--casenav-w) + var(--casenav-gap)); }

  .casenav {
    position: sticky; top: var(--casenav-top); pointer-events: auto;
    display: flex; flex-direction: column; width: var(--casenav-w);
    max-height: calc(100vh - var(--casenav-top) - 24px);
    padding: 12px 8px 8px; border-radius: 20px;
    background: rgba(17, 17, 19, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--line-inv); color: var(--paper);
    box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .6);
    transition: width .35s var(--ease), border-radius .35s var(--ease), padding .35s var(--ease);
  }
  .casenav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 10px 12px; }
  .casenav-title {
    display: inline-flex; gap: 8px; align-items: baseline;
    font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-dark);
  }
  .casenav-count { color: var(--accent); letter-spacing: .04em; }
  .casenav-toggle { width: 30px; height: 30px; flex: none; }
  .casenav-toggle-icon { display: grid; rotate: 90deg; transition: rotate .35s var(--ease); }
  .casenav .casenav-list { overflow-y: auto; min-height: 0; flex: 1; scrollbar-width: thin; }

  /* collapsed: a compact round control that keeps its place — the copy does not reflow */
  .casenav.is-collapsed { width: 52px; padding: 6px; border-radius: 999px; }
  .casenav.is-collapsed .casenav-head { flex-direction: column; padding: 0; gap: 2px; }
  .casenav.is-collapsed .casenav-title-text { display: none; }
  .casenav.is-collapsed .casenav-title { padding-bottom: 6px; letter-spacing: .04em; }
  .casenav.is-collapsed .casenav-toggle { width: 40px; height: 40px; border-color: transparent; }
  .casenav.is-collapsed .casenav-toggle:hover { border-color: var(--accent); }
  .casenav.is-collapsed .casenav-toggle-icon { rotate: -90deg; }
}
/* wide screens: the rail fits in the outer margin, the copy keeps its full column */
@media (min-width: 1760px) {
  .case-rail { left: calc((100% - var(--maxw)) / 2 - var(--casenav-w) - var(--casenav-gap)); }
  .case-body .sec > .wrap, .case-body .case-hero > .wrap { padding-left: var(--gutter); }
}

/* ============================================================
   reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .mi-js .reveal { opacity: 1 !important; translate: 0 0 !important; transition: none !important; }
  .mi-js .rise, .mi-js .float-in, .mi-js .mi-split .mi-ch { opacity: 1 !important; translate: 0 0 !important; rotate: 0deg !important; animation: none !important; }
  .mi-glow { animation: none !important; }
  #mi-particles { display: none !important; }
  .hero-photo { filter: none !important; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
