/* =========================================================
   Tokens — dark by default, one accent (lime)
   ========================================================= */
:root,
:root[data-theme="dark"] {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --surface-3: #212126;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .15);
  --text: #ededef;
  --text-2: #a1a1aa;
  --muted: #71717a;
  --accent: #c6f24e;
  --accent-ink: #c6f24e;
  --on-accent: #0b0b0c;
  --accent-soft: rgba(198, 242, 78, .12);
  --grid: rgba(255, 255, 255, .04);
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 24px 60px -24px rgba(0,0,0,.85);
  --shadow-lg: 0 50px 100px -40px rgba(0,0,0,.9);
  --spot: rgba(198, 242, 78, .06);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f4f4f3;
  --surface-3: #eaeae8;
  --border: rgba(0, 0, 0, .08);
  --border-2: rgba(0, 0, 0, .16);
  --text: #0a0a0b;
  --text-2: #52525b;
  --muted: #74747c;
  --accent: #b5e534;
  --accent-ink: #4d7c0f;
  --on-accent: #0b0b0c;
  --accent-soft: rgba(132, 204, 22, .14);
  --grid: rgba(0, 0, 0, .05);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 24px 60px -28px rgba(0,0,0,.28);
  --shadow-lg: 0 50px 100px -40px rgba(0,0,0,.35);
  --spot: rgba(132, 204, 22, .09);
  color-scheme: light;
}
:root {
  --code-bg: #0e0e10;
  --code-bar: #151518;
  --code-text: #d4d4d8;
  --code-dim: #5b5b63;
  --code-str: #a5d6a7;
  --code-fn: #7dd3fc;
  --r: 14px;
  --r-lg: 20px;
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --max: 1160px;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); letter-spacing: -.006em;
  overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .4s, color .4s;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
b { font-weight: 600; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.spark { display: inline-block; color: var(--accent-ink); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; position: relative; flex: none; display: inline-block; }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 2s ease-out infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }

/* scroll progress */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* background */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 30%, transparent 75%);
}
.bg__glow { position: absolute; width: 1000px; height: 600px; left: 50%; top: -380px; translate: -50% 0; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-soft), transparent); filter: blur(20px); }
.spot { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, -30%), var(--spot), transparent 60%); }

/* "view" label that follows the pointer over images */
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: 600 12px var(--mono); opacity: 0; scale: .6; transition: opacity .2s, scale .3s var(--ease);
  translate: -50% -50%;
}
.cursor-label.is-on { opacity: 1; scale: 1; }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed; top: 14px; left: 50%; translate: -50% 0; z-index: 50;
  width: min(var(--max), calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 18px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--border);
  transition: transform .5s var(--ease);
}
.nav.is-hidden { transform: translateY(-150%); }
.nav__logo { font: 600 15px var(--mono); display: flex; align-items: center; }
.nav__logo .prompt { color: var(--muted); }
.caret { color: var(--accent-ink); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav__links { display: flex; gap: 2px; }
.nav__links a { padding: 7px 11px; border-radius: 8px; font: 500 13px var(--mono); color: var(--text-2); transition: color .2s, background .2s; }
.nav__links a i { font-style: normal; color: var(--muted); margin-right: 6px; font-size: 11px; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active i { color: var(--accent-ink); }
.nav__actions { display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--text-2); transition: color .2s, border-color .2s; }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.i-sun { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root[data-theme="light"] .i-moon { display: none; }
@media (max-width: 900px) { .nav__links { display: none; } }
@media (max-width: 480px) { .hide-sm { display: none !important; } }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 20px; border-radius: 11px;
  font: 500 15px var(--sans); white-space: nowrap;
  transition: transform .35s var(--ease), background .25s, border-color .25s, box-shadow .3s, color .2s;
}
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn--accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1px rgba(0,0,0,.1) inset; }
.btn--accent:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.1) inset, 0 10px 40px -8px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn--ghost { border: 1px solid var(--border-2); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn--ghost:hover { border-color: var(--text-2); }
.kbd { font: 12px var(--mono); padding: 1px 6px; border-radius: 5px; background: rgba(0,0,0,.12); }

/* =========================================================
   Browser + phone frames (shared)
   ========================================================= */
.dots { display: flex; gap: 6px; flex: none; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #3f3f46; }
.browser {
  border-radius: 14px; overflow: hidden; background: #0e0e10;
  border: 1px solid rgba(255,255,255,.1); box-shadow: var(--shadow-lg);
}
.browser__bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #17171a; border-bottom: 1px solid rgba(255,255,255,.06); }
.browser__url {
  flex: 1; max-width: 380px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px;
  font: 11.5px var(--mono); color: #a1a1aa; background: #0e0e10; padding: 5px 10px; border-radius: 7px; white-space: nowrap; overflow: hidden;
}
.browser__url svg { color: #71717a; flex: none; }
.browser__url span { overflow: hidden; text-overflow: ellipsis; }
.browser__live { display: flex; align-items: center; gap: 7px; font: 11px var(--mono); color: #a1a1aa; flex: none; }
.browser__view { position: relative; aspect-ratio: 16 / 10; background: #0e0e10; overflow: hidden; }
.browser__view img, .phone__view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.03); transition: opacity .9s var(--ease), transform 1.4s var(--ease); }
.browser__view img.is-on, .phone__view img.is-on { opacity: 1; transform: none; }

.phone {
  position: absolute; width: 150px; aspect-ratio: 390 / 844; border-radius: 26px; padding: 6px;
  background: #0b0b0c; border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4);
}
.phone > img, .phone__view { width: 100%; height: 100%; border-radius: 20px; object-fit: cover; object-position: top; position: relative; overflow: hidden; }
.phone__notch { position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 44px; height: 12px; border-radius: 10px; background: #0b0b0c; z-index: 2; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 150px 24px 110px;
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; min-height: 100svh;
}
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; color: var(--text-2); transition: border-color .2s;
}
.status:hover { border-color: var(--border-2); }
.status__sep { color: var(--muted); }
.hero__title { font: 600 clamp(46px, 6.2vw, 84px)/1 var(--sans); letter-spacing: -.048em; margin: 0 0 26px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .1em; }
.hero__title .word { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.hero__title .muted { color: var(--muted); }
.hero__title .serif { color: var(--text); font-size: 1.08em; }
body.is-ready .hero__title .word { transform: none; }
body.is-ready .hero__title .line:nth-child(2) .word { transition-delay: .1s; }
.hero__sub { font-size: 18px; color: var(--text-2); max-width: 500px; margin: 0 0 34px; line-height: 1.6; }
.hero__sub b { color: var(--text); font-weight: 500; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 50px; }
.stats { list-style: none; display: flex; padding: 0; margin: 0; border-top: 1px solid var(--border); max-width: 520px; }
.stats li { flex: 1; padding: 18px 16px 0 0; display: flex; flex-direction: column; gap: 6px; }
.stats li + li { padding-left: 16px; border-left: 1px solid var(--border); }
.stats b { font: 500 30px/1 var(--mono); letter-spacing: -.04em; }
.stats li:first-child b { color: var(--accent-ink); }
.stats li > span { font-size: 12.5px; line-height: 1.4; color: var(--muted); }

.hero__show { position: relative; padding: 0 40px 70px 0; }
.browser--hero { transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transform-origin: left center; transition: transform 1.2s var(--ease); }
.hero__show:hover .browser--hero { transform: perspective(1600px) rotateY(-2deg) rotateX(1deg); }
.phone--hero { right: 0; bottom: 20px; width: 150px; animation: bob 7s ease-in-out infinite; }
.hero__caption {
  position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 12px;
  font-size: 13.5px; color: var(--text-2); padding: 8px 14px 8px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(8px);
  transition: border-color .2s, color .2s;
}
.hero__caption b { color: var(--text); }
.hero__caption .mono { font-size: 11px; }
.hero__caption .arrow { transition: transform .3s var(--ease); color: var(--muted); }
.hero__caption:hover { border-color: var(--border-2); color: var(--text); }
.hero__caption:hover .arrow { transform: translate(2px, -2px); color: var(--accent-ink); }
@keyframes bob { 50% { transform: translateY(-10px); } }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 130px; min-height: auto; gap: 60px; }
  .browser--hero, .hero__show:hover .browser--hero { transform: none; }
}
@media (max-width: 560px) {
  .hero__show { padding: 0 0 90px; }
  .phone--hero { width: 104px; right: -4px; bottom: 44px; border-radius: 20px; padding: 4px; }
  .phone--hero > img { border-radius: 16px; }
  .hero__caption { right: 0; font-size: 12.5px; }
  .hero__caption .mono { display: none; }
  .browser__live { display: none; }
  .stats b { font-size: 24px; }
  .stats li { padding-right: 10px; } .stats li + li { padding-left: 12px; }
  .stats li > span { font-size: 11.5px; }
}

/* =========================================================
   Marquee
   ========================================================= */
.marquee {
  overflow: hidden; border-block: 1px solid var(--border); padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee span { font: 500 14px var(--mono); color: var(--muted); padding-left: 26px; white-space: nowrap; display: flex; align-items: center; gap: 26px; transition: color .2s; }
.marquee span::after { content: "/"; color: var(--border-2); }
.marquee span:hover { color: var(--text); }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   Sections
   ========================================================= */
.section { max-width: var(--max); margin: 0 auto; padding: 140px 24px 20px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; margin-bottom: 48px; }
.label { font: 500 12.5px var(--mono); color: var(--accent-ink); margin: 0 0 14px; letter-spacing: .02em; }
.section h2 { font: 600 clamp(38px, 5vw, 62px)/1.02 var(--sans); letter-spacing: -.045em; margin: 0; }
.section h2 .serif { color: var(--text-2); font-size: 1.06em; }
.section__note { max-width: 340px; color: var(--text-2); margin: 0; font-size: 15px; }
.link-arrow { display: inline-flex; gap: 8px; align-items: center; font: 500 13px var(--mono); color: var(--text); border-bottom: 1px solid var(--border-2); padding-bottom: 4px; transition: border-color .2s, color .2s; }
.link-arrow:hover { border-color: var(--accent); color: var(--accent-ink); }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
/* =========================================================
   Case studies — each project has its own layout
   ========================================================= */
.case { padding: 56px 0 8px; border-top: 1px solid var(--border); }
.case + .case { margin-top: 64px; }
.case__top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.case__num { font-size: 12px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--border-2); border-radius: 6px; }
.chip-live { display: inline-flex; align-items: center; gap: 8px; font: 12px var(--mono); color: var(--accent-ink); padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); }
.chip-live--muted { color: var(--text-2); background: var(--surface-2); }
.case h3 { font: 600 clamp(32px, 4vw, 52px)/1.02 var(--sans); letter-spacing: -.045em; margin: 0; }
.case__lede { color: var(--text-2); font-size: 17px; margin: 0 0 22px; }
.case__links { display: flex; gap: 8px; flex-wrap: wrap; }
.col__label { margin: 0 0 14px; font-size: 11.5px; font-weight: 500; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--text-2); font-size: 15px; }
.bullets li { padding-left: 20px; position: relative; }
.bullets li::before { content: ""; position: absolute; left: 1px; top: .62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.bullets b { color: var(--text); font-weight: 500; }

/* ---------- 01 · Showcase: header row → wide stage → 3 columns ---------- */
.show__head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.show__intro .case__lede { max-width: 480px; }
.show__stage { position: relative; padding-right: 90px; }
.browser__view--wide { aspect-ratio: 16 / 8.2; }
.case__tabs { display: flex; gap: 4px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.case__tabs::-webkit-scrollbar { display: none; }
.case__tabs button { font: 500 12px var(--mono); color: var(--muted); padding: 6px 10px; border-radius: 7px; border: 1px solid transparent; white-space: nowrap; transition: all .2s; position: relative; overflow: hidden; }
.case__tabs button:hover { color: var(--text); }
.case__tabs button.is-active { color: var(--text); border-color: var(--border-2); background: var(--surface); }
.case__tabs button.is-active::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: left; animation: tabfill var(--dur, 4s) linear forwards; }
.case__tabs.is-paused button.is-active::after { animation-play-state: paused; }
@keyframes tabfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.phone--case { right: 0; bottom: -46px; width: 170px; }
.show__cols { display: grid; grid-template-columns: 1.1fr .9fr 1.1fr; margin-top: 86px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.col { padding: 26px 26px 28px; }
.col + .col { border-left: 1px solid var(--border); }
.col p { margin: 0; color: var(--text-2); font-size: 15px; }
.col p b { color: var(--text); font-weight: 500; }
.stacklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; font-size: 14.5px; }
.stacklist li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-weight: 500; }
.stacklist li:last-child { border: 0; }
.stacklist span { font: 12px var(--mono); color: var(--muted); font-weight: 400; }

/* ---------- 02 · Bento grid ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: minmax(0, auto); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; min-width: 0; position: relative; overflow: hidden; transition: border-color .3s; }
.tile:hover { border-color: var(--border-2); }
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(300px circle at var(--x, 50%) var(--y, 0%), var(--accent-soft), transparent 60%); }
.tile:hover::before { opacity: 1; }
.tile--intro { grid-column: 1 / 6; grid-row: 1; display: flex; flex-direction: column; align-items: flex-start; }
.tile--intro h3 { margin-bottom: 14px; }
.tile--intro .btn { margin-top: auto; }
.tile--code { grid-column: 6 / 13; grid-row: 1 / 3; padding: 0; border: 0; background: none; }
.tile--code .editor { height: 100%; display: flex; flex-direction: column; }
.tile--code .editor__body { flex: 1; }
.tile--stack { grid-column: 1 / 6; grid-row: 2; }
.tile--flow { grid-column: 1 / 8; grid-row: 3 / 5; }
.tile--feat { display: flex; gap: 18px; align-items: center; padding: 20px 22px; }
.feat__big { font-size: 34px; font-weight: 500; letter-spacing: -.05em; line-height: 1; color: var(--accent-ink); min-width: 92px; display: flex; align-items: baseline; gap: 4px; }
.feat__big small { font-size: 12px; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.tile--feat p { margin: 0; font-size: 14px; color: var(--text-2); }
.bento .tile--feat:nth-child(5) { grid-row: 3; grid-column: 8 / 13; } .bento .tile--feat:nth-child(6) { grid-row: 4; grid-column: 8 / 13; }
.bento .tile--feat:nth-child(7) { grid-row: 5; grid-column: 1 / 7; } .bento .tile--feat:nth-child(8) { grid-row: 5; grid-column: 7 / 13; }

.editor { border-radius: var(--r-lg); overflow: hidden; background: var(--code-bg); border: 1px solid rgba(255,255,255,.1); color: var(--code-text); }
.editor__bar { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #17171a; border-bottom: 1px solid rgba(255,255,255,.06); }
.editor__title { flex: 1; text-align: center; font-size: 11.5px; color: #a1a1aa; }
.editor__branch { font-size: 11px; color: #71717a; }
.editor__body { display: grid; grid-template-columns: 150px 1fr; }
.tree { border-right: 1px solid rgba(255,255,255,.06); padding: 12px 0; font-size: 11.5px; color: #8b8b93; background: #0c0c0e; }
.tree p { margin: 0; padding: 2.5px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree .d1 { padding-left: 22px; } .tree .d2 { padding-left: 32px; } .tree .d3 { padding-left: 42px; color: #6b6b73; }
.tree .is-open { background: rgba(198,242,78,.08); color: #ededef; box-shadow: inset 2px 0 0 #c6f24e; }
.code { min-width: 0; display: flex; flex-direction: column; }
.code__tab { font-size: 11.5px; color: #d4d4d8; padding: 8px 14px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; gap: 8px; }
.code__tab .ts { font-size: 9px; font-weight: 700; color: #0e0e10; background: #7dd3fc; padding: 1px 4px; border-radius: 3px; }
.code pre { margin: 0; padding: 14px 16px; font-size: 11.5px; line-height: 1.75; overflow: auto; flex: 1; scrollbar-width: thin; }
.code .k { color: #c6f24e; } .code .s { color: var(--code-str); } .code .f { color: var(--code-fn); }
.code__foot { display: flex; justify-content: space-between; gap: 10px; padding: 7px 14px; font-size: 10.5px; color: #5b5b63; border-top: 1px solid rgba(255,255,255,.06); }

.arch { display: grid; gap: 22px; }
.arch__row { display: flex; align-items: center; gap: 0; flex-wrap: wrap; row-gap: 10px; }
.arch__line { flex: 1; min-width: 18px; height: 1px; background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px); position: relative; }
.arch__line::after { content: ""; position: absolute; right: -1px; top: -3px; border: 3.5px solid transparent; border-left: 5px solid var(--muted); }
.arch__node { font: 12px var(--mono); padding: 8px 11px; border-radius: 9px; border: 1px solid var(--border-2); background: var(--surface-2); white-space: nowrap; display: inline-flex; flex-direction: column; gap: 2px; }
.arch__node small { font-size: 10.5px; color: var(--muted); }
.arch__node--hl { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.arch__services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-top: 18px; border-top: 1px dashed var(--border-2); position: relative; }
.arch__services::before { content: "services"; position: absolute; top: -9px; left: 0; font: 10.5px var(--mono); color: var(--muted); background: var(--surface); padding-right: 8px; }

/* ---------- 03 · Impact: header → metrics band → before/after table ---------- */
.impact__head { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: end; margin-bottom: 32px; }
.impact__meta { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.impact__meta div { padding: 12px 14px; }
.impact__meta div + div { border-left: 1px solid var(--border); }
.impact__meta dt { font: 11px var(--mono); color: var(--muted); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .06em; }
.impact__meta dd { margin: 0; font-size: 13.5px; font-weight: 500; }
.impact__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.metric { padding: 24px 24px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.metric__label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.metric__val { display: flex; align-items: baseline; gap: 2px; font: 500 64px/1.05 var(--mono); letter-spacing: -.05em; margin: 10px 0 16px; }
.metric__val small { font-size: 22px; color: var(--accent-ink); margin-left: 8px; letter-spacing: 0; }
.metric:first-child .metric__val { color: var(--accent-ink); }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: inherit; transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) .3s; }
.case.is-in .bar i { transform: scaleX(1); }
.ba { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ba__row { display: grid; grid-template-columns: 1fr 48px 2fr; align-items: center; padding: 16px 24px; border-top: 1px solid var(--border); font-size: 15px; transition: background .25s; }
.ba__row:first-child { border-top: 0; }
.ba__row:not(.ba__row--head):hover { background: var(--surface-2); }
.ba__row > span:first-child { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.ba__row > i { font-style: normal; color: var(--accent-ink); font-family: var(--mono); text-align: center; transition: transform .3s var(--ease); }
.ba__row:hover > i { transform: translateX(4px); }
.ba__row > span:last-child { color: var(--text-2); }
.ba__row b { color: var(--text); font-weight: 500; }
.ba__row--head { padding: 12px 24px; background: var(--surface-2); }
.ba__row--head span { font-size: 11px !important; text-transform: uppercase; letter-spacing: .08em; color: var(--muted) !important; text-decoration: none !important; }
.ba__row--head span:last-child { color: var(--accent-ink) !important; }
.metrics__note { margin: 14px 4px 0; font-size: 11px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .show__head, .impact__head { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .show__stage { padding-right: 0; }
  .phone--case { right: 10px; width: 130px; }
  .show__cols { grid-template-columns: 1fr 1fr; }
  .show__cols .col:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > .tile { grid-column: auto !important; grid-row: auto !important; }
  .tile--intro, .tile--code, .tile--flow, .tile--stack { grid-column: 1 / -1 !important; }
  .impact__meta { grid-template-columns: 1fr 1fr; }
  .impact__meta div:nth-child(3) { border-left: 0; }
  .impact__meta div:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .phone--case { width: 92px; right: 6px; bottom: -30px; border-radius: 18px; padding: 4px; }
  .phone--case .phone__view { border-radius: 14px; }
  .phone--case .phone__notch { width: 28px; height: 8px; top: 8px; }
  .browser__view--wide { aspect-ratio: 16 / 10; }
  .show__cols { grid-template-columns: 1fr; margin-top: 60px; }
  .col + .col { border-left: 0; border-top: 1px solid var(--border); }
  .bento { grid-template-columns: 1fr; }
  .editor__body { grid-template-columns: 1fr; } .tree { display: none; }
  .arch__services { grid-template-columns: 1fr 1fr; }
  .impact__stats { grid-template-columns: 1fr; }
  .metric__val { font-size: 48px; }
  .ba__row { grid-template-columns: 1fr; gap: 4px; padding: 14px 18px; }
  .ba__row > i { display: none; }
  .ba__row--head { display: none; }
  .ba__row > span:first-child { font-size: 13px; }
}

/* =========================================================
   Pinboard (masonry)
   ========================================================= */
.chips {
  display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 26px; padding: 5px; width: fit-content; max-width: 100%;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.chip { padding: 7px 13px; border-radius: 8px; font: 500 13px var(--mono); color: var(--text-2); transition: color .2s, background .2s; display: flex; align-items: center; gap: 6px; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--border-2) inset; }
.count { font-size: 11px; padding: 0 6px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink); }

.masonry { columns: 3 280px; column-gap: 16px; }
.pin {
  break-inside: avoid; margin: 0 0 16px; position: relative; display: block; cursor: pointer;
  opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.pin.is-in { opacity: 1; transform: none; }
.pin.is-hidden { display: none; }
.pin__media { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); isolation: isolate; }
.pin__media img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.pin:hover .pin__media img { transform: scale(1.04); }
.pin__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), transparent 30%, transparent 60%, rgba(0,0,0,.55)); opacity: 0; transition: opacity .35s; }
.pin:hover .pin__media::after, .pin:focus-visible .pin__media::after { opacity: 1; }
.pin--tall .pin__media { padding: 8px; border-radius: 26px; background: #0b0b0c; }
.pin--tall .pin__media img { border-radius: 19px; }
.pin__url {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; font: 11px var(--mono); color: #fff;
  padding: 4px 9px; border-radius: 6px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pin:hover .pin__url { opacity: 1; transform: none; }
.pin__star {
  position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 8px; font: 500 12px var(--mono);
  background: rgba(9, 9, 11, .7); color: #ededef; border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .3s var(--ease), background .2s;
}
.pin:hover .pin__star, .pin:focus-within .pin__star, .pin__star.is-starred { opacity: 1; transform: none; }
.pin__star.is-starred { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.pin__star.pop { animation: pop .45s var(--ease); }
@keyframes pop { 40% { transform: scale(1.15); } }
.pin__meta { padding: 10px 4px 2px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pin__meta h3 { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.pin__meta span { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }

/* note pins */
.note { padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); transition: border-color .3s; position: relative; overflow: hidden; }
.pin:hover .note { border-color: var(--border-2); }
.note::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--x, 80%) var(--y, 0%), var(--accent-soft), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.pin:hover .note::before { opacity: 1; }
.note__kicker { font: 11px var(--mono); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.note h3 { margin: 0 0 12px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.note p { margin: 0; color: var(--text-2); font-size: 14px; }
.note .tags { margin-top: 2px; }
.note ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: 13.5px; color: var(--text-2); }
.note li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--border); padding-bottom: 7px; }
.note li:last-child { border: 0; padding: 0; }
.note li span { font: 11.5px var(--mono); color: var(--muted); white-space: nowrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font: 500 12px var(--mono); padding: 4px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); transition: all .3s var(--ease); }
.pin:hover .note .tags span:first-child { background: var(--accent); color: var(--on-accent); border-color: transparent; }
@media (max-width: 620px) { .masonry { columns: 2; column-gap: 10px; } .pin { margin-bottom: 10px; } .pin__meta h3 { font-size: 13px; } .pin__meta span { display: none; } .note { padding: 14px; } .note h3 { font-size: 16px; } .pin--tall .pin__media { padding: 5px; border-radius: 20px; } .pin--tall .pin__media img { border-radius: 15px; } .pin__star { padding: 4px 8px; font-size: 11px; } }

/* =========================================================
   Experience
   ========================================================= */
.xp { list-style: none; margin: 0; padding: 0; position: relative; }
.xp__item { display: grid; grid-template-columns: 170px 1fr; gap: 30px; padding: 30px 0; border-top: 1px solid var(--border); position: relative; }
.xp__item:last-child { border-bottom: 1px solid var(--border); }
.xp__item::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--accent); transition: width 1.2s var(--ease) .2s; }
.xp__item.is-in::before { width: 100%; }
.xp__when { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); padding-top: 4px; }
.xp__when span:first-child { color: var(--text); }
.xp__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-bottom: 14px; }
.xp__head h3 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.xp__co { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--accent-ink); }
.xp__loc { margin-left: auto; font-size: 12px; color: var(--muted); }
.xp ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--text-2); font-size: 15px; max-width: 760px; }
.xp__body li { padding-left: 20px; position: relative; }
.xp__body li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }
.xp__body li b { color: var(--text); }
@media (max-width: 720px) { .xp__item { grid-template-columns: 1fr; gap: 10px; } .xp__when { flex-direction: row; gap: 6px; } .xp__when span + span::before { content: "— "; } .xp__loc { margin-left: 0; width: 100%; } }

.skills { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 56px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.skill { padding: 22px 22px 24px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background .3s; }
.skill:nth-child(3n) { border-right: 0; }
.skill:nth-last-child(-n+3) { border-bottom: 0; }
.skill:hover { background: var(--surface-2); }
.skill h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 500; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.skill p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
@media (max-width: 860px) {
  .skills { grid-template-columns: 1fr 1fr; }
  .skill:nth-child(3n) { border-right: 1px solid var(--border); }
  .skill:nth-child(2n) { border-right: 0; }
  .skill:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .skill:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 520px) {
  .skills { grid-template-columns: 1fr; }
  .skill { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .skill:last-child { border-bottom: 0 !important; }
}

/* =========================================================
   AI — IDE panel
   ========================================================= */
.ide {
  display: grid; grid-template-columns: 270px 1fr; height: 540px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow); position: relative;
}
.ide::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(500px circle at 100% 0%, var(--accent-soft), transparent 50%); }
.ide__side { border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 12px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.ide__label { font: 500 11px var(--mono); color: var(--muted); letter-spacing: .08em; margin: 0 4px; }
.suggest { display: flex; flex-direction: column; gap: 2px; }
.suggest button { text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); transition: background .2s, color .2s; display: flex; gap: 8px; }
.suggest button span { font-family: var(--mono); color: var(--muted); transition: color .2s, transform .3s var(--ease); }
.suggest button:hover { background: var(--surface-3); color: var(--text); }
.suggest button:hover span { color: var(--accent-ink); transform: translateX(2px); }
.ide__model { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 0 4px; }
.ide__main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.ide__tabs { display: flex; align-items: center; border-bottom: 1px solid var(--border); font: 12.5px var(--mono); }
.tab { padding: 12px 16px; color: var(--text); border-right: 1px solid var(--border); box-shadow: inset 0 -2px 0 var(--accent); }
.ide__status { margin-left: auto; padding: 0 16px; color: var(--accent-ink); font-size: 11.5px; }
.chat__log { flex: 1; min-height: 0; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.msg { max-width: 88%; font-size: 15px; line-height: 1.6; animation: msgIn .45s var(--ease); }
.msg a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent); text-underline-offset: 3px; }
.msg b { color: var(--text); font-weight: 600; }
.msg--user { align-self: flex-end; background: var(--surface-3); border: 1px solid var(--border); padding: 9px 14px; border-radius: 12px 12px 4px 12px; }
.msg--ai { align-self: flex-start; color: var(--text-2); padding-left: 34px; position: relative; }
.msg--ai::before { content: "✦"; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 11px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } }
.typing { display: inline-flex; gap: 4px; padding: 6px 0; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .4; animation: dots 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 30% { transform: translateY(-3px); opacity: 1; } }
.chat__form { display: flex; align-items: center; gap: 10px; margin: 0 16px 16px; padding: 6px 6px 6px 14px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.chat__form:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px var(--accent-soft); }
.chat__prompt { color: var(--accent-ink); }
.chat__form input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 15px var(--sans); outline: none; padding: 8px 0; }
.chat__form input::placeholder { color: var(--muted); }
.send { width: 38px; height: 34px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 15px; transition: transform .3s var(--ease); }
.send:hover { transform: translateY(-1px); }
@media (max-width: 820px) {
  .ide { grid-template-columns: 1fr; height: auto; }
  .ide__side { border-right: 0; border-bottom: 1px solid var(--border); }
  .suggest { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .suggest button { border: 1px solid var(--border); font-size: 13px; }
  .ide__model { display: none; }
  .chat__log { height: 380px; flex: none; }
}

/* =========================================================
   Contact
   ========================================================= */
.contact { padding-bottom: 110px; }
.section .contact__big { font: 600 clamp(52px, 9.5vw, 128px)/.95 var(--sans); letter-spacing: -.058em; margin: 0 0 40px; }
.section .contact__big .serif { color: var(--accent-ink); }
.copy { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.copy__mail { font: 500 clamp(18px, 2.4vw, 26px) var(--mono); letter-spacing: -.03em; border-bottom: 1px solid var(--border-2); padding-bottom: 4px; transition: border-color .2s, color .2s; word-break: break-all; }
.copy__mail:hover { border-color: var(--accent); color: var(--accent-ink); }
.copy__btn { font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-2); color: var(--text-2); transition: all .2s; }
.copy__btn:hover { color: var(--text); border-color: var(--text-2); }
.copy__btn.is-copied { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.links { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.link { position: relative; padding: 22px; display: flex; flex-direction: column; gap: 6px; transition: background .3s; min-width: 0; }
.link + .link { border-left: 1px solid var(--border); }
.link small { font: 11.5px var(--mono); color: var(--muted); }
.link span { font-weight: 500; overflow-wrap: anywhere; }
.link i { position: absolute; top: 18px; right: 20px; font-style: normal; color: var(--muted); transition: transform .35s var(--ease), color .2s; }
.link:hover { background: var(--surface-2); }
.link:hover i { transform: translate(3px, -3px); color: var(--accent-ink); }
@media (max-width: 860px) {
  .links { grid-template-columns: 1fr 1fr; }
  .link:nth-child(3) { border-left: 0; }
  .link:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .links { grid-template-columns: 1fr; }
  .link + .link { border-left: 0; border-top: 1px solid var(--border); }
}
.footer { max-width: var(--max); margin: 0 auto; padding: 26px 24px 100px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); color: var(--text-2); font-size: 12.5px; }
.footer a:hover { color: var(--accent-ink); }

/* =========================================================
   Modal / lightbox
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; visibility: hidden; pointer-events: none; }
.modal.is-open { visibility: visible; pointer-events: auto; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .35s; }
.modal.is-open .modal__backdrop { opacity: 1; }
.modal__card {
  position: relative; width: min(1100px, 100%); max-height: calc(100svh - 40px); overflow: auto;
  display: grid; grid-template-columns: 1.6fr 1fr; background: var(--surface); border: 1px solid var(--border-2); border-radius: 22px;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.modal.is-open .modal__card { opacity: 1; transform: none; }
.modal__card.is-note { width: min(560px, 100%); grid-template-columns: 1fr; }
.modal__media { padding: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.modal__media:empty { display: none; }
.modal__media img { border-radius: 12px; max-height: calc(100svh - 80px); width: auto; max-width: 100%; }
.modal__media.is-tall img { max-height: min(76svh, 720px); border-radius: 22px; border: 6px solid #0b0b0c; }
.modal__body { padding: 36px 30px 30px; display: flex; flex-direction: column; }
.modal__body h3 { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 12px; font-weight: 600; }
.modal__body p { color: var(--text-2); margin: 0 0 18px; }
.modal__url { font: 12px var(--mono); color: var(--muted); margin-bottom: 20px; overflow-wrap: anywhere; }
.modal__nav { display: flex; gap: 8px; margin-top: auto; padding-top: 20px; }
.modal__nav button { font: 500 12px var(--mono); padding: 7px 12px; border-radius: 8px; border: 1px solid var(--border-2); color: var(--text-2); transition: all .2s; }
.modal__nav button:hover { color: var(--text); border-color: var(--text-2); }
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 3; padding: 5px 9px; border-radius: 7px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2); font-size: 11px; transition: color .2s, border-color .2s; }
.modal__close:hover { color: var(--text); border-color: var(--text-2); }
@media (max-width: 760px) { .modal__card { grid-template-columns: 1fr; } .modal__body { padding: 20px 22px 24px; } .modal__media img { max-height: 60svh; } }

/* =========================================================
   FAB
   ========================================================= */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 11px; font: 500 13px var(--mono);
  background: var(--accent); color: var(--on-accent); box-shadow: 0 16px 40px -12px rgba(0,0,0,.6);
  opacity: 0; translate: 0 20px; pointer-events: none; transition: opacity .4s, translate .5s var(--ease), transform .35s var(--ease);
}
.fab .spark { color: inherit; }
.fab.is-shown { opacity: 1; translate: 0 0; pointer-events: auto; }

/* =========================================================
   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, .pin, .hero__title .word { opacity: 1 !important; transform: none !important; }
}
.pin--note { cursor: default; }
@media (max-width: 620px) { .note li { flex-direction: column; gap: 0; } .note__kicker { font-size: 10px; } }
@media (max-width: 640px) {
  .arch__row { flex-direction: column; align-items: flex-start; }
  .arch__line { flex: none; min-width: 0; width: 1px; height: 16px; margin-left: 22px; background: repeating-linear-gradient(180deg, var(--muted) 0 3px, transparent 3px 6px); }
  .arch__line::after { right: -3.5px; top: auto; bottom: -3px; border: 3.5px solid transparent; border-top: 5px solid var(--muted); }
}

/* =========================================================
   v4 — portrait hero, about, NewsLens lab, compact case
   ========================================================= */
.icon-btn--lg { width: 46px; height: 46px; border-radius: 11px; border-color: var(--border-2); }

/* hero with portrait */
.hero { grid-template-columns: 1.15fr .85fr; }
.hero__me { position: relative; justify-self: end; width: min(400px, 100%); padding-bottom: 60px; }
.portrait { margin: 0; position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--border-2); box-shadow: var(--shadow-lg); aspect-ratio: 463 / 600; background: var(--surface-2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: saturate(.92) contrast(1.02); transition: transform 1.4s var(--ease), filter .6s; }
.hero__me:hover .portrait img { transform: scale(1.03); filter: none; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(9,9,11,.55)); pointer-events: none; }
.portrait__corner { position: absolute; width: 22px; height: 22px; border-color: var(--accent); border-style: solid; z-index: 2; }
.portrait__corner--tl { top: 14px; left: 14px; border-width: 2px 0 0 2px; border-radius: 6px 0 0 0; }
.portrait__corner--br { bottom: 14px; right: 14px; border-width: 0 2px 2px 0; border-radius: 0 0 6px 0; }
.portrait__cap { position: absolute; right: 16px; top: 16px; z-index: 2; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #ededef; padding: 5px 10px; border-radius: 8px; background: rgba(9,9,11,.6); backdrop-filter: blur(8px); }
.idcard {
  position: absolute; left: -110px; bottom: 0; width: 290px; z-index: 3;
  background: var(--code-bg); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); animation: bob 7s ease-in-out infinite;
}
.idcard__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #17171a; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 11px; color: #a1a1aa; }
.idcard__bar .dots i { width: 8px; height: 8px; }
.idcard pre { margin: 0; padding: 12px 14px 14px; font-size: 12px; line-height: 1.7; color: #d4d4d8; }
.idcard .k { color: #7dd3fc; } .idcard .s { color: var(--code-str); } .idcard .b { color: #c6f24e; }
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero__me { justify-self: center; }
}
@media (max-width: 560px) {
  .hero__me { width: 100%; padding-bottom: 150px; }
  .idcard { left: 50%; translate: -50% 0; width: 88%; }
}

/* about */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: center; }
.about__photo { margin: 0; position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border-2); aspect-ratio: 4 / 5; background: var(--surface-2); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transition: transform 1.4s var(--ease); }
.about__photo:hover img { transform: scale(1.03); }
.about__photo figcaption { position: absolute; left: 14px; bottom: 14px; font-size: 11.5px; color: #ededef; padding: 5px 10px; border-radius: 8px; background: rgba(9,9,11,.6); backdrop-filter: blur(8px); }
.about__text h2 { margin-bottom: 26px !important; }
.about__body p { color: var(--text-2); font-size: 17px; margin: 0 0 16px; max-width: 560px; }
.about__body b { color: var(--text); font-weight: 500; }
.facts { display: grid; grid-template-columns: 1fr 1fr; margin: 30px 0 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.facts div { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.facts div:nth-child(odd) { border-right: 1px solid var(--border); }
.facts div:nth-last-child(-n+2) { border-bottom: 0; }
.facts dt { font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.facts dd { margin: 0; font-size: 14.5px; font-weight: 500; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 36px; } .about__photo { max-width: 420px; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .facts div:nth-child(odd) { border-right: 0; } .facts div:nth-last-child(2) { border-bottom: 1px solid var(--border); } }

/* ---------- 01 · NewsLens "lab report" ---------- */
.lab__head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 30px; }
.lab__head h3 { margin-bottom: 14px; }
.lab__head .case__lede { margin: 0; max-width: 560px; }
.lab__head .case__lede b { color: var(--text); font-weight: 500; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.kpis div { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.kpis div:nth-child(odd) { border-right: 1px solid var(--border); }
.kpis div:nth-last-child(-n+2) { border-bottom: 0; }
.kpis dt { font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpis dd { margin: 4px 0 0; font: 500 30px/1 var(--mono); letter-spacing: -.04em; }
.kpis div:first-child dd { color: var(--accent-ink); }
.lab__grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 12px; align-items: stretch; }
.lab__stage { min-width: 0; }
.browser__view img.contain { object-fit: contain; background: #0b0f1d; }
.lab__side { display: grid; gap: 12px; align-content: end; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 22px; min-width: 0; text-align: left; transition: border-color .3s; }
.panel:hover { border-color: var(--border-2); }
.panel__note { margin: 12px 0 0; font-size: 11px; color: var(--muted); }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.hbars--sm li { grid-template-columns: 90px 1fr 36px; font-size: 12.5px; gap: 8px; }
.hbars b { height: 8px; border-radius: 5px; background: var(--surface-3); overflow: hidden; }
/* axis runs 0.78 to 0.92 so the differences are readable */
.hbars b i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--accent) 55%, var(--surface-3)); width: calc((var(--v) - .78) / .14 * 100%); transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; }
.case.is-in .hbars b i { transform: scaleX(1); }
.hbars li.is-best b i, .hbars--sm li:first-child b i { background: var(--accent); }
.hbars li.is-best { color: var(--text); font-weight: 500; }
.hbars em { font: normal 12px var(--mono); color: var(--text); text-align: right; }
.lab__row { display: grid; grid-template-columns: 1.55fr .75fr .9fr; gap: 12px; margin-top: 12px; }
.code__py { margin: 0; padding: 16px 18px; font-size: 11.5px; line-height: 1.75; color: #d4d4d8; overflow: auto; }
.code__py .k { color: #c6f24e; } .code__py .f { color: #7dd3fc; } .code__py .s { color: var(--code-str); } .code__py .c { color: #6b6b73; } .code__py .n { color: #f0abfc; }
.api ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font: 12.5px var(--mono); color: var(--text-2); }
.api li { display: flex; align-items: center; gap: 10px; }
.api i { font-style: normal; font-size: 10px; font-weight: 600; width: 38px; text-align: center; padding: 2px 0; border-radius: 4px; }
.api .get { background: rgba(125,211,252,.14); color: #7dd3fc; }
.api .post { background: var(--accent-soft); color: var(--accent-ink); }
.api .del { background: rgba(248,113,113,.14); color: #f87171; }
.cm { cursor: zoom-in; display: flex; flex-direction: column; }
.cm img { border-radius: 10px; background: #fff; padding: 6px; margin-top: auto; transition: transform .6s var(--ease); }
.cm:hover img { transform: scale(1.03); }
.lab__foot { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; margin-top: 18px; }
.lab__foot p { margin: 0; font-size: 12px; max-width: 520px; }
@media (max-width: 1000px) {
  .lab__head, .lab__grid { grid-template-columns: 1fr; }
  .lab__row { grid-template-columns: 1fr 1fr; }
  .lab__row .editor { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .lab__row { grid-template-columns: 1fr; }
  .kpis dd { font-size: 24px; }
  .hbars li { grid-template-columns: 110px 1fr 40px; }
}

/* ---------- 04 · Ramaya compact row ---------- */
.case--compact { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.compact__media { display: block; transition: transform .6s var(--ease); }
.compact__media:hover { transform: translateY(-4px); }
.compact__media .browser__view { aspect-ratio: 16 / 9; }
.case--compact h3 { font-size: clamp(26px, 2.6vw, 34px); margin-bottom: 10px; }
.case--compact .case__lede { font-size: 15.5px; margin-bottom: 16px; }
.case--compact .bullets { margin-bottom: 18px; font-size: 14.5px; }
.case--compact .tags { margin-bottom: 20px; }
@media (max-width: 860px) { .case--compact { grid-template-columns: 1fr; gap: 26px; } }

/* skills: 4 x 2 */
.skills { grid-template-columns: repeat(4, 1fr); }
.skill, .skill:nth-child(3n), .skill:nth-last-child(-n+3) { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.skill:nth-child(4n) { border-right: 0; }
.skill:nth-last-child(-n+4) { border-bottom: 0; }
@media (max-width: 960px) {
  .skills { grid-template-columns: 1fr 1fr; }
  .skill:nth-child(4n) { border-right: 1px solid var(--border); }
  .skill:nth-child(2n) { border-right: 0; }
  .skill:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .skill:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 520px) {
  .skills { grid-template-columns: 1fr; }
  .skill { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .skill:last-child { border-bottom: 0 !important; }
}

/* =========================================================
   Education
   ========================================================= */
.uni {
  display: grid; grid-template-columns: 1.1fr 1fr; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); overflow: hidden; position: relative;
}
.uni::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px circle at 0% 0%, var(--accent-soft), transparent 55%); }
.uni__main { padding: 36px 36px 32px; position: relative; border-right: 1px solid var(--border); }
.uni__badge {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 26px;
  background: var(--accent); color: var(--on-accent); font-size: 20px; font-weight: 600; letter-spacing: -.04em;
  box-shadow: 0 0 0 6px var(--accent-soft);
}
.uni__kicker { font-size: 12px; color: var(--accent-ink); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.uni__name { font: 600 clamp(36px, 4.4vw, 56px)/1 var(--sans); letter-spacing: -.045em; margin: 0 0 12px; }
.uni__name .serif { color: var(--text-2); font-size: 1.06em; }
.uni__degree { font-size: 18px; margin: 0 0 10px; color: var(--text); font-weight: 500; }
.uni__loc { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin: 0 0 34px; }
.years__track { height: 4px; border-radius: 4px; background: var(--surface-3); position: relative; overflow: hidden; }
.years__track i { position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 40%, transparent), var(--accent)); transform-origin: left; transform: scaleX(0); transition: transform 1.8s var(--ease) .3s; }
.uni.is-in .years__track i { transform: scaleX(1); }
.years__marks { list-style: none; margin: 0; padding: 14px 0 0; display: flex; justify-content: space-between; position: relative; }
.years__marks li { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--muted); position: relative; }
.years__marks li::before { content: ""; position: absolute; top: -21px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.years__marks li:last-child { text-align: right; align-items: flex-end; }
.years__marks li:last-child::before { left: auto; right: 0; background: var(--accent); }
.years__marks b { font-size: 13px; color: var(--text); font-weight: 500; }
.uni__side { padding: 32px 32px; display: grid; gap: 28px; align-content: start; position: relative; }
.course { display: grid; gap: 8px; }
.course span { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font-size: 14.5px; font-weight: 500; transition: border-color .25s, transform .35s var(--ease); }
.course span:hover { border-color: var(--border-2); transform: translateX(4px); }
.course i { font-style: normal; font-size: 11px; color: var(--accent-ink); }
.edu__row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; margin-top: 12px; }
.school__name { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.school .mono { margin: 0; font-size: 12px; }
.certs ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.certs li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.certs em { font-style: normal; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .uni { grid-template-columns: 1fr; }
  .uni__main { border-right: 0; border-bottom: 1px solid var(--border); }
  .edu__row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .uni__main, .uni__side { padding: 26px 22px; }
  .certs ul { grid-template-columns: 1fr; }
  .years__marks span { display: none; }
}
@media (max-width: 1150px) { .nav__links a i { display: none; } .nav__links a { padding: 7px 9px; } }
/* year markers placed to scale: 2021 · 2022 · 2023 · (2024) · 2025 */
.years__marks { display: block; height: 44px; }
.years__marks li { position: absolute; top: 14px; }
.years__marks li:nth-child(1) { left: 0; }
.years__marks li:nth-child(2) { left: 25%; }
.years__marks li:nth-child(3) { left: 50%; }
.years__marks li:nth-child(4) { right: 0; }
