/* ==========================================================================
   components.css — header, nav, buttons, chips, cards, glass, hero, footer
   ========================================================================== */

/* ---------- Eyebrow: mono console-style section label ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-sm);
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.btn:hover { --btn-border: var(--accent); color: var(--text); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  --btn-border: var(--accent);
  box-shadow: 0 8px 24px -12px var(--accent-glow);
}
.btn--primary:hover {
  --btn-bg: var(--accent-strong);
  --btn-border: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: 0 10px 28px -10px rgb(1 169 248 / .45);
}

.btn--ghost { --btn-border: transparent; color: var(--text-muted); }
.btn--ghost:hover { --btn-border: transparent; background: var(--surface-2); color: var(--text); }

.btn--sm { min-height: 40px; padding: 0 var(--space-4); font-size: .875rem; }

/* ---------- Icon button (theme toggle, menu) ---------- */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition:
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 30px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.3;
  padding-block: 4px;
  max-width: 100%;
}
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* Status badge: live green dot */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 32px;
  padding: 0 var(--space-3) 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 500;
}
.status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgb(52 211 153 / .18);
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: var(--space-6);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.card--hover:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--shadow-card), var(--shadow-lift);
}

/* Glass: surface at ~80% + blur, for content sitting over the 3D scene */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
/* Low-effects mode (set by main.js when frames run slow, and on phones):
   drop the expensive blur and make surfaces nearly solid instead. */
.low-fx { --glass: var(--glass-solid); }
.low-fx .glass,
.low-fx .status { -webkit-backdrop-filter: none; backdrop-filter: none; }
@media (max-width: 767px) {
  :root { --glass: var(--glass-solid); }
  .glass,
  .status { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (min-width: 768px) {
  .card { padding: var(--space-8); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  background: var(--glass-header);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  margin-right: auto;
  border-radius: var(--radius-sm);
}
.brand:hover { color: var(--text); }
.brand__logo { width: 38px; height: 38px; flex: none; }
.brand__name { line-height: 1; }

/* Primary nav */
.site-nav { display: none; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--fs-small);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
.site-nav__link:hover { color: var(--text); }
.site-nav__link::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.site-nav__link[aria-current="true"] { color: var(--text); }
.site-nav__link[aria-current="true"]::after { transform: scaleX(1); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.site-header__actions .btn--resume { display: none; }

/* Theme toggle: one icon per theme, swapped by CSS */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Hamburger: two bars that become an X */
.nav-toggle { position: relative; }
.nav-toggle__bar {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
.nav-toggle__bar:nth-child(1) { top: 16px; }
.nav-toggle__bar:nth-child(2) { top: 22px; width: 14px; }
.nav-toggle__bar:nth-child(3) { top: 28px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu panel (< 900px) */
@media (max-width: 899px) {
  .site-nav {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: var(--z-menu);
    padding: var(--space-4) var(--gutter) var(--space-6);
    /* solid: a nested backdrop-filter can't blur the page behind the header */
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 24px 48px -24px rgb(0 0 0 / .5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity var(--dur) var(--ease-out),
      transform var(--dur) var(--ease-out),
      visibility 0s linear var(--dur);
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }
  /* No-JS: the menu is simply always visible in flow */
  html:not(.js) .site-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__link {
    height: 48px;
    padding: 0 var(--space-3);
    font-size: 1.0625rem;
    font-family: var(--font-head);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .site-nav__link::after {
    left: 0;
    right: auto;
    top: 14px;
    bottom: 14px;
    width: 2px;
    height: auto;
    transform: scaleY(0);
    transform-origin: top;
  }
  .site-nav__link[aria-current="true"] { padding-left: var(--space-4); }
  .site-nav__link[aria-current="true"]::after { transform: scaleY(1); }

  .site-nav__cta {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
  }
  .site-nav__cta .btn { flex: 1; }
}

@media (min-width: 900px) {
  .site-nav { display: block; }
  .site-nav__cta { display: none; }
  .nav-toggle { display: none; }
  .site-header__actions .btn--resume { display: inline-flex; }
  .site-header__inner { gap: var(--space-8); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding-block: var(--space-12) var(--space-16);
  overflow: hidden;
}
/* faint grid, masked so it fades out toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 60% 45%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 60% 45%, #000 15%, transparent 75%);
}
/* soft accent glow where the 3D logo will sit (center-right) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 74% 50%, var(--accent-glow), transparent 42%);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .hero { min-height: calc(100svh - var(--header-h)); padding-block: var(--space-16); }
}
.hero__content { display: flex; flex-direction: column; gap: var(--space-6); }

.hero__prompt {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: .04em;
  color: var(--text-muted);
}
.hero__prompt b { color: var(--accent); font-weight: 600; }

.hero__title { margin-top: calc(-1 * var(--space-2)); }

.hero__headline {
  font-family: var(--font-head);
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--text);
  max-width: 40ch;
}
.hero__headline .sep { color: var(--accent); font-weight: 400; padding-left: .3em; }

.hero__pitch { max-width: 56ch; }

/* the right column stays visually open for the 3D logo */
.hero__visual { min-height: 220px; }
@media (min-width: 900px) { .hero__visual { min-height: 420px; } }

/* ---------- 3D scene host (fixed, behind everything) ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: var(--z-scene);
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
}
.scene canvas,
.scene__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.scene__poster { object-fit: cover; object-position: center; opacity: .85; }
[data-theme="light"] .scene__poster { opacity: .55; }
.scene canvas { opacity: 0; transition: opacity 900ms var(--ease-out); }
.scene.is-live canvas { opacity: 1; }
[data-theme="light"] .scene.is-live canvas { opacity: .85; }
@media (max-width: 767px) {
  /* phones: the scene sits behind solid cards, so keep it quiet under the headings */
  .scene.is-live canvas { opacity: .6; }
}
/* the page background stays on <body>; the scene paints over it, content over the scene */
body { background: var(--bg); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--space-8);
  background: var(--glass-header);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.site-footer__line {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: .02em;
  color: var(--text-muted);
}
.site-footer__line b { color: var(--text); font-weight: 500; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 500;
}
.site-footer__links a:hover { color: var(--accent); }
@media (min-width: 768px) {
  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

/* ---------- Hero additions ---------- */
.hero__status { align-self: flex-start; }
.hero__caret {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  margin-left: .15em;
  vertical-align: -0.2em;
  background: var(--accent);
  opacity: 0;
}
/* typing sequence (JS adds .is-typing, then .is-typed; without JS nothing is hidden) */
.hero.is-typing .hero__caret { opacity: 1; animation: caret-blink 900ms steps(1) infinite; }
/* Only the name + headline wait for the typed prompt (hidden from first paint when JS runs;
   theme-init.js force-reveals after 2.5 s as a safety net). The pitch, buttons and links
   paint immediately so the largest text is never delayed. */
.js .hero:not(.is-typed) .hero__title,
.js .hero:not(.is-typed) .hero__headline {
  opacity: 0;
  transform: translateY(10px);
}
.js .hero .hero__title,
.js .hero .hero__headline {
  transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out);
}
.js .hero .hero__headline { transition-delay: 120ms; }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .js .hero:not(.is-typed) .hero__title,
  .js .hero:not(.is-typed) .hero__headline { opacity: 1; transform: none; }
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.hero__links li { display: inline-flex; }
.hero__links a,
.hero__loc {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}
.hero__links a:hover { color: var(--accent); }
.hero__links svg { width: 16px; height: 16px; flex: none; }

/* ---------- Stats strip ---------- */
.stats { padding-block: 0 var(--space-8); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-6) var(--space-4);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat:nth-child(2n) { border-right: 0; }
.stat:last-child { grid-column: span 2; border-bottom: 0; border-right: 0; }
.stat__num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  font-size: var(--fs-small);
  color: var(--text-muted);
}
@media (min-width: 768px) {
  .stats__grid { grid-template-columns: repeat(5, 1fr); }
  .stat,
  .stat:last-child { grid-column: auto; border-bottom: 0; border-right: 1px solid var(--border); padding: var(--space-8) var(--space-6); }
  .stat:last-child { border-right: 0; }
}

/* ---------- About ---------- */
.about {
  display: grid;
  gap: var(--space-4);
}
.about__bio { display: grid; gap: var(--space-4); }
.about__bio p { max-width: 62ch; }
.about__now { display: grid; gap: var(--space-4); align-content: start; align-self: start; }
.now { display: grid; gap: var(--space-3); }
.now__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: var(--fs-small);
}
.now__item b { color: var(--text); font-weight: 600; }
.now__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
}
.now__icon svg { width: 18px; height: 18px; }
.now__meta {
  font-size: var(--fs-mono);
  color: var(--text-muted);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); }
}

/* ---------- Skills bento ---------- */
.bento {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
.tile {
  --tile-accent: var(--accent);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow: hidden;
}
/* colored hairline at the top: the only place the secondary brand colors appear */
.tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tile-accent);
  opacity: .9;
}
.tile--security { --tile-accent: var(--brand-orange); }
.tile--network { --tile-accent: var(--brand-green); }
.tile--automation { --tile-accent: var(--brand-yellow); }
.tile__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.tile__head h3 { font-size: 1.25rem; }
.tile__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--tile-accent);
}
.tile__icon svg { width: 22px; height: 22px; }
.tile__desc { color: var(--text-muted); font-size: var(--fs-small); }
@media (min-width: 768px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile--xl { grid-column: span 4; }
  .tile--tall { grid-column: span 2; grid-row: span 2; }
  .tile--endpoint, .tile--network { grid-column: span 2; }
  .tile--automation, .tile--docs { grid-column: span 3; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .tile--xl { grid-column: span 6; }
  .tile--tall { grid-column: span 3; grid-row: auto; }
  .tile--endpoint, .tile--network { grid-column: span 3; }
}

/* ---------- Case study cards ---------- */
.cases {
  display: grid;
  gap: var(--space-4);
}
.case {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  color: var(--text);
  text-decoration: none;
}
.case:hover { color: var(--text); }
.case__kicker {
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--accent);
}
.case__title { font-size: 1.3125rem; }
.case__problem { color: var(--text-muted); font-size: var(--fs-small); }
.case__result {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
  font-weight: 500;
}
.case__result svg { width: 18px; height: 18px; flex: none; color: var(--success); margin-top: .15em; }
.case__cta {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--accent);
}
.case:hover .case__cta { color: var(--accent-strong); }
.section__more { margin-top: var(--space-6); font-weight: 600; }
.section__more a { text-decoration: none; }
@media (min-width: 900px) {
  .cases { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: var(--space-6);
  padding-left: 28px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 7px;
  width: 2px;
  background: linear-gradient(var(--accent), var(--border-strong) 30%);
  border-radius: 2px;
}
.tl { position: relative; }
.tl__marker {
  position: absolute;
  left: -28px;
  top: 30px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border-strong);
}
.tl:first-child .tl__marker {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.tl__body { display: grid; gap: var(--space-3); }
.tl__body:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.tl__when { font-size: var(--fs-mono); color: var(--accent); letter-spacing: .04em; }
.tl__role { font-size: 1.3125rem; }
.tl__org { color: var(--text-muted); font-weight: 500; font-size: var(--fs-small); margin-top: calc(-1 * var(--space-1)); }
.tl__summary { color: var(--text-muted); }
.tl__group {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--text-muted);
}
.tl__list {
  display: grid;
  gap: var(--space-2);
  padding-left: 1.1em;
  font-size: var(--fs-small);
  color: var(--text);
}
.tl__list li { padding-left: .2em; }
.tl__list li::marker { color: var(--accent); }
.tl__more { margin-top: var(--space-2); }
.tl__more summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-small);
  color: var(--accent);
  list-style: none;
}
.tl__more summary::-webkit-details-marker { display: none; }
.tl__more summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.tl__more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.tl__more[open] summary { margin-bottom: var(--space-2); }
@media (min-width: 768px) {
  .timeline { padding-left: 48px; }
  .timeline::before { left: 11px; }
  .tl__marker { left: -48px; top: 34px; width: 24px; height: 24px; border-width: 3px; }
}

/* ---------- Certifications ---------- */
.certs { display: grid; gap: var(--space-4); }
.cert__head { display: flex; gap: var(--space-4); align-items: flex-start; }
.cert__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
}
.cert__icon svg { width: 24px; height: 24px; }
.cert__name { font-size: 1.125rem; }
.cert__status { margin-top: var(--space-2); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 26px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.badge--progress {
  color: var(--brand-yellow);
  border: 1px solid color-mix(in srgb, var(--brand-yellow) 45%, transparent);
  background: color-mix(in srgb, var(--brand-yellow) 10%, transparent);
}
.badge--progress::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.roadmap { display: grid; gap: var(--space-4); }
.roadmap__path {
  display: grid;
  gap: var(--space-3);
}
.roadmap__step {
  position: relative;
  display: grid;
  gap: 2px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  opacity: .55;
}
.roadmap__step.is-current {
  opacity: 1;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.roadmap__code { font-family: var(--font-head); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.roadmap__label { font-size: var(--fs-small); color: var(--text-muted); }
.roadmap__state {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--space-1);
}
.roadmap__step.is-current .roadmap__state { color: var(--accent); }
@media (min-width: 768px) {
  .roadmap__path { grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
  .roadmap__step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(-1 * var(--space-6));
    width: var(--space-6);
    height: 2px;
    background: var(--border-strong);
  }
}

.subsection__title { margin-top: var(--space-12); margin-bottom: var(--space-4); }
.edu { display: grid; gap: var(--space-4); }
.edu__item { display: grid; gap: var(--space-1); }
.edu__when { font-size: var(--fs-mono); color: var(--accent); letter-spacing: .04em; }
.edu__name { font-size: 1.0625rem; }
.edu__school { color: var(--text-muted); font-size: var(--fs-small); }
@media (min-width: 768px) { .edu { grid-template-columns: 1fr 1fr; } }

.langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.langs__label {
  font-size: var(--fs-mono);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: var(--space-2);
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
  padding: var(--space-8) var(--space-6);
}
.contact .lead { max-width: 48ch; }
.contact__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.contact__meta { font-size: var(--fs-mono); color: var(--text-muted); }
@media (min-width: 768px) {
  .contact { padding: var(--space-12); }
}

/* ==========================================================================
   Inner pages: case studies
   ========================================================================== */
.scene--static .scene__poster { opacity: .35; }
[data-theme="light"] .scene--static .scene__poster { opacity: .22; }

.page-head {
  padding-block: var(--space-12) var(--space-8);
}
.page-head .container { display: grid; gap: var(--space-4); justify-items: start; max-width: calc(880px + 2 * var(--gutter)); }
.page-head__title { max-width: 20ch; }
.page-head__summary { max-width: 60ch; }
.page-head__role { font-size: var(--fs-mono); color: var(--text-muted); letter-spacing: .04em; }
@media (min-width: 768px) { .page-head { padding-block: var(--space-16) var(--space-12); } }

.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); font-size: var(--fs-small); color: var(--text-muted); }
.crumbs li + li::before { content: "›"; margin-right: var(--space-2); color: var(--text-muted); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

.article__body { display: grid; gap: var(--space-6); padding-bottom: var(--space-24); max-width: calc(880px + 2 * var(--gutter)); }
.article__section { display: grid; gap: var(--space-3); }
.article__section h2 { font-size: var(--fs-h3); }
.article__section > p { max-width: 70ch; }
.article__cta { margin-top: var(--space-6); }

.steps { display: grid; gap: var(--space-4); counter-reset: step; }
.step {
  position: relative;
  padding-left: 52px;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  color: var(--accent);
}
.step__title { font-size: 1.0625rem; margin-bottom: var(--space-1); }
.step p { color: var(--text-muted); font-size: var(--fs-small); max-width: 66ch; }

.figure { display: grid; gap: var(--space-3); margin: 0; }
.figure__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.figure__scroll .diagram { min-width: 560px; }
.figure figcaption { font-size: var(--fs-small); color: var(--text-muted); max-width: 70ch; }
.diagram { width: 100%; height: auto; font-family: var(--font-body); }
.diagram .d-box { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 1.2; }
.diagram .d-box--accent { stroke: var(--accent); }
.diagram .d-box--green { stroke: var(--brand-green); }
.diagram .d-box--yellow { stroke: var(--brand-yellow); }
.diagram .d-box--warn { stroke: var(--brand-orange); stroke-dasharray: 5 4; }
.diagram .d-box--muted { stroke: var(--border); }
.diagram .d-box--dim { stroke: var(--border); stroke-dasharray: 4 4; }
.diagram .d-label { fill: var(--text); font-size: 13px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; }
.diagram .d-sub { fill: var(--text-muted); font-size: 11px; font-family: var(--font-mono); text-anchor: middle; dominant-baseline: middle; }
.diagram .d-head { fill: var(--accent); font-size: 11px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.diagram .d-line { stroke: var(--text-muted); stroke-width: 1.4; }
.diagram .d-arrow { fill: var(--text-muted); }
.diagram .d-divider { stroke: var(--border); stroke-dasharray: 3 5; }

.results { display: grid; gap: var(--space-3); }
.result { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-6); font-weight: 500; }
.result svg { width: 20px; height: 20px; flex: none; color: var(--success); margin-top: .15em; }
.result--soon { color: var(--text-muted); font-weight: 400; border-style: dashed; }
.result--soon b { color: var(--text); }
@media (min-width: 768px) { .results { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .result { padding: var(--space-6); } }

.pager { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.pager__link { display: grid; gap: var(--space-2); padding: var(--space-4) var(--space-6); text-decoration: none; color: var(--text); }
.pager__link .mono { font-size: var(--fs-mono); color: var(--accent); letter-spacing: .04em; }
.pager__title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.3; }
.pager__link--next { text-align: right; }
@media (min-width: 768px) { .pager { grid-template-columns: 1fr 1fr; } }

.section--tight { padding-block: 0 var(--space-24); }
