@import url("https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Instrument+Sans:wght@400;500;600&display=swap");
/* -------------------------------------------------------
   GLOBAL THEME VARIABLES
------------------------------------------------------- */
:root {
  --bg: #060712;
  --bg-elevated: #0b0d1a;
  --bg-soft: #0f111f;
  --card: #0f111f;
  --border-subtle: #1f2235;
  --text: #f9fafb;
  --text-muted: #9ca3af;

  --accent: #4f8dfd;
  --accent-soft: rgba(79, 141, 253, 0.13);

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --shadow-soft: 0 18px 45px rgba(0,0,0,0.55);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 0, #111827 0%, #020617 65%);
  line-height: 1.6;
  overflow-x: hidden;
}

/* -------------------------------------------------------
   LAYOUT
------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

.narrow {
  max-width: 760px;
  margin: 0 auto;
}

/* -------------------------------------------------------
   HEADER (STICKY DESKTOP NAV)
------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.glass {
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.8));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  gap: 14px;
}

.nav-link {
  font-size: 13px;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: .2s;
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
}

.nav-link.active {
  background: rgba(79,141,253,0.22);
  color: var(--text);
}

/* Mobile hides desktop nav */
@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }
}

/* -------------------------------------------------------
   MOBILE FLOATING PILL NAV
------------------------------------------------------- */
.mobile-pill-nav {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 100;

  display: flex;
  gap: 26px;
  padding: 10px 18px;

  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(20px);
  border-radius: 40px;
  border: 1px solid rgba(148,163,184,0.18);

  box-shadow: 0 8px 35px rgba(0,0,0,0.45);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  transition: .2s;
}

.pill-btn.active,
.pill-btn:hover {
  color: var(--text);
}

.nav-icon {
  width: 22px;
  height: 22px;
  stroke: var(--text);
  fill: none;
}

/* Hide mobile nav on desktop */
@media (min-width: 860px) {
  .mobile-pill-nav {
    display: none;
  }
}

/* -------------------------------------------------------
   HERO
------------------------------------------------------- */
.hero {
  position: relative;
  padding: 90px 0 40px;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background:
    radial-gradient(circle at top left, rgba(79,141,253,0.35), transparent 60%),
    radial-gradient(circle at top right, rgba(56,189,248,0.18), transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--text-muted);
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 12px 0;
}

.hero-subtitle {
  color: var(--text-muted);
  max-width: 560px;
}

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

.hero-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* -------------------------------------------------------
   BUTTONS & TAGS
------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  min-height: 38px;
  line-height: 1;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  transition: .2s;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, #4f8dfd, #38bdf8);
  color: white;
  box-shadow: 0 12px 30px rgba(15, 118, 255, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(15,23,42,0.7);
  color: var(--text);
  border: 1px solid rgba(148,163,184,0.25);
}

.btn-small-primary {
  background: linear-gradient(135deg, #3b82f6, #a855f7);
  color: #fff;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(59,130,246,0.5);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-small-primary:hover {
  filter: brightness(1.05);
}

.pill {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  font-size: 11px;
}

@media (max-width: 560px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

/* -------------------------------------------------------
   SECTIONS
------------------------------------------------------- */
.section {
  padding: 60px 0;
}

.section-alt {
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.9), #020617);
}

.section-header h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.section-intro {
  font-size: 14px;
  color: var(--text-muted);
}

/* -------------------------------------------------------
   PANELS & CARDS
------------------------------------------------------- */
.panel {
  padding: 18px 20px;
  background: radial-gradient(circle at top left, rgba(148,163,184,0.1), rgba(15,23,42,0.95));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--text-muted);
}

.card-body h3 {
  margin: 8px 0;
  font-size: 18px;
}

.card-body p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.card-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.card-link:hover {
  opacity: 0.8;
}

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

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.65);
}

/* -------------------------------------------------------
   TIMELINE (DESKTOP + MOBILE HYBRID)
------------------------------------------------------- */
.timeline {
  position: relative;
  border-left: 2px solid rgba(148,163,184,0.3);
  margin-left: 14px;
  padding-left: 26px;
}

.timeline-item {
  margin-bottom: 28px;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
}

.timeline-dot {
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 35% 35%, #fff, #4f8dfd);
  border-radius: 999px;
  box-shadow: 0 0 0 3px rgba(79,141,253,0.25);
}

.timeline-toggle {
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.timeline-header-row {
  display: flex;
  justify-content: space-between;
}

.timeline-role {
  font-size: 15px;
  font-weight: 600;
}

.timeline-company {
  font-size: 13px;
  color: var(--text-muted);
}

.timeline-summary {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.timeline-dates {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-hint {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 20px;
}

/* Details hidden unless expanded */
.timeline-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .3s ease, opacity .3s ease;
  margin-top: 8px;
  padding-left: 4px;
}

.timeline-item.expanded .timeline-details {
  max-height: 300px;
  opacity: 1;
}

/* Desktop: hover expands */
@media (min-width: 860px) {
  .timeline-item:hover .timeline-details {
    max-height: 300px;
    opacity: 1;
  }
}

/* -------------------------------------------------------
   REVEAL ANIMATIONS
------------------------------------------------------- */

.js-enabled .reveal {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------
   FOOTER
------------------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid rgba(148,163,184,0.15);
}

/* -------------------------------------------------------
   PROJECT PAGE ELEMENTS
------------------------------------------------------- */
.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 0.8;
}

.project-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pillbox {
  background: var(--accent-soft);
  border: 1px solid rgba(79, 141, 253, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.pillbox h2 {
  margin-top: 0;
  font-size: 18px;
}

.list-bullets {
  padding-left: 20px;
  margin: 12px 0;
}

.list-bullets li {
  margin-bottom: 8px;
  color: var(--text-muted);
}

.list-steps {
  padding-left: 20px;
  margin: 12px 0;
}

.list-steps li {
  margin-bottom: 10px;
  color: var(--text-muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.eyebrow-soft {
  color: var(--accent);
  margin-bottom: 8px;
}

/* -------------------------------------------------------
   EDUCATION & CERTIFICATIONS
------------------------------------------------------- */
.education-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .education-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.education-grid h3 {
  font-size: 16px;
  margin: 0 0 16px;
  color: var(--text);
}

.education-item {
  margin-bottom: 16px;
}

.education-item:last-child {
  margin-bottom: 0;
}

.education-degree {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.education-school {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cert-list {
  margin-bottom: 16px;
}

.cert-item {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}

.cert-item:last-child {
  margin-bottom: 0;
}

.cert-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cert-org {
  font-size: 12px;
  color: var(--text-muted);
}

.cert-skills {
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: 12px;
}

.cert-skills h4 {
  font-size: 13px;
  margin: 0 0 8px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cert-skills p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* -------------------------------------------------------
   CONTACT SECTION
------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-item h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.8;
}

.contact-text {
  color: var(--text);
  font-size: 15px;
  margin: 0;
}

/* -------------------------------------------------------
   MOBILE RESPONSIVE
------------------------------------------------------- */
@media (max-width: 640px) {
  .section {
    padding: 50px 0;
  }

  .timeline {
    margin-left: 10px;
    padding-left: 20px;
  }

  .timeline-header-row {
    flex-direction: column;
  }

  .pill-btn span {
    font-size: 9px;
  }
}


/* =======================================================
   2026: warm editorial ledger. Overrides the original
   theme above for every page.
======================================================= */
:root {
  --bg: #14120F;
  --bg-2: #1A1714;
  --text: #EBE7DE;
  --text-2: #CFC9BD;
  --text-muted: #A39D92;
  --rule: rgba(235, 231, 222, 0.12);
  --rule-strong: rgba(235, 231, 222, 0.28);
  --accent: #D4A35A;
  --accent-ink: #14120F;
  --card: transparent;
  --border-subtle: var(--rule);
  --accent-soft: rgba(212, 163, 90, 0.10);
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; }

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

section[id] { scroll-margin-top: 80px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.container { max-width: 1160px; }

/* ---------- Header (all pages) ---------- */
.site-header, .glass {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 18, 15, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.container.header-inner { padding-left: 22px; padding-right: 22px; }
.logo { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; text-transform: none; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.desktop-nav { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 15px; color: var(--text-muted); text-decoration: none; padding: 4px 0; background: none; border-radius: 0; border-bottom: 1px solid transparent; }
.nav-link:hover { color: var(--text); background: none; }
.nav-link.active { color: var(--text); background: none; border-bottom-color: var(--accent); }
.header-email { display: none; }

/* ---------- Buttons ---------- */
.button, .btn, .btn-small-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  border-radius: 2px; text-decoration: none; white-space: nowrap;
  box-shadow: none; transition: background .15s ease, color .15s ease;
}
.button-primary, .btn.primary, .btn-small-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.button-primary:hover, .btn.primary:hover, .btn-small-primary:hover { background: #E6BE80; border-color: #E6BE80; color: var(--accent-ink); transform: none; filter: none; }
.button-ghost, .btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--rule-strong); }
.button-ghost:hover, .btn.ghost:hover { border-color: var(--text); color: var(--text); }
.hero-actions, .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }

/* ---------- Homepage: intro ---------- */
.intro { padding-top: 112px; padding-bottom: 96px; max-width: 1160px; }
.intro-place { margin: 0; font-size: 15px; color: var(--text-muted); }
.intro h1 { margin: 22px 0 0; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; letter-spacing: -0.025em; max-width: 15ch; }
.intro h1 em { font-style: italic; color: var(--accent); }
.intro-story { margin: 36px 0 0; max-width: 40em; font-size: 20px; line-height: 1.6; color: var(--text-2); }
.intro-story strong { color: var(--text); font-weight: 600; }

/* ---------- Homepage: ledger sections ---------- */
.ledger { border-top: 1px solid var(--rule); }
.ledger-inner { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; padding-top: 72px; padding-bottom: 88px; }
.ledger-head h2 { margin: 0; font-size: 34px; line-height: 1.1; }
.ledger-head p { margin: 14px 0 0; font-size: 15px; color: var(--text-muted); max-width: 22em; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 32px; padding: 28px 0; border-bottom: 1px solid var(--rule); color: var(--text); text-decoration: none; }
a.row:hover { color: var(--text); }
a.row:hover h3 { color: var(--accent); }
a.row:hover .row-go { color: var(--accent); transform: translateX(3px); }
.row-label { font-size: 14px; color: var(--text-muted); padding-top: 6px; }
.row-body h3 { margin: 0; font-size: 27px; line-height: 1.2; transition: color .15s ease; }
.row-body p { margin: 8px 0 0; color: var(--text-2); max-width: 42em; }
.row-tags { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); }
.row-go { font-size: 20px; color: var(--text-muted); padding-top: 4px; transition: transform .15s ease, color .15s ease; }

/* Experience rows */
.role-org { margin: 2px 0 0; font-size: 15px; color: var(--text-muted); }
.row-body ul { margin: 14px 0 0; padding-left: 18px; color: var(--text-2); display: flex; flex-direction: column; gap: 6px; }
.row-body li::marker { color: var(--accent); }
.row-body strong { color: var(--text); font-weight: 600; }
.row-exp .row-body h3 { font-size: 23px; }
.more { margin-top: 10px; }
.more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: var(--accent); }
.more summary::-webkit-details-marker { display: none; }
.more:not([open]) .more-label::after { content: " +"; }
.more[open] .more-label::after { content: " –"; }

/* How I work */
.prose p { margin: 0 0 18px; max-width: 38em; font-size: 19px; line-height: 1.65; color: var(--text-2); }
.prose p:first-child { font-family: var(--serif); font-size: 26px; line-height: 1.4; color: var(--text); }
.facts { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-top: 28px; border-top: 1px solid var(--rule); }
.facts h3 { margin: 0 0 10px; font-size: 19px; }
.facts p { margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* Contact */
.contact { padding-top: 104px; padding-bottom: 104px; border-top: 1px solid var(--rule); }
.contact h2 { margin: 0; font-size: clamp(36px, 5vw, 60px); line-height: 1.08; max-width: 16ch; }
.contact p { margin: 20px 0 0; font-size: 19px; color: var(--text-2); max-width: 32em; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 40px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--text-muted); }

/* ---------- Case study pages ---------- */
.section { padding: 64px 0 88px; }
.section-alt { background: var(--bg-2); }
.back-link { color: var(--text-muted); font-size: 15px; }
.back-link:hover { color: var(--accent); opacity: 1; }
main.section h1 { font-size: clamp(36px, 5vw, 54px); line-height: 1.08; margin: 8px 0 0; }
main.section h2 { font-size: 27px; margin: 44px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); }
main.section h3 { font-size: 21px; }
main.section p, main.section li { color: var(--text-2); }
main.section strong { color: var(--text); }
.project-meta { font-size: 15px; color: var(--text-muted); }
.pillbox { margin-top: 32px; padding: 0 0 0 22px; background: none; border: 0; border-left: 2px solid var(--accent); border-radius: 0; }
main.section .pillbox h2 { margin: 0; padding: 0; border: 0; font-size: 21px; }
.panel { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.list-bullets li, .list-steps li { color: var(--text-2); }
.list-bullets li::marker, .list-steps li::marker { color: var(--accent); }
.pill-row { gap: 6px 18px; }
.pill { padding: 0; border: 0; border-radius: 0; font-size: 14px; color: var(--text-muted); }
.pill + .pill::before { content: none; }
.eyebrow, .eyebrow-soft { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.site-footer { border-top: 1px solid var(--rule); color: var(--text-muted); font-size: 14px; }

/* UAT diagram: warm the hard-coded SVG colours */
.system-diagram { margin-top: 20px; overflow-x: auto; }
.system-diagram rect { fill: var(--bg-2); stroke: var(--rule-strong); }
.system-diagram line, .system-diagram path { stroke: var(--accent); }
.system-diagram polygon { fill: var(--accent); }
.system-diagram text { fill: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ledger-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 56px; padding-bottom: 64px; }
  .facts { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 860px) {
  .desktop-nav { display: flex; order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .desktop-nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: 0 0 auto; min-height: 40px; display: inline-flex; align-items: center; }
  .nav-cta { display: none; }
  .header-email { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 2px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 500; text-decoration: none; }
  .home .header-email { margin-left: auto; }
  .header-inner { padding-bottom: 8px; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  section[id] { scroll-margin-top: 110px; }
  .intro { padding-top: 56px; padding-bottom: 64px; }
  .intro-story { font-size: 18px; }
  .actions { flex-direction: column; }
  .actions .button { width: 100%; }
  .row { grid-template-columns: 1fr auto; padding: 24px 0; }
  .row-label { grid-column: 1 / -1; padding-top: 0; }
  .row-body h3 { font-size: 23px; }
  .prose p:first-child { font-size: 22px; }
  .contact { padding-top: 72px; padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .row-go, .row-body h3, .button { transition: none; }
}
.container.narrow { max-width: 780px; }

/* UAT system overview: HTML flow (replaces fixed-size SVG) */
main.section ol.flow-diagram { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.flow-node { position: relative; margin: 0; padding: 18px 16px 20px; background: var(--bg-2); border: 1px solid var(--rule-strong); border-radius: 2px; }
.flow-node:not(:last-child)::after { content: "→"; position: absolute; top: 50%; right: -25px; transform: translateY(-50%); color: var(--accent); font-size: 20px; line-height: 1; }
main.section .flow-node h3 { margin: 4px 0 0; font-size: 18px; line-height: 1.25; }
main.section .flow-node p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
main.section .flow-node p.flow-step-no { margin: 0; font-size: 13px; color: var(--accent); }
main.section .flow-node ul { margin: 8px 0 0; padding-left: 16px; font-size: 14px; line-height: 1.5; }
main.section .flow-node li { margin: 0 0 4px; color: var(--text-muted); }
@media (max-width: 760px) {
  main.section ol.flow-diagram { grid-template-columns: 1fr; gap: 30px; }
  .flow-node:not(:last-child)::after { content: "↓"; top: auto; right: auto; left: 50%; bottom: -26px; transform: translateX(-50%); }
}

/* Intro role line, seeking line, header CV button, case-study summaries */
.intro .intro-role { margin: 0; font-size: 15px; letter-spacing: 0.01em; color: var(--accent); }
.intro h1 { margin-top: 18px; }
.intro .intro-seeking { margin: 16px 0 0; font-size: 17px; color: var(--text); }
.nav-cta { min-height: 38px; padding: 0 16px; font-size: 14px; }
.tldr { margin: 28px 0 0; padding: 18px 22px; background: var(--bg-2); border-left: 2px solid var(--accent); }
main.section .tldr p { margin: 0; color: var(--text); }
main.section .tldr p + p { margin-top: 10px; }
.tldr strong { color: var(--accent); font-weight: 600; }
