/* FDO.CODES — implemented from Claude Design "Fernando Codes v2" */

:root {
  --bg: #0b0b0a;
  --fg: #f2f0eb;
  --accent: #c8f560;
  --accent-glow: #c8f56022;
  --accent-ring: #c8f56030;
  --muted: #a8a59e;
  --dim: #6f6c66;
  --soft: #d6d3cc;
  --faint: #8a8780;
  --unlit: #2f2e2b;
  --line: #1f1e1c;
  --line-2: #2a2926;
  --line-3: #3a3936;
  --panel: #121211;
  --ink-muted: #55534e;
  --ink-line: #c9c5bd;

  --sans: 'Archivo', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(72px, 10vw, 160px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: clip;
}

a { color: var(--fg); text-decoration: none; }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

[id] { scroll-margin-top: 80px; }

html.fc-nocursor, html.fc-nocursor * { cursor: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: fc-pulse 1.6s ease-in-out infinite;
}

@keyframes fc-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fc-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes fc-shine { 0% { transform: translateX(-120%); } 55%, 100% { transform: translateX(120%); } }
@keyframes fc-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Cursor */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: transform .12s ease-out, opacity .2s;
}

/* Nav: blends over the hero, turns solid once you scroll past it */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  mix-blend-mode: difference;
  background: transparent;
  border-bottom: 1px solid transparent;
  color: var(--fg);
  transition: background .35s ease, padding .35s ease, border-color .35s ease;
}

.nav.is-solid {
  padding-block: 12px;
  mix-blend-mode: normal;
  background: rgba(11, 11, 10, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.brand {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(15px, 2vw, 18px);
  white-space: nowrap;
  letter-spacing: -.02em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
}

.nav-links { display: flex; gap: clamp(14px, 2.5vw, 32px); }

.pill-sm {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--fg);
  font-weight: 600;
}

.menu-btn {
  display: none;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: none;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 100px 20px 40px;
}

.mobile-menu > a {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(44px, 13vw, 72px);
  letter-spacing: -.05em;
  line-height: 1;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-2);
}

.mobile-menu > a.is-accent { color: var(--accent); }

.mobile-menu-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
}

/* Floating "Work with me" bar (phones only) */

.cta { display: none; }

.cta-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .6) 50%, transparent 65%);
  animation: fc-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}

.cta-text { position: relative; display: flex; flex-direction: column; gap: 3px; }

.cta-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-stretch: 125%;
  font-size: 20px;
  letter-spacing: -.03em;
  line-height: 1;
}

.cta-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  animation: fc-pulse 1.6s ease-in-out infinite;
}

.cta-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .7;
  padding-left: 19px;
}

.cta-icon {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex: none;
}

/* Hero */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: grayscale(1) contrast(1.1);
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(84px, 9vw, 120px) clamp(10px, 2vw, 28px) calc(clamp(16px, 2vw, 28px) + env(safe-area-inset-bottom));
}

.hero-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(36px, 13vw, 280px);
  line-height: .8;
  letter-spacing: -.06em;
  text-align: center;
  mix-blend-mode: difference;
  color: var(--fg);
  white-space: nowrap;
}

.hero-bottom {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 24px);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 6px 24px;
  flex-wrap: wrap;
  text-align: center;
  padding: 0 clamp(8px, 2vw, 20px);
  mix-blend-mode: difference;
  color: var(--fg);
}

/* Intro + agent log */

.intro {
  padding: clamp(40px, 6vw, 88px) var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 20px;
}

.lede {
  margin: 0;
  max-width: 620px;
  font-weight: 800;
  font-stretch: 110%;
  font-size: clamp(26px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-wrap: pretty;
}

.intro-body {
  margin: 20px 0 0;
  max-width: 600px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--soft);
  text-wrap: pretty;
}

.log {
  justify-self: end;
  width: min(100%, 420px);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}

.log-head {
  display: flex;
  justify-content: space-between;
  color: var(--dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

.log-row { display: flex; gap: 10px; padding: 2px 0; min-width: 0; }
.log-row:nth-child(2) { opacity: .35; }
.log-row:nth-child(3) { opacity: .55; }
.log-row:nth-child(4) { opacity: .8; }
.log-row:nth-child(5) { opacity: 1; }
.log-tag { color: var(--accent); flex: none; min-width: 84px; }

.log-msg {
  color: var(--soft);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-prompt { color: var(--dim); }
.caret { animation: fc-blink 1s steps(1) infinite; }

/* Stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  padding: clamp(18px, 3vw, 44px) clamp(10px, 2.6vw, 48px);
  background: var(--bg);
  min-width: 0;
}

.stat-num {
  font-weight: 900;
  font-size: clamp(18px, 5vw, 76px);
  letter-spacing: -.05em;
  line-height: .9;
  white-space: nowrap;
}

.stat-num--accent { color: var(--accent); }

.stat-label {
  margin-top: clamp(8px, 1.2vw, 12px);
  font-family: var(--mono);
  font-size: clamp(9.5px, calc(6px + .45vw), 12px);
  line-height: 1.35;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* Marquee */

.marquee { border-bottom: 1px solid var(--line); padding: 22px 0; overflow: hidden; }

.marquee-track {
  display: flex;
  width: max-content;
  animation: fc-marquee 50s linear infinite;
}

.marquee-half {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  padding-right: clamp(20px, 3vw, 40px);
}

.marquee-word {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Shared section type */

.section { padding: 0 var(--gutter) var(--section-y); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding: 0 var(--gutter);
}

.h2 {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(40px, 7vw, 112px);
  line-height: .88;
  letter-spacing: -.05em;
}

.h2--spaced { margin-bottom: clamp(28px, 4vw, 48px); }

.controls { display: flex; align-items: center; gap: 16px; }

.counter {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
  min-width: 64px;
}

.round-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--fg);
  background: transparent;
  color: var(--fg);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.round-btn:hover { background: var(--fg); color: var(--bg); }

/* Profile: sticky portrait, text lights up word by word as you scroll */

.profile {
  padding: clamp(80px, 10vw, 160px) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(48px, 6vw, 104px);
  align-items: flex-start;
}

.profile-aside {
  flex: 1 1 260px;
  max-width: 340px;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.profile-aside .label { color: var(--muted); }

.portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  filter: grayscale(1) contrast(1.1);
  display: block;
}

.portrait-tag {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(11, 11, 10, .72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.facts div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.facts dt { color: var(--dim); }
.facts dd { margin: 0; text-align: right; color: var(--soft); }

.profile-body { flex: 999 1 520px; min-width: 0; }

.profile-text {
  margin: 0;
  font-weight: 800;
  font-stretch: 110%;
  font-size: clamp(24px, 3.2vw, 50px);
  line-height: 1.2;
  letter-spacing: -.025em;
  word-spacing: .04em;
  text-wrap: pretty;
}

.profile-text .hl { color: var(--accent); }
.js .profile-text span { color: var(--unlit); transition: color .35s ease; }
.js .profile-text span.is-lit { color: var(--fg); }
.js .profile-text span.hl.is-lit { color: var(--accent); }

/* Shared bits for the newer sections */

.section-head--flush { padding: 0; }
.h2--nowrap { white-space: nowrap; }
.note { color: var(--muted); }

/* What I lead: accordion with an illustrated panel */

.lead-h2 { font-size: clamp(30px, 7vw, 112px); }

.lead-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.lead-list { order: 1; min-width: 0; border-top: 1px solid var(--line-2); }
.lead-row { border-bottom: 1px solid var(--line-2); cursor: pointer; }

.lead-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  width: 100%;
  padding: clamp(20px, 2.6vw, 32px) 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lead-num {
  flex: none;
  min-width: 44px;
  text-align: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-2);
  transition: background .3s, color .3s, border-color .3s;
}

.lead-title {
  flex: 1;
  min-width: 0;
  font-weight: 900;
  font-stretch: 112%;
  font-size: clamp(22px, 2.6vw, 40px);
  line-height: .98;
  letter-spacing: -.045em;
  text-transform: uppercase;
  color: var(--faint);
  transition: color .35s;
  text-wrap: balance;
}

.lead-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--faint);
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform .45s var(--ease-out), color .3s, border-color .3s;
}

.lead-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease-out);
}

.lead-body > div { overflow: hidden; min-height: 0; }

.lead-body p {
  margin: 0 0 clamp(24px, 3vw, 40px);
  padding-left: calc(44px + clamp(14px, 3vw, 40px));
  padding-right: 64px;
  max-width: 900px;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--soft);
  text-wrap: pretty;
}

.lead-row.is-open .lead-num { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.lead-row.is-open .lead-title { color: var(--fg); }
.lead-row.is-open .lead-icon { color: var(--fg); border-color: var(--fg); transform: rotate(45deg); }
.lead-row.is-open .lead-body { grid-template-rows: 1fr; }

.lead-panel {
  order: 2;
  position: sticky;
  top: 96px;
  min-width: 0;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  background: var(--panel);
  overflow: hidden;
}

.lead-art-box {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(8px, 2vw, 20px);
}

.lead-art { width: 100%; height: 100%; overflow: visible; animation: fc-in .5s ease; }

.lead-cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-top: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead-cap-t { color: var(--fg); text-align: right; }

/* How I build: "Drive the pipeline" mini game beside the four stages */

.build { padding: clamp(72px, 10vw, 140px) var(--gutter); }

.build-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.build-h2 { font-size: clamp(34px, 7vw, 112px); }

.build-note {
  margin: 0;
  max-width: 380px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.build-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  align-items: start;
}

.game-col { min-width: 0; }

.game {
  position: relative;
  height: clamp(480px, 72vh, 660px);
  border: 1px solid var(--line-2);
  border-radius: clamp(18px, 2.5vw, 28px);
  overflow: hidden;
  background: var(--bg);
  -webkit-user-select: none;
  user-select: none;
}

.game canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: auto;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.game-overlay--idle { gap: 18px; background: rgba(11, 11, 10, .62); }
.game-overlay--pause { gap: 16px; background: rgba(11, 11, 10, .72); }
.game-overlay--done { gap: 14px; background: rgba(11, 11, 10, .8); }

.game-title {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(30px, 5.4vw, 72px);
  line-height: .9;
  letter-spacing: -.05em;
}

.game-overlay p {
  margin: 0;
  max-width: 420px;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.5;
  color: var(--soft);
  text-wrap: pretty;
}

.game-btn {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: var(--accent);
  color: var(--bg);
}

a.game-btn:hover { color: var(--bg); }
.game-btn--ghost { border: 1.5px solid var(--fg); background: transparent; color: var(--fg); }

.game-paused {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(28px, 4vw, 52px);
  letter-spacing: -.05em;
}

.game-done-label { color: var(--accent); }

.game-shipped {
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(40px, 7vw, 96px);
  line-height: .85;
  letter-spacing: -.055em;
}

.game-result { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; color: var(--soft); }
.game-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

.game-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px 24px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--dim);
}

.game-skip {
  background: none;
  border: none;
  padding: 10px 0;
  color: var(--muted);
  font: inherit;
  letter-spacing: .04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.stages { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.stage-card {
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: 20px 22px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity .5s ease, border-color .5s ease;
}

.js .stage-card { opacity: .4; }
.js .stage-card.is-unlocked { opacity: 1; border-color: var(--line-3); }
.js .stage-card.is-latest { border-color: var(--accent); }

.stage-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.stage-status { color: var(--dim); }
.stage-card.is-unlocked .stage-status { color: var(--accent); }

.stage-name {
  margin: 0;
  font-weight: 900;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}

.stage-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* Selected work */

.work { padding: 0 0 var(--section-y); }

.track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--gutter);
  padding: 8px var(--gutter);
  scrollbar-width: none;
  cursor: grab;
  overscroll-behavior-x: contain;
}

.track::-webkit-scrollbar,
.stack-track::-webkit-scrollbar,
.tabs::-webkit-scrollbar { display: none; }

.is-dragging { scroll-snap-type: none !important; cursor: grabbing !important; }
.track-end { flex: 0 0 1px; }

.card {
  flex: 0 0 min(84vw, 440px);
  scroll-snap-align: start;
  border: 1px solid var(--line-2);
  border-radius: 24px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .35s ease, border-color .35s ease;
  user-select: none;
}

.card:hover { border-color: var(--fg); transform: translateY(-6px); }

.card-media {
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(135deg, #161615 0 10px, #1d1d1b 10px 20px);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.card-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.card-meta span:last-child { color: var(--accent); }

.card-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(26px, 2.6vw, 38px);
  letter-spacing: -.045em;
  line-height: .95;
  text-wrap: balance;
}

.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.progress {
  margin: clamp(20px, 3vw, 32px) var(--gutter) 0;
  height: 2px;
  background: var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 14.3%;
  background: var(--accent);
  transition: width .4s ease;
}

.work-note {
  margin: clamp(20px, 3vw, 32px) var(--gutter) 0;
  max-width: 640px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

/* Stack: centred carousel with tabs */

.stack { padding: 0 0 var(--section-y); }
.stack .section-head { margin-bottom: clamp(20px, 3vw, 32px); }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 var(--gutter);
  margin-bottom: clamp(24px, 3vw, 40px);
}

.tab {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-2);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}

.tab.is-active { border-color: var(--fg); background: var(--fg); color: var(--bg); }

.stack-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 12px calc((100% - min(82vw, 560px)) / 2);
  scrollbar-width: none;
  cursor: grab;
  overscroll-behavior-x: contain;
}

.stack-card {
  flex: 0 0 min(82vw, 560px);
  scroll-snap-align: center;
  border-radius: 28px;
  padding: clamp(24px, 3vw, 40px);
  min-height: clamp(400px, 40vw, 470px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--line-2);
  transform: scale(.92);
  opacity: .5;
  transition: background .5s, color .5s, border-color .5s, transform .5s var(--ease-out), opacity .5s;
  user-select: none;
}

.stack-card.is-active {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: scale(1);
  opacity: 1;
}

.stack-card-top { display: flex; justify-content: space-between; gap: 12px; }
.stack-card-body { display: flex; flex-direction: column; gap: clamp(18px, 2vw, 28px); }

.stack-card-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: .9;
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}

.stack-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  font-weight: 700;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.25;
  letter-spacing: -.01em;
}

.stack-tools .sep { color: var(--line-3); }
.stack-card.is-active .sep { color: rgba(11, 11, 10, .35); }

/* Experience */

.xp-list { border-top: 1px solid var(--line-2); }

.xp {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(12px, 3vw, 40px);
  padding: clamp(24px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--line-2);
}

.xp-when { font-family: var(--mono); font-size: 13px; color: var(--fg); }
.xp-when span { color: var(--muted); }
.xp--current .xp-when { color: var(--accent); }

.xp-role {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -.04em;
  line-height: 1.05;
}

.xp-org { margin-top: 6px; color: var(--muted); }

.xp p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--soft);
  text-wrap: pretty;
}

.awards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: clamp(24px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 88px);
}

.awards h3 { margin: 0 0 16px; font-weight: 400; color: var(--muted); }

.award-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 1.4;
}

.award-list li { display: flex; gap: 16px; }

.award-year {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  min-width: 44px;
}

.award-year--current { color: var(--accent); }

/* Blog */

.blog {
  padding: clamp(72px, 10vw, 160px) var(--gutter) clamp(56px, 8vw, 120px);
  border-top: 1px solid var(--line-2);
}

.posts { border-top: 1px solid var(--line-2); }

.post {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: clamp(16px, 3vw, 48px);
  row-gap: 12px;
  padding: clamp(24px, 3vw, 40px) clamp(8px, 1.4vw, 20px);
  border-bottom: 1px solid var(--line-2);
  color: var(--fg);
  border-radius: 6px;
  transition: background .25s, color .25s;
}

.post:hover { background: var(--fg); color: var(--bg); }

.post-meta {
  flex: 0 0 140px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .65;
}

.post-title {
  flex: 1 1 420px;
  min-width: 0;
  font-weight: 900;
  font-size: clamp(24px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.post-desc { flex: 1 1 300px; font-size: 15px; line-height: 1.5; opacity: .75; text-wrap: pretty; }

.post-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Contact */

.contact {
  padding: var(--section-y) var(--gutter) calc(clamp(32px, 5vw, 64px) + env(safe-area-inset-bottom));
  background: var(--fg);
  color: var(--bg);
  border-radius: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 56px) 0 0;
}

.contact :focus-visible { outline-color: var(--bg); }
.contact .label { color: var(--ink-muted); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
  margin-bottom: clamp(56px, 8vw, 120px);
}

.contact-intro { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); min-width: 0; }

.contact-title {
  margin: 0;
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(48px, 7.4vw, 150px);
  line-height: .84;
  letter-spacing: -.055em;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: clamp(0px, 3vw, 44px);
  min-width: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 24px;
}

.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { color: var(--ink-muted); }

.field input,
.field textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 0;
  border: none;
  border-bottom: 2px solid var(--bg);
  background: transparent;
  color: var(--bg);
  font-family: var(--sans);
  font-size: 18px;
  outline: none;
  border-radius: 0;
}

.field input:focus,
.field textarea:focus { border-bottom-color: var(--ink-muted); }
.field textarea { resize: vertical; line-height: 1.4; }

.form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

.submit-btn {
  min-height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  border: none;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  flex: 1 1 200px;
  max-width: 320px;
}

.submit-btn:hover { background: var(--line-2); }
.form-status { color: var(--ink-muted); }

.contact-direct { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.direct-label { color: var(--ink-muted); flex-basis: 100%; margin-bottom: 4px; }

.btn {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 20px);
}

.btn--solid { background: var(--bg); color: var(--fg); max-width: 100%; overflow-wrap: anywhere; }
.btn--solid:hover { background: var(--line-2); color: var(--fg); }
.btn--outline { border: 2px solid var(--bg); color: var(--bg); }
.btn--outline:hover { background: var(--bg); color: var(--fg); }

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  line-height: 1.5;
}

.footer-meta { display: flex; gap: 8px 24px; flex-wrap: wrap; color: var(--bg); }
.footer-copy { color: var(--ink-muted); }

/* Phones and narrow tablets */

@media (max-width: 759.98px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }

  .cta {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 18;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px 0 22px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg);
    overflow: hidden;
    box-shadow: 0 0 0 5px var(--accent-ring), 0 18px 44px rgba(0, 0, 0, .55);
    transform: translateY(140%);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform .5s var(--ease-out), opacity .3s, visibility 0s linear .5s;
  }

  .cta.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform .5s var(--ease-out), opacity .3s, visibility 0s;
  }

  .hero-meta { justify-content: center; }

  .log {
    justify-self: stretch;
    width: auto;
    margin: 0 -20px;
    border-left-width: 0;
    border-right-width: 0;
    border-radius: 0;
    padding: 14px 14px 10px;
    font-size: 11.5px;
  }

  .log-row { flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .log-tag { min-width: 0; }
  .log-msg { white-space: normal; }

  .profile-aside { max-width: 100%; position: static; }
  .portrait { aspect-ratio: 1 / 1; }

  .lead-panel { order: 0; position: relative; top: auto; }

  .footer-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Motion preferences */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .dot, .caret, .cta-shine, .cta-dot { animation: none; }
  .cursor, .card, .round-btn, .progress-bar, .stack-card, .stage-card, .lead-body, .lead-icon { transition: none; }
  .lead-art { animation: none; }
  .card:hover { transform: none; }
}
