/* ============================================================
   TOKENS — shared
   ============================================================ */
:root {
  --display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --container: 1080px;

  /* status colors — constant across themes (semantic, not decorative) */
  --released: #8fae8a;
  --released-soft: rgba(143, 174, 138, 0.12);
  --released-border: rgba(143, 174, 138, 0.35);
  --dev: #d1a856;
  --dev-soft: rgba(209, 168, 86, 0.12);
  --dev-border: rgba(209, 168, 86, 0.35);
  --proto: #9799a3;
  --proto-soft: rgba(151, 153, 163, 0.12);
  --proto-border: rgba(151, 153, 163, 0.35);
  --tool: #8ba3c7;
  --tool-soft: rgba(139, 163, 199, 0.12);
  --tool-border: rgba(139, 163, 199, 0.35);
  --experimental: #b08bc9;
  --experimental-soft: rgba(176, 139, 201, 0.12);
  --experimental-border: rgba(176, 139, 201, 0.35);
}

/* ============================================================
   THEMES
   To add a new theme: copy a block below, change the token values,
   then register { id, name } in the THEMES array at the top of script.js.
   ============================================================ */

/* --- Obsidian (default): charcoal + muted bronze --- */
:root, html[data-theme="obsidian"] {
  --bg: #101114;
  --bg-alt: #16171b;
  --surface: #1b1c21;
  --surface-2: #212227;
  --border: #2a2b31;
  --border-soft: #1f2025;
  --text: #eceef0;
  --text-dim: #9a9ca3;
  --text-faint: #616269;
  --accent: #c6a15b;
  --accent-ink: #16130b;
  --accent-soft: rgba(198, 161, 91, 0.10);
  --accent-border: rgba(198, 161, 91, 0.35);
}

/* --- Daylight: warm paper + deep bronze --- */
html[data-theme="daylight"] {
  --bg: #f8f6f1;
  --bg-alt: #f0ede5;
  --surface: #ffffff;
  --surface-2: #f3f0e9;
  --border: #e1ddd0;
  --border-soft: #ebe7dc;
  --text: #201e19;
  --text-dim: #5c584e;
  --text-faint: #948f80;
  --accent: #9c7a3e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(156, 122, 62, 0.10);
  --accent-border: rgba(156, 122, 62, 0.35);
}

/* --- Arcade: deep indigo + soft violet --- */
html[data-theme="arcade"] {
  --bg: #0b0e17;
  --bg-alt: #10141f;
  --surface: #151a29;
  --surface-2: #1a2032;
  --border: #262d42;
  --border-soft: #1b2134;
  --text: #eef0f6;
  --text-dim: #9aa0b8;
  --text-faint: #5c6178;
  --accent: #8b7cf6;
  --accent-ink: #12101f;
  --accent-soft: rgba(139, 124, 246, 0.12);
  --accent-border: rgba(139, 124, 246, 0.38);
}

/* --- Machina: industrial iron + muted copper --- */
html[data-theme="machina"] {
  --bg: #121315;
  --bg-alt: #181a1d;
  --surface: #1f2125;
  --surface-2: #27292e;
  --border: #32353c;
  --border-soft: #222429;
  --text: #e2e4e9;
  --text-dim: #9095a0;
  --text-faint: #5f636e;
  --accent: #c48464;
  --accent-ink: #1a0f0a;
  --accent-soft: rgba(196, 132, 100, 0.10);
  --accent-border: rgba(196, 132, 100, 0.35);
}

/* --- Glacier: soft gray + dusty slate blue --- */
html[data-theme="glacier"] {
  --bg: #f3f4f6;
  --bg-alt: #e9ebef;
  --surface: #ffffff;
  --surface-2: #dfe2e6;
  --border: #cbd0d8;
  --border-soft: #dbe0e7;
  --text: #1e242b;
  --text-dim: #535e6c;
  --text-faint: #8894a3;
  --accent: #568198;
  --accent-ink: #ffffff;
  --accent-soft: rgba(86, 129, 152, 0.10);
  --accent-border: rgba(86, 129, 152, 0.35);
}

/* --- Covenant: dark grape charcoal + dusty burgundy --- */
html[data-theme="covenant"] {
  --bg: #0e0d0f;
  --bg-alt: #151318;
  --surface: #1d1a22;
  --surface-2: #26222d;
  --border: #35303e;
  --border-soft: #211d29;
  --text: #ede9f2;
  --text-dim: #9992a3;
  --text-faint: #605a69;
  --accent: #a95a66;
  --accent-ink: #ffffff;
  --accent-soft: rgba(169, 90, 102, 0.10);
  --accent-border: rgba(169, 90, 102, 0.35);
}

/* --- Dusk: deep twilight slate + muted periwinkle --- */
html[data-theme="dusk"] {
  --bg: #0f1015;
  --bg-alt: #15171e;
  --surface: #1c1f28;
  --surface-2: #242834;
  --border: #313747;
  --border-soft: #20242f;
  --text: #eaecf0;
  --text-dim: #989eb0;
  --text-faint: #606678;
  --accent: #7c8ba1;
  --accent-ink: #11141a;
  --accent-soft: rgba(124, 139, 161, 0.10);
  --accent-border: rgba(124, 139, 161, 0.35);
}

/* ============================================================
   RESET
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

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

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s ease-out;
}

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================================================
   NAV
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand { font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.9rem; }
.nav-links a { color: var(--text-dim); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }

.theme-switcher { display: flex; gap: 6px; padding-left: 10px; border-left: 1px solid var(--border); }
.theme-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.theme-dot:hover { transform: scale(1.1); }
.theme-dot.active { border-color: var(--text); }

#nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 6px; }
#nav-toggle span { width: 20px; height: 2px; background: var(--text); display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 60px;
}
.hero-inner { max-width: 760px; width: 100%; text-align: center; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 20px;
}
.hero-sub { max-width: 560px; margin: 0 auto 32px; color: var(--text-dim); font-size: 1.05rem; }

.hero-actions { display: flex; gap: 14px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.btn {
  font-size: 0.92rem; font-weight: 600; padding: 13px 28px; border-radius: 6px;
  transition: all 0.2s ease; border: 1px solid transparent; display: inline-block;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-border); color: var(--accent); }

.hero-links { display: flex; gap: 22px; justify-content: center; font-size: 1.2rem; color: var(--text-dim); margin-bottom: 48px; }
.hero-links a { transition: color 0.2s ease, transform 0.2s ease; }
.hero-links a:hover { color: var(--accent); transform: translateY(-2px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 620px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
}
.hero-stat-num { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--accent); }
.hero-stat-label { font-size: 0.78rem; color: var(--text-faint); }

/* ============================================================
   SECTIONS — SHARED
   ============================================================ */
.section { padding: 110px 24px; }
.section-alt { background: var(--bg-alt); }
.section-inner { max-width: var(--container); margin: 0 auto; }
.section-title { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 600; margin-bottom: 14px; letter-spacing: -0.01em; }
.section-desc { color: var(--text-dim); max-width: 620px; margin-bottom: 48px; font-size: 1rem; }

.text-link {
  background: none; border: none; color: var(--accent);
  font-size: 0.92rem; font-weight: 600; padding: 0; margin-top: 28px;
  border-bottom: 1px solid transparent; transition: border-color 0.2s ease;
}
.text-link:hover { border-color: var(--accent); }

/* ============================================================
   APPROACH (How I Work)
   ============================================================ */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 56px;
}
.approach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.approach-card:hover { border-color: var(--accent-border); transform: translateY(-3px); }
.approach-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.approach-title { font-family: var(--display); font-weight: 600; font-size: 1.02rem; margin-bottom: 8px; }
.approach-desc { color: var(--text-dim); font-size: 0.9rem; }

.range-block { margin-bottom: 56px; }
.range-label { font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.range-bar {
  display: flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.range-seg {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 0.72rem; font-family: var(--mono);
  color: var(--bg);
  white-space: normal;
  line-height: 1.35;
  padding: 12px 6px;
  transition: filter 0.2s ease;
}
.range-seg:hover { filter: brightness(1.15); }

.pipeline { margin-bottom: 8px; }
.pipeline-inner { display: flex; align-items: flex-start; justify-content: space-between; position: relative; padding-top: 4px; }
.pipeline-track { position: absolute; top: 9px; left: 5%; right: 5%; height: 1px; background: var(--border); }
.pipeline-track-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 6px var(--accent-border); }
.pipeline-dot-mover {
  position: absolute; top: -3px; left: 0;
  width: 7px; height: 7px; margin-left: -3.5px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent-border);
  opacity: 0;
}
.pipeline-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1; }
.pipeline-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--text-faint); transition: background 1.5s ease, border-color 1.5s ease, box-shadow 1.5s ease; }
.pipeline-label { font-family: var(--mono); font-size: 0.72rem; color: var(--text-faint); text-align: center; transition: color 1.5s ease; }
.pipeline-node.lit .pipeline-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pipeline-node.lit .pipeline-label { color: var(--accent); }

/* ============================================================
   CASE STUDIES
   ============================================================ */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.case-card:hover { border-color: var(--accent-border); transform: translateY(-3px); }
.case-tag { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.case-title { font-family: var(--display); font-weight: 600; font-size: 1.08rem; margin-bottom: 14px; line-height: 1.35; }
.case-line { display: flex; gap: 8px; font-size: 0.86rem; color: var(--text-dim); margin-bottom: 8px; }
.case-line b { color: var(--text-faint); font-weight: 600; flex-shrink: 0; min-width: 66px; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; padding-top: 2px; }
.case-more { margin-top: 16px; background: none; border: none; color: var(--accent); font-size: 0.85rem; font-weight: 600; text-align: left; padding: 0; }
.case-more:hover { text-decoration: underline; }

/* ============================================================
   PROJECTS
   ============================================================ */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-bottom: 64px; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; display: flex; flex-direction: column; }
.project-card:hover { border-color: var(--accent-border); transform: translateY(-3px); }
.project-thumb { height: 150px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 0.95rem; font-weight: 600; color: var(--text-faint); border-bottom: 1px solid var(--border); background: var(--bg-alt); text-align: center; padding: 0 16px; overflow: hidden; }
.project-thumb.has-image { padding: 0; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.project-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.project-name { font-family: var(--display); font-weight: 600; font-size: 1.02rem; }
.status-label { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; padding: 3px 8px; border-radius: 4px; white-space: nowrap; letter-spacing: 0.02em; }
.status-released { background: var(--released-soft); color: var(--released); border: 1px solid var(--released-border); }
.status-dev { background: var(--dev-soft); color: var(--dev); border: 1px solid var(--dev-border); }
.status-proto { background: var(--proto-soft); color: var(--proto); border: 1px solid var(--proto-border); }
.status-tool { background: var(--tool-soft); color: var(--tool); border: 1px solid var(--tool-border); }
.status-experimental { background: var(--experimental-soft); color: var(--experimental); border: 1px solid var(--experimental-border); }
.project-hook { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 14px; flex: 1; }
.project-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.project-tag { font-family: var(--mono); font-size: 0.68rem; color: var(--text-faint); border: 1px solid var(--border); padding: 2px 7px; border-radius: 4px; }
.project-actions { display: flex; align-items: center; gap: 12px; }
.project-links { display: flex; gap: 10px; font-size: 0.95rem; color: var(--text-dim); }
.project-links a:hover { color: var(--accent); }
.project-details-btn { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); background: none; border: none; padding: 0; }
.project-details-btn:hover { text-decoration: underline; }

.more-title { font-family: var(--display); font-size: 1rem; color: var(--text-dim); margin-bottom: 18px; font-weight: 600; }
.project-list { border-top: 1px solid var(--border); }
.project-list-row {
  display: grid;
  grid-template-columns: minmax(150px, 230px) 118px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}
.project-list-row .pl-name { font-weight: 600; font-size: 0.95rem; line-height: 1.3; }
.project-list-row .pl-name a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.project-list-row .pl-name a:hover { color: var(--text); }
.project-list-row .pl-desc { color: var(--text-dim); font-size: 0.86rem; }
.project-list-row .status-label { justify-self: start; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 40px;
  max-width: 480px;
  color: var(--text-faint);
}
.skills-search input {
  border: none; background: none; outline: none; color: var(--text);
  font-size: 0.92rem; width: 100%; font-family: var(--sans);
}
.skills-search input::placeholder { color: var(--text-faint); }

.skills-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; margin-bottom: 12px; }
.skill-group-title { font-family: var(--display); font-size: 0.92rem; color: var(--accent); margin-bottom: 14px; font-weight: 600; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-pill { font-size: 0.83rem; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease; }
.skill-pill:hover { color: var(--text); border-color: var(--accent-border); }
.skill-pill.dim { opacity: 0.25; }
.skill-pill.hit { border-color: var(--accent-border); color: var(--accent); }

.extra-pills { margin-top: 18px; }
.no-results { color: var(--text-faint); font-size: 0.9rem; margin-top: 18px; }

/* ============================================================
   TIMELINE (experience) — condensed rows
   ============================================================ */
.timeline { border-top: 1px solid var(--border); }
.tl-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  text-align: left;
  color: var(--text);
  transition: background 0.2s ease;
}
.tl-row:hover { background: var(--surface); }
.tl-row .tl-dates { font-family: var(--mono); font-size: 0.78rem; color: var(--text-faint); width: 160px; flex-shrink: 0; }
.tl-row .tl-main { flex: 1; min-width: 0; }
.tl-row .tl-role { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.tl-row .tl-company { color: var(--text-dim); font-size: 0.86rem; }
.tl-row .tl-arrow { color: var(--text-faint); font-size: 0.9rem; flex-shrink: 0; }
.tl-row:hover .tl-arrow { color: var(--accent); }

.tl-focus { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 16px; }
.tl-focus-tag { font-size: 0.72rem; font-family: var(--mono); color: var(--text-dim); border: 1px solid var(--border); padding: 3px 9px; border-radius: 20px; }
.tl-lines { display: flex; flex-direction: column; gap: 10px; }
.tl-line { display: flex; gap: 12px; font-size: 0.96rem; color: var(--text-dim); align-items: flex-start; }
.tl-line::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--text-faint); margin-top: 9px; flex-shrink: 0; }

/* ============================================================
   RECOGNITION
   ============================================================ */
.highlight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.highlight-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.highlight-icon { color: var(--accent); font-size: 1.2rem; margin-bottom: 14px; }
.highlight-text { font-size: 0.94rem; color: var(--text-dim); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); gap: 16px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 26px 18px; text-align: center; transition: all 0.2s ease; }
.contact-card i { display: block; font-size: 1.5rem; margin-bottom: 10px; color: var(--text-dim); transition: color 0.2s ease; }
.contact-card span { font-size: 0.88rem; font-weight: 500; }
.contact-card:hover { border-color: var(--accent-border); transform: translateY(-3px); }
.contact-card:hover i { color: var(--accent); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { padding: 32px 24px; text-align: center; color: var(--text-faint); font-size: 0.82rem; border-top: 1px solid var(--border-soft); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 40px 36px;
  position: relative;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-alt); border: 1px solid var(--border);
  color: var(--text-dim); font-size: 1.2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); border-color: var(--accent-border); }
.modal-eyebrow { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.modal-title { font-family: var(--display); font-size: 1.35rem; font-weight: 600; margin-bottom: 18px; padding-right: 30px; }
.modal-body p { color: var(--text-dim); margin-bottom: 14px; font-size: 0.98rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-body .m-line { display: flex; gap: 10px; margin-bottom: 12px; }
.modal-body .m-line b { color: var(--text); font-weight: 600; min-width: 78px; flex-shrink: 0; font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase; padding-top: 3px; }
.modal-body ul { margin: 4px 0 18px; }
.modal-body ul li { color: var(--text-dim); font-size: 0.92rem; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.modal-body ul li:last-child { border-bottom: none; }
.modal-body h4 { font-family: var(--display); font-size: 0.95rem; margin: 20px 0 10px; color: var(--text); }
.modal-body h4:first-child { margin-top: 0; }
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.modal-tags span { font-family: var(--mono); font-size: 0.7rem; color: var(--text-faint); border: 1px solid var(--border); padding: 2px 8px; border-radius: 4px; }

.modal-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.modal-links a {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.85rem; color: var(--text-dim);
  border: 1px solid var(--border); padding: 7px 13px; border-radius: 6px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.modal-links a:hover { color: var(--accent); border-color: var(--accent-border); }

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal { transition: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .pipeline-label { display: none; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 18px 24px; gap: 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .theme-switcher { border-left: none; padding-left: 0; padding-top: 8px; border-top: 1px solid var(--border); width: 100%; }
  #nav-toggle { display: flex; }
  .section { padding: 80px 20px; }
  .hero { padding-top: 120px; }
  .pipeline-track { left: 0; right: 0; }
  .tl-row { flex-wrap: wrap; }
  .tl-row .tl-dates { width: auto; }
  .project-list-row { grid-template-columns: 1fr; gap: 6px; }
  .project-list-row .status-label { justify-self: start; }
  .modal { padding: 30px 22px; }
  .range-bar { flex-direction: column; }
  .range-seg { width: 100% !important; justify-content: flex-start; text-align: left; padding: 10px 14px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { text-align: center; }
  .range-seg span { display: block; }
}
