/* ================= Tokens ================= */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 6rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --font-display: 'Cabinet Grotesk', 'Satoshi', system-ui, sans-serif;
  --font-body: 'Satoshi', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 6px; --radius: 10px; --radius-lg: 16px;
  --max: 1200px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* Dark (default): deep navy + bright yellow */
:root, [data-theme="dark"] {
  --bg: #08111f;
  --bg-2: #0b1628;
  --surface: #0f1d35;
  --surface-2: #142646;
  --border: #1f3356;
  --border-strong: #2c4674;
  --text: #e8eef9;
  --text-muted: #9aabca;
  --text-faint: #6479a0;
  --accent: #ffd23f;          /* fills, highlights */
  --accent-ink: #ffd23f;      /* accent used as text on bg */
  --on-accent: #08111f;
  --accent-soft: rgba(255, 210, 63, .12);
  --grid-line: rgba(120, 160, 230, .07);
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f3f6fc;
  --bg-2: #e9eef8;
  --surface: #ffffff;
  --surface-2: #eef2fa;
  --border: #d4dcec;
  --border-strong: #b5c2dc;
  --text: #0a1a36;
  --text-muted: #45587c;
  --text-faint: #6d7fa1;
  --accent: #ffc928;
  --accent-ink: #8a6200;
  --on-accent: #0a1a36;
  --accent-soft: rgba(255, 201, 40, .22);
  --grid-line: rgba(10, 40, 100, .06);
  --shadow: 0 10px 30px -14px rgba(10, 26, 54, .25);
  color-scheme: light;
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex; flex-direction: column;
}
body::before { /* blueprint grid */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at top, #000 20%, transparent 75%);
}
main { flex: 1; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 var(--space-4); max-width: 68ch; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
code, pre { font-family: var(--font-mono); font-variant-ligatures: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; cursor: pointer; }

.container { width: min(100% - 2 * var(--space-6), var(--max)); margin-inline: auto; }
.section { padding-block: clamp(var(--space-12), 8vw, var(--space-24)); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--on-accent); padding: var(--space-2) var(--space-4); z-index: 100; }
.skip:focus { left: var(--space-4); top: var(--space-4); }

/* Mono label like a schematic ref designator */
.label {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.label::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.muted { color: var(--text-muted); }

/* ================= Header ================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: var(--space-4); }
.brand { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-weight: 800; font-size: var(--text-sm); letter-spacing: -.01em; }
.brand svg { width: 34px; height: 34px; color: var(--accent); flex: none; }
.nav-links { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: var(--text-sm); font-weight: 500; color: var(--text-muted);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-tools { display: flex; align-items: center; gap: var(--space-2); }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-sm);
  color: var(--text-muted); transition: color .2s, border-color .2s;
}
.icon-btn:hover { color: var(--accent-ink); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: var(--space-3) var(--space-4) var(--space-6);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: var(--space-3); font-size: var(--text-base); }
  .nav-links a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); }
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 700; padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ================= Hero ================= */
.hero { padding-block: clamp(var(--space-12), 9vw, var(--space-24)) clamp(var(--space-12), 6vw, var(--space-20)); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(var(--space-8), 6vw, var(--space-20)); align-items: center; }
.hero h1 { font-size: var(--text-hero); line-height: .95; letter-spacing: -.035em; margin: var(--space-5) 0 var(--space-6); }
.hero h1 .hl { color: var(--accent-ink); }
.hero .lede { font-size: var(--text-lg); color: var(--text-muted); max-width: 40ch; line-height: 1.5; margin-bottom: var(--space-8); font-weight: 400; }
.status-pill {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: var(--space-1) var(--space-3); background: var(--surface);
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }

.headshot-wrap { position: relative; justify-self: center; width: min(100%, 400px); }
.headshot-frame {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface);
}
.headshot-frame img { width: 100%; height: 100%; object-fit: cover; }
.headshot-wrap::before, .headshot-wrap::after { /* corner registration marks */
  content: ""; position: absolute; width: 36px; height: 36px; border: 2px solid var(--accent); pointer-events: none;
}
.headshot-wrap::before { top: -12px; left: -12px; border-right: 0; border-bottom: 0; }
.headshot-wrap::after { bottom: -12px; right: -12px; border-left: 0; border-top: 0; }
.headshot-tag {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  font-family: var(--font-mono); font-size: var(--text-xs);
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(6px);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-1) var(--space-3); color: var(--text-muted);
}

.socials { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.social {
  display: inline-flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius);
  font-weight: 700; font-size: var(--text-sm);
  transition: border-color .2s, transform .2s var(--ease);
}
.social:hover { border-color: var(--accent); transform: translateY(-2px); }
.social .ico { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.social .ico svg { width: 18px; height: 18px; }
.social small { display: block; font-family: var(--font-mono); font-weight: 400; font-size: var(--text-xs); color: var(--text-faint); line-height: 1.2; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .headshot-wrap { order: -1; width: min(70%, 280px); justify-self: start; }
}

/* ================= Section heads ================= */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-10); flex-wrap: wrap; }
.section-head h2 { font-size: var(--text-xl); margin-top: var(--space-3); }
.section-head p { color: var(--text-muted); margin: var(--space-3) 0 0; }
.link-arrow { font-weight: 700; font-size: var(--text-sm); color: var(--accent-ink); display: inline-flex; gap: var(--space-2); align-items: center; }
.link-arrow:hover span { transform: translateX(3px); }
.link-arrow span { transition: transform .2s var(--ease); }

.page-head { padding-block: clamp(var(--space-12), 7vw, var(--space-20)) var(--space-8); border-bottom: 1px solid var(--border); }
.page-head h1 { font-size: var(--text-2xl); margin: var(--space-4) 0 var(--space-4); }
.page-head p { color: var(--text-muted); font-size: var(--text-lg); max-width: 56ch; line-height: 1.5; }

/* ================= Stats strip ================= */
.strip { border-block: 1px solid var(--border); background: var(--bg-2); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: var(--space-6) var(--space-5); border-left: 1px solid var(--border); }
.strip-item:first-child { border-left: 0; }
.strip-item b { display: block; font-family: var(--font-display); font-size: var(--text-xl); color: var(--accent-ink); line-height: 1.1; }
.strip-item span { font-size: var(--text-xs); color: var(--text-muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 760px) { .strip-grid { grid-template-columns: 1fr 1fr; } .strip-item:nth-child(3) { border-left: 0; } .strip-item:nth-child(n+3) { border-top: 1px solid var(--border); } }

/* ================= Cards ================= */
.grid { display: grid; gap: var(--space-6); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 16/10; overflow: hidden; background: var(--surface-2); position: relative; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-3); flex: 1; }
.card-body h3 { font-size: var(--text-lg); }
.card-body p { color: var(--text-muted); font-size: var(--text-sm); margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
.tag { font-family: var(--font-mono); font-size: var(--text-xs); padding: 2px var(--space-2); border-radius: 4px; border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-2); }
.badge {
  font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px var(--space-2); border-radius: 4px; display: inline-flex; align-items: center; gap: 6px;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-current, .badge-workshop-ready { background: var(--accent); color: var(--on-accent); }
.badge-current::before, .badge-workshop-ready::before { background: var(--on-accent); }
.badge-past { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-iterating { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.badge-prototype { background: transparent; color: var(--text-muted); border: 1px dashed var(--border-strong); }
.card-media .badge { position: absolute; top: var(--space-3); left: var(--space-3); }

/* ================= Filters ================= */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-8); }
.filter {
  font-size: var(--text-sm); font-weight: 600; padding: var(--space-2) var(--space-4);
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
}
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.filter .count { font-family: var(--font-mono); font-size: var(--text-xs); opacity: .7; margin-left: 4px; }

/* ================= Project feature rows ================= */
.project-list { display: flex; flex-direction: column; gap: var(--space-8); }
.project {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
}
.project:nth-child(even) .project-media { order: 2; }
.project-media { position: relative; min-height: 300px; background: var(--surface-2); }
.project-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-body { padding: clamp(var(--space-6), 4vw, var(--space-10)); display: flex; flex-direction: column; gap: var(--space-4); }
.project-body h3 { font-size: var(--text-xl); }
.project-body p { color: var(--text-muted); margin: 0; }
.project-body ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-2); }
.project-body li { position: relative; padding-left: var(--space-6); font-size: var(--text-sm); }
.project-body li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 2px; background: var(--accent); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--space-1) var(--space-4); font-size: var(--text-sm); }
.kv dt { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.kv dd { margin: 0; }
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-media { order: 0; }
  .project-media { min-height: 0; aspect-ratio: 16/10; }
}

/* ================= Pipeline (tutorials) ================= */
.pipeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); margin-bottom: var(--space-10); }
.stage { padding: var(--space-6); position: relative; border-left: 1px solid var(--border); }
.stage:first-child { border-left: 0; }
.stage .num { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.stage h3 { font-size: var(--text-lg); margin: var(--space-2) 0; display: flex; align-items: baseline; gap: var(--space-3); }
.stage h3 b { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent-ink); font-weight: 600; }
.stage p { font-size: var(--text-sm); color: var(--text-muted); margin: 0; }
.stage:not(:last-child)::after {
  content: ""; position: absolute; right: -9px; top: 50%; width: 16px; height: 16px; z-index: 1;
  background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); transform: translateY(-50%) rotate(45deg);
}
.stage .bar { height: 3px; border-radius: 2px; background: var(--border); margin-top: var(--space-4); overflow: hidden; }
.stage .bar i { display: block; height: 100%; background: var(--accent); }
@media (max-width: 760px) {
  .pipeline { grid-template-columns: 1fr; }
  .stage { border-left: 0; border-top: 1px solid var(--border); }
  .stage:first-child { border-top: 0; }
  .stage:not(:last-child)::after { display: none; }
}

.tut-card .card-body { gap: var(--space-3); }
.tut-card .version { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent-ink); }
.tut-top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.tut-card .progress { display: flex; gap: 4px; margin-top: var(--space-2); }
.tut-card .progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--border); }
.tut-card .progress i.on { background: var(--accent); }

/* ================= Tutorial detail ================= */
.tut-layout { display: grid; grid-template-columns: 280px 1fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: start; }
.tut-aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: var(--space-6); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5); }
.panel h2, .panel h3 { font-size: var(--text-sm); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: var(--space-3); font-weight: 600; }
.panel ul { margin: 0; padding-left: var(--space-5); font-size: var(--text-sm); display: grid; gap: var(--space-1); }
.toc { list-style: none; padding: 0 !important; counter-reset: s; }
.toc a { display: block; color: var(--text-muted); padding: var(--space-1) 0; }
.toc a:hover { color: var(--accent-ink); }
.tut-main h2 { font-size: var(--text-lg); margin: var(--space-12) 0 var(--space-4); }
.tut-main h2:first-child { margin-top: 0; }
.objectives { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.objectives li { display: flex; gap: var(--space-3); align-items: flex-start; }
.objectives li::before { content: "✓"; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--accent-soft); color: var(--accent-ink); margin-top: 2px; }
.step { position: relative; padding-left: var(--space-12); padding-bottom: var(--space-8); }
.step::before { content: ""; position: absolute; left: 15px; top: 36px; bottom: 0; width: 2px; background: var(--border); }
.step:last-child::before { display: none; }
.step-num { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 700; color: var(--accent-ink); background: var(--bg); }
.step h3 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; margin: 4px 0 var(--space-2); letter-spacing: 0; }
.step p { color: var(--text-muted); }
.code { position: relative; margin: var(--space-4) 0 0; }
.rich .code { margin-top: var(--space-4); }
.code pre {
  margin: 0; background: #060d19; color: #dfe7f5; border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--space-5); overflow-x: auto; font-size: var(--text-xs); line-height: 1.7; tab-size: 2;
}
.copy { position: absolute; top: var(--space-2); right: var(--space-2); z-index: 1; font-family: var(--font-mono); font-size: var(--text-xs); padding: 4px var(--space-3); border-radius: 4px; border: 1px solid #25406b; background: #0f1d35; color: #9aabca; }
.copy:hover { color: #ffd23f; }
.workshop-box { border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); border-radius: var(--radius-lg); padding: clamp(var(--space-6), 3vw, var(--space-8)); }
.workshop-box .kv { margin-bottom: var(--space-5); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 var(--space-5) var(--space-6); }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border-strong); }
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline b { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--accent-ink); margin-right: var(--space-2); }
.timeline time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.timeline p { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--text-muted); }
@media (max-width: 900px) { .tut-layout { grid-template-columns: 1fr; } .tut-aside { position: static; } }

/* ================= About ================= */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(var(--space-8), 6vw, var(--space-20)); align-items: start; }
.about-grid .headshot-wrap { position: sticky; top: 100px; justify-self: stretch; width: 100%; max-width: 380px; }
.prose p { color: var(--text-muted); }
.prose p:first-child { color: var(--text); font-size: var(--text-lg); line-height: 1.5; }
.prose h2 { font-size: var(--text-lg); margin: var(--space-10) 0 var(--space-4); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }
.skill-group h3 { font-size: var(--text-sm); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-bottom: var(--space-3); font-weight: 600; }
.xp { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); }
.xp li { display: grid; grid-template-columns: 120px 1fr; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.xp time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); padding-top: 3px; }
.xp h3 { font-size: var(--text-base); font-family: var(--font-body); letter-spacing: 0; }
.xp p { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--text-muted); }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-grid .headshot-wrap { position: static; max-width: 260px; } .xp li { grid-template-columns: 1fr; gap: var(--space-1); } }

/* ================= Banner / CTA ================= */
.banner { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); min-height: 340px; display: flex; align-items: flex-end; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 13, 25, .95) 0%, rgba(6, 13, 25, .75) 45%, rgba(6, 13, 25, .1) 100%); }
.banner-body { position: relative; z-index: 1; padding: clamp(var(--space-6), 5vw, var(--space-12)); max-width: 560px; color: #e8eef9; }
.banner-body h2 { font-size: var(--text-xl); margin: var(--space-3) 0; }
.banner-body p { color: #b7c4dd; }
.banner-body .label { color: #ffd23f; }

/* ================= Footer ================= */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--space-10); margin-top: var(--space-16); background: var(--bg-2); }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.footer-grid p { margin: 0; font-size: var(--text-xs); color: var(--text-faint); font-family: var(--font-mono); }
.footer-socials { display: flex; gap: var(--space-2); }

/* ================= Motion ================= */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ================= Print (workshop handouts) ================= */
@media print {
  :root, [data-theme] { --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #fff; --text: #000; --text-muted: #222; --text-faint: #444; --border: #bbb; --accent-ink: #000; --accent-soft: #f2f2f2; }
  body::before, .site-header, .site-footer, .no-print, .copy { display: none !important; }
  .tut-layout { grid-template-columns: 1fr; }
  .tut-aside { position: static; }
  .code pre { background: #f5f5f5; color: #000; white-space: pre-wrap; }
  .step, .panel, .workshop-box { break-inside: avoid; }
}

/* ================= Rich content blocks ================= */
.rich > * + * { margin-top: var(--space-4); }
.rich p { color: var(--text-muted); margin-bottom: 0; }
.rich strong, .rich b { color: var(--text); }
code.ic { font-size: .88em; padding: 1px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.inline-link { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.inline-link:hover { text-decoration-thickness: 2px; }
.code { margin: 0; }
.code-head { display: flex; justify-content: space-between; gap: var(--space-4); font-family: var(--font-mono); font-size: var(--text-xs); color: #9aabca; background: #0b1628; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; padding: var(--space-2) var(--space-4); padding-right: 80px; }
.code-head + .copy + pre { border-radius: 0 0 var(--radius) var(--radius); }
.code:has(.code-head) .copy { top: 5px; }
.block-img { margin: 0; }
.block-img img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.block-img figcaption { font-size: var(--text-xs); color: var(--text-faint); margin-top: var(--space-2); font-family: var(--font-mono); }
.block-h { font-family: var(--font-body); font-size: var(--text-base); font-weight: 700; letter-spacing: 0; }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5); }
.callout strong { display: block; font-size: var(--text-sm); margin-bottom: var(--space-1); color: var(--accent-ink); }
.callout p { margin: 0; font-size: var(--text-sm); color: var(--text); }
.callout-warning { border-left-color: #ff8a3d; background: rgba(255, 138, 61, .1); }
.callout-warning strong { color: #ff9d5c; }
[data-theme="light"] .callout-warning strong { color: #b04f00; }
.callout-info { border-left-color: #6ea8ff; background: rgba(110, 168, 255, .1); }
.callout-info strong { color: #8cbaff; }
[data-theme="light"] .callout-info strong { color: #1f5fc4; }
.block-list { margin: 0; padding-left: var(--space-6); color: var(--text-muted); display: grid; gap: var(--space-1); }
.block-table { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.block-table table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.block-table th, .block-table td { text-align: left; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); }
.block-table th { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); background: var(--surface-2); font-weight: 600; }
.block-table tr:last-child td { border-bottom: 0; }
.block-video { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.block-video iframe { width: 100%; height: 100%; border: 0; }

/* ================= Involvements ================= */
.org-list { display: flex; flex-direction: column; gap: var(--space-6); }
.org { display: grid; grid-template-columns: 120px 1fr; gap: clamp(var(--space-5), 3vw, var(--space-10)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(var(--space-6), 3vw, var(--space-8)); transition: border-color .25s; }
.org:hover { border-color: var(--border-strong); }
.org-logo { width: 120px; height: 120px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--bg-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.org-logo img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-3); }
.org-logo span { font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); color: var(--accent-ink); letter-spacing: -.02em; }
.org-logo::after { content: ""; position: absolute; inset: 6px; border: 1px dashed var(--border); border-radius: 6px; pointer-events: none; }
.org-body { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.org-body h3 { font-size: var(--text-lg); }
.org-sum { color: var(--text-muted); margin: 0; }
.roles { list-style: none; margin: 0; padding: 0 0 0 var(--space-5); border-left: 2px solid var(--border); display: grid; gap: var(--space-3); }
.roles li { position: relative; }
.roles li::before { content: ""; position: absolute; left: calc(-1 * var(--space-5) - 7px); top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--border-strong); }
.roles li:first-child::before { background: var(--accent); border-color: var(--accent); }
.roles b { font-size: var(--text-sm); margin-right: var(--space-3); }
.roles time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-faint); }
.roles p { margin: 2px 0 0; font-size: var(--text-sm); color: var(--text-muted); }
.org-hl { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-2); }
.org-hl li { position: relative; padding-left: var(--space-6); font-size: var(--text-sm); }
.org-hl li::before { content: ""; position: absolute; left: 0; top: .6em; width: 12px; height: 2px; background: var(--accent); }
.org-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.org-foot .tags { margin: 0; padding: 0; }
@media (max-width: 640px) { .org { grid-template-columns: 1fr; } .org-logo { width: 72px; height: 72px; } .org-logo span { font-size: var(--text-lg); } }
