/* ==========================================================================
   Sebastian Kowalik // Claude Code × Karpathy.ai Editorial Stylesheet
   Dark warm charcoal default (#141413 + #d97757) + Light parchment (#faf9f5)
   Shared across / and /travel/
   ========================================================================== */

:root,
[data-theme="dark"] {
  --bg: #141413;
  --bg-subtle: #1b1a18;
  --bg-elevated: #21201d;
  --bg-hover: #262521;
  --topbar-bg: rgba(20, 20, 19, 0.82);
  --popover-bg: rgba(25, 24, 22, 0.96);
  --column-scrim: linear-gradient(
    90deg,
    rgba(20, 20, 19, 0) 0%,
    rgba(20, 20, 19, 0.72) 10%,
    rgba(20, 20, 19, 0.84) 50%,
    rgba(20, 20, 19, 0.72) 90%,
    rgba(20, 20, 19, 0) 100%
  );

  --border: #2a2824;
  --border-subtle: #22201d;
  --border-strong: rgba(217, 119, 87, 0.45);

  --text: #f3efe7;
  --text-secondary: #b0aa9f;
  --text-muted: #7c776e;

  --accent: #d97757;
  --accent-hover: #e58a6c;
  --accent-btn-bg: #d97757;
  --accent-btn-hover: #e48768;
  --accent-btn-ink: #141413;
  --accent-soft: rgba(217, 119, 87, 0.12);
  --accent-soft-strong: rgba(217, 119, 87, 0.2);

  --emerald: #6ee7b7;
  --emerald-soft: rgba(110, 231, 183, 0.12);

  --logo-bg: #1d1c19;
  --logo-border: #2f2c28;
  --code-bg: #191816;

  /* Map SVG theme tokens */
  --map-bg: rgba(23, 22, 20, 0.88);
  --map-grid: rgba(243, 239, 231, 0.055);
  --map-equator: rgba(217, 119, 87, 0.18);
  --map-land-fill: rgba(243, 239, 231, 0.035);
  --map-land-dot: rgba(243, 239, 231, 0.28);
  --map-land-stroke: rgba(243, 239, 231, 0.14);
  --map-overlay-bg: rgba(20, 20, 19, 0.88);

  --shadow-popover: 0 18px 42px rgba(0, 0, 0, 0.48);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --topbar-h: 52px;
  --col-max: 820px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #faf9f5;
  --bg-subtle: #f3f1ea;
  --bg-elevated: #ffffff;
  --bg-hover: #ece9df;
  --topbar-bg: rgba(250, 249, 245, 0.86);
  --popover-bg: rgba(255, 255, 255, 0.97);
  --column-scrim: linear-gradient(
    90deg,
    rgba(250, 249, 245, 0) 0%,
    rgba(250, 249, 245, 0.72) 10%,
    rgba(250, 249, 245, 0.86) 50%,
    rgba(250, 249, 245, 0.72) 90%,
    rgba(250, 249, 245, 0) 100%
  );

  --border: #e5e1d6;
  --border-subtle: #edeae1;
  --border-strong: rgba(196, 93, 59, 0.42);

  --text: #191917;
  --text-secondary: #524e47;
  --text-muted: #7a746b;

  --accent: #c45d3b;
  --accent-hover: #a94929;
  --accent-btn-bg: #b94f2d;
  --accent-btn-hover: #a34324;
  --accent-btn-ink: #ffffff;
  --accent-soft: rgba(196, 93, 59, 0.09);
  --accent-soft-strong: rgba(196, 93, 59, 0.16);

  --emerald: #047857;
  --emerald-soft: rgba(4, 120, 87, 0.09);

  --logo-bg: #ffffff;
  --logo-border: #e0dbd0;
  --code-bg: #f3f1ea;

  /* Map SVG theme tokens */
  --map-bg: rgba(255, 255, 255, 0.9);
  --map-grid: rgba(25, 25, 23, 0.055);
  --map-equator: rgba(196, 93, 59, 0.22);
  --map-land-fill: rgba(25, 25, 23, 0.03);
  --map-land-dot: rgba(25, 25, 23, 0.28);
  --map-land-stroke: rgba(25, 25, 23, 0.14);
  --map-overlay-bg: rgba(250, 249, 245, 0.92);

  --shadow-popover: 0 14px 34px rgba(25, 25, 23, 0.12);

  color-scheme: light;
}

/* Hermes Skin — Dark (Nous Research Hermes LENS_0 Charcoal-Teal) */
[data-skin="hermes"][data-theme="dark"],
[data-skin="hermes"]:not([data-theme="light"]) {
  --bg: #071415;
  --bg-subtle: #0d1c1e;
  --bg-elevated: #0f2022;
  --bg-hover: #142a2d;
  --topbar-bg: rgba(7, 20, 21, 0.86);
  --popover-bg: rgba(11, 25, 26, 0.96);
  --column-scrim: linear-gradient(
    90deg,
    rgba(7, 20, 21, 0) 0%,
    rgba(7, 20, 21, 0.72) 10%,
    rgba(7, 20, 21, 0.84) 50%,
    rgba(7, 20, 21, 0.72) 90%,
    rgba(7, 20, 21, 0) 100%
  );

  --border: rgba(45, 212, 191, 0.2);
  --border-subtle: rgba(45, 212, 191, 0.11);
  --border-strong: rgba(45, 212, 191, 0.48);

  --text: #f3eadc;
  --text-secondary: #9bb4b6;
  --text-muted: #698689;

  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-btn-bg: #14b8a6;
  --accent-btn-hover: #2dd4bf;
  --accent-btn-ink: #041a19;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --accent-soft-strong: rgba(45, 212, 191, 0.22);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.13);

  --logo-bg: #102325;
  --logo-border: rgba(45, 212, 191, 0.24);
  --code-bg: #061011;

  --map-bg: rgba(10, 23, 25, 0.9);
  --map-grid: rgba(45, 212, 191, 0.08);
  --map-equator: rgba(45, 212, 191, 0.28);
  --map-land-fill: rgba(45, 212, 191, 0.045);
  --map-land-dot: rgba(45, 212, 191, 0.36);
  --map-land-stroke: rgba(45, 212, 191, 0.2);
  --map-overlay-bg: rgba(7, 20, 21, 0.9);

  color-scheme: dark;
}

/* Hermes Skin — Light (Crisp Alabaster-Teal) */
[data-skin="hermes"][data-theme="light"] {
  --bg: #f3f7f6;
  --bg-subtle: #eaf2f0;
  --bg-elevated: #ffffff;
  --bg-hover: #e1ecea;
  --topbar-bg: rgba(243, 247, 246, 0.88);
  --popover-bg: rgba(255, 255, 255, 0.97);
  --column-scrim: linear-gradient(
    90deg,
    rgba(243, 247, 246, 0) 0%,
    rgba(243, 247, 246, 0.72) 10%,
    rgba(243, 247, 246, 0.86) 50%,
    rgba(243, 247, 246, 0.72) 90%,
    rgba(243, 247, 246, 0) 100%
  );

  --border: rgba(15, 118, 110, 0.18);
  --border-subtle: rgba(15, 118, 110, 0.1);
  --border-strong: rgba(15, 118, 110, 0.48);

  --text: #0e1f21;
  --text-secondary: #395558;
  --text-muted: #5d797c;

  --accent: #0f766e;
  --accent-hover: #0d9488;
  --accent-btn-bg: #0f766e;
  --accent-btn-hover: #0d9488;
  --accent-btn-ink: #ffffff;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --accent-soft-strong: rgba(15, 118, 110, 0.18);

  --emerald: #059669;
  --emerald-soft: rgba(5, 150, 105, 0.11);

  --logo-bg: #ffffff;
  --logo-border: rgba(15, 118, 110, 0.22);
  --code-bg: #ebf3f1;

  --map-bg: rgba(255, 255, 255, 0.92);
  --map-grid: rgba(15, 118, 110, 0.08);
  --map-equator: rgba(15, 118, 110, 0.26);
  --map-land-fill: rgba(15, 118, 110, 0.04);
  --map-land-dot: rgba(15, 118, 110, 0.34);
  --map-land-stroke: rgba(15, 118, 110, 0.2);
  --map-overlay-bg: rgba(243, 247, 246, 0.94);

  color-scheme: light;
}

/* Hermes skin subtle grain & technical header tracking */
[data-skin="hermes"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-skin="hermes"][data-theme="light"] body::after {
  opacity: 0.016;
}

[data-skin="hermes"] .section-title,
[data-skin="hermes"] .skill-col-title,
[data-skin="hermes"] .pillar-head {
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

[data-skin="hermes"] .hero-portrait-wrap {
  border-radius: 10px;
}

[data-skin="hermes"] .hero-portrait {
  border-radius: 7px;
}

[data-skin="hermes"] .cta-primary {
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 200;
  background: var(--accent-btn-bg);
  color: var(--accent-btn-ink);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

/* ==========================================================================
   Scroll-Reactive Trance Background Canvas
   ========================================================================== */

.trance-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.page-scrim {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(980px, 100vw);
  transform: translateX(-50%);
  background: var(--column-scrim);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Minimal Sticky Top Bar (~52px)
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.topbar-inner {
  max-width: 920px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-spark {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  transition: transform 0.35s ease;
}

.brand-link:hover .brand-spark {
  transform: rotate(45deg);
}

.brand-prompt {
  color: var(--accent);
  font-weight: 600;
}

.brand-claude {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.brand-hermes {
  display: none;
}

[data-skin="hermes"] .brand-claude {
  display: none;
}

[data-skin="hermes"] .brand-hermes {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.brand-hermes-glyph {
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.skin-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.skin-toggle-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--accent-soft);
}

.skin-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: border-radius 0.18s ease, transform 0.18s ease;
}

[data-skin="hermes"] .skin-dot {
  border-radius: 1px;
  transform: rotate(45deg);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.slash-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.slash-link {
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.slash-link:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.slash-link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

/* Minimal Melodic Audio Pill + Popover */
.synth-pill-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.synth-pill-group:hover,
.synth-pill-group.is-open,
.synth-pill-group.is-playing {
  border-color: var(--border-strong);
}

.synth-pill-group.is-playing,
.synth-pill-group.is-open {
  background: var(--accent-soft);
}

.audio-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.audio-pill-btn:hover,
.synth-pill-group.is-open .audio-pill-btn,
.synth-pill-group.is-playing .audio-pill-btn {
  color: var(--accent);
}

.pill-note {
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
}

.synth-pill-group.is-playing .pill-note {
  display: none;
}

.synth-eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
  width: 11px;
}

.synth-pill-group.is-playing .synth-eq {
  display: inline-flex;
}

.synth-eq i {
  display: block;
  width: 2px;
  height: 4px;
  border-radius: 1px;
  background: var(--accent);
  animation: eqBounce 0.72s ease-in-out infinite alternate;
}

.synth-eq i:nth-child(2) {
  height: 8px;
  animation-delay: 0.18s;
}

.synth-eq i:nth-child(3) {
  height: 5px;
  animation-delay: 0.34s;
}

@keyframes eqBounce {
  0% { height: 3px; }
  100% { height: 11px; }
}

.pill-chevron {
  opacity: 0.7;
  transition: transform 0.18s ease, opacity 0.15s ease;
}

.synth-pill-group.is-open .pill-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.synth-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-btn-bg);
  background: var(--accent-btn-bg);
  color: var(--accent-btn-ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.synth-play-btn:hover {
  background: var(--accent-btn-hover);
  border-color: var(--accent-btn-hover);
}

.synth-play-btn.is-playing {
  background: var(--accent-soft);
  border-color: var(--border-strong);
  color: var(--accent);
}

.synth-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 304px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--popover-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-popover);
  display: flex;
  flex-direction: column;
  gap: 11px;
  z-index: 80;
}

.synth-popover[hidden] {
  display: none;
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
}

.popover-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--code-bg);
}

.popover-tab {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.14s ease;
}

.popover-tab:hover {
  color: var(--text);
}

.popover-tab.is-active {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.popover-panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.popover-panel[hidden] {
  display: none;
}

.track-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.track-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.track-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.source-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
}

.source-btn {
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
}

.source-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.source-btn.is-active {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.track-embed-host {
  width: 100%;
  min-height: 152px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--code-bg);
}

.track-embed-host iframe {
  display: block;
  width: 100%;
  border: 0;
}

.track-embed-host.is-youtube {
  aspect-ratio: 16 / 9;
  min-height: 156px;
}

.track-embed-host.is-youtube iframe {
  height: 100%;
}

.track-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}

.popover-title {
  color: var(--text);
  font-weight: 600;
}

.popover-state {
  color: var(--text-muted);
  font-size: 10.5px;
}

.popover-state.is-live {
  color: var(--accent);
}

.popover-scope {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--code-bg);
}

.popover-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popover-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.popover-val {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.preset-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preset-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 6px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.14s ease;
}

.preset-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.preset-btn.is-active {
  border-color: var(--border-strong);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.popover-note {
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-muted);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.mobile-menu-btn {
  display: none;
}

.mobile-nav-drawer {
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mobile-nav-drawer[hidden] {
  display: none;
}

.mobile-nav-inner {
  max-width: 920px;
  margin: 0 auto;
  padding: 10px 20px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

/* Theme icon visibility */
[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

/* ==========================================================================
   Centered Editorial Column (max-width: 820px)
   ========================================================================== */

.editorial-main {
  position: relative;
  z-index: 1;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 44px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 26px;
}

.section-title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}

.prompt-caret {
  color: var(--accent);
  margin-right: 6px;
}

.section-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Hero (Karpathy.ai rhythm + Claude Code clarity)
   ========================================================================== */

.hero {
  padding: 52px 0 38px;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.hero-portrait-wrap {
  flex-shrink: 0;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.hero-portrait-wrap:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.hero-portrait {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}

.hero-content {
  min-width: 0;
  flex: 1;
}

.hero-name {
  margin: 0;
  font-size: clamp(1.9rem, 3.6vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}

.hero-subtitle {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  line-height: 1.5;
}

.hero-bio {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.68;
}

.hero-bio strong {
  color: var(--text);
  font-weight: 500;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 6px;
  background: var(--accent-btn-bg);
  color: var(--accent-btn-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.12s ease;
}

.cta-primary:hover {
  background: var(--accent-btn-hover);
}

.cta-primary:active {
  transform: translateY(1px);
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.inline-link:hover {
  color: var(--accent);
}

.hero-strip {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

.strip-sep {
  opacity: 0.45;
}

/* ==========================================================================
   Career Timeline (Karpathy.ai Centerpiece)
   ========================================================================== */

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 116px 56px minmax(0, 1fr);
  gap: 0 18px;
  padding-bottom: 34px;
}

.tl-item:last-child {
  padding-bottom: 4px;
}

.tl-dates {
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tl-item.is-current .tl-dates {
  color: var(--accent);
  font-weight: 500;
}

.tl-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tl-item:not(:last-child) .tl-rail::before {
  content: "";
  position: absolute;
  top: 46px;
  bottom: -34px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--border);
}

.tl-logo {
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--logo-border);
  background: var(--logo-bg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: border-color 0.16s ease;
}

.tl-item.is-current .tl-logo {
  border-color: var(--border-strong);
}

.tl-item:hover .tl-logo {
  border-color: var(--border-strong);
}

.tl-body {
  min-width: 0;
  padding-top: 1px;
}

.tl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.tl-org {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.tl-org-sub {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 14.5px;
}

.tl-stage {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.tl-item.is-current .tl-stage {
  color: var(--accent);
}

.tl-role {
  margin-top: 2px;
  font-size: 14px;
  color: var(--text-secondary);
}

.tl-progression {
  margin: 10px 0 12px;
  padding: 7px 10px;
  border-left: 2px solid var(--accent);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
}

.tl-progression strong {
  color: var(--text);
  font-weight: 600;
}

.tl-bullets {
  margin: 10px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.62;
}

.tl-bullets li::marker {
  color: var(--accent);
}

.tl-bullets strong {
  color: var(--text);
  font-weight: 500;
}

.tl-prose {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.62;
}

.tl-intro {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.tl-projects-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.tl-projects-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.tl-expand-btn {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}

.tl-expand-btn:hover {
  background: var(--accent-soft);
  border-color: var(--border-strong);
}

.tl-projects {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-project {
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: transparent;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.tl-project:hover {
  border-color: var(--border);
  background: var(--bg-subtle);
}

.tl-project[open] {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.tl-project-summary {
  list-style: none;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 10px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}

.tl-project-summary::-webkit-details-marker {
  display: none;
}

.tl-project-summary::marker {
  display: none;
  content: "";
}

.tl-project-chevron {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 20px;
  font-size: 0;
  color: transparent;
}

.tl-project-chevron::before {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.7px solid var(--accent);
  border-bottom: 1.7px solid var(--accent);
  transform: translateX(-1px) rotate(-45deg);
  transition: transform 0.16s ease;
}

.tl-project[open] > .tl-project-summary .tl-project-chevron::before {
  transform: translateY(-1px) rotate(45deg);
}

.tl-project-title-group {
  min-width: 0;
}

.tl-project-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.42;
  color: var(--text);
}

.tl-project-sub {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}

.tl-project-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.tl-project[open] .tl-project-date {
  color: var(--accent);
}

.tl-project-body {
  margin: 0 12px 12px 19px;
  padding: 6px 0 2px 14px;
  border-left: 2px solid var(--border-strong);
}

.tl-project-bullets {
  margin: 0;
  padding-left: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.8px;
  line-height: 1.58;
  color: var(--text-secondary);
}

.tl-project-bullets li::marker {
  color: var(--accent);
}

.tl-project-bullets strong {
  color: var(--text);
  font-weight: 500;
}

.tl-project-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tl-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Projects (Clean Minimal 2-Column Editorial Grid)
   ========================================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 34px;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.project-item-featured {
  grid-column: 1 / -1;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.project-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.project-name {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.project-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  flex: 1;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.project-links {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.text-link {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link-muted {
  color: var(--text-muted);
}

.text-link-muted:hover {
  color: var(--text);
}

/* ==========================================================================
   Skills & Local AI Practice (Quiet Terminal-Spec Layout)
   ========================================================================== */

.pillars-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
  padding: 16px 0 22px;
  margin-bottom: 24px;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.pillar-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pillar-head {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
}

.pillar-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.skills-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 28px;
}

.skill-col-title {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.skill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.skill-list li {
  position: relative;
  padding-left: 12px;
}

.skill-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.creds-line {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.creds-line strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   Community, Speaking & Beyond Code (Compact Karpathy Editorial List)
   ========================================================================== */

.editorial-rows {
  display: flex;
  flex-direction: column;
}

.ed-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 6px 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
}

.ed-row:first-child {
  padding-top: 0;
  border-top: none;
}

.ed-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding-top: 2px;
}

.ed-sub {
  display: block;
  margin-top: 3px;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-muted);
}

.ed-body {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.ed-body p {
  margin: 0;
}

.ed-body strong {
  color: var(--text);
  font-weight: 500;
}

.ed-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.synth-inline-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.synth-inline-btn:hover,
.synth-inline-btn.is-playing {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.synth-inline-btn-secondary {
  color: var(--text-secondary);
}

.synth-inline-btn-secondary:hover {
  color: var(--accent);
}

/* ==========================================================================
   Minimal Closing Footer
   ========================================================================== */

.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 28px 24px 56px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-links .footer-cta {
  color: var(--accent);
  font-weight: 600;
}

/* ==========================================================================
   /travel Page — Stylized Dot-Matrix World Map + Under Construction State
   ========================================================================== */

.travel-main {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.travel-header {
  margin-bottom: 26px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 18px;
  transition: color 0.15s ease;
}

.back-link:hover {
  color: var(--accent);
}

.travel-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.travel-title {
  margin: 0;
  font-size: clamp(1.65rem, 3.2vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}

.status-pill.is-live {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--emerald);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: statusPulse 2.4s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.travel-subtitle {
  margin: 10px 0 0;
  max-width: 64ch;
  font-size: 15px;
  color: var(--text-secondary);
}

.map-frame {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--map-bg);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.map-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.map-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 430;
  min-height: 290px;
}

.world-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map-grid-line {
  stroke: var(--map-grid);
  stroke-width: 0.75;
}

.map-equator {
  stroke: var(--map-equator);
  stroke-width: 0.9;
  stroke-dasharray: 4 5;
}

.map-land-base {
  fill: var(--map-land-fill);
  stroke: var(--map-land-stroke);
  stroke-width: 0.75;
  stroke-linejoin: round;
}

.map-land-dots {
  fill: url(#world-dot-pattern);
  pointer-events: none;
}

.reticle-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 0.9;
  opacity: 0.45;
  transform-box: fill-box;
  transform-origin: center;
  animation: reticlePulse 4.6s ease-out infinite;
}

.reticle-ring-delay-1 { animation-delay: 1.5s; }
.reticle-ring-delay-2 { animation-delay: 3.0s; }

@keyframes reticlePulse {
  0% { transform: scale(0.55); opacity: 0.65; }
  75% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.reticle-cross {
  stroke: var(--accent);
  stroke-width: 0.85;
  opacity: 0.55;
}

.map-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  pointer-events: none;
}

.map-overlay[hidden] {
  display: none;
}

.construction-card {
  pointer-events: auto;
  max-width: 440px;
  width: 100%;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--map-overlay-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-popover);
}

.construction-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.construction-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.construction-text {
  margin: 8px 0 0;
  font-size: 13.8px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.construction-code {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--code-bg);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.construction-code span {
  color: var(--text-secondary);
}

/* Live interactive pins & tooltip (activates automatically when travel/places.json has entries) */
.travel-pin {
  cursor: pointer;
}

.travel-pin-halo {
  fill: var(--accent);
  opacity: 0.24;
  transition: opacity 0.16s ease;
}

.travel-pin-core {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 1.4;
}

.travel-pin:hover .travel-pin-halo,
.travel-pin:focus-visible .travel-pin-halo {
  opacity: 0.5;
}

.map-tooltip {
  position: absolute;
  z-index: 20;
  max-width: 240px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--popover-bg);
  box-shadow: var(--shadow-popover);
  pointer-events: none;
  font-size: 12.5px;
}

.map-tooltip[hidden] {
  display: none;
}

.tooltip-title {
  font-weight: 600;
  color: var(--text);
}

.tooltip-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  margin-top: 2px;
}

.tooltip-note {
  margin: 6px 0 0;
  color: var(--text-secondary);
  line-height: 1.45;
}

.places-list-section {
  margin-top: 28px;
}

.places-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.place-card {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.place-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.place-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.place-year {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

.place-country {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.place-note {
  margin: 7px 0 0;
  font-size: 13.8px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 780px) {
  .topbar-inner {
    padding: 0 16px;
  }

  .slash-nav {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .editorial-main,
  .site-footer,
  .travel-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding: 36px 0 30px;
  }

  .hero-top {
    flex-direction: column;
    gap: 18px;
  }

  .hero-portrait-wrap {
    width: 96px;
    height: 96px;
  }

  .section {
    padding: 34px 0;
  }

  .projects-grid,
  .pillars-strip,
  .skills-columns,
  .places-grid {
    grid-template-columns: 1fr;
  }

  .ed-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tl-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 4px 14px;
    padding-bottom: 28px;
  }

  .tl-dates {
    grid-column: 2;
    grid-row: 1;
    padding-top: 0;
    text-align: left;
  }

  .tl-rail {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .tl-body {
    grid-column: 2;
    grid-row: 2;
  }

  .map-stage {
    aspect-ratio: 1000 / 560;
    min-height: 320px;
  }
}

@media (max-width: 520px) {
  .topbar-inner {
    padding: 0 12px;
    gap: 6px;
  }

  .brand-claude {
    gap: 5px;
  }

  .brand-prompt {
    display: none;
  }

  .brand-name {
    font-size: 11px;
    letter-spacing: -0.02em;
  }

  .topbar-right {
    gap: 6px;
  }

  .topbar-tools {
    gap: 4px;
  }

  .audio-pill-btn {
    height: 26px;
    padding: 0 7px;
    gap: 4px;
    font-size: 10.5px;
  }

  .pill-chevron {
    display: none;
  }

  .skin-toggle-btn {
    height: 28px;
    padding: 0 7px;
    gap: 4px;
    font-size: 10.5px;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
  }

  .synth-popover {
    width: min(304px, calc(100vw - 24px));
    right: 0;
  }

  .construction-card {
    padding: 15px 16px;
  }

  .tl-project-summary {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 2px 8px;
    padding: 9px 10px;
  }

  .tl-project-date {
    grid-column: 2;
    padding-top: 3px;
    font-size: 10.5px;
  }

  .tl-project-body {
    margin: 0 10px 10px 14px;
    padding: 5px 0 2px 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .synth-pill-group.is-playing .synth-eq i,
  .status-dot,
  .reticle-ring {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
