/* ============================================================
   PORTFOLIO — warm editorial design
   Structure:
   1. Variables (light + dark themes)
   2. Reset & base
   3. Scroll progress + nav
   4. Hero (staggered entrance, rotating word)
   5. Sections & reveal-on-scroll
   6. About / Work / Skills / Journey / Contact
   7. Footer
   8. Responsive
   ============================================================ */

/* ---------- 1. VARIABLES ---------- */
:root {
  /* light theme (default) */
  --bg: #f7f3ec;            /* warm paper */
  --bg-soft: #efe9df;       /* slightly deeper paper for cards */
  --ink: #191512;           /* near-black warm ink */
  --ink-soft: #57504a;      /* secondary text */
  --ink-faint: #8d857d;     /* labels, meta */
  --accent: #e4572e;        /* burnt orange */
  --accent-ink: #ffffff;    /* text on accent */
  --line: #d9d2c7;          /* hairline borders */

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --max-w: 1060px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);  /* smooth deceleration for all animations */
}


/* ---------- 2. RESET & BASE ---------- */
* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  transition: background 0.35s ease, color 0.35s ease;  /* smooth theme switch */
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; }

a { color: inherit; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* respect users who disable animations at the OS level */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- 3. SCROLL PROGRESS + NAV ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;                     /* JS sets this as you scroll */
  background: var(--accent);
  z-index: 100;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 5vw;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* JS adds .scrolled once you leave the top of the page */
.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(0, 0, 0, 0.5);
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.mark-dot { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; }

.nav-link {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 0.2em 0;
  transition: color 0.2s ease;
}
/* underline that grows in on hover / active section */
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }

.nav-right { display: flex; align-items: center; gap: 1rem; }


/* hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
/* the two bars form an X when open */
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- 4. HERO ---------- */
.hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 7rem 5vw 5rem;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.6rem;
}

.hero-title {
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.8rem;
}

/* each .line clips its child; the child slides up into view */
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 0.8s var(--ease) forwards;
}
/* stagger: each line starts a bit later */
.hero-title .line:nth-child(1) > span { animation-delay: 0.05s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.18s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.31s; }

@keyframes rise {
  to { transform: translateY(0); }
}

.accent { color: var(--accent); }

/* the rotating word fades/slides when JS swaps its text */
#rotator { transition: opacity 0.25s ease, transform 0.25s ease; }
#rotator.swap { opacity: 0; transform: translateY(12px); }

.hero-sub {
  max-width: 54ch;
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin-bottom: 2.2rem;
}

.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.8em 1.6em;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* stats band */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--line);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- 5. SECTIONS & REVEAL ---------- */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 5.5rem 5vw;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  margin-bottom: 2.8rem;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

/* reveal-on-scroll: elements start invisible + shifted down.
   JS adds .visible when they enter the viewport (IntersectionObserver). */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 6b. WORK ---------- */
.work-list { display: flex; flex-direction: column; }

.work-card {
  position: relative;              /* anchor for the stretched link */
  padding: 2.2rem 1.4rem;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.4rem 2.5rem;
  transition: background 0.3s ease;
}
.work-card:last-child { border-bottom: 1px solid var(--line); }
.work-card:hover { background: var(--bg-soft); }

/* accent bar that wipes down the left edge on hover */
.work-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease);
}
.work-card:hover::before { transform: scaleY(1); }

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.work-year { color: var(--accent); }

.work-title {
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  grid-column: 2;
  grid-row: 1;
}
/* the link covers the entire card (classic "stretched link" pattern) */
.work-title a.stretched {
  text-decoration: none;
}
.work-title a.stretched::after {
  content: "";
  position: absolute;
  inset: 0;                       /* top/right/bottom/left: 0 — fills the card */
}
.arrow {
  font-size: 1.1rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease);
}
/* work cards navigate internally, so the arrow slides sideways, not diagonally */
.work-card:hover .arrow { transform: translateX(6px); }

.work-desc {
  grid-column: 2;
  color: var(--ink-soft);
  max-width: 64ch;
  margin: 0.4rem 0 0.9rem;
}

.chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  grid-column: 2;
}
.chips li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3em 0.7em;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.work-card:hover .chips li { border-color: var(--accent); color: var(--ink-soft); }
.chips.big li { font-size: 0.82rem; padding: 0.45em 0.9em; }

/* ---------- 6c. SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
}
.skill-col h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- 6e. CONTACT ---------- */
.contact-lede {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 3rem;
}

/* Every row shares one grid template, so labels and values align in
   strict columns down the whole list. */
.channels {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
  max-width: 620px;
}
.channel {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.15rem 0.2rem;
  border-bottom: 1px solid var(--line);
}
.channel-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}
/* one type size for every value — nothing jumps */
.channel-value {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  justify-self: start;
  word-break: break-word;
  /* underline grows from the left on hover */
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  transition: color 0.2s ease, background-size 0.35s var(--ease);
}
a.channel-value:hover { color: var(--accent); background-size: 100% 1.5px; }
.channel-static { color: var(--ink-soft); background-image: none; }

.contact-foot {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 2.8rem;
}
.contact-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ============================================================
   9. PROJECT DETAIL PAGES
   ============================================================ */

/* ---------- 9a. PROJECT HERO ---------- */
.project-hero {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 5vw 3rem;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  text-decoration: none;
  margin-bottom: 2.2rem;
  transition: color 0.2s ease, gap 0.25s var(--ease);
}
.back-link:hover { color: var(--accent); gap: 0.85rem; }

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}
.project-meta .dot { color: var(--line); }
.project-meta .year { color: var(--accent); }

.project-title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.project-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
  margin-bottom: 2rem;
}

.project-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* ---------- 9b. PROJECT BODY ---------- */
.project-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 5vw 0;
}
.project-section:last-of-type { padding-bottom: 4rem; }

.project-section > h2 {
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.project-section > .sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 1.8rem;
}
.prose p { color: var(--ink-soft); max-width: 68ch; margin-bottom: 1em; }
.prose strong { color: var(--ink); font-weight: 600; }

/* ---------- 9c. DEMO STAGE ---------- */
.demo {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
  overflow: hidden;
}
.demo-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  background: var(--bg);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--line);
  display: block;
}
.demo-dots i:first-child { background: var(--accent); }
.demo-body { padding: 1.6rem 1.4rem; }

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}
.demo-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.55em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease);
}
.demo-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.demo-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.demo-btn.primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.demo-btn.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.demo-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.demo-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 1rem;
}

/* generic readouts used across demos */
.readout {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  max-height: 220px;
  overflow-y: auto;
}
/* tone utilities, used inside readouts and demo widgets alike */
.ok   { color: #3f9a5d; }
.warn { color: var(--accent); }
.dim  { color: var(--ink-faint); }
body.dark .ok { color: #63c684; }

/* pipeline stage strip */
.stages { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.3rem; }
.stage {
  flex: 1 1 120px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}
.stage b { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; margin-bottom: 0.2rem; }
.stage.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  transform: translateY(-3px);
}
.stage.active b { color: var(--accent); }
.stage.done { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

/* ---------- 9d. FILE TREE ---------- */
.filetree {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.filetree ul { list-style: none; padding: 0; margin: 0; }
.filetree li { border-bottom: 1px solid var(--line); }
.filetree li:last-child { border-bottom: none; }
.file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 0.7rem 1rem;
  transition: background 0.2s ease;
}
.file-row:hover { background: var(--bg-soft); }
.file-name { color: var(--ink); display: flex; align-items: center; gap: 0.55rem; }
.file-name .ic { color: var(--ink-faint); font-size: 0.9em; }
.file-name.dir .ic { color: var(--accent); }
.file-note { color: var(--ink-faint); font-size: 0.75rem; text-align: right; }
/* nested depth */
.depth-1 .file-name { padding-left: 1.3rem; }
.depth-2 .file-name { padding-left: 2.6rem; }

/* ---------- 9e. SKILLS IN CONTEXT ---------- */
.skill-context { display: grid; gap: 0.9rem; }
.sc-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.sc-item:hover { border-color: var(--accent); background: var(--bg-soft); }
.sc-skill {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.5;
}
.sc-where { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- 9f0. AUDIO PLAYERS ---------- */
.audio-list { display: grid; gap: 0.9rem; }
.audio-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.2rem;
  align-items: center;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.audio-item:hover { border-color: var(--accent); background: var(--bg-soft); }
.audio-meta { display: flex; flex-direction: column; gap: 0.25rem; }
.audio-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
}
.audio-note { color: var(--ink-faint); font-size: 0.78rem; }
.audio-item audio { width: 100%; accent-color: var(--accent); }
@media (max-width: 640px) {
  .audio-item { grid-template-columns: 1fr; }
}

/* ---------- 9f3. LCD + TIMER DEMO (FPGA/RISC-V labs) ---------- */
.lcd-screen {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
}
.lcd-line {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  min-height: 1.5em;
  white-space: pre;
}
.lcd-cursor { opacity: 1; animation: lcdblink 1s steps(1) infinite; }
@keyframes lcdblink { 50% { opacity: 0; } }
.lcd-caption { color: var(--ink-faint); font-family: var(--font-mono); font-size: 0.72rem; margin-top: 0.6rem; }

.timer-stage {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.timer-count {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 1.1rem;
  min-width: 4.5rem;
  text-align: center;
}

/* ---------- 9f4. MSE / ALIASING CHART (Fourier) ---------- */
.mse-chart-wrap { margin-top: 1rem; }
.mse-bars {
  display: flex;
  align-items: flex-end;
  gap: 1.6rem;
  height: 180px;
  padding: 0 0.5rem;
  border-bottom: 1px solid var(--line);
}
.mse-col { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; }
.mse-bar {
  width: 100%;
  max-width: 64px;
  background: var(--line);
  border-radius: 4px 4px 0 0;
  transition: height 0.4s var(--ease), background 0.2s ease;
}
.mse-bar.hi { background: var(--accent); }
.mse-col-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.5rem; text-align: center; }
.mse-col-value { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); margin-top: 0.15rem; }

/* ---------- 9f5. ARM vs RISC-V BENCHMARK CHARTS ---------- */
.bench-legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }
.bench-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.bench-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.bench-bars { display: flex; align-items: flex-end; gap: 2rem; height: 200px; padding: 0 0.5rem 0; border-bottom: 1px solid var(--line); }
.bench-group { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; }
.bench-group-bars { display: flex; align-items: flex-end; gap: 0.5rem; width: 100%; justify-content: center; height: 100%; }
.bench-bar-col { display: flex; flex-direction: column-reverse; width: 34px; border-radius: 4px 4px 0 0; overflow: hidden; }
.bench-seg { width: 100%; }
.bench-group-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.5rem; text-align: center; }

/* ---------- 9f. NEXT PROJECT ---------- */
.project-next {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 5vw 4rem;
}
.next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.8rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.next-card:hover { border-color: var(--accent); background: var(--bg-soft); transform: translateY(-2px); }
.next-card .lbl {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.35rem;
}
.next-card .ttl { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }
.next-card .arrow { font-size: 1.3rem; }
.next-card:hover .arrow { transform: translate(4px, -4px); }

/* ---------- 9i. AT-A-GLANCE FACTS ---------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { padding: 1.1rem 1.3rem 1.1rem 0; }
.fact dt {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.fact dd { margin: 0; font-size: 0.95rem; color: var(--ink); }
/* AUB awards A+ = 4.3, so a GPA above 4.0 is real — say so before anyone
   assumes it's a typo against a 4.0 scale */
.gpa-scale {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin-top: 0.15rem;
}

/* ---------- 9j. DIAGRAMS ---------- */
.figure { margin: 0; }
.figure svg {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  padding: 0.5rem 0;
}
.figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 0.7rem;
}
/* shared diagram vocabulary, theme-aware via CSS variables */
.dgm .box   { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.dgm .box.hot { stroke: var(--accent); stroke-width: 1.6; }
.dgm .lbl   { font-family: var(--font-display); font-size: 13px; font-weight: 500; fill: var(--ink); }
.dgm .cap   { font-family: var(--font-mono); font-size: 9.5px; fill: var(--ink-faint); }
.dgm .cap.acc { fill: var(--accent); }
.dgm .arw   { stroke: var(--ink-faint); stroke-width: 1.3; fill: none; }
.dgm .head  { fill: var(--ink-faint); }
.dgm .arw.acc, .dgm .head.acc { stroke: var(--accent); fill: var(--accent); }
.dgm .zone  { fill: var(--accent); fill-opacity: 0.06; stroke: var(--accent); stroke-opacity: 0.3; stroke-dasharray: 4 3; }

/* ---------- 9k. CODE BLOCKS ---------- */
.snippet { margin-bottom: 1.6rem; }
.snippet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  padding: 0 0.2rem 0.5rem;
}
.snippet-head .path { color: var(--accent); }
.snippet pre {
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  overflow-x: auto;
}
.snippet code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre;
}
.snippet-note {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
  padding: 0 0.2rem;
}
/* syntax tokens */
.t-com { color: var(--ink-faint); font-style: italic; }
.t-str { color: #2e7d5b; }
.t-num { color: #b06a1f; }
.t-key { color: #a1385f; }
.t-fn  { color: #2b6cb0; }
body.dark .t-str { color: #6fd3a5; }
body.dark .t-num { color: #e0a35c; }
body.dark .t-key { color: #ff7ab2; }
body.dark .t-fn  { color: #7fb8ea; }

/* ---------- 9h. DEMO WIDGETS ---------- */

/* incident report card (SOC pipeline) */
.report {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 1.1rem 1.2rem;
  margin-top: 1.2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.report.show { opacity: 1; transform: translateY(0); }
.report-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.report-head h4 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.sev {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  white-space: nowrap;
}
.sev-high { background: var(--accent); color: var(--accent-ink); }
.sev-med  { border: 1px solid var(--accent); color: var(--accent); }

.kv {
  display: grid;
  grid-template-columns: 155px 1fr;
  gap: 0.45rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  margin: 0;
}
.kv dt { color: var(--ink-faint); }
.kv dd { color: var(--ink-soft); margin: 0; }

/* triage queue (ByteMed) */
.queue { display: flex; flex-direction: column; gap: 0.55rem; }
.case {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.35s ease, background 0.35s ease;
}
.case.urgent { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.case-rank {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink-faint);
  text-align: center;
}
.case.urgent .case-rank { color: var(--accent); font-weight: 500; }
.case-name { font-weight: 500; font-size: 0.95rem; }
.case-vitals { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.case-score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-align: right;
  min-width: 84px;
}
.case-score b { color: var(--accent); font-weight: 500; }

/* chat transcript (WhatsApp bot) */
.chat {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 340px;
  overflow-y: auto;
  padding: 0.3rem;
}
.bub {
  max-width: 80%;
  padding: 0.6rem 0.85rem;
  border-radius: 13px;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.bub.show { opacity: 1; transform: translateY(0); }
.bub.in  { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.bub.out { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 3px; }
.bub .t { display: block; font-family: var(--font-mono); font-size: 0.6rem; opacity: 0.65; margin-top: 0.3rem; }
.bub.sys {
  align-self: center;
  background: none;
  border: 1px dashed var(--line);
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  max-width: 100%;
}

/* sliders + gauge (driver index, leak localizer) */
.slider-row {
  display: grid;
  grid-template-columns: 165px 1fr 58px;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.slider-row output { color: var(--accent); text-align: right; }
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.gauge-wrap { display: flex; gap: 2rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.gauge-read { display: flex; flex-direction: column; gap: 0.1rem; }
.gauge-val {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}
.gauge-cap {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ink-faint);
}
.gauge-band { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.35rem; }

/* ---------- 9g. PAGE ENTRANCE ---------- */
/* whole page eases in on load, so navigation feels like a transition
   rather than a hard cut */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: pageIn 0.5s var(--ease) both; }

/* ============================================================
   10. ABOUT PAGE
   ============================================================ */
.about-hero {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 3.5rem;
  align-items: center;
  margin-bottom: 4rem;
}

/* the wrapper carries its own square ratio, so the ring stays a true circle
   even before the image loads — otherwise the wrapper collapses and the ring
   renders as an ellipse */
.portrait-wrap {
  position: relative;
  width: min(260px, 68vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}
.portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  background: var(--bg-soft);
}
/* slow dashed ring — the one bit of motion that makes the page feel alive */
.portrait-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1.5px dashed var(--accent);
  opacity: 0.45;
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.portrait-tag {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4em 0.9em;
  border-radius: 999px;
}

.about-kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.about-name {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
}
.about-intro { font-size: 1.12rem; color: var(--ink-soft); max-width: 54ch; }
.about-intro strong { color: var(--ink); font-weight: 600; }

/* pull-quote style statement */
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  border-left: 3px solid var(--accent);
  padding: 0.3em 0 0.3em 1.6rem;
  max-width: 34ch;
}
.statement em { color: var(--accent); font-style: normal; }

/* interests / "beyond the code" */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}
.icon-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.3rem 1.3rem;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
.icon-card:hover { border-color: var(--accent); background: var(--bg-soft); transform: translateY(-2px); }
.icon-card svg { width: 26px; height: 26px; stroke: var(--accent); fill: none; stroke-width: 1.6; margin-bottom: 0.8rem; }
.icon-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.icon-card p { font-size: 0.88rem; color: var(--ink-faint); }

/* certifications in progress */
.cert-list { display: grid; gap: 0.55rem; }
.cert {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.95rem;
}
.cert .tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.3em 0.7em;
  white-space: nowrap;
}

/* language proficiency rows */
.lang-row {
  display: grid;
  grid-template-columns: 110px 1fr 110px;
  gap: 1.2rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.lang-bar { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.lang-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.lang-level { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); text-align: right; }

/* ============================================================
   11. JOURNEY PAGE
   ============================================================ */
.now-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.now-card {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.now-card:hover { background: var(--bg-soft); }
.now-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.5rem; }
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: livePulse 2.4s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.now-since {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.now-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.3rem; }
.now-card p { font-size: 0.88rem; color: var(--ink-soft); }

/* year-grouped timeline */
.tl { display: grid; gap: 0; }
.tl-year {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 2.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.tl-year:first-child { border-top: none; }
.tl-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: -0.02em;
  position: sticky;
  top: 92px;
  align-self: start;
}
.tl-items { display: grid; gap: 1.5rem; }
.tl-item { position: relative; padding-left: 1.5rem; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.tl-item.soft::before { background: var(--line); }
.tl-item h3 { font-size: 1.08rem; font-weight: 600; margin-bottom: 0.25rem; }
.tl-item .where {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 0.4rem;
}
.tl-item p { font-size: 0.92rem; color: var(--ink-soft); max-width: 62ch; }
.tl-item .win {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.25em 0.6em;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: 2px;
}

/* ============================================================
   12. COURSES PAGE
   ============================================================ */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.5em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.term { margin-bottom: 2.8rem; }
.term-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.term-head h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.term-meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }
.term-live {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.25em 0.65em;
  border-radius: 999px;
}

/* one course = a native <details>, so it works without JS */
.course {
  border-bottom: 1px solid var(--line);
}
.course > summary {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
  padding: 0.85rem 0.3rem;
  cursor: pointer;
  list-style: none;
  transition: background 0.2s ease;
}
.course > summary::-webkit-details-marker { display: none; }
.course > summary:hover { background: var(--bg-soft); }
.course-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}
.course-title { font-size: 0.98rem; font-weight: 500; }
.course-cred {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}
/* rotating caret */
.course-title::after {
  content: " +";
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 0.85em;
}
.course[open] .course-title::after { content: " −"; color: var(--accent); }

.course-body {
  padding: 0.2rem 0.3rem 1.3rem calc(92px + 1.2rem);
  max-width: 78ch;
}
.course-body p { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.7rem; }
.course-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.course-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25em 0.65em;
}
.course-tag.official { color: var(--accent); border-color: var(--accent); }
/* link out to the department's catalogue entry */
a.course-tag.syl {
  text-decoration: none;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
a.course-tag.syl:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
}

/* declared focus areas / concentrations */
.track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}
.track {
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
}
.track-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 0.7rem;
}
.track ul { list-style: none; padding: 0; margin: 0; }
.track li {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.28rem 0 0.28rem 1.1rem;
  position: relative;
}
.track li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.95em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.note-box {
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin-bottom: 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

@media (max-width: 780px) {
  .course > summary { grid-template-columns: 74px 1fr; gap: 0.8rem; }
  .course-cred { grid-column: 2; font-size: 0.68rem; }
  .course-body { padding-left: 0.3rem; }
}

/* ============================================================
   13. SKILLS PAGE
   ============================================================ */

/* ---------- skill × context matrix ---------- */
.matrix-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;              /* narrow screens scroll the grid, not the page */
  background: var(--bg);
}
.matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 760px;
}
.matrix thead th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
  color: var(--ink-faint);
  padding: 1rem 0.4rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  vertical-align: bottom;
}
.matrix thead th a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.matrix thead th a:hover { color: var(--accent); }

/* first column pins while the rest scrolls sideways */
.matrix .mx-head {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg);
  text-align: left;
  padding-left: 1.1rem;
}
.matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg);
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  padding: 0.5rem 1.4rem 0.5rem 1.1rem;
}
.matrix td { text-align: center; padding: 0.5rem 0.4rem; }
.matrix tbody tr { transition: background 0.15s ease; }
.matrix tbody tr:hover { background: var(--bg-soft); }
.matrix tbody tr:hover th { background: var(--bg-soft); }

.mx-dot, .mx-off {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
}
.mx-dot { background: var(--accent); }
.mx-off { background: var(--line); opacity: 0.55; }

.mx-group th {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--accent);
  font-weight: 500;
  padding-top: 1.5rem;
  padding-bottom: 0.4rem;
}
.mx-legend {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: 0.9rem;
}
.mx-legend span { display: flex; align-items: center; gap: 0.45rem; }

/* ---------- core strengths ---------- */
.strengths { display: grid; gap: 1rem; }
.strength {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 1.4rem;
  padding: 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.strength:hover { border-color: var(--accent); background: var(--bg-soft); }
.strength-n {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  padding-top: 0.35rem;
}
.strength h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.45rem; }
.strength p { color: var(--ink-soft); font-size: 0.95rem; max-width: 68ch; margin-bottom: 0.7rem; }
.seen-in {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}
.seen-in a {
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25em 0.7em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.seen-in a:hover { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }

@media (max-width: 780px) {
  .strength { grid-template-columns: 1fr; gap: 0.5rem; }
  .strength-n { padding-top: 0; }
}

/* ============================================================
   14. AWARDS & CERTIFICATES
   ============================================================ */
.gold-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.3em 0.7em;
  border-radius: 999px;
  width: fit-content;
}

.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.award {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s var(--ease);
}
a.award:hover { border-color: var(--accent); background: var(--bg-soft); transform: translateY(-2px); }
.award.first { border-left: 3px solid var(--accent); }
.award-what {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--accent);
}
.award h3 { font-size: 1.05rem; font-weight: 600; }
.award p { font-size: 0.86rem; color: var(--ink-soft); }
.award .doc {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
}
a.award:hover .doc { color: var(--accent); }
.award .doc a { color: var(--ink-soft); text-decoration: none; }
.award .doc a:hover { color: var(--accent); }

/* photo figures on project pages */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.shots figure { margin: 0; }
.shots img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.shots figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 0.6rem;
}

/* ---------- 15. PIPELINE VISUALISER ---------- */
.pipe-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  margin-bottom: 1.1rem;
}
.pipe { border-collapse: collapse; width: 100%; min-width: 700px; }
.pipe thead th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--ink-faint);
  padding: 0.6rem 0.2rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.pipe thead th.now { color: var(--accent); }
.pipe .pipe-head, .pipe tbody th {
  position: sticky;
  left: 0;
  background: var(--bg);
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--ink);
  white-space: nowrap;
  padding: 0.35rem 1.2rem 0.35rem 0.9rem;
  z-index: 1;
}
.pipe td {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.2rem;
  color: var(--accent-ink);
}
/* each stage gets its own tint so the diagonal is readable at a glance */
.pipe td.st { background: var(--accent); border-radius: 3px; }
.pipe td.st-F { background: color-mix(in srgb, var(--accent) 42%, transparent); color: var(--ink); }
.pipe td.st-D { background: color-mix(in srgb, var(--accent) 58%, transparent); color: var(--ink); }
.pipe td.st-E { background: var(--accent); }
.pipe td.st-M { background: color-mix(in srgb, var(--accent) 74%, transparent); color: var(--ink); }
.pipe td.st-W { background: color-mix(in srgb, var(--accent) 50%, transparent); color: var(--ink); }
.pipe td.bub {
  background: repeating-linear-gradient(45deg, var(--line) 0 3px, transparent 3px 6px);
  color: var(--ink-faint);
}
.lane {
  font-size: 0.62rem;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
}
.lane-A { border-color: var(--accent); color: var(--accent); }

/* ---------- 7. FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 5vw 2.6rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ---------- 8. RESPONSIVE ---------- */
@media (max-width: 780px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-link { padding: 1rem 5vw; border-top: 1px solid var(--line); }
  .nav-toggle { display: flex; }

  .work-card { grid-template-columns: 1fr; padding: 1.8rem 0.6rem; }
  .work-title, .work-desc, .chips { grid-column: 1; }

  /* contact rows stack label above value */
  .channel { grid-template-columns: 1fr; gap: 0.25rem; }

  /* about + journey */
  .about-hero { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .about-intro, .statement { margin-left: auto; margin-right: auto; }
  .statement { text-align: left; }
  .tl-year { grid-template-columns: 1fr; gap: 1rem; padding: 1.6rem 0; }
  .tl-num { position: static; font-size: 1.5rem; }
  .lang-row { grid-template-columns: 90px 1fr 90px; gap: 0.8rem; }

  /* project pages */
  .sc-item { grid-template-columns: 1fr; gap: 0.4rem; }
  .file-row { grid-template-columns: 1fr; gap: 0.2rem; }
  .file-note { text-align: left; }
  .stages { flex-direction: column; }
}

/* ---------- 16. BEYOND THE ENGINEERING MARQUEE ---------- */
.be-track {
  overflow-x: hidden;
  cursor: grab;
  margin: 0 -5vw;
}
.be-track.dragging { cursor: grabbing; }
.be-row {
  display: flex;
  gap: 14px;
  padding: 0 5vw;
  width: max-content;
}
.be-card {
  flex: 0 0 250px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.4rem;
}
.be-card svg {
  width: 30px; height: 30px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.6;
  margin-bottom: 1rem;
}
.be-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.be-card p { font-size: 0.88rem; line-height: 1.55; color: var(--ink-soft); }
.be-hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}
