/* =====================================================================
   fadymassoud.com — Personal Site
   Tonally matched to the resume (Modern Minimal, Inter / Inter Tight,
   graphite + teal). Voice: Engineering Manager (Hands-On).
   Static HTML + CSS + minimal JS. Deployable to any host.
   ===================================================================== */

/* ---------- 0. Self-hosted fonts (Latin subset) ----------
   Variable woff2 files cover all weights for each family. Files served from
   assets/fonts/, eliminating two DNS hops to Google Fonts (~50-100ms saved)
   and removing third-party tracking. `font-display: swap` keeps text visible
   while the variable font streams in. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2-variations'),
       url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('assets/fonts/inter-tight-latin.woff2') format('woff2-variations'),
       url('assets/fonts/inter-tight-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2-variations'),
       url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Theme tokens ---------- */
:root {
  /* Light theme (default) */
  --bg:            #FAFBFC;          /* slightly warm off-white (was #FFFFFF) */
  --bg-alt:        #F1F4F8;
  --bg-elev:       #FFFFFF;

  --ink:           #1F2937;
  --ink-strong:    #0A1020;
  --muted:         #475569;
  --soft:          #64748B;
  --softer:        #94A3B8;

  --accent:        #0E7490;
  --accent-ink:    #155E75;
  --accent-soft:   #CFFAFE;

  /* Gold accent — from the FM monogram.
     STRICT usage: numeric metrics, 4px section-title rule, SVG strokes only.
     Never on body copy, never on button backgrounds. */
  --accent-gold:        #C69A3B;
  --accent-gold-strong: #A57E27;
  --accent-gold-soft:   #F4E9D0;

  --line:          #E2E8F0;
  --line-strong:   #CBD5E1;

  --shadow-sm:     0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md:     0 4px 6px rgba(15, 23, 42, 0.04), 0 10px 15px rgba(15, 23, 42, 0.06);
  --shadow-lg:     0 10px 15px rgba(15, 23, 42, 0.05), 0 20px 40px rgba(15, 23, 42, 0.08);

  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     16px;

  --container:     72rem;
  --gutter:        clamp(1.25rem, 4vw, 2.5rem);

  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display:  'Inter Tight', 'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark theme */
:root.theme-dark {
  --bg:            #0A0F1A;          /* deeper, less blue (was #0B1220) */
  --bg-alt:        #0F1623;
  --bg-elev:       #1F2937;

  --ink:           #E5E7EB;
  --ink-strong:    #F5F6F8;
  --muted:         #9CA3AF;
  --soft:          #6B7280;
  --softer:        #4B5563;

  --accent:        #5EE3EF;           /* tuned down from #22D3EE — less saturated */
  --accent-ink:    #7EE8F2;
  --accent-soft:   #164E63;

  --accent-gold:        #D8AE5C;
  --accent-gold-strong: #E8C075;
  --accent-gold-soft:   #3A2E18;

  --line:          #1F2937;
  --line-strong:   #374151;

  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md:     0 4px 6px rgba(0, 0, 0, 0.2), 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-lg:     0 10px 15px rgba(0, 0, 0, 0.3), 0 20px 40px rgba(0, 0, 0, 0.4);
}

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

/* ---- Accessibility primitives (P1-#06) ---- */

/* Skip-to-content — first focusable on every page */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 16px;
  background: var(--ink-strong);
  color: var(--bg);
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  left: 0;
}

/* Custom focus ring — visible, keyboard-only */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Respect prefers-reduced-motion globally */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Tabular figures — apply on any numeric context */
.metric,
.numeric,
.timeline__dates,
.hero__stats .metric,
.currently__row dd,
.hire-filter dd {
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent); }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- 3. Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 4rem;
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink-strong);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.nav__logo:hover { color: var(--ink-strong); }

/* Logo mark — now an <img> from assets/Logo.png (P1-#01) */
.nav__logo-mark {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.nav__logo-text { font-size: 0.95rem; }

/* Scroll-progress bar at bottom edge of nav (P1-#07-ish: included for free with the logo work) */
.nav__progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--accent-gold);
  transition: width 0.1s linear;
  pointer-events: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
}
.nav__links a:hover { color: var(--ink-strong); }
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -1.25rem;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}
.nav__links a:hover::after { transform: scaleX(1); }

.theme-toggle {
  width: 2.75rem;       /* ≥ 44px touch target (was 2.25rem ≈ 36px) */
  height: 2.75rem;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}
.theme-toggle:hover { background: var(--bg-alt); border-color: var(--line-strong); }
.theme-toggle:active { transform: translateY(1px); }

.theme-toggle__icon { display: none; }
:root .theme-toggle__icon--moon { display: inline; }
:root.theme-dark .theme-toggle__icon--moon { display: none; }
:root.theme-dark .theme-toggle__icon--sun { display: inline; }

/* Mobile hamburger — hidden on desktop, shown ≤800px via media query below */
.nav__menu-btn {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}
.nav__menu-btn:hover { background: var(--bg-alt); border-color: var(--line-strong); }
.nav__menu-btn:active { transform: translateY(1px); }

.nav__menu-icon { display: none; }
.nav__menu-btn .nav__menu-icon--open { display: inline; }
.nav__menu-btn[aria-expanded="true"] .nav__menu-icon--open { display: none; }
.nav__menu-btn[aria-expanded="true"] .nav__menu-icon--close { display: inline; }

/* ---------- 4. Hero ---------- */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10rem;
  right: -10rem;
  width: 30rem;
  height: 30rem;
  background: radial-gradient(circle at center, var(--accent) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
  filter: blur(40px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin: 0 0 1.5rem 0;
  background: var(--bg-elev);
}

.hero__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: #10B981;
  box-shadow: 0 0 0 0.25rem rgba(16, 185, 129, 0.15);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink-strong);
  margin: 0 0 1.25rem 0;
  max-width: 22ch;
}

.hero__accent {
  color: var(--accent);
  position: relative;
}

.hero__lede {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1.5rem 0;
  max-width: 56ch;
}

.hero__lede strong { color: var(--ink-strong); font-weight: 600; }

/* Hire-filter block (P1-#03) — sits below lede, above CTAs.
   Mono labels signal "metadata"; sans values keep readability. */
.hire-filter {
  margin: 0 0 1.75rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.5rem;
  max-width: 56rem;
}

.hire-filter__row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem;
  align-items: baseline;
}

.hire-filter dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: lowercase;
  margin: 0;
}

.hire-filter dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.5;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

/* Hero stats — only 2 now, gold metric color (P1-#09) */
.hero__stats {
  list-style: none;
  margin: 0;
  padding: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  border-top: 1px solid var(--line);
  max-width: 44rem;
}

.hero__stats li {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.hero__stats .metric {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--accent-gold);            /* gold accent on numeric metrics */
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

/* Unit annotation ("TPS") rendered smaller next to the number so the digit
   stays the visual anchor while the unit earns engineering credibility. */
.hero__stats .metric__unit {
  font-size: 0.5em;
  font-weight: 600;
  color: var(--accent-gold-strong);
  letter-spacing: 0.04em;
  vertical-align: 0.4em;
  margin-left: 0.1em;
}

.hero__stats span {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Italic org parenthetical (Paysafe) — calmer than upright body */
.hero__stats em {
  font-style: italic;
  color: var(--soft);
  font-weight: 400;
}

@media (max-width: 640px) {
  .hire-filter__row { grid-template-columns: 4.5rem 1fr; gap: 0.75rem; }
  .hero__stats { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  text-decoration: none;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--ink-strong);
  color: var(--bg);
}
.btn--primary:hover { background: var(--accent-ink); color: var(--bg); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { color: var(--ink-strong); border-color: var(--ink-strong); background: var(--bg-alt); }

.btn__icon { font-weight: 500; }

/* ---------- 6. Section base ---------- */
.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* Section headers — gain a 4px gold rule above each title (P1-#09).
   This is the through-line of the Engineering Ledger aesthetic — one
   small typographic detail repeated across every section. */
.section__rule {
  display: block;
  width: 2.25rem;
  height: 4px;
  background: var(--accent-gold);
  border-radius: 2px;
  margin: 0 0 1rem 0;
}

.section__eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.375rem 0;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
  margin: 0 0 1rem 0;
  max-width: 32ch;
}

.section__lede {
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 56ch;
  margin: 0 0 2.5rem 0;
}

/* ---------- 7. About (simplified — sidebar moved to Currently strip) ---------- */
.about__copy {
  max-width: 56rem;
}

.about__copy p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 0 0 1.25rem 0;
  color: var(--ink);
}
.about__copy p:last-child { margin-bottom: 0; }
.about__copy strong { color: var(--ink-strong); font-weight: 600; }

/* "What I look for next" callout — premium emphasis on the closing positioning line */
.about__lookfor {
  margin: 2rem 0 0 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent-gold);
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.about__lookfor h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem 0;
}
.about__lookfor p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- 7d. Selected Systems — architecture cards ----------
   Three cards (Kort AWS · Paysafe monolith · Paysafe Kafka) with inline SVG
   sketches drawn in ink + gold accent. Sketches use currentColor so the strokes
   inherit theme color. Card gets a thin gold left-border on hover. */

.systems__grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
}

.system-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  color: var(--ink);
}

.system-card:hover {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.system-card__id {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin: 0 0 0.5rem 0;
}

.system-card__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  margin: 0 0 0.375rem 0;
}

.system-card__meta {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 1rem 0;
}

.system-card__sketch {
  margin: 0 0 1rem 0;
  padding: 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  color: var(--ink);              /* SVG strokes inherit via currentColor */
  border: 1px solid var(--line);
}

.system-card__sketch svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
}

/* Metrics row — 3 small metric tiles per card */
.system-card__metrics {
  margin: 0 0 1rem 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
}

.system-card__metrics div {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.system-card__metrics dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.system-card__metrics dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum';
}

.system-card__link {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.system-card__link:hover {
  color: var(--accent);
}

/* On mobile, ensure cards stack and the metrics row stays readable */
@media (max-width: 640px) {
  .systems__grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .system-card__metrics dd { font-size: 0.9375rem; }
}

/* ---------- 7c. Impact strip (career totals — different from hero stats) ----------
   Sits between About and Experience. Four large numbers in gold, with a short
   muted-grey label below each. Anchors recruiter scan with career-wide signal
   before they enter the per-role timeline. */
.impact {
  padding: 3rem 0 3.5rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.impact__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem 0;
}

.impact__grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.impact__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--accent-gold);
}

.impact__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-gold);
  line-height: 1;
  margin: 0;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

.impact__label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 768px) {
  .impact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (max-width: 480px) {
  .impact__grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ---------- 7b. Currently strip (P1-#04) — promoted above the fold ----------
   Horizontal "what is this person doing right now" — the strongest
   active-engineer signal on the site. Mono labels, sans values, thin
   row dividers. */
.currently {
  padding: 2rem 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.currently__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem 0;
}

.currently__list {
  margin: 0;
  display: grid;
  gap: 0;
}

.currently__row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--line);
}
.currently__row:last-child { border-bottom: none; }

.currently__row dt {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: lowercase;
  margin: 0;
  padding-top: 2px;
}

.currently__row dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-strong);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .currently__row { grid-template-columns: 5.5rem 1fr; gap: 0.75rem; }
  .currently__row dd { font-size: 0.875rem; }
}

/* ---------- 8. Experience timeline ---------- */
.timeline {
  list-style: none;
  margin: 2rem 0 0 0;
  padding: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  bottom: 0.5rem;
  left: 0.4375rem;
  width: 2px;
  background: var(--line);
  border-radius: 1px;
}

.timeline__item {
  position: relative;
  padding-left: 2.25rem;
  padding-bottom: 2.5rem;
}
.timeline__item:last-child { padding-bottom: 0; }

.timeline__marker {
  position: absolute;
  left: 0;
  top: 0.625rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.section--alt .timeline__marker { box-shadow: 0 0 0 4px var(--bg-alt); }

.timeline__item--earlier .timeline__marker {
  background: var(--softer);
  border-color: var(--softer);
}

.timeline__dates {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--soft);
  margin: 0 0 0.375rem 0;
}

.timeline__role {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink-strong);
  margin: 0 0 0.375rem 0;
}

.timeline__company {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 1rem 0;
  font-weight: 500;
}
.timeline__company-meta { color: var(--soft); font-weight: 400; }

.timeline__bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline__bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
}

.timeline__bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}
.timeline__bullets li strong { color: var(--ink-strong); font-weight: 600; }

.timeline__bullets--paragraph {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  padding-left: 0;
}

/* Current role — visually anchored at top of timeline (Audit recommendation).
   Subtle gold left-border + an inline "Current" pill in the dates row so a
   recruiter's eye lands here first. No size or weight change — restraint. */
.timeline__item--current .timeline__body {
  position: relative;
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-gold);
  margin-left: -1.25rem;
}

.timeline__current-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.125rem 0.5rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold-strong);
  border-radius: 999px;
  margin-right: 0.625rem;
  vertical-align: 2px;
}

/* On mobile, the timeline marker may share visual real estate; let the
   gold border stay but tighten the negative margin */
@media (max-width: 640px) {
  .timeline__item--current .timeline__body {
    padding-left: 1rem;
    margin-left: -0.5rem;
  }
}

/* ---------- 9. How I Work — operating principles ----------
   Replaces the old Skills cards. Numbered manifesto layout: large gold
   numeral on the left, principle headline + one-line elaboration on the
   right. Reads as deliberate leadership voice, not a skill checklist. */
.principles {
  list-style: none;
  margin: 2.5rem 0 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.principle {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.principle:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.principle__num {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  padding-top: 0.125rem;
  font-feature-settings: 'tnum';
  font-variant-numeric: tabular-nums;
}

.principle__title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--ink-strong);
  margin: 0 0 0.5rem 0;
}

.principle__detail {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 64ch;
}

@media (max-width: 640px) {
  .principle { grid-template-columns: 3rem 1fr; gap: 1rem; }
  .principle__num { font-size: 0.875rem; }
  .principle__title { font-size: 1rem; }
  .principle__detail { font-size: 0.875rem; }
}

/* "Working with" compact stack line — ATS keyword retention without the
   visual cost of skill cards. Mono label, dense comma-separated stack. */
.principles__stack {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.principles__stack-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.625rem 0;
}

.principles__stack-value {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
}

/* ---------- 9b. Skills grid — REMOVED in Phase F.
   The .skills__grid + .skill-card* selectors were the original Phase-1 markup,
   replaced in Phase 2 by .principles (How I Work). Dead code eliminated here
   to keep style.css lean (~3 KB savings). */

/* ---------- 10. Featured / Writing ---------- */
.featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.featured-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease;
}

.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.featured-card__tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-sm);
  margin: 0;
}

.featured-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--ink-strong);
  margin: 0;
}

.featured-card__excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  flex: 1;
}

.featured-card__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--soft);
  margin: 0;
}

.featured-card__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-ink);
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap 0.15s ease, color 0.15s ease;
}
.featured-card__link:hover { gap: 0.625rem; color: var(--accent); }

.featured__more {
  text-align: center;
  margin: 2.5rem 0 0 0;
}
.featured__more a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, color 0.15s ease, gap 0.15s ease;
}
.featured__more a:hover {
  color: var(--accent);
  border-color: var(--accent);
  gap: 0.75rem;
}

/* ---------- 11. Contact ---------- */
.section--contact {
  background: var(--bg);
}

/* .contact__inner inherits .container's 72rem max-width — same as every other
   section. Removed the 48rem override so the Contact block aligns flush with
   the section above it. Readable text length is preserved by the per-element
   max-widths below (.contact__lede uses max-width: 56ch). */
.contact__inner { /* no width override — uses .container's 72rem */ }

.contact__lede {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 2rem 0;
  max-width: 56ch;
}

.contact__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.contact__link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.contact__link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.contact__link--primary {
  background: var(--ink-strong);
  border-color: var(--ink-strong);
}
.contact__link--primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.contact__link--primary .contact__link-label,
.contact__link--primary .contact__link-value { color: var(--bg); }

.contact__link-label {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
}

.contact__link-value {
  font-size: 1rem;
  color: var(--ink-strong);
  font-weight: 500;
}

.contact__resumes {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.contact__resumes-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.contact__resume-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- 12. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
  margin-top: 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer__meta {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--soft);
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 800px) {
  /* Replace inline links with a hamburger that opens a dropdown panel */
  .nav__menu-btn { display: inline-grid; }

  .nav__links { display: none; }

  .nav__links[data-open="true"] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    padding: 0.25rem var(--gutter) 0.5rem;
  }
  .nav__links[data-open="true"] li { border-top: 1px solid var(--line); }
  .nav__links[data-open="true"] li:first-child { border-top: none; }
  .nav__links[data-open="true"] a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
    color: var(--ink);
  }
  /* The desktop hover underline lives below the link — irrelevant in a stacked dropdown */
  .nav__links[data-open="true"] a::after { display: none; }

  .about__grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer__inner { justify-content: center; text-align: center; }
}

@media (max-width: 540px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .hero__stats { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

/* ---------- 14. Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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