/* ============ Tokens ============ */
:root {
  --bg: #041626;          /* base navy; the page deepens from --top to --deep */
  --top: #0c4a6c;
  --deep: #020a14;
  --bg-2: rgba(4, 24, 42, .55);
  --surface: rgba(200, 240, 255, 0.04);
  --line: rgba(200, 240, 255, 0.1);
  --line-2: rgba(200, 240, 255, 0.2);
  --text: #e8f6fb;
  --muted: #86a9ba;
  --dim: #4f7489;
  --accent: #2ee6d6;      /* agents / primary */
  --accent-ink: #01201d;
  --sec: #6aa8ff;         /* security */
  --coral: #ff7e9d;
  --tool: #b9a4ff;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --serif: 'Instrument Serif', Georgia, serif;
  --pixel: 'Pixelify Sans', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: linear-gradient(var(--top) 0, #083656 100vh, #05243d 240vh, #03152a 60%, var(--deep) 88%);
  background-color: var(--deep);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ============ Global chrome ============ */
/* terminal backdrop: faint scrolling logs + scanlines + vignette, behind all content */
.site-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.site-bg pre {
  position: absolute; left: var(--gutter); top: 0; margin: 0; font: 12px/2.1 var(--mono); color: rgba(46, 230, 214, .06);
  white-space: pre; animation: logscroll 120s linear infinite;
}
.site-bg::before { /* scanlines */
  content: ''; position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .22) 2px 4px);
}
.site-bg::after { /* CRT vignette */
  content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 6, 12, .55));
}
.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 0%{background-position:0 0} 25%{background-position:-40px 30px} 50%{background-position:30px -50px} 75%{background-position:-20px -10px} }

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--sec), var(--accent)); transform-origin: 0 50%; transform: scaleX(0); }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  background: linear-gradient(rgba(6, 34, 56, .85) 10%, transparent);
}
.logo { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; letter-spacing: -.02em; }
.logo-mark { font-size: 17px; }
.logo-bloop { display: inline-flex; margin-right: 4px; }
svg.sprite { shape-rendering: crispEdges; display: block; }
.nav-links { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(4, 24, 42, .55); backdrop-filter: blur(12px); }
.nav-links a { padding: 6px 14px; border-radius: 999px; font-size: 13px; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px;
  border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s;
}
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #7ff5ea; }
.btn-ghost { border: 1px solid var(--line-2); background: rgba(4, 24, 42, .45); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.eyebrow { color: var(--accent); margin-bottom: 18px; }

/* social icon buttons */
.icon-row { display: inline-flex; gap: 10px; align-items: center; }
.icon-btn {
  position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: rgba(4, 24, 42, .45); color: var(--text);
  transition: color .25s, border-color .25s, background .25s, transform .25s var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: rgba(46, 230, 214, .08); transform: translateY(-2px); }
.icon-btn::after { /* tooltip */
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translate(-50%, 4px);
  font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--text); background: rgba(2, 12, 22, .92); border: 1px solid var(--line-2); padding: 4px 8px; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.icon-btn:hover::after, .icon-btn:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 120px var(--gutter) 90px; overflow: hidden;
}
.graph { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { /* vignette to seat the text */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 30% 55%, rgba(6, 34, 56, .75), transparent 70%), linear-gradient(transparent 80%, rgba(8, 54, 86, .6));
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: 1320px; margin: 0 auto; }

.status { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); padding: 7px 14px 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(4, 24, 42, .55); backdrop-filter: blur(8px); }

.hero-name {
  font-size: clamp(3.4rem, 11vw, 10.5rem); font-weight: 600; line-height: .92; letter-spacing: -.055em;
  margin: 28px 0 44px; white-space: nowrap;
}
.hero-name .ch { display: inline-block; }
.hero-name .ch.is-glyph { color: var(--accent); }

.hero-grid { display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: clamp(32px, 6vw, 96px); align-items: end; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.5rem); line-height: 1.45; color: #c9d0d6; max-width: 34ch; letter-spacing: -.01em; }
.lede em { color: var(--text); font-size: 1.12em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Agent console */
.agent {
  border: 1px solid var(--line-2); border-radius: 18px; background: rgba(4, 24, 42, .62);
  backdrop-filter: blur(16px); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05);
  overflow: hidden;
}
.agent-head { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.agent-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
@keyframes blink { 50% { opacity: .3; } }
.agent-form { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.prompt-glyph { color: var(--accent); font-size: 16px; }
.agent-input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 15px; }
.agent-input::placeholder { color: var(--dim); }
.agent-run { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: none; font-size: 11px; color: var(--muted); transition: all .2s; }
.agent-run:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.agent-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }
.chip { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.agent-log {
  list-style: none; height: 212px; overflow: hidden; padding: 14px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; text-transform: none; letter-spacing: 0; line-height: 1.5;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 7px;
  mask-image: linear-gradient(transparent, #000 30%);
}
.agent-log:empty::before { content: 'Waiting for a goal…'; color: var(--dim); }
.agent-log li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; color: #b7c0c7; animation: logIn .35s var(--ease) both; }
.agent-log .k { font-size: 10px; letter-spacing: .08em; padding-top: 1px; }
.agent-log .k-plan { color: var(--sec); }
.agent-log .k-tool { color: var(--tool); }
.agent-log .k-obs { color: var(--muted); }
.agent-log .k-done { color: var(--accent); }
.agent-log .v code { color: var(--text); }
.agent-log .meta { color: var(--dim); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--dim); font-size: 10px; }
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(var(--accent), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ============ Ticker ============ */
.ticker { border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: rgba(2, 16, 30, .25); }
.ticker-track { display: flex; width: max-content; will-change: transform; font-size: clamp(14px, 1.6vw, 20px); color: var(--muted); }
.ticker-track span { display: inline-flex; align-items: center; gap: clamp(20px, 3vw, 40px); padding-right: clamp(20px, 3vw, 40px); white-space: nowrap; }
.ticker-track span::after { content: ''; width: 6px; height: 6px; border: 1px solid var(--accent); transform: rotate(45deg); }

/* ============ Path (horizontal) ============ */
.path { position: relative; }
.path-pin { position: relative; height: 100svh; display: flex; flex-direction: column; overflow: hidden; padding: 84px 0 28px; }
.path-hud { display: flex; justify-content: space-between; padding: 0 var(--gutter); color: var(--muted); }
.path-hud b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.hud-now { display: inline-flex; gap: 16px; align-items: center; }
.hud-phase { padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; color: var(--sec); transition: color .4s; }
.hud-phase.is-agents { color: var(--accent); }
.path-viewport { flex: 1; position: relative; min-height: 0; }
.path-track { position: relative; height: 100%; display: flex; width: max-content; will-change: transform; }

.path-line { position: absolute; top: 50%; height: 1px; background: var(--line-2); left: 0; width: 0; }
.path-fill { position: absolute; left: 0; top: -1px; height: 3px; width: 0; overflow: hidden; border-radius: 3px; }
.path-grad { height: 100%; }
.path-token {
  position: absolute; top: 50%; left: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
  background: var(--tok, var(--sec)); z-index: 3;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--tok, var(--sec)) 20%, transparent), 0 0 40px 6px var(--tok, var(--sec));
}

.panel { position: relative; height: 100%; flex: none; padding: 0 clamp(24px, 3vw, 48px); }
.panel-intro, .panel-outro { display: grid; grid-template-rows: 1fr 0 1fr; }
.panel-intro { width: min(64vw, 900px); padding-left: var(--gutter); }
.panel-intro .panel-body { grid-row: 1; align-self: end; padding-bottom: 44px; }
.panel-outro .panel-body { grid-row: 3; align-self: start; padding-top: 40px; display: flex; flex-direction: column; }
.panel-intro h2 { font-size: clamp(3rem, 7.4vw, 7.5rem); line-height: .95; letter-spacing: -.05em; font-weight: 600; }
.panel-intro h2 em { color: var(--accent); }
.panel-sub { margin-top: 24px; color: var(--muted); max-width: 36ch; font-size: 17px; }
.hint { display: block; margin-top: 18px; color: var(--dim); }
.panel-outro { width: min(52vw, 640px); padding-right: var(--gutter); }
.panel-outro h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 500; margin-bottom: 28px; max-width: 18ch; }
.panel-outro .btn { align-self: flex-start; }

.stop { width: clamp(340px, 34vw, 500px); display: grid; grid-template-rows: 1fr 0 1fr; }
.stop-card, .stop-meta { padding: 0 8px; }
.stop-card { grid-row: 1; align-self: end; padding-bottom: 42px; }
.stop-meta { grid-row: 3; align-self: start; padding-top: 38px; }
.stop.is-flip .stop-card { grid-row: 3; align-self: start; padding: 42px 8px 0; }
.stop.is-flip .stop-meta { grid-row: 1; align-self: end; padding: 0 8px 38px; }
.stop-node {
  grid-row: 2; position: relative; width: 13px; height: 13px; margin: -6.5px 0 0 1.5px;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); z-index: 2; transition: all .4s var(--ease);
}
.stop.is-active .stop-node { border-color: var(--c); background: var(--c); }
.stop { --c: var(--sec); }
.stop[data-phase="agents"] { --c: var(--accent); }

.stop-year { font-family: var(--mono); font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1; letter-spacing: -.04em; color: transparent; -webkit-text-stroke: 1px var(--line-2); transition: color .5s, -webkit-text-stroke-color .5s; white-space: nowrap; }
.stop.is-active .stop-year { color: var(--c); -webkit-text-stroke-color: transparent; }
.stop-card {
  opacity: .35; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.stop.is-active .stop-card { opacity: 1; transform: none; }
.stop-role { font-size: 12px; color: var(--c); margin-bottom: 8px; }
.stop-company { font-size: clamp(1.7rem, 2.6vw, 2.4rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; }
.now-badge { font-family: var(--mono); font-size: 10px; letter-spacing: .08em; font-weight: 500; color: var(--accent-ink); background: var(--accent); padding: 3px 8px; border-radius: 999px; }
.stop-text { color: #b3bcc3; font-size: 15px; max-width: 42ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; list-style: none; }
.tags li { font-family: var(--mono); font-size: 11px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }

.path-bar { margin: 0 var(--gutter); height: 1px; background: var(--line); }
.path-bar span { display: block; height: 100%; background: var(--text); transform-origin: 0 50%; transform: scaleX(0); }

/* native horizontal scroll (mobile / reduced motion) */
.path.is-native .path-viewport { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
.path.is-native .path-viewport::-webkit-scrollbar { display: none; }
.path.is-native .panel { scroll-snap-align: start; }

/* ============ Education ============ */
.edu { padding: clamp(96px, 12vw, 160px) var(--gutter) 0; max-width: 1320px; margin: 0 auto; }
.edu-head { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 24px 64px; align-items: end; margin-bottom: 56px; }
.edu-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; color: var(--muted); }
.edu-head .eyebrow b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.edu-head h2 { font-size: clamp(2.6rem, 6vw, 5.5rem); letter-spacing: -.05em; line-height: .95; font-weight: 600; }
.edu-head h2 em { color: var(--accent); }

.edu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.badge {
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; display: flex; flex-direction: column; min-height: 440px; padding: 22px;
  border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden;
  background: linear-gradient(160deg, #0d2c46, #061a2e 60%);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  transition: transform .5s var(--ease), border-color .3s;
}
.badge.is-tilting { transition: transform .08s linear, border-color .3s; }
.badge:hover { border-color: rgba(46, 230, 214, .35); }
.badge::before { /* lanyard slot */
  content: ''; position: absolute; top: 14px; left: 50%; width: 44px; height: 6px; margin-left: -22px;
  border-radius: 6px; background: var(--bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .8), 0 0 0 1px var(--line);
}
.badge-sheen { /* spotlight + holographic foil following the cursor */
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; mix-blend-mode: screen;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(46, 230, 214, .14), transparent 45%);
}
.badge.is-holo .badge-sheen {
  background:
    radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, .12), transparent 45%),
    linear-gradient(115deg, transparent 20%, rgba(106, 168, 255, .22) 36%, rgba(46, 230, 214, .22) 46%, rgba(199, 164, 255, .22) 56%, transparent 72%);
  background-size: 100% 100%, 250% 250%;
  background-position: 0 0, var(--mx) var(--my);
}
.badge:hover .badge-sheen { opacity: 1; }
.badge-top { display: flex; justify-content: space-between; color: var(--dim); font-size: 10px; margin-top: 18px; }
.badge-top .kind { color: var(--accent); }
.badge-logo { height: 120px; margin: 22px 0 24px; border-radius: 14px; background: #f3f1ea; display: grid; place-items: center; transform: translateZ(30px); }
.badge-logo img { max-height: 84px; max-width: 70%; object-fit: contain; }
.badge-school { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.badge-title { font-size: clamp(1.4rem, 2vw, 1.75rem); letter-spacing: -.03em; line-height: 1.1; font-weight: 600; margin-bottom: 16px; transform: translateZ(20px); }
.badge .tags { margin-top: 0; }
.badge-foot { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; align-items: end; color: var(--muted); font-size: 11px; }
.barcode { width: 84px; height: 22px; opacity: .45; background: repeating-linear-gradient(90deg, var(--text) 0 1px, transparent 1px 3px, var(--text) 3px 5px, transparent 5px 6px, var(--text) 6px 7px, transparent 7px 10px); }

/* ============ Shared section head ============ */
.sec-head { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 20px 64px; align-items: end; margin-bottom: 56px; }
.sec-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; color: var(--muted); }
.sec-head .eyebrow b, .now .eyebrow b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.sec-head h2 { font-size: clamp(2.6rem, 6vw, 5.5rem); letter-spacing: -.05em; line-height: .95; font-weight: 600; }
.sec-head h2 em { color: var(--accent); }
.sec-head h2:last-child { grid-column: 1 / -1; }
.sec-sub { color: var(--muted); font-size: 16px; }

/* ============ Projects: card shuffle ============ */
.work { position: relative; padding: clamp(96px, 12vw, 160px) var(--gutter) 0; max-width: 1320px; margin: 0 auto; }
.work.is-pinned { height: 100svh; max-width: none; padding: 88px var(--gutter) 36px; display: flex; flex-direction: column; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; max-width: 1320px; width: 100%; margin-inline: auto; }
.work.is-pinned .work-head { margin-bottom: 28px; }
.work-head .eyebrow { color: var(--muted); }
.work-head .eyebrow b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.work-head h2 { font-size: clamp(2.4rem, 5vw, 4.6rem); letter-spacing: -.05em; line-height: .95; font-weight: 600; }
.work-head h2 em { color: var(--accent); }
.deck-meta { display: flex; align-items: flex-end; gap: 18px; }
.deck-bloop { display: flex; align-items: flex-end; gap: 8px; }
.deck-bloop .say { margin-bottom: 34px; }
.deck-bloop [data-sprite] { animation: floaty 2.4s ease-in-out infinite; }
.deck-count { color: var(--muted); font-size: 13px; padding-bottom: 6px; }
.deck-count b { color: var(--accent); font-weight: 500; }

.deck { display: grid; gap: 24px; }
.work.is-pinned .deck { position: relative; flex: 1; min-height: 0; display: block; max-width: 1180px; width: 100%; margin: 0 auto; }
.pcard {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); overflow: hidden;
  border: 1px solid var(--line-2); border-radius: 24px; background: linear-gradient(160deg, #0c2b45, #051729 70%);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.work.is-pinned .pcard { position: absolute; inset: 0 0 12px; transform-origin: 50% 100%; will-change: transform; }
.pcard-img { background: center / cover; border-right: 1px solid var(--line); min-height: 260px; }
.pcard-body { display: flex; flex-direction: column; padding: clamp(22px, 3vw, 40px); overflow: auto; scrollbar-width: none; }
.pcard-kind { font-size: 10.5px; color: var(--accent); }
.pcard-title { font-size: clamp(1.8rem, 3.2vw, 2.8rem); letter-spacing: -.045em; line-height: 1.02; margin: 10px 0 10px; font-weight: 600; }
.pcard-line { color: #c1d8e2; font-size: clamp(15px, 1.25vw, 17px); max-width: 44ch; }
.pcard-label { color: var(--dim); font-size: 10px; margin: 20px 0 10px; }
.pcard-foot { margin-top: auto; padding-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.pcard-foot .tags { margin: 0; }
.pcard-links { display: flex; flex-wrap: wrap; gap: 10px; }
.pcard.is-pending { border-style: dashed; background: rgba(5, 23, 41, .9); }
.pcard.is-pending .pcard-img { display: grid; place-items: center; background: repeating-linear-gradient(45deg, transparent 0 10px, rgba(200, 240, 255, .04) 10px 11px); }
.pcard.is-pending .pcard-img [data-sprite] { animation: floaty 2.4s ease-in-out infinite; }
.pcard.is-pending .pcard-links { margin-top: 24px; }

.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; list-style: none; }
.flow li { position: relative; font-family: var(--mono); font-size: 11px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(2, 14, 26, .6); }
.flow li:not(:last-child) { margin-right: 22px; }
.flow li:not(:last-child)::after {
  content: ''; position: absolute; left: 100%; top: 50%; width: 22px; height: 1px;
  background: linear-gradient(90deg, var(--line-2), var(--accent), var(--line-2)); background-size: 300% 100%; animation: flowPulse 1.8s linear infinite;
}
.flow li:last-child { border-color: var(--accent); color: var(--accent); }
@keyframes flowPulse { from { background-position: 100% 0; } to { background-position: 0 0; } }
.highlights { list-style: none; display: grid; gap: 8px; }
.highlights li { display: grid; grid-template-columns: 18px 1fr; color: #c1d8e2; font-size: 14px; }
.highlights li::before { content: '↳'; color: var(--accent); font-family: var(--mono); }

/* ============ Now: terminal ============ */
.now { position: relative; padding: clamp(96px, 12vw, 160px) var(--gutter) 0; }
.now-grid { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; }
@keyframes logscroll { to { transform: translateY(-50%); } }
.now-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.now .eyebrow { color: var(--muted); }
.now .eyebrow b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.now h2 { font-size: clamp(2.8rem, 5.4vw, 5.2rem); letter-spacing: -.05em; line-height: .95; font-weight: 600; }
.now h2 em { color: var(--accent); }
.now-note { color: var(--muted); margin-top: 24px; max-width: 34ch; font-size: 17px; }
.now-note code { font-family: var(--mono); font-size: .9em; color: var(--accent); background: rgba(46, 230, 214, .08); padding: 2px 6px; border-radius: 5px; }

.term { position: relative; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(2, 12, 22, .82); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); overflow: hidden; cursor: text; }
.term-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 10.5px; }
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term-bar .logo-bloop { margin-left: auto; }
.term-body { height: clamp(420px, 60vh, 560px); overflow-y: auto; padding: 24px 28px; font: 15px/1.8 var(--mono); color: #b9d3de; scrollbar-width: thin; }
.term-out > div { white-space: pre-wrap; word-break: break-word; }
.term .ps1 { color: var(--accent); margin-right: 10px; }
.term .cmd { color: var(--text); }
.term .h { color: var(--text); font-weight: 500; }
.term .c-dim { color: var(--dim); }
.term .k-building { color: var(--accent); }
.term .k-exploring { color: var(--sec); }
.term .k-tinkering { color: var(--tool); }
.term .err { color: var(--coral); }
.term a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.term-line { display: flex; align-items: center; }
.term-line input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: inherit; color: var(--text); caret-color: var(--accent); }
.term-line[hidden] { display: none; }
.caret { display: inline-block; width: 8px; height: 1.1em; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(2) infinite; }

/* ============ Bloop ============ */
.say {
  font-family: var(--pixel); font-size: 14px; line-height: 1.2; color: #06243a; background: var(--text);
  padding: 8px 12px; border-radius: 10px 10px 2px 10px; white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.say.pop { animation: pop .35s var(--ease); }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.buddy { position: relative; }
.bloop-perch { position: absolute; right: 22px; bottom: 100%; margin-bottom: -14px; display: flex; align-items: flex-end; gap: 10px; z-index: 3; }
.bloop-perch .say { margin-bottom: 58px; }
.bloop-float { animation: floaty 2.4s ease-in-out infinite; filter: drop-shadow(0 12px 12px rgba(0, 0, 0, .35)); }

/* path traveller */
.path-token { width: 72px; height: 60px; margin: -62px 0 0 -36px; background: none; box-shadow: none; }
.token-bob { animation: floaty 1.4s ease-in-out infinite; }

/* ============ The Lab (horizontal) ============ */
.lab { position: relative; }
.lab-pin { height: 100svh; overflow: hidden; display: flex; align-items: center; }
.lab-track { display: flex; align-items: center; gap: clamp(32px, 5vw, 80px); padding: 60px var(--gutter) 0; width: max-content; will-change: transform; }
.lab-intro { width: min(36vw, 480px); flex: none; }
.lab-intro .eyebrow { color: var(--muted); }
.lab-intro .eyebrow b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.lab-intro h2 { font-size: clamp(2.2rem, 4.4vw, 4.2rem); letter-spacing: -.05em; line-height: .98; font-weight: 600; }
.lab-intro h2 em { color: var(--accent); }
.lab-sub { color: var(--muted); margin-top: 20px; }
.lab-hint { display: block; margin-top: 14px; color: var(--dim); }
.lab-end { width: 1px; flex: none; }

.lab-card {
  --lab-bg: #f5ede2; --lab-ink: #3a2820; --lab-accent: #8a5a3c;
  flex: none; width: min(76vw, 1060px); height: min(70vh, 620px); display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: clamp(20px, 2.4vw, 36px);
  padding: clamp(16px, 1.6vw, 22px); border-radius: 28px; background: var(--lab-bg); color: var(--lab-ink);
  box-shadow: 0 50px 90px -40px rgba(0, 0, 0, .85); transition: background .5s var(--ease), color .5s var(--ease);
}
.lab-browser { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--lab-ink) 12%, transparent), 0 24px 50px -24px rgba(0, 0, 0, .45); }
.lab-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: color-mix(in srgb, var(--lab-bg) 70%, #fff); border-bottom: 1px solid color-mix(in srgb, var(--lab-ink) 10%, transparent); }
.lab-bar .term-dots i { background: color-mix(in srgb, var(--lab-ink) 22%, transparent); }
.lab-url { flex: 1; text-align: center; font-size: 10.5px; color: color-mix(in srgb, var(--lab-ink) 65%, transparent); text-transform: none; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--lab-ink) 6%, transparent); margin-right: 40px; }
.lab-screen { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.lab-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease), transform 1.2s var(--ease); }
.lab-screen img.is-on { opacity: 1; transform: none; }
.lab-card:hover .lab-screen img.is-on { transform: scale(1.02); }
.lab-info { display: flex; flex-direction: column; padding: clamp(8px, 1.4vw, 18px) clamp(4px, 1vw, 12px) 6px 0; min-width: 0; }
.lab-kind { font-size: 10.5px; color: var(--lab-accent); }
.lab-title { font-size: clamp(2rem, 3.4vw, 3.2rem); line-height: 1; letter-spacing: -.04em; font-weight: 600; margin: 14px 0 14px; }
.lab-card.is-serif .lab-title { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; font-size: clamp(2.4rem, 4vw, 3.8rem); }
.lab-about { font-size: 15.5px; line-height: 1.55; color: color-mix(in srgb, var(--lab-ink) 82%, transparent); }
.lab-toggle { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; margin-top: 22px; border-radius: 999px; background: color-mix(in srgb, var(--lab-ink) 8%, transparent); }
.lab-toggle button { font-size: 10px; padding: 8px 12px; border: 0; border-radius: 999px; background: none; color: color-mix(in srgb, var(--lab-ink) 70%, transparent); cursor: pointer; transition: background .3s, color .3s; }
.lab-toggle button[aria-pressed="true"] { background: var(--lab-ink); color: var(--lab-bg); }
.lab-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: auto; padding-top: 22px; }
.lab-tags li { font-size: 10px; padding: 5px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--lab-ink) 22%, transparent); color: color-mix(in srgb, var(--lab-ink) 75%, transparent); }
.lab-visit { align-self: flex-start; margin-top: 16px; font-size: 14px; font-weight: 500; padding: 12px 18px; border-radius: 999px; background: var(--lab-ink); color: var(--lab-bg); transition: background .3s, transform .3s var(--ease); }
.lab-visit:hover { background: var(--lab-accent); }
.lab-card.is-next { --lab-bg: transparent; --lab-ink: var(--text); width: min(40vw, 520px); display: grid; place-items: center; border: 1px dashed var(--line-2); box-shadow: none; }
.lab-next-in { text-align: center; max-width: 30ch; display: flex; flex-direction: column; align-items: center; }
.lab-next-in [data-sprite] { margin-bottom: 18px; animation: floaty 2.4s ease-in-out infinite; }
.lab-card.is-next .lab-kind { color: var(--accent); }
.lab-card.is-next .lab-title { font-size: clamp(1.6rem, 2.4vw, 2.2rem); }
.lab-card.is-next .lab-about { color: var(--muted); }
/* native swipe (mobile / reduced motion) */
.lab.is-native .lab-pin { height: auto; display: block; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; padding: clamp(96px, 12vw, 160px) 0 20px; }
.lab.is-native .lab-pin::-webkit-scrollbar { display: none; }
.lab.is-native .lab-track { padding-top: 0; align-items: stretch; }
.lab.is-native .lab-card, .lab.is-native .lab-intro { scroll-snap-align: start; }

/* ============ About ============ */
.about { padding: clamp(96px, 12vw, 160px) var(--gutter) 0; max-width: 1320px; margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9); aspect-ratio: 3 / 4; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.about-copy .eyebrow { color: var(--muted); }
.about-copy .eyebrow b { color: var(--accent); font-weight: 500; margin-right: 8px; }
.about-copy h2 { font-size: clamp(2.6rem, 5.6vw, 5rem); letter-spacing: -.05em; line-height: .95; font-weight: 600; margin-bottom: 28px; }
.about-copy h2 em { color: var(--accent); }
.about-text { display: grid; gap: 16px; color: #c3dae4; font-size: clamp(16px, 1.3vw, 18px); max-width: 56ch; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; margin: 32px 0 34px; padding: 18px 0; border-block: 1px solid var(--line); font-size: 12px; }
.facts dt { color: var(--dim); }
.facts dt::after { content: ':'; }
.facts dd { color: var(--text); text-transform: none; letter-spacing: .02em; }
.about-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ Footer ============ */
.footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding: clamp(80px, 10vw, 140px) var(--gutter) 24px; }
.footer-top { max-width: 1320px; margin: 0 auto; }
.footer h2 { font-size: clamp(2rem, 4.6vw, 4.2rem); letter-spacing: -.04em; line-height: 1.02; font-weight: 600; max-width: 16ch; margin-bottom: 36px; }
.footer h2 em { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.socials { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; margin-top: 40px; }
.resume-link { color: var(--muted); }
.resume-link:hover { color: var(--accent); }
.wordmark { font-size: 27vw; font-weight: 700; letter-spacing: -.07em; line-height: .78; text-align: center; margin: 60px 0 0; background: linear-gradient(var(--line-2), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent; user-select: none; }
.colophon { text-align: center; color: var(--dim); font-size: 11px; margin-top: 12px; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .edu-head, .sec-head { grid-template-columns: 1fr; }
  .now-grid { grid-template-columns: 1fr; }
  .work-head { flex-direction: column; align-items: flex-start; }
  .deck-count { display: none; }
  .lab-intro { width: 78vw; }
  .lab-card { width: 86vw; height: auto; grid-template-columns: 1fr; }
  .lab-screen { aspect-ratio: 16 / 10; flex: none; }
  .lab-card.is-next { width: 70vw; min-height: 320px; }
  .about-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 280px; }
  .pcard { grid-template-columns: 1fr; }
  .pcard-img { border-right: 0; border-bottom: 1px solid var(--line); min-height: 200px; }
  .term-body { height: 380px; font-size: 13px; padding: 16px; }
  .bloop-perch { right: 8px; }
  .buddy { margin-top: 96px; }
  .edu-grid { grid-template-columns: 1fr; max-width: 460px; }
  .badge { min-height: 0; }
  .hero-name { white-space: normal; }
  .scroll-cue { display: none; }

  .panel-intro { width: 88vw; }
  .panel-outro { width: 86vw; }
  .stop { width: 82vw; }
  .stop-text { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .scroll-cue span, .bloop-float, .token-bob, .caret, 
  .stop-card, .badge { transition: none; }
}
