/* Nikko Eka Saputra — portfolio styles
   Layout: hero, project catalog, one full-bleed tinted band per product (Cerebrum's band carries the
   platform map), career timeline, stack panel, contact. Colours are tokens; dark theme follows the OS. */
:root {
  --bg: #ECEEF1;
  --surface: #F8F9FB;
  --ink: #14171C;
  --muted: #555C67;
  --line: #D3D8DF;
  --device: #111318;
  --device-edge: #2A2E36;
  --scrim: rgba(12, 14, 18, 0.82);
  --shadow: 0 18px 40px -18px rgba(20, 23, 28, 0.35);
  --tint: 13%;
  --pc-ink-amt: 64%;
  --pc-ink-to: #000;
  --line-strong: #B4BCC7;
  --dim: #767D88;
  --chip: #E3E7EC;
  --t-mobile: #1F6DB5;
  --t-backend: #B9521F;
  --t-web: #2A8045;
  --t-infra: #7D45B3;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1200px;
  --wa: #1FAF55;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111317;
    --surface: #1A1D23;
    --ink: #EDEFF2;
    --muted: #A0A7B2;
    --line: #2B3038;
    --device: #050608;
    --device-edge: #343944;
    --scrim: rgba(0, 0, 0, 0.86);
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    --tint: 20%;
    --pc-ink-amt: 58%;
    --pc-ink-to: #fff;
    --line-strong: #414753;
    --dim: #7D8490;
    --chip: #242830;
    --t-mobile: #6DB3F2;
    --t-backend: #F0956A;
    --t-web: #86CF9C;
    --t-infra: #C6A6EE;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111317;
  --surface: #1A1D23;
  --ink: #EDEFF2;
  --muted: #A0A7B2;
  --line: #2B3038;
  --device: #050608;
  --device-edge: #343944;
  --scrim: rgba(0, 0, 0, 0.86);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  --tint: 20%;
  --pc-ink-amt: 58%;
  --pc-ink-to: #fff;
  --line-strong: #414753;
  --dim: #7D8490;
  --chip: #242830;
  --t-mobile: #6DB3F2;
  --t-backend: #F0956A;
  --t-web: #86CF9C;
  --t-infra: #C6A6EE;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.wrap {
  max-width: calc(var(--wrap) + 32px);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- top bar ---------- */
/* sticky header: translucent page colour + blur; hairline appears once the page has scrolled */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 30;
  padding-block: 16px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.topbar.scrolled { border-bottom-color: var(--line); }
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 31;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 22px; font-size: 0.95rem; }
.topnav a { text-decoration: none; color: var(--muted); }
.topnav a:hover { color: var(--ink); }
/* WhatsApp CTA: same chat link in the nav and the hero */
.wa-ico { width: 18px; height: 18px; flex: none; color: var(--wa); }
.topnav .nav-wa {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px 6px 10px;
  border: 1px solid color-mix(in oklab, var(--wa) 55%, var(--line));
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
}
.topnav .nav-wa:hover { background: color-mix(in oklab, var(--wa) 14%, transparent); }
.btn.ghost.wa-link { border-color: color-mix(in oklab, var(--wa) 60%, var(--ink)); }
.btn.ghost.wa-link:hover { background: color-mix(in oklab, var(--wa) 14%, transparent); }
.wa-fab {
  position: fixed;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden;
  transform: translateY(16px) scale(.9);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.wa-fab.show { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease, visibility 0s; }
.wa-fab:hover { transform: translateY(-2px); }
.wa-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wa-fab .wa-ico { width: 28px; height: 28px; color: #fff; }
/* "back to the catalog" pill, shown only while reading the project bands; centred at the bottom */
.to-work {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  z-index: 40;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px 9px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 0.86rem; font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.to-work.show { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .25s ease, visibility 0s; }
.to-work:hover { background: var(--bg); }
.to-work:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.to-work svg { width: 16px; height: 16px; }
/* mobile header: wordmark + WhatsApp icon + hamburger; links move into a drop-down panel */
.menu-btn {
  display: none;
  width: 40px; height: 40px; padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 10px;
  color: var(--ink);
}
.menu-btn svg { width: 22px; height: 22px; }
/* theme toggle: shows the moon in light mode, the sun in dark mode */
.theme-btn {
  width: 34px; height: 34px; padding: 0;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.theme-btn:hover { border-color: var(--ink); }
.theme-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.menu-btn path { transition: transform .2s ease, opacity .2s ease; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] .mb-top { transform: translateY(5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .mb-mid { opacity: 0; }
.menu-btn[aria-expanded="true"] .mb-bot { transform: translateY(-5px) rotate(-45deg); }
.menu-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.mobile-menu { border-top: 1px solid var(--line); margin-top: 16px; margin-bottom: -16px; background: var(--bg); }
.mobile-menu .wrap { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-items: stretch; padding-block: 8px 24px; }
.topbar:has(.mobile-menu:not([hidden])) { background: var(--bg); border-bottom-color: var(--line); }
.mobile-menu a:not(.btn) {
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
}
.mobile-menu .mm-wa { margin-top: 16px; justify-content: center; }
@media (max-width: 720px) {
  .topbar .wrap { gap: 10px; }
  .wordmark { white-space: nowrap; margin-right: auto; }
  .topnav a:not(.nav-wa) { display: none; }
  .topnav .nav-wa { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 10px; }
  .theme-btn { width: 40px; height: 40px; }
  .topnav { gap: 10px; }
  .topnav .nav-wa span { display: none; }
  .menu-btn { display: inline-grid; }
}
@media (min-width: 721px) { .mobile-menu { display: none !important; } }

/* ---------- hero ---------- */
.hero { padding-block: 28px 40px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 22px 48px;
  align-items: end;
}
/* role on the left, location on the right, one shared line above text and photo */
.hero-top { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
.hero-text { min-width: 0; display: grid; gap: 22px; }
.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
  text-wrap: balance;
  font-variation-settings: "opsz" 96;
}
.hero .headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2.3vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  max-width: 30ch;
  text-wrap: balance;
}
.hero .summary { color: var(--muted); max-width: 62ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn-ico { width: 18px; height: 18px; flex: none; }
.hero-skills { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: -6px 0 0; padding: 0; }
.hero-skills li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
.stat { padding: 18px 16px 0 0; display: grid; gap: 4px; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--line); }
.stat b {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 0.86rem; color: var(--muted); line-height: 1.35; }

.portrait { position: relative; justify-self: end; width: min(100%, 360px); }
.portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 16px;
  background: var(--surface);
}
.now {
  position: absolute;
  left: -36px;
  bottom: 28px;
  max-width: calc(100% + 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 0.84rem;
  line-height: 1.4;
}
.now .eyebrow { font-size: 0.68rem; display: block; margin-bottom: 4px; }
.now strong { display: block; font-weight: 600; }
.now span { color: var(--muted); display: block; }
.now .co { white-space: nowrap; }

/* ---------- device frames ---------- */
.phone {
  background: var(--device);
  border: 1px solid var(--device-edge);
  border-radius: 26px;
  padding: 7px;
  box-shadow: var(--shadow);
}
.phone img { width: 100%; height: auto; border-radius: 19px; }
/* fan phones share one height per band: --ar is the shortest screen's ratio, set by script once images load */
.fan[style*="--ar"] .phone img { aspect-ratio: var(--ar); object-fit: cover; object-position: top center; }
.browser {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.browser .bar {
  display: flex; align-items: center; gap: 6px;
  height: 26px; padding-inline: 10px;
  border-bottom: 1px solid var(--line);
}
.browser .bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser img { width: 100%; height: auto; }

.shot { background: none; border: 0; padding: 0; display: block; text-align: left; }
.shot:focus-visible { outline-offset: 6px; border-radius: 26px; }

/* ---------- work intro ---------- */
.work-intro {
  padding-block: clamp(64px, 8vw, 96px);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.work-intro .wrap { display: grid; gap: 18px; }
.work-intro h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.work-intro p { color: var(--muted); max-width: 60ch; }
/* catalog: compact 4-up index; each card jumps to its full band below */
.catalog {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.cat-card {
  --pc: var(--ink);
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s ease, transform .2s ease;
}
.cat-card:hover { border-color: color-mix(in oklab, var(--pc) 70%, var(--line)); transform: translateY(-3px); }
.cat-card:focus-visible { outline: 2px solid var(--pc); outline-offset: 3px; }
.cat-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  background: color-mix(in oklab, var(--pc) calc(var(--tint) + 6%), var(--bg));
  display: flex; justify-content: center; align-items: flex-start;
}
.cat-thumb img {
  margin-top: 14px;
  width: 68%;
  max-width: 220px;
  height: auto;
  border: 4px solid var(--device);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow);
  transition: transform .3s ease;
}
.cat-thumb.web img {
  width: 92%; max-width: 420px;
  height: calc(100% - 14px);
  object-fit: cover; object-position: top left;
  border-width: 3px; border-radius: 8px 8px 0 0;
}
.cat-card:hover .cat-thumb img { transform: translateY(-4px); }
.cat-body { display: grid; gap: 6px; padding: 14px 16px 18px; }
.cat-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--muted);
}
.cat-meta::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--pc); flex: none; }
.cat-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.015em; line-height: 1.2; }
.cat-card p {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-year {
  justify-self: start;
  margin-top: 6px;
  padding: 2px 9px;
  border: 1px solid color-mix(in oklab, var(--pc) 35%, var(--line));
  background: color-mix(in oklab, var(--pc) 12%, var(--bg));
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.68rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cat-go { margin-top: 2px; font-size: 0.82rem; font-weight: 600; color: color-mix(in oklab, var(--pc) var(--pc-ink-amt), var(--pc-ink-to)); }
@media (max-width: 1180px) { .catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .cat-body { padding: 12px 12px 14px; } }
@media (max-width: 420px) { .cat-card p { -webkit-line-clamp: 3; } }

/* ---------- project bands ---------- */
.band {
  background: color-mix(in oklab, var(--pc) var(--tint), var(--bg));
  padding-block: clamp(56px, 8vw, 110px);
  scroll-margin-top: 0;
}
.band + .band { border-top: 1px solid color-mix(in oklab, var(--pc) 22%, var(--bg)); }
.band .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.band.flip .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.band.flip .band-text { order: 2; }
.band.flip .band-shots { order: 1; }
.band-text { min-width: 0; display: grid; gap: 18px; align-content: start; }
.band .meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 0.84rem; font-weight: 600;
  color: color-mix(in oklab, var(--pc) var(--pc-ink-amt), var(--pc-ink-to));
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.band .meta span + span::before { content: "/"; margin-right: 14px; opacity: .5; }
.band h3 {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: color-mix(in oklab, var(--pc) var(--pc-ink-amt), var(--pc-ink-to));
  text-wrap: balance;
}
.band .full { font-size: 0.92rem; color: var(--muted); margin-top: -8px; }
.band .tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.band .desc { color: var(--muted); font-size: 1rem; }
.metric {
  display: flex; align-items: baseline; gap: 14px;
  padding-block: 4px;
}
.metric b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: color-mix(in oklab, var(--pc) var(--pc-ink-amt), var(--pc-ink-to));
  font-variant-numeric: tabular-nums;
}
.metric span { font-size: 0.95rem; color: var(--muted); line-height: 1.3; }
.impact {
  border-left: 3px solid color-mix(in oklab, var(--pc) 70%, var(--bg));
  padding-left: 16px;
  font-size: 0.98rem;
  max-width: 60ch;
}
.impact .eyebrow { display: block; margin-bottom: 4px; font-size: 0.7rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills li {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: color-mix(in oklab, var(--pc) 9%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--pc) 28%, var(--line));
}
.integrations { font-size: 0.86rem; color: var(--muted); }
.integrations b { color: var(--ink); font-weight: 600; }

.band-shots { min-width: 0; display: grid; gap: 0; justify-items: center; }

/* fan: rotated, overlapping phones */
.fan { display: flex; justify-content: center; align-items: flex-start; padding-block: 28px; }
.fan .shot { width: clamp(150px, 17vw, 228px); flex: none; transition: transform .25s ease; position: relative; }
.fan .shot + .shot { margin-left: -46px; }
.fan .shot:nth-child(1) { transform: rotate(-6deg) translateY(22px); z-index: 1; }
.fan .shot:nth-child(2) { transform: translateY(-6px); z-index: 3; }
.fan .shot:nth-child(3) { transform: rotate(6deg) translateY(26px); z-index: 2; }
.fan .shot:hover, .fan .shot:focus-visible { z-index: 5; transform: translateY(-14px) rotate(0deg); }

/* web stack */
.webstack { width: 100%; display: grid; }
.webstack .shot { width: 100%; transition: transform .25s ease; }
.webstack .shot.secondary { width: 60%; justify-self: end; margin-top: -14%; margin-right: -12px; position: relative; z-index: 2; }
.webstack .shot.secondary:first-child { margin-top: 0; }
.webstack .shot:hover { transform: translateY(-6px); }
.webstack + .fan { margin-top: -36px; position: relative; z-index: 3; }

/* ---------- experience & skills ---------- */
.section { padding-block: 96px 24px; }
/* career and contact share the Selected work surface so the page alternates bg / surface */
#experience, .contact { background: var(--surface); border-top: 1px solid var(--line); }
#experience, #stack { padding-block: 96px; }
.section-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 28px;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- platform map (inside the Cerebrum band) ---------- */
.uth {
  max-width: calc(var(--wrap) + 32px);
  margin: clamp(48px, 6vw, 80px) auto 0;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
.uth-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  padding-top: clamp(36px, 5vw, 56px);
  border-top: 1px solid color-mix(in oklab, var(--pc) 30%, var(--line));
}
.uth-text { min-width: 0; display: grid; gap: 16px; align-content: start; }
.uth-text .mono-label { color: color-mix(in oklab, var(--pc) var(--pc-ink-amt), var(--pc-ink-to)); }
.uth h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.uth-text p { color: var(--muted); max-width: 52ch; font-size: 1rem; }
.uth-facts { display: grid; gap: 0; border-top: 1px solid color-mix(in oklab, var(--pc) 22%, var(--line)); max-width: 460px; }
.uth-facts div {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px;
  padding-block: 10px;
  border-bottom: 1px solid color-mix(in oklab, var(--pc) 22%, var(--line));
  font-size: 0.92rem;
}
.uth-facts dt { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.uth-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.uth-clock { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.uth-clock i { width: 7px; height: 7px; border-radius: 50%; background: var(--t-web); box-shadow: 0 0 0 3px color-mix(in oklab, var(--t-web) 25%, transparent); }

.diagram { min-width: 0; }
.diagram figure {
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in oklab, var(--pc) 22%, var(--line));
  border-radius: 14px;
  padding: 18px 16px 14px;
  box-shadow: var(--shadow);
}
.diagram figcaption { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.diagram figcaption span:last-child { text-transform: none; letter-spacing: 0; }
.diagram svg { width: 100%; height: auto; display: block; max-width: 480px; margin: 0 auto; overflow: visible; }
.d-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.d-box-strong { fill: var(--bg); stroke: var(--ink); stroke-width: 1.2; }
.d-box-infra { fill: color-mix(in oklab, var(--t-infra) 8%, var(--surface)); stroke: var(--t-infra); stroke-width: 1; stroke-dasharray: 3 3; }
.d-node { fill: var(--surface); stroke: color-mix(in oklab, var(--t-infra) 60%, var(--line)); stroke-width: 1; }
.d-tile { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; }
.d-tile-dot { fill: var(--muted); }
.d-tile-line { fill: var(--line-strong); }
.d-edge { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.d-edge.flow { stroke-dasharray: 4 5; animation: flow 1.1s linear infinite; }
.d-edge.dash { stroke: var(--t-infra); stroke-dasharray: 2 4; }
.d-arrow { fill: var(--muted); }
.d-arrow-infra { fill: var(--t-infra); }
.d-cap { font: 500 11px var(--font-mono); letter-spacing: .08em; fill: var(--dim); }
.d-cap.infra { fill: var(--t-infra); }
.d-text { font: 500 13px var(--font-text); fill: var(--ink); }
.d-big { font: 700 26px var(--font-display); letter-spacing: -0.02em; fill: var(--ink); }
.d-small { font: 400 11px var(--font-mono); fill: var(--muted); }
.d-tech { font: 600 14px var(--font-text); }
.t-mobile { fill: var(--t-mobile); } .t-backend { fill: var(--t-backend); } .t-web { fill: var(--t-web); } .t-infra { fill: var(--t-infra); }
.t-sep { fill: var(--dim); }
@keyframes flow { to { stroke-dashoffset: -18; } }

/* ---------- career timeline ---------- */
.timeline { display: grid; margin-top: 8px; }
.tl-item { display: grid; gap: 6px 32px; grid-template-columns: 200px minmax(0, 1fr); position: relative; }
.tl-when { font: 500 0.84rem/1.5 var(--font-mono); color: var(--muted); padding-top: 6px; font-variant-numeric: tabular-nums; }
.tl-when .dur { display: block; color: var(--dim); font-weight: 400; }
.tl-what { position: relative; padding: 0 0 48px 30px; border-left: 1px solid var(--line-strong); min-width: 0; }
.tl-item:last-child .tl-what { border-left-color: transparent; padding-bottom: 0; }
.tl-what::before {
  content: ""; position: absolute; left: -6px; top: 10px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink);
}
.tl-item.current .tl-what::before { background: var(--ink); }
.tl-what h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.35rem, 2.2vw, 1.6rem); letter-spacing: -0.02em; line-height: 1.2; }
.tl-org { font-weight: 600; color: var(--muted); margin-top: 2px; }
.tl-what > p.blurb { color: var(--muted); margin-top: 10px; font-size: 0.98rem; }
.tl-points { display: grid; gap: 8px; margin-top: 14px; font-size: 0.97rem; }
.tl-points li { display: flex; gap: 12px; }
.tl-points li::before { content: ""; width: 10px; height: 1px; background: var(--line-strong); margin-top: .85em; flex: none; }
.tl-item.edu .tl-what::before { border-style: dashed; }
.tl-item.edu h3 { font-size: 1.2rem; }

/* ---------- stack & practice ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  min-width: 0;
}
.stack-panel { display: flex; flex-direction: column; gap: 14px; }
.stack-panel > .mono-label { margin-bottom: 2px; }
.skill-g { display: grid; gap: 8px; }
.skill-g + .skill-g { padding-top: 14px; border-top: 1px solid var(--line); }
.skill-g .mono-label { font-size: 0.66rem; }
.skill-items { display: flex; flex-wrap: wrap; gap: 6px; }
.skill { font-size: 0.86rem; font-weight: 600; padding: 4px 10px; border-radius: 7px; background: var(--chip); }
.facts { display: grid; gap: 18px; align-content: start; }
.fact + .fact { padding-top: 18px; border-top: 1px solid var(--line); }
.facts .mono-label { display: block; margin-bottom: 2px; }
.fact { display: grid; gap: 4px; }
.fact strong { font-family: var(--font-display); font-weight: 650; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.25; }
.fact span { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

/* ---------- contact ---------- */
.contact { padding-block: 96px 56px; }
.contact h2 { text-wrap: balance; }
.contact-lines { border-top: 1px solid var(--line); }
.cline {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.cline .eyebrow { font-size: 0.72rem; }
.cline .val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  user-select: all;
  text-decoration: none;
}
.cline a.val { user-select: auto; }
.cline a.val:hover { text-decoration: underline; text-underline-offset: 4px; }
.copy {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.copy:hover { border-color: var(--ink); }
/* contact actions: two round icon buttons per row (copy, open the channel) */
.cline-actions { display: flex; gap: 8px; }
.ib {
  width: 40px; height: 40px; padding: 0;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.ib svg { width: 18px; height: 18px; }
.ib:hover { border-color: var(--ink); }
.ib:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ib.ok { border-color: var(--wa); color: var(--wa); }
.ib-wa { border-color: color-mix(in oklab, var(--wa) 55%, var(--line)); }
.ib-wa:hover { border-color: var(--wa); background: color-mix(in oklab, var(--wa) 14%, var(--bg)); }
footer { background: var(--surface); padding-block: 8px 80px; font-size: 0.85rem; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- lightbox ---------- */
dialog.lb {
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  margin: 0;
}
dialog.lb::backdrop { background: var(--scrim); }
.lb-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: calc(56px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}
.lb figure { display: grid; gap: 14px; justify-items: center; min-width: 0; max-height: 100%; }
.lb img {
  max-height: calc(100vh - 180px);
  width: auto;
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.lb figcaption { font-size: 0.92rem; text-align: center; color: rgba(255,255,255,.86); }
.lb figcaption b { font-family: var(--font-display); font-weight: 650; color: #fff; }
.lb figcaption a { color: #fff; }
.lb-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.25rem;
  display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(12px + env(safe-area-inset-right, 0px));
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .portrait { justify-self: start; width: min(100%, 300px); order: -1; }
  .hero-top { order: -2; }
  .now { left: auto; right: -12px; bottom: 18px; }
  .band .wrap, .band.flip .wrap { grid-template-columns: minmax(0, 1fr); }
  .band.flip .band-text { order: 1; }
  .band.flip .band-shots { order: 2; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .uth-grid { grid-template-columns: minmax(0, 1fr); }
  .tl-item { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tl-when { padding: 0 0 6px 30px; border-left: 1px solid var(--line-strong); }
  .tl-what::before { top: -22px; }
  .tl-what { padding-top: 2px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .topnav { gap: 14px; font-size: 0.88rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { padding-top: 18px; }
  .now { right: 8px; max-width: calc(100% - 16px); }
  .band-shots { justify-items: center; }
  /* keep the fanned phones on mobile, just smaller and tighter, instead of a scroll strip */
  .fan { padding-block: 16px 24px; }
  .fan .shot { width: min(36vw, 140px); }
  .fan .shot + .shot { margin-left: max(-12vw, -44px); }
  .fan .shot:nth-child(1) { transform: rotate(-6deg) translateY(16px); }
  .fan .shot:nth-child(3) { transform: rotate(6deg) translateY(18px); }
  .phone { border-radius: 18px; padding: 5px; }
  .phone img { border-radius: 13px; }
  .webstack .shot.secondary { width: 100%; margin: 14px 0 0; }
  .webstack + .fan { margin-top: 8px; }
  /* hero on phones: wide, shorter photo so the name shows sooner; full-width stacked buttons */
  .portrait { width: 100%; }
  .portrait img { aspect-ratio: 5 / 4; object-position: 50% 22%; }
  .actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .actions .btn { justify-content: center; }
  /* diagram: scroll sideways inside its own box at a readable size */
  .diagram figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .diagram svg { min-width: 460px; }
  .cline .val { font-size: 1rem; overflow-wrap: normal; word-break: normal; }
  .panel { padding: 20px 18px; }
  .uth-facts div { grid-template-columns: 92px minmax(0, 1fr); }
  .diagram figure { padding: 14px 10px 10px; }
  .cline { grid-template-columns: minmax(0, 1fr) auto; }
  .cline .eyebrow { grid-column: 1 / -1; }
  .lb-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .lb-prev, .lb-next { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .lb-prev { left: max(16px, env(safe-area-inset-left, 0px)); }
  .lb-next { right: max(16px, env(safe-area-inset-right, 0px)); }
  .lb img { max-height: calc(100vh - 230px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .d-edge.flow { stroke-dasharray: none; }
}
