/* ===========================================================
   Theme tokens
   =========================================================== */
:root {
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

:root[data-theme="light"] {
  --bg: #f7f7f5;
  --bg-2: #ffffff;
  --text: #16171b;
  --muted: #5d6170;
  --line: #e4e4e0;
  --card: #ffffff;
  --card-line: #e7e7e3;
  --accent: #4f46e5;
  --accent-2: #0ea5a4;
  --accent-ink: #ffffff;
  --chip: #f1f1ee;
  --glow: rgba(79, 70, 229, .14);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0b0f;
  --bg-2: #111319;
  --text: #e9eaf0;
  --muted: #9a9fb0;
  --line: #22252e;
  --card: #12141a;
  --card-line: #23262f;
  --accent: #8b93ff;
  --accent-2: #3fd0c9;
  --accent-ink: #0a0b0f;
  --chip: #1a1d25;
  --glow: rgba(139, 147, 255, .18);
  color-scheme: dark;
}

:root[data-theme="wizard"] {
  --font-head: "Cinzel", Georgia, serif;
  --font-body: "EB Garamond", Georgia, serif;
  --font-mono: "EB Garamond", Georgia, serif;
  --bg: #0d0a17;
  --bg-2: #160f24;
  --text: #f3e7c9;
  --muted: #c7b78f;
  --line: rgba(212, 166, 74, .28);
  --card: #efe0bd;
  --card-ink: #2a1b0c;
  --card-muted: #5e4527;
  --card-line: #b8955a;
  --accent: #d4a64a;
  --accent-2: #8e1b1b;
  --accent-ink: #1a1006;
  --chip: rgba(122, 82, 30, .12);
  --glow: rgba(212, 166, 74, .25);
  color-scheme: dark;
}

/* Professional vs. wizard copy */
.wiz { display: none; }
:root[data-theme="wizard"] .pro { display: none; }
:root[data-theme="wizard"] .wiz { display: inline; }

/* ===========================================================
   Base
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
:root[data-theme="wizard"] body { font-size: 19px; }

body::before {
  /* soft ambient gradient */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(800px 500px at 85% -10%, var(--glow), transparent 60%),
    radial-gradient(600px 400px at -10% 30%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 60%);
}
:root[data-theme="light"] body::after,
:root[data-theme="dark"] body::after {
  /* faint grid */
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: .5;
}
:root[data-theme="wizard"] body::before {
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(90, 50, 140, .45), transparent 60%),
    radial-gradient(700px 500px at 0% 60%, rgba(30, 60, 110, .35), transparent 60%),
    linear-gradient(#0d0a17, #120c1e 60%, #0b0812);
}

#fx {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
em { font-style: normal; color: var(--accent); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
kbd {
  font-family: var(--font-mono);
  font-size: .85em;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--chip);
}
::selection { background: var(--accent); color: var(--accent-ink); }

/* ===========================================================
   Top bar + theme switch
   =========================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(16px, calc((100vw - var(--maxw)) / 2));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.logo { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.logo .dot { color: var(--accent); }
:root[data-theme="wizard"] .logo { color: var(--accent); letter-spacing: .08em; }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--chip); }
:root[data-theme="wizard"] .nav a { font-family: var(--font-head); font-size: 13px; letter-spacing: .06em; }
:root[data-theme="wizard"] .nav a:hover { background: rgba(212, 166, 74, .12); color: var(--accent); }

.theme-switch {
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 34px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
}
.theme-switch button {
  position: relative; z-index: 1;
  width: 34px; height: 30px;
  display: grid; place-items: center;
  border: 0; background: none; cursor: pointer;
  color: var(--muted);
  border-radius: 999px;
  transition: color .3s;
}
.theme-switch button[aria-checked="true"] { color: var(--accent-ink); }
.theme-switch svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.theme-switch .thumb {
  position: absolute; top: 3px; left: 3px;
  width: 34px; height: 30px;
  border-radius: 999px;
  background: var(--accent);
  transition: transform .45s var(--ease), background .45s;
}
:root[data-theme="dark"] .theme-switch .thumb { transform: translateX(34px); }
:root[data-theme="wizard"] .theme-switch .thumb {
  transform: translateX(68px);
  background: radial-gradient(circle at 30% 30%, #f6d98a, #b6852e);
  box-shadow: 0 0 14px rgba(212, 166, 74, .7);
}

/* ===========================================================
   Layout
   =========================================================== */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.section { padding: 96px 0 24px; }
.section-head { margin-bottom: 40px; display: grid; gap: 6px; }
.section-num { color: var(--accent); font-size: 14px; letter-spacing: .1em; }
.section-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -.03em;
}
.section-kicker { margin: 0; color: var(--muted); font-size: 18px; }

:root[data-theme="wizard"] .section-head { text-align: center; justify-items: center; }
:root[data-theme="wizard"] .section-head h2 {
  letter-spacing: .04em;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(212, 166, 74, .35);
}
:root[data-theme="wizard"] .section-head h2::before,
:root[data-theme="wizard"] .section-head h2::after {
  content: "❦"; font-size: .45em; vertical-align: middle; margin: 0 .6em; opacity: .7;
}
:root[data-theme="wizard"] .section-num { font-family: var(--font-head); font-size: 18px; }
:root[data-theme="wizard"] .section-kicker { font-style: italic; }

/* ===========================================================
   Cards
   =========================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s, background-color .5s;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--card-line));
  box-shadow: 0 20px 50px -30px var(--glow), 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

/* Parchment cards in wizard mode */
:root[data-theme="wizard"] .card {
  color: var(--card-ink);
  border-radius: 6px;
  border: 1px solid var(--card-line);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 250, 230, .65), transparent 55%),
    radial-gradient(ellipse at 90% 90%, rgba(150, 100, 40, .25), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(120, 80, 30, .18), transparent 45%),
    var(--card);
  box-shadow:
    inset 0 0 40px rgba(110, 70, 20, .28),
    inset 0 0 0 6px rgba(239, 224, 189, 1),
    inset 0 0 0 7px rgba(140, 100, 45, .45),
    0 18px 40px -18px rgba(0, 0, 0, .7);
}
:root[data-theme="wizard"] .card:hover {
  box-shadow:
    inset 0 0 40px rgba(110, 70, 20, .28),
    inset 0 0 0 6px rgba(239, 224, 189, 1),
    inset 0 0 0 7px rgba(140, 100, 45, .6),
    0 0 40px -6px rgba(212, 166, 74, .45),
    0 18px 40px -18px rgba(0, 0, 0, .7);
}
:root[data-theme="wizard"] .card .muted { color: var(--card-muted); }
:root[data-theme="wizard"] .card em,
:root[data-theme="wizard"] .card strong { color: #6b1414; }

/* ===========================================================
   Hero
   =========================================================== */
.hero { padding: 96px 0 56px; }
.eyebrow {
  display: inline-flex; align-items: center;
  margin: 24px 0 0;
  padding: 6px 14px;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
}
.eyebrow .pro { display: inline-flex; align-items: center; }
.crown {
  display: inline-block; flex: none;
  width: 1.25em; height: 1.09em; margin-right: 9px;
  background-color: #012169;
  -webkit-mask: url("assets/columbia-crown.png") center / contain no-repeat;
          mask: url("assets/columbia-crown.png") center / contain no-repeat;
}
:root[data-theme="dark"] .crown { background-color: #9bcbeb; }
.crown-badge {
  flex: none; display: block;
  width: 22px; height: 22px; margin: 0 7px;
  border-radius: 50%;
}
.pulse {
  display: inline-block; width: 8px; height: 8px; margin-right: 10px;
  border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }

.hero-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(56px, 11vw, 132px);
  line-height: .92;
  letter-spacing: -.02em;
  font-weight: 700;
}
.hero-title .pro {
  background: linear-gradient(110deg, var(--text) 30%, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub { max-width: 640px; margin: 28px 0 18px; font-size: clamp(16px, 2vw, 19px); color: var(--muted); }
.hero-sub em { font-weight: 500; }
.hero-roles { font-size: 15px; color: var(--accent); min-height: 1.6em; }
.caret { animation: blink 1s steps(1) infinite; margin-left: 2px; }
@keyframes blink { 50% { opacity: 0; } }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 36px 0 64px; }
.btn {
  display: inline-flex; align-items: center;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-weight: 500; font-size: 15px;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { box-shadow: 0 12px 30px -10px var(--accent); }
.btn.ghost { background: transparent; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}
.stat { padding: 24px 20px 0 0; }
.stat dt {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 600;
  letter-spacing: -.03em;
}
.stat dd { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 220px; }

/* ===========================================================
   Hero portrait — day/night
   =========================================================== */
@property --portrait-glow { syntax: "<color>"; inherits: true; initial-value: rgba(110, 168, 255, .45); }
@property --portrait-glow-2 { syntax: "<color>"; inherits: true; initial-value: rgba(79, 70, 229, .18); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: 64px;
  align-items: center;
}
.hero-copy { grid-column: 1; grid-row: 1; min-width: 0; }
.hero-grid .hero-title { font-size: clamp(48px, 7.2vw, 90px); }

.portrait {
  --dur: 1.25s;
  --wipe: cubic-bezier(.65, 0, .25, 1);
  --portrait-glow: rgba(110, 168, 255, .45);
  --portrait-glow-2: rgba(79, 70, 229, .16);
  grid-column: 2; grid-row: 1;
  position: relative;
  margin: 0;
  perspective: 1000px;
  transition: --portrait-glow var(--dur) var(--wipe), --portrait-glow-2 var(--dur) var(--wipe);
}
:root:not([data-theme="light"]) .portrait {
  --portrait-glow: rgba(255, 184, 108, .28);
  --portrait-glow-2: rgba(139, 147, 255, .26);
}

/* ambient light that spills from the photo into the page */
.portrait::before {
  content: "";
  position: absolute; inset: 6% -14% 4% -14%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 50% 32%, var(--portrait-glow), transparent),
    radial-gradient(closest-side at 50% 78%, var(--portrait-glow-2), transparent);
  filter: blur(36px);
  pointer-events: none;
}

/* offset hairline arch — architectural echo of the frame */
.portrait::after {
  content: "";
  position: absolute; inset: -14px 14px 14px -14px;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 24px;
  -webkit-mask-image: linear-gradient(#000 60%, transparent 100%);
          mask-image: linear-gradient(#000 60%, transparent 100%);
  pointer-events: none;
  transition: border-color var(--dur) var(--wipe);
}

.portrait-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  background: var(--bg-2);
  /* dissolve the lower body into the page */
  -webkit-mask-image: linear-gradient(#000 72%, rgba(0, 0, 0, .7) 88%, transparent 100%);
          mask-image: linear-gradient(#000 72%, rgba(0, 0, 0, .7) 88%, transparent 100%);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .6s var(--ease);
  will-change: transform;
}

.shot, .shot img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.shot img {
  object-fit: cover;
  object-position: 50% 42%;
  transform: translate(var(--px, 0px), var(--py, 0px)) scale(1.45);
  transform-origin: 55% 95%; /* zoom toward the subject, keeping a little room at the bottom for parallax */
  transition: transform .8s var(--ease);
}

/* Night fades in over day */
.shot.night {
  opacity: 0;
  transition: opacity .9s ease;
}
:root:not([data-theme="light"]) .shot.night { opacity: 1; }

/* cool the hazy night sky so it melts into the dark page */
.shot.night::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(10, 11, 15, .6), rgba(10, 11, 15, .2) 38%, transparent 58%);
  pointer-events: none;
}

:root[data-theme="wizard"] .hero-grid { text-align: left; }

/* Wizard hero */
:root[data-theme="wizard"] .hero { text-align: center; padding-top: 110px; }
:root[data-theme="wizard"] .eyebrow {
  background: transparent; border-color: var(--line);
  font-family: var(--font-head); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}
:root[data-theme="wizard"] .hero-title {
  font-size: clamp(44px, 8.5vw, 104px);
  letter-spacing: .03em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff3cf 0%, #e8c06a 45%, #a87a2a 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(212, 166, 74, .35));
}
:root[data-theme="wizard"] .hero-sub { margin-inline: auto; font-style: italic; color: var(--muted); }
:root[data-theme="wizard"] .hero-sub em { color: var(--accent); }
:root[data-theme="wizard"] .hero-roles { font-style: italic; font-size: 19px; }
:root[data-theme="wizard"] .cta { justify-content: center; }
:root[data-theme="wizard"] .btn {
  border-radius: 4px; font-family: var(--font-head); letter-spacing: .06em; font-size: 14px;
  background: transparent; color: var(--text); border-color: var(--line);
}
:root[data-theme="wizard"] .btn.primary {
  background: linear-gradient(180deg, #e8c06a, #b4852f);
  color: var(--accent-ink); border-color: #e8c06a;
}
:root[data-theme="wizard"] .stats { border-top-color: var(--line); }
:root[data-theme="wizard"] .stat { padding-inline: 10px; }
:root[data-theme="wizard"] .stat dt { color: var(--accent); font-weight: 500; }
:root[data-theme="wizard"] .stat dd { margin-inline: auto; font-style: italic; font-size: 16px; }

/* ===========================================================
   Pillars
   =========================================================== */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar h3 { margin: 14px 0 8px; font-family: var(--font-head); font-size: 22px; letter-spacing: -.01em; }
.pillar p { margin: 0; color: var(--muted); font-size: 15.5px; }
.pillar-icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; font-size: 20px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
:root[data-theme="wizard"] .pillar { text-align: center; }
:root[data-theme="wizard"] .pillar-icon {
  margin: 0 auto; font-size: 26px; border-radius: 50%;
  color: #6b1414; background: rgba(107, 20, 20, .1);
  border: 1px solid rgba(107, 20, 20, .3);
}
:root[data-theme="wizard"] .pillar h3 { color: var(--card-ink); letter-spacing: .03em; font-size: 19px; }
:root[data-theme="wizard"] .pillar p { color: var(--card-muted); font-size: 17px; }

/* ===========================================================
   Timeline
   =========================================================== */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; display: grid; gap: 18px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), transparent);
  border-radius: 2px;
}
.t-item { position: relative; }
.t-item::before {
  content: ""; position: absolute; left: -28px; top: 32px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.t-meta { font-size: 13px; color: var(--muted); }
.t-item h3 { margin: 4px 0 12px; font-family: var(--font-head); font-size: 22px; letter-spacing: -.01em; }
.t-item .at { color: var(--accent); font-weight: 500; }
.t-item ul { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 8px; }
.t-item li::marker { color: var(--accent); }
.t-item p { margin: 0; }

:root[data-theme="wizard"] .timeline::before {
  background: repeating-linear-gradient(var(--accent) 0 6px, transparent 6px 12px);
  width: 2px;
}
:root[data-theme="wizard"] .t-item::before {
  /* wax seal */
  width: 22px; height: 22px; left: -31px;
  background: radial-gradient(circle at 35% 35%, #c43a3a, #7a1010 70%);
  border: 0;
  box-shadow: 0 0 0 3px rgba(122, 16, 16, .35), 0 2px 6px rgba(0, 0, 0, .5);
}
:root[data-theme="wizard"] .t-item h3 { letter-spacing: .02em; font-size: 20px; }
:root[data-theme="wizard"] .t-item .at { color: #6b1414; }
:root[data-theme="wizard"] .t-meta { color: var(--card-muted); font-style: italic; font-size: 15px; }
:root[data-theme="wizard"] .t-item li::marker { content: "✦  "; color: #8e5a1a; font-size: .8em; }

/* Tags & chips */
.tags, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span, .chips span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--muted);
  border: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.chips span { font-size: 13.5px; padding: 6px 12px; }
.chips span:hover { color: var(--accent); border-color: var(--accent); }
:root[data-theme="wizard"] .tags span,
:root[data-theme="wizard"] .chips span {
  border-radius: 3px;
  font-style: italic;
  font-size: 15px;
  color: var(--card-ink);
  background: rgba(122, 82, 30, .1);
  border: 1px solid rgba(122, 82, 30, .3);
}
:root[data-theme="wizard"] .chips span:hover { color: #6b1414; border-color: #6b1414; }

/* ===========================================================
   Projects
   =========================================================== */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project { display: flex; flex-direction: column; gap: 12px; }
.project:hover { transform: translateY(-4px); }
.project h3 { margin: 0; font-family: var(--font-head); font-size: 28px; letter-spacing: -.02em; }
.project p { margin: 0; font-size: 15.5px; }
.project .tags { margin-top: auto; padding-top: 6px; }
.p-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.p-kind { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.p-live {
  font-size: 13px; font-weight: 500;
  padding: 4px 12px; border-radius: 999px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  transition: background .2s, color .2s;
}
.p-live:hover { background: var(--accent); color: var(--accent-ink); }

.flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 12px; border-radius: 10px;
  background: var(--chip); font-size: 12px;
}
.flow span { padding: 2px 8px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--card-line); }
.flow i { font-style: normal; color: var(--accent); }

.bench { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: var(--chip); }
.bar { display: grid; grid-template-columns: 100px 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.bar .fill {
  height: 8px; border-radius: 99px; background: var(--card-line); position: relative; overflow: hidden;
}
.bar .fill::after {
  content: ""; position: absolute; inset: 0; width: 0;
  background: var(--muted); border-radius: inherit;
  transition: width 1.2s var(--ease);
}
.bar.best .fill::after { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.in .bar .fill::after { width: var(--w); }
.bar .val { color: var(--muted); white-space: nowrap; }
.bar.best .val { color: var(--accent); }

:root[data-theme="wizard"] .project h3 { color: var(--card-ink); letter-spacing: .03em; font-size: 24px; }
:root[data-theme="wizard"] .p-kind { color: #6b1414; font-style: italic; text-transform: none; letter-spacing: 0; font-size: 15px; }
:root[data-theme="wizard"] .p-live { color: #6b1414; border-color: rgba(107, 20, 20, .4); border-radius: 3px; font-family: var(--font-head); font-size: 12px; }
:root[data-theme="wizard"] .p-live:hover { background: #6b1414; color: #efe0bd; }
:root[data-theme="wizard"] .flow,
:root[data-theme="wizard"] .bench { background: rgba(122, 82, 30, .1); font-size: 15px; font-style: italic; }
:root[data-theme="wizard"] .flow span { background: rgba(255, 250, 230, .5); border-color: rgba(122, 82, 30, .3); }
:root[data-theme="wizard"] .flow i { color: #6b1414; }
:root[data-theme="wizard"] .bar { grid-template-columns: 110px 1fr auto; font-size: 14px; }
:root[data-theme="wizard"] .bar .fill { background: rgba(122, 82, 30, .2); }
:root[data-theme="wizard"] .bar .fill::after { background: #8e5a1a; }
:root[data-theme="wizard"] .bar.best .fill::after { background: linear-gradient(90deg, #8e1b1b, #c43a3a); }
:root[data-theme="wizard"] .bar .val { color: var(--card-muted); }
:root[data-theme="wizard"] .bar.best .val { color: #6b1414; }

/* ===========================================================
   Beyond
   =========================================================== */
.beyond { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.now h3 { margin: 0 0 14px; font-size: 18px; color: var(--accent); }
.now ul { margin: 0; padding-left: 18px; display: grid; gap: 10px; font-size: 15.5px; }
.now li::marker { color: var(--accent); }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.principle { padding: 22px; }
.principle h4 { margin: 6px 0 6px; font-family: var(--font-head); font-size: 18px; letter-spacing: -.01em; }
.principle p { margin: 0; color: var(--muted); font-size: 15px; }
.p-no { color: var(--accent); font-size: 13px; }
.offclock { grid-column: 1 / -1; }
.offclock h3 { margin: 0 0 14px; font-family: var(--font-head); }

:root[data-theme="wizard"] .now h3 { color: #6b1414; font-family: var(--font-head); font-size: 20px; letter-spacing: .04em; }
:root[data-theme="wizard"] .now li::marker { content: "✦  "; color: #8e5a1a; font-size: .8em; }
:root[data-theme="wizard"] .now ul { font-size: 17.5px; }
:root[data-theme="wizard"] .principle h4 { color: var(--card-ink); letter-spacing: .02em; font-size: 17px; }
:root[data-theme="wizard"] .principle p { color: var(--card-muted); font-size: 17px; }
:root[data-theme="wizard"] .p-no { color: #6b1414; font-style: italic; font-size: 17px; }

/* ===========================================================
   Skills
   =========================================================== */
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.skill-group h4 { margin: 0 0 14px; font-family: var(--font-head); font-size: 18px; }
:root[data-theme="wizard"] .skill-group h4 { color: #6b1414; letter-spacing: .05em; text-align: center; }
:root[data-theme="wizard"] .skill-group .chips { justify-content: center; }

/* ===========================================================
   Contact + footer
   =========================================================== */
.contact { padding-bottom: 80px; }
.contact-card { text-align: center; padding: 64px 28px; }
.contact-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -.03em;
  line-height: 1.05;
}
.contact-card p { margin: 0 auto 28px; max-width: 520px; color: var(--muted); }
.email {
  display: inline-block;
  font-size: clamp(18px, 3vw, 28px);
  color: var(--accent);
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color .2s;
  word-break: break-all;
}
.email:hover { border-color: var(--accent); }
.socials { display: flex; justify-content: center; gap: 20px; margin-top: 24px; font-size: 15px; }
.socials a { color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--accent); }

:root[data-theme="wizard"] .contact-card h2 { color: var(--card-ink); letter-spacing: .03em; }
:root[data-theme="wizard"] .contact-card p { color: var(--card-muted); font-style: italic; }
:root[data-theme="wizard"] .email { color: #6b1414; font-style: italic; border-color: rgba(107, 20, 20, .35); }
:root[data-theme="wizard"] .socials a { color: var(--card-muted); font-family: var(--font-head); font-size: 13px; letter-spacing: .06em; }
:root[data-theme="wizard"] .socials a:hover { color: #6b1414; }

.footer {
  max-width: var(--maxw); margin: 0 auto;
  padding: 28px 16px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
  text-align: center;
}
:root[data-theme="wizard"] .footer { font-style: italic; font-size: 16px; }

#toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-family: var(--font-mono); font-size: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
:root[data-theme="wizard"] #toast {
  background: #efe0bd; color: var(--card-ink); border-radius: 4px; font-style: italic; font-size: 17px;
  box-shadow: 0 0 30px rgba(212, 166, 74, .5);
}

/* ===========================================================
   Reveal on scroll
   =========================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Wizard cursor */
:root[data-theme="wizard"] body,
:root[data-theme="wizard"] a,
:root[data-theme="wizard"] button {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M3 25 L19 9' stroke='%235a3a1a' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M3 25 L19 9' stroke='%23c9a063' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='21' cy='7' r='2.6' fill='%23fff3cf'/%3E%3C/svg%3E") 21 7, auto;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 960px) {
  .projects { grid-template-columns: 1fr; }
  .beyond { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: 40px; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .eyebrow { white-space: normal; }
  .portrait { grid-column: 1; grid-row: 1; width: min(62vw, 270px); margin-left: 14px; }
  .hero-copy { grid-row: 2; }
  .portrait::before { inset: 6% -8% 4% -8%; }
}
@media (max-width: 760px) {
  .nav { display: none; }
  .theme-switch { margin-left: auto; }
  .pillars, .skills, .principles { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
  .section { padding-top: 72px; }
  .card { padding: 22px; }
  .bar { grid-template-columns: 1fr auto; }
  .bar .lbl { grid-column: 1 / -1; }
  :root[data-theme="wizard"] .section-head h2::before,
  :root[data-theme="wizard"] .section-head h2::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
