@view-transition { navigation: auto; }
/* =====================================================================
   waranyah · bento v2
   Tokens: reference -> semantic. Components only use semantic tokens.
   ===================================================================== */
:root {
  /* reference */
  --ref-sage-300: #b3bcb1;
  --ref-sage-500: #5f6a5c; /* was #8d978b: darkened so white text passes AA */
  --ref-white: #ffffff;
  --ref-mist-100: #fbfbf8;
  --ref-mist-150: #f3f4f0;
  --ref-mist-200: #eaece6;
  --ref-mist-300: #e2e5de;
  --ref-lime-300: #e4fb6c;
  --ref-lime-100: #f3fdc4;
  --ref-ink-900: #0f100e;
  --ref-ink-800: #1d211c;
  --ref-ink-600: #3d423a; /* was #4a4f47 (AA) */
  --ref-ink-400: #5c6258; /* was #6f756b (AA) */

  /* semantic */
  --page: var(--ref-white);          /* white page (2026-11-02); was sage-300 */
  --surface: var(--ref-mist-150);    /* plain cards sit on the white page */
  --card: var(--ref-white);          /* small pieces inside cards: pills, chips, rows */
  --card-soft: var(--ref-mist-200);
  --card-sage: var(--ref-sage-500);
  --card-dark: var(--ref-ink-900);
  --card-accent: var(--ref-lime-300);
  --line: var(--ref-mist-300);
  --text: var(--ref-ink-900);
  --text-soft: var(--ref-ink-600);
  --text-muted: var(--ref-ink-400);
  --text-on-dark: #f4f6f1;
  --text-on-dark-soft: #a9b0a4;
  --accent: var(--ref-lime-300);
  --accent-soft: var(--ref-lime-100);

  --font: "Inter Tight", "IBM Plex Sans Thai", system-ui, -apple-system, sans-serif;
  --r-card: 30px;
  --r-inner: 18px;
  --gap: 16px;
  --pad: 26px;
  --max: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ref-ink-900); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; background: var(--accent); padding: 8px 14px; border-radius: 999px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------------- Primitives ---------------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--pad);
  overflow: hidden;
  min-width: 0;
}
.card.soft { background: var(--card-soft); }
.card.sage { background: var(--card-sage); color: var(--text-on-dark); }
.card.dark { background: var(--card-dark); color: var(--text-on-dark); }
.card.accent { background: var(--card-accent); }
.s4 { grid-column: span 4; } .s5 { grid-column: span 5; }
.s6 { grid-column: span 6; } .s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }

.title { font-weight: 400; font-size: clamp(30px, 3.2vw, 42px); line-height: 1.02; letter-spacing: -.025em; }
.title-xl { font-weight: 400; font-size: clamp(36px, 4.4vw, 58px); line-height: 1.02; letter-spacing: -.03em; }
.big-num { font-weight: 300; font-size: clamp(44px, 4.4vw, 60px); line-height: 1; letter-spacing: -.03em; }
.label { font-size: 13px; color: var(--text-muted); }
.card.dark .label { color: var(--text-on-dark-soft); }
.card.sage .label { color: #f1f4ee; }
.soft-text { color: var(--text-soft); }
.card.dark .soft-text { color: var(--text-on-dark-soft); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 999px; border: 0;
  background: var(--ref-ink-900); color: #fff;
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer;
  white-space: nowrap;
}
.pill.light { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.pill.sm { height: 36px; padding: 0 16px; font-size: 14px; }
.circle {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  text-decoration: none;
}
.circle.ink { background: var(--ref-ink-900); color: #fff; border: 0; }
.circle.lime { background: var(--accent); color: var(--text); border: 0; }
.circle svg { width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--card-soft); color: var(--text-soft); white-space: nowrap; }
.card.soft .chip { background: var(--card); }
.card.dark .chip { background: var(--ref-ink-800); color: var(--text-on-dark-soft); }
.card.accent .chip { background: rgba(255,255,255,.6); color: var(--text); }
.chip.on, .card .chip.on { background: var(--accent); color: var(--text); }

/* Notch: the inverted-corner cutout from the reference.
   .notch paints the page colour into the card's top-right corner with curved inside corners. */
.notch {
  position: absolute; top: 0; right: 0; z-index: 2;
  background: var(--page);
  border-bottom-left-radius: var(--r-card);
  padding: 0 0 10px 10px;
  display: flex; gap: 10px;
}
.notch::before, .notch::after {
  content: ""; position: absolute; width: var(--r-card); height: var(--r-card);
  background: radial-gradient(circle at 0 100%, transparent calc(var(--r-card) - .5px), var(--page) var(--r-card));
}
.notch::before { top: 0; left: calc(var(--r-card) * -1); }
.notch::after { right: 0; bottom: calc(var(--r-card) * -1); }

/* ---------------- Media slots (screens + video) ----------------
   To fill a slot, replace <div class="empty">…</div> with
   <img src="assets/…" alt="…">  or
   <video src="assets/…mp4" poster="assets/…jpg" autoplay muted loop playsinline></video>
   ---------------------------------------------------------------- */
.media { margin: 0; }
.screen { position: relative; aspect-ratio: 16 / 10; background: var(--ref-ink-800); overflow: hidden; }
.screen > img, .screen > video { width: 100%; height: 100%; object-fit: cover; }
.screen > .contain { object-fit: contain; }
.empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--card-soft) 0 14px, var(--card) 14px 28px);
  color: var(--text-muted); font-size: 13px; padding: 16px;
}
.empty b { display: block; color: var(--text-soft); font-weight: 500; font-size: 15px; margin-bottom: 4px; }

.browser { border-radius: var(--r-inner); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.browser .bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: var(--card-soft); }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--ref-mist-300); }
.browser .bar span { margin-left: 10px; font-size: 11px; color: var(--text-muted); background: var(--card); padding: 2px 10px; border-radius: 999px; }

.laptop .lid { border-radius: 16px 16px 4px 4px; background: #000; padding: 10px 10px 14px; border: 1px solid #333; }
.laptop .lid .screen { border-radius: 4px; }
.laptop .base { height: 12px; margin: 0 -4%; background: linear-gradient(#d4d8d1, #9fa59b); border-radius: 0 0 14px 14px; position: relative; }
.laptop .base::after { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 5px; transform: translateX(-50%); background: #8f958b; border-radius: 0 0 6px 6px; }

.phone { width: min(230px, 100%); margin: 0 auto; border-radius: 34px; background: #111; padding: 9px; }
.phone .screen { aspect-ratio: 9 / 19.5; border-radius: 26px; }

figcaption { font-size: 13px; color: var(--text-muted); margin-top: 12px; }
.card.dark figcaption { color: var(--text-on-dark-soft); }

/* ---------------- Nav ---------------- */
.nav { position: sticky; top: 0; z-index: 10; padding: 14px 0; background: color-mix(in srgb, var(--page) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.02em; font-size: 18px; }
.logo i { width: 36px; height: 36px; border-radius: 50%; background: var(--ref-ink-900); color: var(--accent); display: grid; place-items: center; font-style: normal; font-size: 15px; }
.tabs { display: flex; gap: 4px; background: var(--surface); padding: 5px; border-radius: 999px; list-style: none; }
.tabs a { display: block; padding: 9px 16px; border-radius: 999px; text-decoration: none; font-size: 15px; color: var(--text-soft); }
.tabs a:hover { background: var(--card); color: var(--text); }
.tabs a { transition: background .2s, color .2s; }
.tabs a[aria-current="true"] { background: var(--ref-ink-900); color: #fff; }

/* ---------------- Hero ---------------- */
.hero { padding-top: 10px; }
.profile { background: var(--card-accent); min-height: 360px; display: flex; flex-direction: column; }
.who { display: flex; align-items: center; gap: 14px; padding-right: 140px; }
.avatar { width: 62px; height: 62px; border-radius: 50%; overflow: hidden; background: #fff; flex: none; }
.who b { display: block; font-weight: 500; font-size: 17px; }
.who span { font-size: 14px; color: var(--text-soft); }
.profile h1 { margin-top: 30px; }
.profile .lede { font-size: 17px; color: var(--text-soft); max-width: 42ch; margin-top: 10px; }
.profile .row { display: flex; gap: 12px; align-items: center; margin-top: auto; padding-top: 24px; }
.jump { position: relative; flex: 1; }
.jump select {
  width: 100%; height: 56px; border-radius: 999px; appearance: none; -webkit-appearance: none;
  border: 1px solid rgba(0,0,0,.2); background: rgba(255,255,255,.4);
  font: 500 15px var(--font); color: var(--text); padding: 0 48px 0 22px; cursor: pointer;
}
.jump::after { content: ""; position: absolute; right: 24px; top: 50%; width: 8px; height: 8px; border-right: 1.6px solid; border-bottom: 1.6px solid; transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.now-card { display: flex; flex-direction: column; }
.now-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.now-meta { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 15px; }
.years { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: auto; padding-top: 22px; }
.year { background: var(--card); border-radius: 999px; text-align: center; padding: 18px 2px 16px; }
.year b { display: block; font-weight: 400; font-size: 19px; }
.year span { font-size: 12px; color: var(--text-muted); }
.year.on { background: var(--accent); }
.year.on span { color: var(--text-soft); }
.dots { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 14px; position: relative; align-items: center; }
.dots::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--ref-ink-400); opacity: .5; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ref-ink-400); justify-self: center; position: relative; }
.dots i.on { width: 10px; height: 10px; background: var(--ref-ink-900); }

/* Career roadmap (gantt) */
.road-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.gantt { margin-top: 24px; }
.gantt .rows { position: relative; display: grid; gap: 8px; }
.gantt .rows::before {
  content: ""; position: absolute; inset: -6px 0;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 20%);
  pointer-events: none;
}
.g-row { position: relative; height: 38px; }
.g-bar {
  position: absolute; top: 0; bottom: 0; left: var(--s); width: var(--w);
  border-radius: 999px; background: var(--card-soft); display: flex; align-items: center; padding: 0 14px;
  font-size: 14px; white-space: nowrap; overflow: hidden;
}
.g-bar.sage { background: var(--card-sage); color: #fff; }
.g-bar.lime { background: var(--accent); }
.g-bar.ongoing { background: repeating-linear-gradient(135deg, var(--accent) 0 7px, var(--accent-soft) 7px 14px); }
.g-label { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-size: 14px; white-space: nowrap; color: var(--text-soft); }
.g-label.after { left: calc(var(--s) + var(--w) + 10px); }
.g-label.before { right: calc(100% - var(--s) + 10px); }
/* Date tooltip: shows on hovering a bar or its label, or on keyboard focus of the row */
.g-row:focus-visible { outline: none; }
.g-row:focus-visible .g-bar { outline: 2px solid var(--ref-ink-900); outline-offset: 3px; }
.g-tip {
  position: absolute; z-index: 3; bottom: calc(100% + 6px); left: var(--s);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  background: var(--ref-ink-900); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 20px -10px rgba(15,16,14,.5);
  opacity: 0; translate: 0 4px; transition: opacity .18s ease, translate .25s cubic-bezier(.34, 1.6, .5, 1);
}
.g-tip.end { left: auto; right: calc(100% - var(--s) - var(--w)); }
.g-bar:hover ~ .g-tip, .g-label:hover ~ .g-tip, .g-row:focus-visible .g-tip { opacity: 1; translate: 0 0; }
.g-bar, .g-label { cursor: default; }
@media (prefers-reduced-motion: reduce) { .g-tip { transition: none; translate: none; } }
.g-today { position: absolute; top: -12px; bottom: -6px; left: var(--t); width: 2px; background: var(--ref-ink-900); }
.g-today::before { content: ""; position: absolute; top: -7px; left: -5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ref-ink-900); background: var(--card); }
.g-axis { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 14px; font-size: 14px; color: var(--text-soft); }
.g-axis span:last-child { font-weight: 600; color: var(--text); }

.minis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-content: stretch; }
/* stacks fill the height of the career roadmap next to them */
.mini-stack { display: grid; gap: var(--gap); grid-template-rows: auto 1fr; }
.mini-stack:last-child { grid-template-rows: 1fr 1fr; }
.mini-stack:first-child { grid-template-rows: auto 1fr auto; }
.minis a { text-decoration: none; color: inherit; transition: transform .25s ease; }
.minis a:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .minis a:hover { transform: none; } }
.tenure { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 999px; background: var(--card-soft); }
.tenure .circle { width: 58px; height: 58px; font-size: 28px; font-weight: 300; }
.tenure b { font-weight: 500; font-size: 17px; display: block; line-height: 1.15; }
.tenure span { font-size: 14px; color: var(--text-soft); }

.score { min-height: 230px; display: flex; flex-direction: column; }
.score svg { margin-top: auto; width: calc(100% + 2 * var(--pad)); max-width: none; margin-left: calc(var(--pad) * -1); margin-bottom: calc(var(--pad) * -1); height: 110px; }
.badge { position: absolute; right: 18px; top: 98px; background: #fff; color: var(--text); border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 500; }
.disc { display: flex; flex-direction: column; gap: 6px; }
.disc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.disc .circle { width: 36px; height: 36px; flex: none; }
.disc .big-num { font-size: clamp(36px, 3.2vw, 44px); margin-top: 4px; }
.disc .label { color: var(--text-soft); }
.disc-sub { font-size: 14px; line-height: 1.25; color: var(--text-soft); }

.adopt { display: flex; flex-direction: column; min-height: 168px; }
.adopt .circle { width: 48px; height: 48px; background: var(--card); border: 0; }
.adopt .big-num { margin-top: auto; padding-top: 16px; }
.adopt .big-num small { font-size: .55em; opacity: .75; }

.quest { display: grid; grid-template-columns: 1fr 1fr; min-height: 168px; text-decoration: none; padding: 0; }
.quest .txt { padding: 16px 0 16px 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.quest .circle { width: 40px; height: 40px; }
.quest .txt b { font-weight: 600; display: block; font-size: 17px; line-height: 1.1; }
.quest .txt span { font-size: 14px; line-height: 1.2; }
.quest img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- Sections ---------------- */
section, article { scroll-margin-top: 84px; }
.sec { padding-top: 80px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 20px; }
.sec-head h2 { font-weight: 400; font-size: clamp(38px, 4.4vw, 60px); letter-spacing: -.035em; line-height: 1; }
.sec-head p { color: var(--text-soft); max-width: 36ch; text-align: right; }

/* Work cards */
.work { text-decoration: none; display: flex; flex-direction: column; gap: 18px; transition: transform .25s ease; }
.work:hover { transform: translateY(-3px); }
.work .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.work h3 { font-weight: 400; font-size: clamp(22px, 2vw, 28px); line-height: 1.12; letter-spacing: -.02em; }
.work p { color: var(--text-soft); font-size: 15px; }
.card.sage.work p, .card.sage .num { color: #f1f4ee; }
.work .go { width: 42px; height: 42px; }
.num { font-size: 13px; color: var(--text-muted); }
.card.dark .num { color: var(--text-on-dark-soft); }
.card.accent .num { color: var(--text-soft); }

.modes { display: grid; gap: 8px; }
.mode { display: flex; justify-content: space-between; align-items: center; background: var(--card); border-radius: 999px; padding: 7px 7px 7px 16px; font-size: 14px; }
.toggle { width: 38px; height: 22px; border-radius: 999px; background: var(--ref-ink-900); position: relative; flex: none; }
.toggle::after { content: ""; position: absolute; right: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }

.devices { display: grid; grid-template-columns: 1.7fr 1fr .65fr; gap: 10px; align-items: end; }
.dev { border: 1.5px solid var(--text-on-dark-soft); border-radius: 10px; display: grid; place-items: center; color: var(--text-on-dark); }
.dev.tv { aspect-ratio: 16/9; font-size: 40px; } .dev.land { aspect-ratio: 4/3; font-size: 26px; } .dev.port { aspect-ratio: 3/4; font-size: 18px; }

/* Case studies */
.case { padding-top: 72px; }
.eyebrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.case .intro { font-size: 19px; line-height: 1.45; color: var(--text-soft); margin-top: 18px; max-width: 56ch; }
.card.dark .intro { color: var(--text-on-dark-soft); }
.facts dl { display: grid; gap: 14px; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.facts dd { font-size: 15px; line-height: 1.4; margin-top: 2px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; min-height: 170px; }
.stat p:last-child { font-size: 15px; color: var(--text-soft); margin-top: 14px; }
.card.dark.stat p:last-child { color: var(--text-on-dark-soft); }
.card.sage.stat p:last-child { color: #f1f4ee; }
.prose h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 500; margin-bottom: 12px; }
.card.dark .prose h3 { color: var(--text-on-dark-soft); }
.card.accent .prose h3 { color: var(--text-soft); }
.prose p { font-size: 16px; line-height: 1.6; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose ul { padding-left: 1.1em; }
.prose li + li { margin-top: 6px; }
.steps { list-style: none; display: grid; gap: 8px; }
.steps li { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--card); border-radius: 999px; padding: 8px 8px 8px 18px; font-size: 15px; }
.steps li span:last-child { background: var(--card-soft); padding: 5px 11px; border-radius: 999px; font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.reframe { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin-top: 20px; }
.reframe > div { border-radius: var(--r-inner); padding: 20px; }
.reframe .from { border: 1.5px dashed var(--ref-ink-400); }
.reframe .to { background: var(--accent); }
.reframe .arrow { display: grid; place-items: center; padding: 0; }
.reframe small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 6px; }
.reframe .to small { color: var(--text-soft); }
.reframe p { font-size: 21px; line-height: 1.25; letter-spacing: -.01em; }
.note { display: flex; gap: 16px; align-items: center; }
.note .circle { width: 46px; height: 46px; }

.layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.layers div { background: var(--ref-ink-800); border-radius: 14px; padding: 14px; font-size: 14px; }
.layers small { display: block; color: var(--accent); font-size: 12px; margin-bottom: 4px; }

/* AI second brain */
.cmds { display: grid; gap: 8px; }
.cmd { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--ref-ink-800); border-radius: 999px; padding: 6px 16px 6px 6px; font-size: 14px; }
.cmd code { background: var(--accent); color: var(--text); border-radius: 999px; padding: 7px 0; text-align: center; font: 500 13px ui-monospace, Menlo, monospace; }
.cmd span { color: var(--text-on-dark-soft); }
.layer3 { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.layer3 > div { background: var(--card); border-radius: var(--r-inner); padding: 18px; min-height: 128px; height: 100%; }
.layer3 b { display: block; font-weight: 500; font-size: 19px; margin-bottom: 6px; }
.layer3 p { font-size: 14px; color: var(--text-soft); }
.layer3 .arr { color: var(--text-muted); font-size: 20px; }
.logview { font: 13px/1.8 ui-monospace, Menlo, monospace; color: var(--text-on-dark-soft); }
.logview b { color: var(--accent); font-weight: 400; }
.logview i { color: #fff; font-style: normal; }
.rules { list-style: none; display: grid; gap: 12px; }
.rules li { display: flex; gap: 12px; align-items: start; font-size: 16px; }
.rules li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--ref-ink-900) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5' fill='none' stroke='%23e4fb6c' stroke-width='2'/%3E%3C/svg%3E") center/22px no-repeat; }
.vault-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.vault-stats div { background: var(--card-soft); border-radius: var(--r-inner); padding: 14px 16px; }
.card.accent .vault-stats div { background: rgba(255,255,255,.55); }
.vault-stats b { display: block; font-weight: 300; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.vault-stats span { font-size: 13px; color: var(--text-soft); }
.graph { display: flex; flex-direction: column; }
.graph img { flex: 1; min-height: 240px; width: 100%; object-fit: contain; }

/* Motion walls */
.walls { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
.wall { text-decoration: none; padding: 10px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s ease; }
.wall:hover { transform: translateY(-3px); }
.wall img { border-radius: var(--r-inner); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.wall span { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 6px; font-size: 15px; font-weight: 500; }
.wall span em { font-style: normal; font-size: 13px; color: var(--text-muted); font-weight: 400; }
.process { list-style: none; display: grid; gap: 10px; counter-reset: p; }
.process li { counter-increment: p; display: flex; gap: 12px; align-items: start; font-size: 15px; }
.process li::before { content: counter(p); flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ref-ink-900); color: var(--accent); display: grid; place-items: center; font-size: 13px; }

/* Principles / teaching / about */
.quote { min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; }
.quote p { font-size: clamp(22px, 2.1vw, 28px); line-height: 1.15; letter-spacing: -.02em; }
.quote cite { display: block; margin-top: 22px; font-style: normal; font-size: 13px; color: var(--text-muted); }
.card.dark.quote cite { color: var(--text-on-dark-soft); }
.card.accent.quote cite { color: var(--text-soft); }
.bars { margin-top: 18px; display: grid; gap: 8px; }
.bar { height: 14px; border-radius: 999px; background: var(--card); position: relative; overflow: hidden; margin-bottom: 6px; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.bar.b i { width: calc(1.86 / 5 * 100%); background: var(--card-sage); }
.bar.a i { width: calc(3.17 / 5 * 100%); background: var(--ref-ink-900); }
.guide { display: flex; justify-content: space-between; align-items: center; background: var(--card-soft); border-radius: 999px; padding: 6px 6px 6px 18px; text-decoration: none; font-size: 15px; margin-top: 8px; }
.guide .circle { width: 38px; height: 38px; }
.timeline { list-style: none; display: grid; gap: 8px; }
.timeline li { display: flex; justify-content: space-between; gap: 12px; background: var(--card); border-radius: 999px; padding: 11px 18px; font-size: 15px; }
.timeline li b { font-weight: 500; }
.timeline li span { color: var(--text-muted); white-space: nowrap; }
.timeline li.on { background: var(--accent); }
.timeline li.on span { color: var(--text-soft); }

.foot { margin: 80px 0 0; }
.foot .card.accent { padding: 40px; display: flex; flex-direction: column; gap: 28px; min-height: 300px; }
.foot h2 { font-weight: 400; font-size: clamp(32px, 6vw, 84px); line-height: 1; letter-spacing: -.035em; overflow-wrap: anywhere; }
.foot h2 a { text-decoration: none; }
.foot .row { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-top: auto; }
.foot .links { display: flex; gap: 10px; flex-wrap: wrap; }
.copy { text-align: center; font-size: 13px; color: var(--ref-ink-600); padding: 18px 0 30px; }
.ph { background: rgba(255,255,255,.7); outline: 1px dashed var(--ref-ink-400); border-radius: 4px; padding: 0 4px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1040px) {
  .tabs { display: none; }
  .s4 { grid-column: span 6; }
  .s5, .s6, .s7, .s8 { grid-column: span 12; }
  .walls { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  :root { --pad: 20px; --r-card: 26px; --gap: 12px; }
  .wrap { padding: 0 12px; }
  .s4, .s5, .s6, .s7, .s8 { grid-column: span 12; }
  .who { padding-right: 0; margin-top: 64px; }
  .minis { grid-template-columns: 1fr; }
  .walls { grid-template-columns: 1fr 1fr; }
  .reframe, .layer3 { grid-template-columns: 1fr; }
  .reframe .arrow, .layer3 .arr { transform: rotate(90deg); justify-self: center; }
  .layers { grid-template-columns: 1fr 1fr; }
  .sec-head { flex-direction: column; align-items: start; }
  .sec-head p { text-align: left; }
  .g-label, .g-bar { font-size: 12px; }
  .g-bar { padding: 0 10px; }
  .cmd { grid-template-columns: 82px 1fr; }
  .steps li { border-radius: 18px; }
  .timeline li { flex-direction: column; gap: 0; border-radius: 18px; }
  .foot .card.accent { padding: 26px; }
}

.work p.big-num { font-size: clamp(44px, 4.4vw, 60px); color: inherit; }

/* Homepage MedPark card: desktop screen + phone overlap */
.mp-shots { position: relative; padding: 0 0 40px 0; margin-right: 8%; }
.mp-shots .browser img { display: block; width: 100%; height: auto; }
.mp-shots .phone-shot { position: absolute; right: -10%; bottom: 0; width: 30%; max-width: 190px; border-radius: 22px; box-shadow: 0 18px 40px rgba(15, 16, 14, .22); }
.mp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-muted); }
.mp-legend b { font-weight: 500; color: var(--text-soft); }

/* Profile card: case navigation buttons */
.profile .row { align-items: flex-end; }
.case-nav { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.case-nav-lbl { font-size: 13px; color: var(--text-soft); margin-right: 2px; }
.case-nav a { position: relative; font-size: 14px; text-decoration: none; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.45); border: 1px solid rgba(0,0,0,.14); color: var(--text); transition: background .2s, color .2s; white-space: nowrap; }
.case-nav a:hover, .case-nav a:focus-visible { background: var(--ref-ink-900); color: #fff; border-color: var(--ref-ink-900); }
/* Jump-to tooltip: shows on hover or keyboard focus, sits above the pill */
.cn-tip {
  position: absolute; z-index: 5; bottom: calc(100% + 8px); left: 50%; translate: calc(-50% + var(--dx, 0px)) 4px;
  width: max-content; max-width: 240px; white-space: normal; text-align: left;
  padding: 8px 12px; border-radius: 12px; pointer-events: none;
  background: var(--ref-ink-900); color: #fff; font-size: 13px; line-height: 1.35;
  box-shadow: 0 8px 20px -10px rgba(15,16,14,.5);
  opacity: 0; visibility: hidden; transition: opacity .18s ease, translate .25s cubic-bezier(.34, 1.6, .5, 1), visibility .18s;
}
.cn-tip::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.case-nav a:hover .cn-tip, .case-nav a:focus-visible .cn-tip { pointer-events: auto; opacity: 1; visibility: visible; translate: calc(-50% + var(--dx, 0px)) 0; }
.case-nav a.tip-off .cn-tip { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .cn-tip { transition: none; } }

/* Skill highlights card */
.skills-card { display: flex; flex-direction: column; }
.skill-groups { display: grid; gap: 14px; margin-top: auto; padding-top: 20px; }
.sg-lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 8px; }
.sk { display: flex; flex-wrap: wrap; gap: 6px; }
.sk span { font-size: 14px; padding: 7px 13px; border-radius: 999px; background: var(--card); color: var(--text); white-space: nowrap; }
.sk span.on { background: var(--accent); }
.sk span.ink { background: var(--ref-ink-900); color: #fff; }

/* ---------------- Side projects: ticket cards ---------------- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.side-stage {
  background: var(--card-dark);
  border-radius: var(--r-card);
  overflow: hidden;
}
.tickets {
  list-style: none;
  display: flex;
  align-items: flex-start;
  padding: 64px 48px 72px;
}
/* one row; each ticket tucks slightly under the next */
.tickets > .ticket { flex: 1 1 0; min-width: 0; position: relative; z-index: 1; }
.tickets > .ticket + .ticket { margin-left: -14px; }
.tickets .paper { padding-right: 26px; }
.tickets > .ticket:hover, .tickets > .ticket:focus-within { z-index: 5; }
.tickets .t-no { font-size: clamp(30px, 3vw, 40px); }
.tickets .t-rows dt, .tickets .t-rows dd { font-size: 14px; }
.ticket a { display: block; text-decoration: none; color: var(--text); border-radius: 26px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.ticket.t1 a { transform: rotate(-5deg); }
.ticket.t2 { margin-top: 64px; }
.ticket.t2 a { transform: rotate(4deg); }
.ticket.t3 { margin-top: 18px; }
.ticket.t3 a { transform: rotate(-2.5deg); }
.ticket.t4 { margin-top: 40px; }
.ticket.t4 a { transform: rotate(3deg); }
.ticket a:hover { transform: rotate(0) translateY(-6px); }
.ticket a:focus-visible { transform: none; outline: 3px solid var(--accent); outline-offset: 6px; }

.paper { background: var(--card); padding: 22px 22px 26px; }
.paper img, .paper video { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; margin: 14px 0; }

/* each ticket gets its own cut-outs, like a punched stub */
.t4 .paper {
  border-radius: 18px;
  -webkit-mask: radial-gradient(20px at 0 62%, #0000 calc(100% - .5px), #000 100%) left / 51% 100% no-repeat,
                radial-gradient(20px at 100% 62%, #0000 calc(100% - .5px), #000 100%) right / 51% 100% no-repeat;
          mask: radial-gradient(20px at 0 62%, #0000 calc(100% - .5px), #000 100%) left / 51% 100% no-repeat,
                radial-gradient(20px at 100% 62%, #0000 calc(100% - .5px), #000 100%) right / 51% 100% no-repeat;
}
.t1 .paper {
  border-radius: 6px;
  -webkit-mask: radial-gradient(24px at 0 44%, #0000 calc(100% - .5px), #000 100%) left / 51% 100% no-repeat,
                radial-gradient(24px at 100% 44%, #0000 calc(100% - .5px), #000 100%) right / 51% 100% no-repeat;
          mask: radial-gradient(24px at 0 44%, #0000 calc(100% - .5px), #000 100%) left / 51% 100% no-repeat,
                radial-gradient(24px at 100% 44%, #0000 calc(100% - .5px), #000 100%) right / 51% 100% no-repeat;
}
.t2 .paper {
  border-radius: 28px;
  padding-top: 30px;
  -webkit-mask: radial-gradient(34px at 0 0, #0000 calc(100% - .5px), #000 100%) top left / 51% 51% no-repeat,
                radial-gradient(34px at 100% 0, #0000 calc(100% - .5px), #000 100%) top right / 51% 51% no-repeat,
                linear-gradient(#000 0 0) bottom / 100% 50% no-repeat;
          mask: radial-gradient(34px at 0 0, #0000 calc(100% - .5px), #000 100%) top left / 51% 51% no-repeat,
                radial-gradient(34px at 100% 0, #0000 calc(100% - .5px), #000 100%) top right / 51% 51% no-repeat,
                linear-gradient(#000 0 0) bottom / 100% 50% no-repeat;
}
.t2 .t-no { text-align: center; }
.t3 .paper {
  border-radius: 6px;
  padding-top: 54px;
  -webkit-mask: radial-gradient(46px at 50% 0, #0000 calc(100% - .5px), #000 100%) top / 100% 51% no-repeat,
                radial-gradient(22px at 0 100%, #0000 calc(100% - .5px), #000 100%) bottom left / 51% 50% no-repeat,
                radial-gradient(22px at 100% 100%, #0000 calc(100% - .5px), #000 100%) bottom right / 51% 50% no-repeat;
          mask: radial-gradient(46px at 50% 0, #0000 calc(100% - .5px), #000 100%) top / 100% 51% no-repeat,
                radial-gradient(22px at 0 100%, #0000 calc(100% - .5px), #000 100%) bottom left / 51% 50% no-repeat,
                radial-gradient(22px at 100% 100%, #0000 calc(100% - .5px), #000 100%) bottom right / 51% 50% no-repeat;
}

.t-no { font-weight: 300; font-size: clamp(40px, 4.2vw, 58px); letter-spacing: -.045em; line-height: .95; }
.t-no span:not(.vh) { font-style: italic; margin-left: .06em; white-space: nowrap; }
.t-rows { margin-top: 12px; }
.t-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--text); }
.t-rows dt { font-weight: 600; font-size: 15px; }
.t-rows dd { font-weight: 300; font-size: 15px; text-align: right; color: var(--text-soft); }

.ribbon {
  display: flex; gap: 48px; overflow: hidden; white-space: nowrap;
  background: var(--accent); color: var(--text);
  padding: 10px 24px; font-size: clamp(26px, 3vw, 38px); font-weight: 300; letter-spacing: -.03em; line-height: 1.2;
}
.ribbon b { font-weight: 600; }

@media (max-width: 960px) {
  .tickets { flex-direction: column; align-items: stretch; max-width: 420px; margin: 0 auto; gap: 40px; padding: 48px 28px 56px; }
  .tickets > .ticket + .ticket { margin-left: 0; }
  .tickets .t-no { font-size: clamp(40px, 10vw, 52px); }
  .ticket.t2, .ticket.t3, .ticket.t4 { margin-top: 0; }
  .ticket.t4 a { transform: rotate(2deg); }
  .ticket.t1 a { transform: rotate(-2.5deg); }
  .ticket.t2 a { transform: rotate(2deg); }
  .ticket.t3 a { transform: rotate(-1.5deg); }
}
@media (max-width: 640px) {
  .tickets { padding: 36px 22px 44px; }
}
