/* =========================================================
   Francis Beasley · portfolio
   ========================================================= */

:root {
  --font-display: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  /* Title tuning for Geist. */
  --display-weight: 700;
  --display-track: -.05em;
  --display-scale: .97;
  --display-wdth: 100;
  --display-leading: .95;
  --font-ios: -apple-system, 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --radius: 20px;
  --radius-lg: 28px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  /* dark (default) */
  --bg: #0B0B0F;
  --bg-elev: #111117;
  --surface: #16161E;
  --surface-2: #1E1E28;
  --surface-3: #262632;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #F3F2EE;
  --muted: #9C9BA8;
  --faint: #62616F;
  --accent: #C8FF2E;
  --accent-ink: #0B0B0F;
  --accent-text: #C8FF2E;
  --accent-soft: rgba(200, 255, 46, .12);
  --violet: #9A88FF;
  --cyan: #3EE6D2;
  --danger: #FF5A5F;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, .65);
  --shadow-sm: 0 10px 30px -12px rgba(0, 0, 0, .5);
  --dotgrid: 255, 255, 255;
  --dotaccent: 200, 255, 46;
  --year-stroke: rgba(255, 255, 255, .42);
  color-scheme: dark;
}

:root[data-theme='light'] {
  --bg: #F2F0E9;
  --bg-elev: #F8F7F2;
  --surface: #FFFFFF;
  --surface-2: #EFEDE5;
  --surface-3: #E5E2D8;
  --line: rgba(17, 17, 20, .09);
  --line-strong: rgba(17, 17, 20, .18);
  --text: #121216;
  --muted: #5C5B66;
  --faint: #9897A2;
  --accent: #C8FF2E;
  --accent-ink: #0B0B0F;
  --accent-text: #3A6500;
  --accent-soft: rgba(110, 160, 0, .12);
  --violet: #5B45E0;
  --cyan: #0B8F80;
  --danger: #E0353B;
  --shadow: 0 30px 80px -24px rgba(40, 36, 20, .28);
  --shadow-sm: 0 10px 30px -14px rgba(40, 36, 20, .25);
  --dotgrid: 17, 17, 20;
  --dotaccent: 96, 150, 0;
  --year-stroke: rgba(17, 17, 20, .38);
  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
body.is-booting { overflow: hidden; }
img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
kbd {
  font: 500 .78em/1 var(--font-mono);
  padding: .28em .5em;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  white-space: nowrap;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }
.mono { font-family: var(--font-mono); }
/* Accent words in titles are two-tone. */
.serif { font-style: normal; color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (pointer: coarse) { .hide-touch { display: none !important; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px;
  border-radius: 999px;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .25s var(--spring), background-color .2s, color .2s, border-color .2s, box-shadow .25s;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(200, 255, 46, .55); }
.btn-primary:hover { box-shadow: 0 14px 40px -10px rgba(200, 255, 46, .75); }
.btn-ghost { border: 1px solid var(--line-strong); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 64px; padding: 0 30px; font-size: 18px; }
.btn[aria-disabled='true'] { opacity: .4; pointer-events: none; box-shadow: none; }
.link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }

.pill-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  font: 500 13px/1 var(--font-mono);
  transition: border-color .2s, background-color .2s, transform .2s var(--spring);
}
.pill-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pill-btn svg { width: 18px; height: 18px; }
.pill-btn kbd { border: 0; background: none; padding: 0; font-size: 12px; }
.pill-btn.icon-only { width: 38px; justify-content: center; padding: 0; }
.achv-btn.bump { animation: bump .6s var(--spring); }
@keyframes bump { 40% { transform: scale(1.18); border-color: var(--accent); } }

/* ---------- boot ---------- */
.boot {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(520px, 100% - 48px); font: 13px/1.8 var(--font-mono); color: var(--muted); }
.boot-log { min-height: 170px; }
.boot-log .ok { color: var(--accent-text); }
.boot-log strong { color: var(--text); font-weight: 500; }
.boot-bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 12px; }
.boot-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.boot-skip { margin-top: 14px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .14em; }

/* ---------- progress + nav ---------- */
.progress { position: fixed; left: 0; top: 0; z-index: 120; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  transition: background-color .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font: 800 14px/1 var(--font-display); letter-spacing: -.02em;
  transition: transform .4s var(--spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 8px 12px; border-radius: 999px;
  font-size: 14px; text-decoration: none; color: var(--muted);
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--surface); }
.nav-tools { display: flex; gap: 8px; align-items: center; }
@media (max-width: 1080px) { .nav-links { display: none; } }
@media (max-width: 520px) { .brand-name { display: none; } }

/* achievements */
.achv-panel {
  position: fixed; z-index: 110; top: calc(var(--nav-h) - 4px); right: var(--gutter);
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - var(--nav-h) - 24px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 20px; box-shadow: var(--shadow);
  padding: 16px;
  animation: pop .3s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.achv-head { display: grid; gap: 2px; margin-bottom: 12px; }
.achv-head .muted { font-size: 13px; }
.achv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.achv-list li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.achv-list .a-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--surface-3); filter: grayscale(1); opacity: .5; }
.achv-list li.got .a-icon { filter: none; opacity: 1; background: var(--accent-soft); }
.achv-list strong { display: block; font-size: 14px; font-weight: 600; }
.achv-list span { font-size: 12.5px; color: var(--muted); }
.achv-list li:not(.got) strong { color: var(--muted); }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 260; display: grid; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px;
  max-width: min(380px, calc(100vw - 32px));
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity .35s var(--ease-out), transform .45s var(--spring);
}
.toast.in { opacity: 1; transform: none; }
.toast-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 15px; flex: none; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 80px;
  display: grid; align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-glow {
  position: absolute; z-index: -1; left: 0; top: 0;
  width: 720px; height: 720px; margin: -360px 0 0 -360px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(200, 255, 46, .16), rgba(142, 123, 255, .08) 55%, transparent 72%);
  pointer-events: none; will-change: transform;
}
:root[data-theme='light'] .hero-glow { background: radial-gradient(closest-side, rgba(150, 210, 0, .2), rgba(91, 69, 224, .07) 55%, transparent 72%); }
.hero-inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  display: grid; justify-items: start;
}
.hero-hello { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 28px; padding: 6px 16px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); font-size: 14px; color: var(--muted); }
.hero-hello strong { color: var(--text); font-weight: 600; }
.hero-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-variation-settings: 'wdth' var(--display-wdth), 'opsz' 96;
  font-size: calc(clamp(46px, 7.8vw, 140px) * var(--display-scale));
  line-height: var(--display-leading);
  letter-spacing: var(--display-track);
  word-spacing: .04em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-title .line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease-out); }
.hero-title.in .line > span { transform: none; }
.hero-title .line:nth-child(2) > span { transition-delay: .08s; }
.hero-title .line:nth-child(3) > span { transition-delay: .16s; }
.hero-title .line:nth-child(4) > span { transition-delay: .24s; }
.think {
  position: relative;
  background: linear-gradient(100deg, var(--accent) 0%, var(--cyan) 40%, var(--violet) 70%, var(--accent) 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
:root[data-theme='light'] .think { background-image: linear-gradient(100deg, #5C9A00 0%, var(--cyan) 40%, var(--violet) 70%, #5C9A00 100%); }
@keyframes shimmer { to { background-position: -250% 0; } }
.hero-foot { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: end; margin-top: clamp(32px, 5vh, 56px); padding-top: 28px; border-top: 1px solid var(--line); }
.hero-sub { max-width: 560px; margin: 0; font-size: clamp(17px, 1.35vw, 20px); color: var(--muted); }
.hero-actions { display: grid; justify-items: end; gap: 22px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; margin: 0; padding: 0; list-style: none; font: 13px/1.4 var(--font-mono); color: var(--muted); }
.hero-meta li { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dot.live { box-shadow: 0 0 0 0 rgba(200, 255, 46, .6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 10px rgba(200, 255, 46, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 255, 46, 0); } }

.scroll-cue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid var(--line-strong); border-radius: 20px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--text); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 60% { transform: translateY(14px); opacity: 0; } 61% { transform: none; opacity: 0; } }

/* ---------- chat ---------- */
.chat {
  --chat-bg: var(--bg-elev);
  --bubble-bot: var(--surface-2);
  position: relative;
  height: 100%;
  display: flex; flex-direction: column;
  background: var(--chat-bg);
  font-size: 14.5px;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); flex: none; }
.chat-avatar-wrap { position: relative; flex: none; }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.chat-avatar-wrap::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--chat-bg); }
.chat-who { display: grid; line-height: 1.2; min-width: 0; flex: 1; }
.chat-who strong { font-size: 15px; }
.chat-mode { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-mode.claude { color: var(--accent-text); }
.chat-icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--muted); transition: background-color .2s, color .2s; flex: none; }
.chat-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.chat-icon-btn svg { width: 19px; height: 19px; }
.chat-icon-btn .wave { opacity: .35; transition: opacity .2s; }
.chat-icon-btn[aria-pressed='true'] { color: var(--accent-text); }
.chat-icon-btn[aria-pressed='true'] .wave { opacity: 1; }

.chat-log { flex: 1; overflow-y: auto; padding: 14px 12px 8px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; overscroll-behavior: contain; scrollbar-width: none; }
.chat-log::-webkit-scrollbar { display: none; }
.msg { max-width: 86%; padding: 9px 13px; border-radius: 20px; line-height: 1.42; word-wrap: break-word; animation: msgIn .35s var(--ease-out); }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.msg.bot { align-self: flex-start; background: var(--bubble-bot); border-bottom-left-radius: 6px; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg p { margin: 0; }
.msg p + p { margin-top: 6px; }
.msg strong { font-weight: 650; }
.msg a { color: var(--accent-text); }
.msg .msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg .msg-action { font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--chat-bg); border: 1px solid var(--line-strong); transition: border-color .2s, transform .2s var(--spring); }
.msg .msg-action:hover { border-color: var(--accent); transform: translateY(-1px); }
.msg .cursor-caret { display: inline-block; width: 7px; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; opacity: .6; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.msg.typing { display: flex; gap: 4px; padding: 13px 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; }
.msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }
.msg code { font: 12.5px/1 var(--font-mono); padding: 2px 5px; border-radius: 5px; background: var(--chat-bg); }
.msg-note { align-self: center; font: 11px/1.3 var(--font-mono); color: var(--faint); text-align: center; padding: 2px 10px; }

.chat-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 12px 8px; flex: none; scrollbar-width: none; mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 24px), transparent); }
.chat-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; white-space: nowrap; background: var(--chat-bg); transition: background-color .2s, border-color .2s, transform .2s var(--spring); }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

.chat-input { display: flex; align-items: center; gap: 6px; margin: 2px 10px 12px; padding: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.chat-input:focus-within { border-color: var(--line-strong); }
.chat-input input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 4px; font-size: 15px; }
.chat-input input::placeholder { color: var(--faint); }
.chat-input .mic, .chat-input .send { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none; transition: background-color .2s, transform .2s var(--spring); }
.chat-input .mic { color: var(--muted); }
.chat-input .mic:hover { color: var(--text); background: var(--surface-3); }
.chat-input .mic svg, .chat-input .send svg { width: 18px; height: 18px; }
.chat-input .send { background: var(--accent); color: var(--accent-ink); }
.chat-input .send:hover { transform: scale(1.06); }
.mic-wave { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 2px; }
.mic-wave i { width: 3px; height: 8px; border-radius: 2px; background: #fff; animation: wave .9s ease-in-out infinite; }
.mic-wave i:nth-child(2) { animation-delay: .1s; } .mic-wave i:nth-child(3) { animation-delay: .2s; } .mic-wave i:nth-child(4) { animation-delay: .3s; }
@keyframes wave { 50% { height: 18px; } }
.mic.listening { background: var(--danger); color: #fff; box-shadow: 0 0 0 0 rgba(255, 90, 95, .6); animation: live 1.4s infinite; }
.mic.listening svg { display: none; }
.mic.listening .mic-wave { display: flex; }
.mic.unsupported { opacity: .35; }

/* floating assistant */
.ask-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 18px 6px 6px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow-sm);
  transform: translateY(120%) scale(.9); opacity: 0;
  transition: transform .5s var(--spring), opacity .3s;
}
.ask-fab.show { transform: none; opacity: 1; }
.ask-fab img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; }
.ask-fab.hidden-by-chat { transform: translateY(120%) scale(.9); opacity: 0; pointer-events: none; }
.float-chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 95;
  width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100svh - 110px));
  border-radius: 30px; overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transform-origin: 100% 100%;
  animation: chatIn .45s var(--spring);
}
@keyframes chatIn { from { opacity: 0; transform: scale(.85) translateY(20px); } }
@media (max-width: 560px) {
  .float-chat { right: 0; left: 0; bottom: 0; width: 100%; height: 86svh; border-radius: 26px 26px 0 0; }
}

/* =========================================================
   PROOF MARQUEE
   ========================================================= */
.proof { border-block: 1px solid var(--line); overflow: hidden; padding: 26px 0; background: var(--bg-elev); }
.marquee { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.proof:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-group { display: flex; align-items: center; }
.stat { display: flex; align-items: baseline; gap: 14px; padding: 0 34px; white-space: nowrap; }
.stat b { font: var(--display-weight) calc(clamp(40px, 5vw, 72px) * var(--display-scale))/1 var(--font-display); font-variation-settings: 'wdth' var(--display-wdth); letter-spacing: var(--display-track); }
.stat span { font-size: 15px; color: var(--muted); max-width: 13ch; white-space: normal; line-height: 1.25; }
.stat-sep { color: var(--accent-text); font-size: 22px; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { position: relative; max-width: var(--maxw); margin: 0 auto; padding: clamp(96px, 13vh, 168px) var(--gutter) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0; font: 500 12.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.eyebrow span { color: var(--accent-text); }
.eyebrow.small { font-size: 11px; letter-spacing: .14em; }
.section-title {
  margin: 0; max-width: 20ch;
  font: var(--display-weight) calc(clamp(38px, 5.4vw, 80px) * var(--display-scale))/calc(var(--display-leading) + .06) var(--font-display);
  font-variation-settings: 'wdth' var(--display-wdth), 'opsz' 96;
  letter-spacing: var(--display-track);
  word-spacing: .03em;
  text-wrap: balance;
}
.section-lede { margin: 0; max-width: 58ch; color: var(--muted); font-size: 18px; }

.seg { display: inline-flex; justify-self: start; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.seg-btn { padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s; }
.seg-btn.is-on { background: var(--text); color: var(--bg); }

/* =========================================================
   WORK
   ========================================================= */
.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dcard {
  --c: #333; --ink: #fff;
  display: flex; flex-direction: column;
  border-radius: 32px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: opacity .9s var(--ease-out), transform .6s var(--spring), box-shadow .3s, border-color .3s;
}
.work-grid > .dcard:nth-child(even) { transition-delay: .08s; }
.dcard:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.dcard-top {
  position: relative; flex: none; height: 230px;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 90% at 20% 0%, color-mix(in srgb, var(--c) 60%, #fff) 0%, transparent 55%),
    linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
  color: var(--ink);
  overflow: hidden;
}
.dcard-top::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 2px, transparent 2px 14px); pointer-events: none; }
.dcard-icons { display: flex; gap: 14px; transition: transform .6s var(--spring); }
.dcard:hover .dcard-icons { transform: scale(1.06) rotate(-3deg); }
.dcard-icons img { width: 108px; height: 108px; border-radius: 26px; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .5); }
.dcard-year { position: absolute; left: 22px; top: 20px; font: 600 12px/1 var(--font-mono); letter-spacing: .08em; padding: 7px 10px; border-radius: 999px; background: rgba(0, 0, 0, .25); color: #fff; backdrop-filter: blur(8px); }
.dcard-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 24px 26px 22px; }
.dcard-name { margin: 0; font: var(--display-weight) calc(30px * var(--display-scale))/1 var(--font-display); letter-spacing: var(--display-track); font-variation-settings: 'wdth' var(--display-wdth); }
.dcard-role { font: 500 12px/1 var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.dcard-headline { margin: 4px 0 0; font-size: 18px; font-weight: 600; line-height: 1.3; }
.dcard-summary { margin: 0 0 6px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 0; list-style: none; }
.tags li { font: 500 11.5px/1 var(--font-mono); padding: 7px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.dcard-ask { align-self: flex-start; margin-top: 10px; padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.dcard-ask span { display: inline-block; transition: transform .25s var(--ease); }
.dcard-ask:hover span { transform: translateX(4px); }
.dcard.flash { animation: flash 1.6s var(--ease); }
@keyframes flash { 20% { box-shadow: 0 0 0 4px var(--accent), var(--shadow); } }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .dcard-top { height: 190px; }
  .dcard-icons img { width: 88px; height: 88px; border-radius: 22px; }
}

/* =========================================================
   TIME MACHINE
   ========================================================= */
.tm-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; min-height: 640px; }
.tm-info { display: grid; gap: 14px; align-content: center; }
.tm-year {
  font: var(--display-weight) calc(clamp(96px, min(17vw, 26vh), 250px) * var(--display-scale))/.8 var(--font-display);
  font-variation-settings: 'wdth' var(--display-wdth);
  letter-spacing: -.025em;
  color: transparent;
  -webkit-text-stroke: 2px var(--year-stroke);
  margin-left: -.04em;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.tm-year .cur { color: var(--text); -webkit-text-stroke: 0; }
.tm-era { margin: 6px 0 0; font: 500 13px/1.5 var(--font-mono); color: var(--accent-text); min-height: 2.6em; }
.tm-company { margin: 0; font: var(--display-weight) calc(clamp(32px, 3.6vw, 52px) * var(--display-scale))/1 var(--font-display); letter-spacing: var(--display-track); font-variation-settings: 'wdth' var(--display-wdth); }
.tm-meta { margin: 8px 0 0; font: 14px/1.4 var(--font-mono); color: var(--muted); }
.tm-desc { margin: 10px 0 0; max-width: 52ch; color: var(--muted); min-height: 3em; }
.tm-role.swap { animation: swap .45s var(--ease-out); }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } }
.tm-belt { margin-top: 10px; display: grid; gap: 10px; }
.belt { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; min-height: 34px; }
.belt li { font: 500 12.5px/1 var(--font-mono); padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-strong); animation: msgIn .4s var(--spring); }
.belt li.new { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

.tm-device-wrap { display: grid; justify-items: center; gap: 14px; }
/* Keep slider, phone and company on screen together on shorter displays. */
@media (min-width: 901px) and (max-height: 880px) {
  .tm-stage { min-height: 0; }
  .tmd { height: 540px; }
  .tmd-body { transform: scale(.84); }
}
@media (min-width: 901px) and (max-height: 760px) {
  .tmd { height: 450px; }
  .tmd-body { transform: scale(.7); }
}
.tmd-caption { margin: 0; font: 12px/1.4 var(--font-mono); color: var(--faint); text-align: center; min-height: 1.4em; }

/* --- morphing device --- */
.tmd { display: grid; place-items: center; height: 640px; }
.tmd-body {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  width: 296px; height: 612px;
  padding: 11px;
  border-radius: 56px;
  background: linear-gradient(150deg, #9A958C, #6F6B64 35%, #A7A298 60%, #5F5B55);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25), inset 0 0 0 5px #0B0B0D, var(--shadow);
  transition: width .8s var(--ease-out), height .8s var(--ease-out), padding .8s var(--ease-out), border-radius .8s var(--ease-out), background .8s, box-shadow .8s;
}
.tmd-screen {
  position: relative; flex: 1; width: 100%;
  border-radius: 46px; overflow: hidden;
  display: flex; flex-direction: column;
  font-family: var(--font-ios);
  background: #000; color: #fff;
  transition: border-radius .8s var(--ease-out), background .6s;
}
.tmd-speaker, .tmd-home, .tmd-notch, .tmd-island, .tmd-indicator { transition: opacity .5s, transform .6s var(--ease-out); }
.tmd-speaker { position: absolute; top: 38px; left: 50%; width: 50px; height: 6px; margin-left: -25px; border-radius: 6px; background: #222; box-shadow: inset 0 1px 2px #000; opacity: 0; }
.tmd-home { position: absolute; bottom: 18px; left: 50%; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #222, #0a0a0a); box-shadow: inset 0 0 0 2px #333; opacity: 0; transform: scale(.6); }
.tmd-home::after { content: ''; position: absolute; inset: 15px; border: 1.5px solid #666; border-radius: 4px; }
.tmd-notch { position: absolute; z-index: 4; top: 0; left: 50%; width: 140px; height: 26px; margin-left: -70px; border-radius: 0 0 18px 18px; background: #000; opacity: 0; transform: translateY(-100%); }
.tmd-island { position: absolute; z-index: 4; top: 10px; left: 50%; width: 92px; height: 27px; margin-left: -46px; border-radius: 20px; background: #000; opacity: 0; transform: scale(.4); }
.tmd-indicator { position: absolute; z-index: 4; bottom: 7px; left: 50%; width: 110px; height: 4.5px; margin-left: -55px; border-radius: 4px; background: currentColor; opacity: 0; }

.tmd-statusbar { flex: none; display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 6px 24px 0; font-size: 12px; font-weight: 600; transition: all .5s; }
.tmd-carrier { display: none; }
.tmd-batt { width: 22px; height: 10px; border-radius: 3px; border: 1.2px solid currentColor; position: relative; }
.tmd-batt::after { content: ''; position: absolute; inset: 1.5px; right: 5px; background: currentColor; border-radius: 1px; }
.tmd-nav { flex: none; display: flex; align-items: flex-end; padding: 6px 18px 10px; min-height: 52px; transition: all .5s; }
.tmd-back { display: none; }
.tmd-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmd-content { flex: 1; overflow: hidden; padding: 4px 14px; display: flex; flex-direction: column; gap: 12px; transition: background .5s; }
.tmd-hero { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; transition: all .5s; }
.tmd-icon { flex: none; position: relative; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; font: 800 20px/1 var(--font-display); color: #fff; background-size: cover; transition: border-radius .5s; }
.tmd-icon img { width: 100%; height: 100%; object-fit: cover; }
.tmd-name { font-size: 16px; font-weight: 700; line-height: 1.2; }
.tmd-sub { font-size: 12.5px; opacity: .65; margin-top: 2px; }
.tmd-list { list-style: none; margin: 0; padding: 0; border-radius: 14px; overflow: hidden; transition: all .5s; }
.tmd-list li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; font-size: 13.5px; transition: all .5s; }
.tmd-list li span:last-child { opacity: .6; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmd-tabbar { flex: none; display: flex; justify-content: space-around; align-items: center; height: 58px; padding-bottom: 8px; transition: all .5s; }
.tmd-tabbar span { width: 22px; height: 22px; border-radius: 6px; background: currentColor; opacity: .3; transition: all .5s; }
.tmd-tabbar span.on { opacity: 1; }

/* era: classic / tall (skeuomorphic iPhone OS 3 to iOS 6) */
.tmd[data-era='classic'] .tmd-body, .tmd[data-era='tall'] .tmd-body {
  width: 262px; height: 520px; padding: 78px 16px 82px; border-radius: 44px;
  background: radial-gradient(120% 60% at 30% 0%, #3b3b3b, #050505 60%);
  box-shadow: inset 0 0 0 3px #9C9C9C, inset 0 0 0 5px #1a1a1a, var(--shadow);
}
.tmd[data-era='tall'] .tmd-body { height: 556px; }
.tmd[data-era='classic'] .tmd-screen, .tmd[data-era='tall'] .tmd-screen { border-radius: 2px; background: #C5CCD4; color: #000; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.tmd[data-era='classic'] .tmd-speaker, .tmd[data-era='tall'] .tmd-speaker,
.tmd[data-era='flat'] .tmd-speaker { opacity: 1; }
.tmd[data-era='classic'] .tmd-home, .tmd[data-era='tall'] .tmd-home,
.tmd[data-era='flat'] .tmd-home { opacity: 1; transform: none; }
.tmd[data-era='classic'] .tmd-statusbar, .tmd[data-era='tall'] .tmd-statusbar { height: 18px; padding: 0 6px; background: #000; color: #fff; font-size: 10px; }
.tmd[data-era='classic'] .tmd-carrier, .tmd[data-era='tall'] .tmd-carrier,
.tmd[data-era='flat'] .tmd-carrier { display: inline; }
.tmd[data-era='classic'] .tmd-batt, .tmd[data-era='tall'] .tmd-batt { width: 18px; height: 8px; }
.tmd[data-era='classic'] .tmd-nav, .tmd[data-era='tall'] .tmd-nav {
  min-height: 40px; padding: 0 8px; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(#B4C0D0, #8B9EB9 50%, #7C91AE 50%, #6D84A2);
  border-bottom: 1px solid #2D3642;
}
.tmd[data-era='classic'] .tmd-back, .tmd[data-era='tall'] .tmd-back {
  display: block; position: absolute; left: 6px; top: 7px;
  padding: 4px 8px 4px 12px; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(#8DA0BB, #5C759A); border: 1px solid #39465A; border-radius: 5px;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  text-shadow: 0 -1px 0 rgba(0,0,0,.4);
}
.tmd[data-era='classic'] .tmd-title, .tmd[data-era='tall'] .tmd-title { font-size: 16px; font-weight: 700; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.5); max-width: 130px; }
.tmd[data-era='classic'] .tmd-content, .tmd[data-era='tall'] .tmd-content { background: repeating-linear-gradient(90deg, #C5CCD4 0 4px, #CBD2D8 4px 7px); padding: 10px; gap: 10px; }
.tmd[data-era='classic'] .tmd-hero, .tmd[data-era='tall'] .tmd-hero { padding: 0 2px; }
.tmd[data-era='classic'] .tmd-name, .tmd[data-era='tall'] .tmd-name { color: #4C566C; text-shadow: 0 1px 0 #fff; font-size: 15px; }
.tmd[data-era='classic'] .tmd-sub, .tmd[data-era='tall'] .tmd-sub { color: #4C566C; text-shadow: 0 1px 0 #fff; }
.tmd[data-era='classic'] .tmd-icon, .tmd[data-era='tall'] .tmd-icon { border-radius: 11px; box-shadow: 0 2px 4px rgba(0,0,0,.4); }
.tmd[data-era='classic'] .tmd-icon::after, .tmd[data-era='tall'] .tmd-icon::after { content: ''; position: absolute; inset: 0 0 50% 0; border-radius: 11px 11px 50% 50% / 11px 11px 18px 18px; background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.12)); }
.tmd[data-era='classic'] .tmd-list, .tmd[data-era='tall'] .tmd-list { background: #fff; border: 1px solid #A8ABAE; border-radius: 9px; }
.tmd[data-era='classic'] .tmd-list li, .tmd[data-era='tall'] .tmd-list li { font-weight: 700; font-size: 12.5px; padding: 10px; border-top: 1px solid #DFDFDF; }
.tmd[data-era='classic'] .tmd-list li:first-child, .tmd[data-era='tall'] .tmd-list li:first-child { border-top: 0; }
.tmd[data-era='classic'] .tmd-list li span:last-child, .tmd[data-era='tall'] .tmd-list li span:last-child { color: #385487; opacity: 1; font-weight: 400; }
.tmd[data-era='classic'] .tmd-tabbar, .tmd[data-era='tall'] .tmd-tabbar { height: 44px; padding: 0; background: linear-gradient(#444, #1a1a1a 50%, #000 50%); color: #9a9a9a; }
.tmd[data-era='classic'] .tmd-tabbar span, .tmd[data-era='tall'] .tmd-tabbar span { width: 18px; height: 18px; border-radius: 4px; opacity: .8; }
.tmd[data-era='classic'] .tmd-tabbar span.on, .tmd[data-era='tall'] .tmd-tabbar span.on { background: linear-gradient(#bfe6ff, #2b8fe3); box-shadow: 0 0 10px rgba(80, 170, 255, .8); }

/* era: flat (iOS 7 to iOS 10) */
.tmd[data-era='flat'] .tmd-body {
  width: 266px; height: 556px; padding: 76px 15px 78px; border-radius: 46px;
  background: linear-gradient(160deg, #E9E9EC, #C9C9CE 50%, #E2E2E6);
  box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 3px #B7B7BC, var(--shadow);
}
.tmd[data-era='flat'] .tmd-speaker { background: #9B9BA0; box-shadow: none; }
.tmd[data-era='flat'] .tmd-home { background: #F2F2F4; box-shadow: inset 0 0 0 2px #B8B8BD; }
.tmd[data-era='flat'] .tmd-home::after { border: 0; }
.tmd[data-era='flat'] .tmd-screen { border-radius: 2px; background: #EFEFF4; color: #000; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
.tmd[data-era='flat'] .tmd-statusbar { height: 18px; padding: 0 6px; background: #F7F7F7; color: #000; font-size: 10px; }
.tmd[data-era='flat'] .tmd-nav { min-height: 40px; padding: 0 10px; align-items: center; justify-content: center; position: relative; background: #F7F7F7; border-bottom: .5px solid #B2B2B2; }
.tmd[data-era='flat'] .tmd-back { display: block; position: absolute; left: 8px; font-size: 13px; color: #007AFF; }
.tmd[data-era='flat'] .tmd-back::before { content: '‹ '; font-size: 18px; line-height: 0; }
.tmd[data-era='flat'] .tmd-title { font-size: 15px; font-weight: 600; max-width: 130px; }
.tmd[data-era='flat'] .tmd-content { padding: 14px 0; }
.tmd[data-era='flat'] .tmd-hero { padding: 0 14px; }
.tmd[data-era='flat'] .tmd-name { font-weight: 300; font-size: 20px; letter-spacing: -.01em; }
.tmd[data-era='flat'] .tmd-icon { border-radius: 13px; }
.tmd[data-era='flat'] .tmd-list { background: #fff; border-radius: 0; border-block: .5px solid #C8C7CC; }
.tmd[data-era='flat'] .tmd-list li { font-size: 13px; font-weight: 400; padding: 10px 14px; box-shadow: inset 14px -.5px 0 #fff, inset 0 -.5px 0 #C8C7CC; }
.tmd[data-era='flat'] .tmd-list li:last-child { box-shadow: none; }
.tmd[data-era='flat'] .tmd-tabbar { height: 44px; padding: 0; background: #F7F7F7; border-top: .5px solid #B2B2B2; color: #929292; }
.tmd[data-era='flat'] .tmd-tabbar span { width: 18px; height: 18px; border-radius: 50%; background: none; border: 1.5px solid currentColor; opacity: 1; }
.tmd[data-era='flat'] .tmd-tabbar span.on { color: #007AFF; background: currentColor; }

/* era: notch (iPhone X to iPhone 13) */
.tmd[data-era='notch'] .tmd-body {
  width: 288px; height: 600px; padding: 12px; border-radius: 52px;
  background: linear-gradient(150deg, #D8D8DC, #8F8F95 30%, #E8E8EC 55%, #7D7D84);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5), inset 0 0 0 6px #0B0B0D, var(--shadow);
}
.tmd[data-era='notch'] .tmd-screen { border-radius: 42px; background: #F2F2F7; color: #000; }
.tmd[data-era='notch'] .tmd-notch { opacity: 1; transform: none; }
.tmd[data-era='notch'] .tmd-indicator, .tmd[data-era='island'] .tmd-indicator, .tmd[data-era='glass'] .tmd-indicator { opacity: .9; }
.tmd[data-era='notch'] .tmd-list { background: #fff; }
.tmd[data-era='notch'] .tmd-list li + li { border-top: .5px solid #E0E0E5; }
.tmd[data-era='notch'] .tmd-hero { background: #fff; }
.tmd[data-era='notch'] .tmd-tabbar { background: rgba(249,249,249,.94); border-top: .5px solid #D0D0D5; color: #8E8E93; height: 66px; padding-bottom: 18px; }
.tmd[data-era='notch'] .tmd-tabbar span { border-radius: 7px; }
.tmd[data-era='notch'] .tmd-tabbar span.on { color: #007AFF; }

/* era: island (iPhone 14 Pro to iPhone 16, dark mode) */
.tmd[data-era='island'] .tmd-body {
  width: 292px; height: 606px; padding: 11px; border-radius: 54px;
  background: linear-gradient(150deg, #5B5466, #2E2A36 35%, #4C4657 60%, #221F28);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25), inset 0 0 0 5px #0B0B0D, var(--shadow);
}
.tmd[data-era='island'] .tmd-screen { border-radius: 44px; background: #000; color: #fff; }
.tmd[data-era='island'] .tmd-island, .tmd[data-era='glass'] .tmd-island { opacity: 1; transform: none; }
.tmd[data-era='island'] .tmd-statusbar { padding: 8px 30px 0; }
.tmd[data-era='island'] .tmd-hero { background: #1C1C1E; }
.tmd[data-era='island'] .tmd-list { background: #1C1C1E; }
.tmd[data-era='island'] .tmd-list li + li { border-top: .5px solid #38383A; }
.tmd[data-era='island'] .tmd-tabbar { background: rgba(22,22,24,.94); border-top: .5px solid #2C2C2E; color: #8E8E93; height: 66px; padding-bottom: 18px; }
.tmd[data-era='island'] .tmd-tabbar span.on { color: var(--era-accent, #0A84FF); }

/* era: glass (iOS 26 Liquid Glass) */
.tmd[data-era='glass'] .tmd-screen {
  background:
    radial-gradient(80% 50% at 20% 10%, color-mix(in srgb, var(--era-accent, #8E7BFF) 85%, #fff), transparent 70%),
    radial-gradient(70% 60% at 90% 60%, #3EE6D2, transparent 70%),
    radial-gradient(80% 60% at 10% 100%, #8E7BFF, transparent 70%),
    #20202a;
  color: #fff;
}
.tmd[data-era='glass'] .tmd-statusbar { padding: 8px 30px 0; }
.tmd[data-era='glass'] .tmd-title { text-shadow: 0 1px 12px rgba(0,0,0,.25); }
.tmd[data-era='glass'] .tmd-hero, .tmd[data-era='glass'] .tmd-list {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(14px) saturate(1.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 10px 30px -10px rgba(0,0,0,.35);
  border-radius: 24px;
}
.tmd[data-era='glass'] .tmd-icon { border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.tmd[data-era='glass'] .tmd-list li + li { border-top: 1px solid rgba(255,255,255,.18); }
.tmd[data-era='glass'] .tmd-tabbar {
  margin: 0 18px 22px; height: 54px; padding: 0; border-radius: 999px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(16px) saturate(1.8); -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 12px 30px -8px rgba(0,0,0,.4);
}
.tmd[data-era='glass'] .tmd-tabbar span { border-radius: 50%; }
.tmd[data-era='glass'] .tmd-tabbar span.on { opacity: 1; box-shadow: 0 0 0 7px rgba(255,255,255,.22); }
.tmd[data-era='glass'] .tmd-indicator { color: #fff; }

/* --- scrubber --- */
.tm-scrubber { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 28px; padding: 24px 18px 8px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.tm-play { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); transition: transform .25s var(--spring); }
.tm-play:hover { transform: scale(1.07); }
.tm-play svg { width: 22px; height: 22px; }
.tm-play .i-pause, .tm-play.playing .i-play { display: none; }
.tm-play.playing .i-pause { display: block; }
.tm-track { position: relative; height: 70px; touch-action: none; cursor: ew-resize; }
.tm-segments { position: absolute; left: 0; right: 0; top: 26px; height: 14px; display: flex; gap: 2px; }
.tm-seg { height: 100%; border-radius: 3px; background: var(--surface-3); transition: background-color .3s, transform .3s var(--spring); cursor: pointer; }
.tm-seg:hover { transform: scaleY(1.5); }
.tm-seg.active { background: var(--accent); transform: scaleY(1.6); }
.tm-seg.featured { background: color-mix(in srgb, var(--text) 35%, transparent); }
.tm-seg.featured.active { background: var(--accent); }
.tm-fill { position: absolute; left: 0; top: 46px; height: 2px; background: var(--accent); width: 100%; transform-origin: 0 50%; opacity: .5; }
.tm-handle { position: absolute; top: 8px; bottom: 16px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 2px; outline: none; }
.tm-handle::before { content: ''; position: absolute; top: 16px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .2s var(--spring); }
.tm-track:active .tm-handle::before, .tm-handle:focus-visible::before { transform: scale(1.2); }
.tm-handle-label { position: absolute; bottom: calc(100% + 2px); left: 50%; translate: -50% 0; padding: 4px 8px; border-radius: 8px; background: var(--text); color: var(--bg); font: 600 11.5px/1 var(--font-mono); white-space: nowrap; }
.tm-years { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; font: 11px/1 var(--font-mono); color: var(--faint); }
.tm-years span { position: absolute; translate: -50% 0; }
@media (max-width: 700px) { .tm-years span:nth-child(even) { display: none; } }

@media (max-width: 900px) {
  .tm-stage { grid-template-columns: 1fr; min-height: 0; }
  .tm-device-wrap { order: -1; }
  .tmd { height: auto; transform: scale(.82); margin: -50px 0; }
}

/* =========================================================
   STACK
   ========================================================= */
.dots { display: flex; gap: 7px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #FF5F57; }
.dots i:nth-child(2) { background: #FEBC2E; } .dots i:nth-child(3) { background: #28C840; }

/* ---------- experience chart ---------- */
.stack .section-head .seg { justify-self: start; }
.xp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 56px; }
.xp-col { display: grid; gap: 30px; align-content: start; }
.xp-single { grid-column: 1 / -1; }
.xp-single .xp-list { display: block; columns: 2; column-gap: 56px; }
.xp-single .xp-row { break-inside: avoid; margin-bottom: 4px; }
.xp-group h3 { margin: 0 0 8px 14px; font: 500 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent-text); }
.xp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.xp-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-rows: auto 6px; gap: 9px 14px; align-items: center; padding: 12px 14px; border-radius: 16px; transition: background-color .2s; }
.xp-row:hover { background: var(--surface); }
.xp-row.flash { animation: flash 1.6s var(--ease); }
.xp-icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); font: 700 12px/1 var(--font-mono); color: var(--muted); }
.xp-icon img { width: 100%; height: 100%; object-fit: cover; }
.xp-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; font-size: 15.5px; font-weight: 600; }
.xp-name small { font: 400 12px/1.2 var(--font-mono); color: var(--faint); }
.xp-years { font: 500 13px/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.xp-years b { margin-right: 3px; font: var(--display-weight) 22px/1 var(--font-display); letter-spacing: var(--display-track); color: var(--text); }
.xp-bar { grid-column: 2 / 4; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.xp-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--cyan)); transition: width 1.2s var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms); }
.xp.grow .xp-bar i { width: var(--w); }
.skills-foot { margin: 28px 14px 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) {
  .xp { grid-template-columns: 1fr; }
  .xp-single .xp-list { columns: 1; }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.about-card { position: sticky; top: calc(var(--nav-h) + 24px); overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.about-photo { display: block; width: 100%; height: 380px; object-fit: cover; object-position: 50% 20%; }
.about-card-body { display: grid; gap: 4px; padding: 20px 22px 22px; }
.about-card-body strong { font-size: 18px; }
.about-facts { list-style: none; display: grid; gap: 11px; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); }
.about-facts li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; text-align: right; }
.about-facts li span:first-child { font: 500 11px/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); text-align: left; }
.about-me p { max-width: 60ch; margin: 0 0 16px; font-size: 17px; line-height: 1.65; color: var(--muted); }
.about-me .lede { font-size: clamp(21px, 1.9vw, 27px); line-height: 1.45; color: var(--text); letter-spacing: -.01em; }
.about-pillars { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 34px 0 0; padding: 0; }
.about-pillars li { padding: 20px 20px 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: transform .4s var(--spring), border-color .25s; }
.about-pillars li:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.pillar-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.pillar-icon svg { width: 20px; height: 20px; }
.about-pillars h3 { margin: 16px 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.about-pillars p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.about-sub { margin: 40px 0 18px; font: 500 12.5px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent-text); }
.about-workflow { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 18px 12px; margin: 0; padding: 0; }
.about-workflow li { display: grid; justify-items: center; gap: 9px; font-size: 13px; text-align: center; color: var(--muted); }
.about-workflow img { width: 58px; height: 58px; border-radius: 15px; box-shadow: var(--shadow-sm); transition: transform .35s var(--spring); }
.about-workflow li:hover img { transform: translateY(-4px) rotate(-5deg); }
.about-mono { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 15px; background: var(--surface-2); border: 1px solid var(--line-strong); font: 700 18px/1 var(--font-mono); font-style: normal; color: var(--text); box-shadow: var(--shadow-sm); }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-card { position: static; display: grid; grid-template-columns: 200px minmax(0, 1fr); }
  .about-photo { height: 100%; min-height: 240px; }
}
@media (max-width: 560px) {
  .about-pillars { grid-template-columns: 1fr; }
  .about-pillars li { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 16px 18px; }
  .about-pillars h3 { margin: 0; }
  .about-pillars p { grid-column: 1 / -1; margin-top: 10px; }
  /* Compact card: small photo beside the name, facts underneath. */
  .about-card { grid-template-columns: 88px minmax(0, 1fr); column-gap: 16px; padding: 18px; }
  .about-photo { grid-row: 1 / 3; width: 88px; height: 88px; min-height: 0; border-radius: 18px; }
  .about-card-body { display: contents; }
  .about-card-body strong { grid-column: 2; grid-row: 1; align-self: end; }
  .about-card-body .muted { grid-column: 2; grid-row: 2; align-self: start; font-size: 14px; }
  .about-facts { grid-column: 1 / -1; grid-row: 3; }
}

/* =========================================================
   FULL STACK
   ========================================================= */
.fs-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.fs-controls .seg { flex-wrap: wrap; }
.fs-controls .btn:disabled { opacity: .55; pointer-events: none; }
.fs-pipeline { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) 64px minmax(0, 1fr); align-items: stretch; }
.fs-node {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .35s, box-shadow .35s, transform .45s var(--spring);
}
.fs-node.lit { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-sm); transform: translateY(-4px); }
.fs-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border-radius: 14px; background: var(--surface-2); color: var(--text); transition: background-color .35s, color .35s; }
.fs-icon svg { width: 24px; height: 24px; }
.fs-node.lit .fs-icon { background: var(--accent); color: var(--accent-ink); }
.fs-node h3 { margin: 4px 0 0; font: var(--display-weight) calc(28px * var(--display-scale))/1.05 var(--font-display); letter-spacing: var(--display-track); font-variation-settings: 'wdth' var(--display-wdth); }
.fs-sub { margin: 0; font-size: 14px; color: var(--muted); }
.fs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 16px 0 0; }
.fs-chips li { font: 500 12px/1 var(--font-mono); padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-strong); transition: background-color .25s, color .25s, border-color .25s; }
.fs-chips.selectable li { cursor: pointer; }
.fs-chips.selectable li:hover { border-color: var(--accent); }
.fs-chips li.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.fs-chips small { font-size: 10.5px; opacity: .6; margin-left: 2px; }
.fs-wire { position: relative; align-self: center; height: 2px; margin: 0 6px; background: repeating-linear-gradient(90deg, var(--line-strong) 0 6px, transparent 6px 12px); }
.fs-packet { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); opacity: 0; }
.fs-wire.go .fs-packet { animation: packetX .62s var(--ease) forwards; }
.fs-wire.back .fs-packet { animation: packetX .62s var(--ease) reverse forwards; }
@keyframes packetX { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@media (max-width: 1000px) {
  .fs-pipeline { grid-template-columns: 1fr; }
  .fs-wire { justify-self: center; width: 2px; height: 44px; margin: 6px 0; background: repeating-linear-gradient(180deg, var(--line-strong) 0 6px, transparent 6px 12px); }
  .fs-packet { left: 50%; top: 0; margin: -6px 0 0 -6px; }
  .fs-wire.go .fs-packet { animation-name: packetY; }
  .fs-wire.back .fs-packet { animation-name: packetY; }
}
@keyframes packetY { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* =========================================================
   SPRINGBOARD
   ========================================================= */
.sb {
  position: relative;
  max-width: 1040px; margin: 0 auto;
  height: 620px;
  border-radius: 48px;
  padding: 14px;
  background: #0B0B0D;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.12), var(--shadow);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  user-select: none; -webkit-user-select: none;
}
:root[data-theme='light'] .sb { box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.2), 0 0 0 6px #D8D5CC, var(--shadow); }
.sb-wall { position: absolute; inset: 14px; border-radius: 36px; overflow: hidden; z-index: -1; background: #17122B; }
.sb-wall i { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; filter: blur(60px); opacity: .8; animation: drift 22s ease-in-out infinite alternate; }
.sb-wall i:nth-child(1) { background: #6B4CFF; left: -15%; top: -30%; }
.sb-wall i:nth-child(2) { background: #00B3A4; right: -20%; top: 10%; animation-delay: -7s; }
.sb-wall i:nth-child(3) { background: #A4E000; left: 20%; bottom: -60%; opacity: .55; animation-delay: -14s; }
@keyframes drift { to { transform: translate(12%, 10%) scale(1.15); } }
.sb-status { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 14px 34px 0; font: 600 14px/1 var(--font-ios); }
.sb-edit { padding: 7px 14px; border-radius: 999px; font: 600 13px/1 var(--font-ios); background: rgba(255,255,255,.18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .2s; }
.sb-edit:hover { background: rgba(255,255,255,.28); }
.sb-pages { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: calc(100% - 170px); margin-top: 6px; overscroll-behavior-x: contain; }
.sb-pages::-webkit-scrollbar { display: none; }
.sb-page { flex: none; width: 100%; scroll-snap-align: start; padding: 16px clamp(14px, 4vw, 48px); }
.sb-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 18px 10px; align-content: start; }
.sb-app-icon { display: grid; justify-items: center; gap: 7px; position: relative; touch-action: manipulation; }
.sb-app-icon button { position: relative; width: 70px; height: 70px; border-radius: 17px; overflow: hidden; box-shadow: 0 6px 16px -6px rgba(0,0,0,.6); transition: transform .3s var(--spring), filter .2s; }
.sb-app-icon button:hover { transform: scale(1.08); }
.sb-app-icon button:active { filter: brightness(.7); }
.sb-app-icon img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gen { width: 100%; height: 100%; display: grid; place-items: center; font: 800 30px/1 var(--font-display); color: #fff; }
.app-icon-big .gen { font-size: 54px; }
.gen.peg { background: radial-gradient(circle at 50% 45%, #2A2A3A, #0B0B0F) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.gen.peg::before { content: ''; width: 48%; height: 48%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 45%, #6B8F00); box-shadow: 0 0 18px rgba(200,255,46,.6); }
.sb-app-icon .sb-label { font: 500 12px/1.2 var(--font-ios); text-align: center; text-shadow: 0 1px 4px rgba(0,0,0,.6); max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb.jiggle .sb-app-icon button { animation: jiggle .26s ease-in-out infinite alternate; }
.sb.jiggle .sb-app-icon:nth-child(odd) button { animation-delay: -.13s; animation-duration: .3s; }
@keyframes jiggle { from { transform: rotate(-1.8deg); } to { transform: rotate(1.8deg); } }
.sb-app-icon.dragging { opacity: .25; }
.sb-ghost { position: fixed; z-index: 400; width: 70px; height: 70px; border-radius: 17px; overflow: hidden; pointer-events: none; transform: scale(1.15); box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.sb-ghost img, .sb-ghost .gen { width: 100%; height: 100%; }
.sb-dots { display: flex; justify-content: center; gap: 8px; height: 20px; align-items: center; }
.sb-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); transition: background-color .2s, transform .2s; }
.sb-dot[aria-selected='true'] { background: #fff; }
.sb-dock {
  list-style: none; position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
  display: flex; gap: 18px; margin: 0; padding: 12px 18px; border-radius: 32px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
}
.sb-dock .sb-app-icon .sb-label { display: none; }
.sb-dock .sb-app-icon button { width: 62px; height: 62px; border-radius: 15px; }
.dock-glyph { width: 100%; height: 100%; display: grid; place-items: center; }
.dock-glyph svg { width: 34px; height: 34px; }

.sb-app {
  position: absolute; z-index: 10; inset: 14px; border-radius: 36px; overflow: hidden;
  display: grid; place-content: safe center; justify-items: center; gap: 14px; padding: 30px; text-align: center;
  background: var(--app-bg, #222); color: #fff;
  transform-origin: top left;
}
.sb-app::before { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 0%, rgba(255,255,255,.22), transparent 70%), linear-gradient(transparent 40%, rgba(0,0,0,.45)); z-index: -1; }
.sb-app .app-icon-big { width: 120px; height: 120px; border-radius: 28px; overflow: hidden; box-shadow: 0 24px 50px -14px rgba(0,0,0,.6); }
.sb-app .app-icon-big img, .sb-app .app-icon-big .gen { width: 100%; height: 100%; }
.sb-app h3 { margin: 8px 0 0; font: var(--display-weight) calc(clamp(30px, 4vw, 44px) * var(--display-scale))/1 var(--font-display); letter-spacing: var(--display-track); }
.sb-app .app-cat { font: 500 12px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; opacity: .75; }
.sb-app p { margin: 0; max-width: 52ch; opacity: .85; }
.sb-app .app-blurb { font-size: 15px; line-height: 1.55; }
.sb-app .app-chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 560px; margin: 2px 0 0; padding: 0; }
.sb-app .app-chips li { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); font: 500 11.5px/1 var(--font-mono); }
.sb-app { overflow-y: auto; }
.sb-app .app-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.sb-app .app-btn { height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(10px); transition: background-color .2s, transform .2s var(--spring); }
.sb-app .app-btn:hover { background: rgba(255,255,255,.3); transform: translateY(-1px); }
.sb-app .app-btn.primary { background: #fff; color: #000; border-color: #fff; }
.sb-app .app-home { position: absolute; bottom: 10px; left: 50%; width: 140px; height: 26px; margin-left: -70px; display: grid; place-items: center; }
.sb-app .app-home::after { content: ''; width: 130px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.85); }
@media (max-width: 640px) {
  .sb { height: 640px; border-radius: 40px; padding: 10px; }
  .sb-wall, .sb-app { inset: 10px; border-radius: 30px; }
  .sb-grid { grid-template-columns: repeat(4, 1fr); gap: 16px 4px; }
  .sb-app-icon button { width: 58px; height: 58px; border-radius: 14px; }
  .sb-app-icon .sb-label { font-size: 11px; max-width: 72px; }
  .sb-page { padding: 14px 10px; }
  .sb-dock { gap: 12px; padding: 10px 12px; bottom: 20px; }
  .sb-dock .sb-app-icon button { width: 54px; height: 54px; border-radius: 13px; }
  .sb-status { padding: 12px 24px 0; }
}

/* =========================================================
   LIFE
   ========================================================= */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(260px, auto); gap: 16px; }
.card { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); padding: 26px; }
.card h3 { margin: 6px 0 8px; font: var(--display-weight) calc(32px * var(--display-scale))/1 var(--font-display); letter-spacing: var(--display-track); font-variation-settings: 'wdth' var(--display-wdth); }
.ironman { grid-column: span 4; display: grid; align-content: start; gap: 6px; }
.course { width: 100%; height: auto; margin: 8px 0 4px; overflow: visible; }
.leg { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; transition: stroke-width .3s, opacity .3s; }
.leg.swim { stroke: var(--cyan); }
.leg.bike { stroke: var(--accent); }
:root[data-theme='light'] .leg.bike { stroke: #7DB300; }
.leg.run { stroke: var(--violet); }
.course.focus .leg { opacity: .2; }
.course.focus .leg.hl { opacity: 1; stroke-width: 8; }
.runner { fill: var(--text); filter: drop-shadow(0 0 6px var(--accent)); }
.legs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.legs li { display: flex; align-items: center; gap: 8px; cursor: default; padding: 4px 0; }
.legs strong { font-weight: 650; }
.leg-dot { width: 12px; height: 12px; border-radius: 4px; }
.leg-dot.swim { background: var(--cyan); } .leg-dot.bike { background: var(--accent); } .leg-dot.run { background: var(--violet); }

.portrait { grid-column: span 2; grid-row: span 2; padding: 0; display: flex; align-items: flex-end; min-height: 540px; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: grayscale(1) contrast(1.05); transition: filter .6s var(--ease), transform 1.2s var(--ease-out); }
.portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.8)); }
.portrait:hover img { filter: none; transform: scale(1.04); }
.portrait-copy { position: relative; z-index: 1; padding: 24px; color: #fff; }
.portrait-copy .eyebrow { color: rgba(255,255,255,.7); }

.brighton { grid-column: span 2; padding: 0; min-height: 300px; color: #fff; }
.seascape { position: absolute; inset: 0; width: 100%; height: 100%; }
#sun { transition: cy .8s, fill .8s; }
.pier rect, .pier path, .pier line { fill: rgba(10, 12, 25, .85); stroke: rgba(10, 12, 25, .85); }
.sea { animation: sea 7s ease-in-out infinite alternate; }
.sea.s1 { fill: rgba(30, 60, 110, .75); }
.sea.s2 { fill: rgba(15, 35, 75, .9); animation-duration: 9s; animation-direction: alternate-reverse; }
@keyframes sea { to { transform: translateX(-30px); } }
.card-overlay { position: relative; z-index: 1; padding: 22px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(transparent 20%, rgba(0,0,0,.55)); }
.card-overlay .eyebrow { color: rgba(255,255,255,.75); }
.card-overlay p { margin: 0; }
.brighton-time { font: 600 15px/1.4 var(--font-mono); margin-bottom: 8px !important; }
.brighton-time .muted { color: rgba(255,255,255,.7); font-weight: 400; }

.anime { grid-column: span 2; background: #FAF7EE; color: #111; border-color: #111; display: flex; align-items: flex-end; }
.anime .eyebrow { color: #555; }
.speedlines { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(0,0,0,.09) 0deg 1.5deg, transparent 1.5deg 6deg); transition: transform 1.6s var(--ease-out), opacity .4s; opacity: .5; }
.anime:hover .speedlines { transform: rotate(18deg) scale(1.2); opacity: 1; }
.anime::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#111 1px, transparent 1.4px); background-size: 7px 7px; opacity: .1; }
.kana { position: absolute; right: 14px; top: 16px; writing-mode: vertical-rl; font: 900 36px/1 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic', sans-serif; letter-spacing: .08em; color: #E0353B; }
.menace { position: absolute; left: 22px; top: 22px; font: 900 30px/1 'Hiragino Sans', 'Noto Sans JP', sans-serif; color: #6B3FA0; opacity: 0; transform: translateY(8px) skewX(-10deg); transition: opacity .3s, transform .5s var(--spring); }
.anime:hover .menace { opacity: 1; transform: skewX(-10deg); animation: shake .15s infinite; }
@keyframes shake { 50% { translate: 1px -1px; } }
.anime-copy { position: relative; z-index: 1; background: #FAF7EE; padding: 12px 14px; border: 2px solid #111; box-shadow: 5px 5px 0 #111; margin-right: 56px; }
.anime-copy h3 { color: #111; }

/* music */
.music {
  grid-column: span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: radial-gradient(90% 120% at 100% 50%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 60%), var(--surface);
}
.music-chart { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; }
.music-chart b { font: var(--display-weight) clamp(64px, 7vw, 108px)/.9 var(--font-display); letter-spacing: var(--display-track); }
.music-chart-label { font: 500 12px/1.35 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.music-copy p.small { max-width: 52ch; color: var(--muted); }
.music-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; }
.music-tags li { font: 500 12px/1 var(--font-mono); padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-strong); }
.music-stage { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.vinyl {
  position: relative; width: 190px; height: 190px; border-radius: 50%;
  background: repeating-radial-gradient(circle at 50% 50%, #0d0d10 0 2px, #1c1c22 2px 4px);
  box-shadow: 0 20px 40px -14px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.06);
  animation: spin 3.2s linear infinite; animation-play-state: paused;
}
.vinyl::before { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 30deg, transparent 0 15%, rgba(255,255,255,.07) 20%, transparent 30% 65%, rgba(255,255,255,.05) 70%, transparent 80%); }
.vinyl span { position: absolute; inset: 34%; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 800 15px/1 var(--font-display); letter-spacing: -.02em; }
.vinyl span::after { content: ''; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #0d0d10; }
.music:hover .vinyl { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-right { display: grid; gap: 18px; justify-items: start; }
.eq { display: flex; align-items: flex-end; gap: 4px; width: 100%; height: 110px; }
.eq i { flex: 1; min-width: 3px; height: var(--h, 12%); border-radius: 3px; background: linear-gradient(to top, var(--accent), var(--cyan)); opacity: .9; transition: height .09s linear; }
.eq i { animation: idle 2.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -0.13s); }
@keyframes idle { from { height: 8%; } to { height: 26%; } }

@media (max-width: 1000px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .ironman { grid-column: span 2; }
  .music { grid-column: span 2; grid-template-columns: 1fr; }
  .portrait { grid-column: span 1; grid-row: span 2; min-height: 460px; }
  .brighton, .anime { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .ironman, .portrait, .brighton, .anime, .music { grid-column: auto; grid-row: auto; }
  .portrait { min-height: 420px; }
  .music-stage { grid-template-columns: 1fr; justify-items: center; }
  .vinyl { width: 160px; height: 160px; }
  .music-right { justify-items: center; width: 100%; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding-bottom: 100px; }
.mega {
  margin: 20px 0 30px;
  font: var(--display-weight) calc(clamp(72px, 15vw, 248px) * var(--display-scale))/.88 var(--font-display);
  font-variation-settings: 'wdth' var(--display-wdth);
  letter-spacing: var(--display-track);
  white-space: nowrap;
}
.mega .ch { display: inline-block; transition: transform .5s var(--spring), color .3s; }
.mega .ch:hover { transform: translateY(-.08em) rotate(-4deg); color: var(--accent-text); }
.mega .ch.dot-ch { color: var(--accent-text); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact-grid.solo { grid-template-columns: 1fr; }
.contact-lede { margin: 0 0 24px; font-size: clamp(19px, 1.6vw, 24px); max-width: 40ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 26px 0 0; padding: 0; list-style: none; }
.contact-links a { text-decoration: none; color: var(--muted); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color .2s, border-color .2s; }
.contact-links a:hover { color: var(--text); border-color: var(--accent); }
.refs { padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.ref-list { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; gap: 12px; }
.ref-list li { display: flex; align-items: center; gap: 12px; }
.ref-list .ref-av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 13px/1 var(--font-mono); color: var(--accent-ink); background: var(--accent); flex: none; }
.ref-list strong { display: block; font-weight: 600; }
.ref-list span { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .mega { white-space: normal; } }

.footer { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 90px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--line); font-size: 14px; }
.footer p { margin: 0; }

/* =========================================================
   TERMINAL
   ========================================================= */
dialog { padding: 0; border: 0; color: inherit; background: none; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(5, 5, 8, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.terminal[open] {
  width: min(820px, calc(100vw - 24px)); height: min(540px, calc(100svh - 48px));
  display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden;
  background: rgba(13, 13, 19, .96); color: #E6E6EE;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 120px -20px rgba(0,0,0,.8);
  animation: chatIn .35s var(--ease-out);
  color-scheme: dark;
}
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.06); }
.term-bar .dots i:first-child { cursor: pointer; }
.term-title { flex: 1; text-align: center; font: 12.5px/1 var(--font-mono); color: #8A8A9A; }
.term-x { font: 11px/1 var(--font-mono); color: #8A8A9A; padding: 5px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.12); }
.term-body { flex: 1; overflow-y: auto; padding: 14px 18px 18px; font: 13.5px/1.65 var(--font-mono); }
.term-out { white-space: pre-wrap; word-break: break-word; }
.term-out .cmd { color: #fff; }
.term-out .dim { color: #6E6E80; }
.term-line { display: flex; gap: 10px; align-items: baseline; }
.term-prompt { flex: none; white-space: nowrap; }
.term-line input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; caret-color: var(--accent); }
.t-green { color: #A6E22E; } .t-blue { color: #66D9EF; } .t-yellow { color: #E6DB74; } .t-pink { color: #F92672; } .t-violet { color: #AE81FF; } .t-lime { color: var(--accent); }
.term-out a { color: #66D9EF; }
@media (max-width: 560px) { .term-prompt .t-green { display: none; } }

/* =========================================================
   RESPONSIVE: HERO
   ========================================================= */
@media (max-width: 900px) {
  .hero { padding-top: calc(var(--nav-h) + 32px); }
  .hero-foot { grid-template-columns: 1fr; }
  .hero-actions { justify-items: start; }
  .hero-meta { justify-content: flex-start; }
}
@media (max-width: 520px) {
  .hero-hello { font-size: 13px; }
  /* Longest line ("shipped apps on time") is ~9.6em wide; keep each line on one row. */
  .hero-title { font-size: min(46px, calc((100vw - 2 * var(--gutter)) / 10)); }
  .scroll-cue { display: none; }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line > span { transform: none; }
  .marquee { animation: none; flex-wrap: wrap; width: auto; }
}
