/* =========================================================
   neale.dev — engineer's whiteboard on cream paper.
   A warm Bone canvas, white Paper cards lifted by a near-
   invisible shadow, Ink text, and a single Signal Red accent
   used as punctuation (one element per row at most).
   Type: Inter at whisper weights (300) for headlines, 400/500
   for body and UI; Space Grotesk, wide-tracked and uppercase,
   for eyebrows and technical labels (the MDIO substitute).
   Both faces are self-hosted from /fonts — no third-party
   font requests.
   ========================================================= */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-var.woff2") format("woff2");
}

:root {
  color-scheme: light;

  /* Colors */
  --color-ink: #181717;
  --color-bone: #eeebea;
  --color-paper: #ffffff;
  --color-graphite: #2e2d2d;
  --color-charcoal: #575555;
  --color-ash: #706e6d;
  --color-linen: #f7f5f4;
  --color-mist: #d5d3d2;
  --color-signal-red: #d04841;
  /* Signal Red for surfaces that carry white text: two RGB steps deeper,
     visually identical, but clears WCAG AA (4.56:1 vs 4.48:1). */
  --color-signal-red-surface: #ce4741;
  --color-network-blue: #5a82de;
  --color-network-blue-deep: #324994;

  /* Typography — families */
  --font-inter: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mdio: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Typography — scale (display and headings flex down on small screens) */
  --text-caption: 12px;
  --text-body-sm: 14px;
  --text-body: 16px;
  --text-subheading: 20px;
  --text-heading: clamp(26px, 3vw, 32px);
  --text-heading-lg: clamp(32px, 4.4vw, 48px);
  --text-display: clamp(40px, 6.4vw, 64px);

  /* Spacing (4px base) */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-84: 84px;

  /* Layout */
  --page-max-width: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-gap: clamp(64px, 9vw, 96px);

  /* Radii */
  --radius-buttons: 8px;
  --radius-cards: 16px;
  --radius-hero-cards: 32px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: rgba(24, 23, 23, 0.02) 0px 4px 8px 0px;
  --shadow-md: rgba(24, 23, 23, 0.16) 0px 4px 16px 0px;
  /* A hairline keeps white cards legible on the Bone canvas;
     the 2% shadow alone is (deliberately) barely perceptible. */
  --edge: 0 0 0 1px rgba(24, 23, 23, 0.05);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  background: var(--color-bone);
  color: var(--color-ink);
  font-family: var(--font-inter);
  font-size: var(--text-body);
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
::selection { background: var(--color-ink); color: var(--color-paper); }
:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-buttons);
  font-weight: 500;
  font-size: var(--text-body-sm);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: calc(var(--page-max-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding-top: var(--section-gap); }
.site-main { padding-bottom: var(--section-gap); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mdio);
  font-weight: 500;
  font-size: var(--text-caption);
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-charcoal);
}
.muted { color: var(--color-charcoal); }

.section-head {
  max-width: 760px;
  margin: 0 auto var(--spacing-48);
  text-align: center;
}
.section-head .eyebrow { display: block; margin-bottom: var(--spacing-16); }
.section-head h2 {
  font-size: var(--text-heading-lg);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-head p {
  max-width: 640px;
  margin: var(--spacing-24) auto 0;
  color: var(--color-charcoal);
  text-wrap: pretty;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 0;
  border-radius: var(--radius-buttons);
  font: 500 var(--text-body-sm)/1.43 var(--font-inter);
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow .2s ease, background-color .2s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary {
  background: var(--color-ink);
  color: var(--color-paper);
  box-shadow: var(--shadow-sm);
}
/* No hover lift — the button stays flat and grounded. */
.btn-primary:hover { box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  padding: 10px 12px;
}
.btn-ghost:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-ghost .icon { transition: transform .2s ease; }
.btn-ghost:hover .icon { transform: translateX(2px); }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

/* ---------- Pills & tags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--color-linen);
  box-shadow: var(--edge);
  font-size: var(--text-caption);
  line-height: 1.5;
  color: var(--color-graphite);
  white-space: nowrap;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-signal-red);
  flex-shrink: 0;
}

/* ---------- Brand mark ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-buttons);
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-mdio);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
}
.site-nav-inner {
  position: relative;
  max-width: var(--page-max-width);
  height: 60px;
  margin: 0 auto;
  padding: 0 10px 0 16px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: color-mix(in srgb, var(--color-linen) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-sm), var(--edge);
}
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0 auto;
}
.nav-links li + li { box-shadow: -1px 0 0 var(--color-mist); }
.nav-links a {
  position: relative;
  display: block;
  padding: 6px 16px;
  font-size: var(--text-body-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-ink);
}
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
/* Active indicator — a Signal Red dot under the current link */
.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--color-signal-red);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  place-items: center;
  border: 0;
  border-radius: var(--radius-buttons);
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--color-bone); }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 960px) {
  .nav-toggle { display: grid; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    background: var(--color-paper);
    border-radius: var(--radius-cards);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li + li { box-shadow: 0 -1px 0 var(--color-linen); }
  .nav-links a { padding: 12px 12px; font-size: var(--text-body); }
  .nav-links a.is-active::after { left: auto; right: 16px; top: 50%; bottom: auto; margin: -2.5px 0 0; }
}
@media (max-width: 560px) {
  .nav-github { display: none; }
}
@media (max-width: 360px) {
  .site-nav-inner .brand-name { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--section-gap) var(--gutter) 0;
  text-align: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  padding: 4px 14px 4px 4px;
  margin-bottom: var(--spacing-32);
  border-radius: var(--radius-pill);
  background: var(--color-paper);
  box-shadow: var(--shadow-sm), var(--edge);
  font-size: var(--text-body-sm);
  text-decoration: none;
  transition: box-shadow .2s ease;
}
a.hero-pill:hover { box-shadow: var(--shadow-md); }
.hero-pill img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.hero-pill .hero-pill-name { font-weight: 500; white-space: nowrap; }
.hero-pill .hero-pill-sep { width: 1px; height: 16px; background: var(--color-mist); }
.hero-pill .hero-pill-role { color: var(--color-charcoal); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-pill--plain { padding: 6px 14px; gap: 8px; }
.hero-pill--mono .hero-pill-role { font-family: var(--font-mdio); font-size: var(--text-caption); letter-spacing: 0.05em; }
@media (max-width: 480px) {
  .hero-pill { gap: 8px; font-size: 13px; }
}
.hero h1 {
  font-size: var(--text-display);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-sub {
  max-width: 640px;
  margin: var(--spacing-24) auto 0;
  color: var(--color-charcoal);
  text-wrap: pretty;
}
.hero .btn-row { margin-top: var(--spacing-32); }

/* ---------- Stat block ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--spacing-32);
  padding-top: var(--section-gap);
  text-align: center;
}
.stat .eyebrow { display: block; margin-bottom: var(--spacing-12); }
.stat-num {
  font-size: var(--text-heading-lg);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat-num .unit { font-size: 0.5em; color: var(--color-charcoal); margin-left: 2px; letter-spacing: -0.01em; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--spacing-48); }
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-paper);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-sm), var(--edge);
  padding: var(--spacing-32);
}
@media (max-width: 560px) { .card { padding: var(--spacing-24); } }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--spacing-64);
  align-items: center;
}
.portrait-card {
  background: var(--color-paper);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-sm), var(--edge);
  overflow: hidden;
}
.portrait-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.portrait-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: var(--text-body-sm);
}
.portrait-card figcaption span:first-child { font-weight: 500; }
.lede {
  font-size: var(--text-subheading);
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}
.prose { color: var(--color-charcoal); }
.prose > * + * { margin-top: 1em; }
.prose strong { color: var(--color-ink); font-weight: 500; }
.prose a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-mist); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: var(--color-ink); }
.about-grid .lede { color: var(--color-ink); margin-bottom: var(--spacing-24); }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: var(--spacing-32); }
  .portrait-card { max-width: 420px; }
}

/* ---------- Product showcase ---------- */
.showcase {
  background: var(--color-paper);
  border-radius: var(--radius-hero-cards);
  box-shadow: var(--shadow-sm), var(--edge);
  overflow: hidden;
}
/* Window chrome — the red header bar of the product UI */
.showcase-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: var(--color-signal-red-surface);
  color: var(--color-paper);
  font-family: var(--font-mdio);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.showcase-dots { display: flex; gap: 6px; }
.showcase-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.showcase-bar .showcase-bar-end { margin-left: auto; white-space: nowrap; }
.showcase-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: 8px;
  padding: 8px;
}
.showcase-main { padding: 32px 32px 32px 32px; }
/* Blue gradient secondary panel — reserved for product imagery */
.showcase-panel {
  border-radius: 24px;
  padding: 32px;
  color: var(--color-paper);
  background: linear-gradient(160deg, var(--color-network-blue) 0%, var(--color-network-blue-deep) 100%);
  background: linear-gradient(in oklab 160deg, var(--color-network-blue) 0%, var(--color-network-blue-deep) 100%);
}
.showcase-panel .eyebrow { color: rgba(255, 255, 255, 0.8); }
@media (max-width: 960px) {
  .showcase-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .showcase { border-radius: 24px; }
  .showcase-bar { padding: 12px 16px; }
  .showcase-bar .showcase-bar-end { display: none; }
  .showcase-main { padding: 20px 16px 24px; }
  .showcase-panel { padding: 24px; border-radius: 18px; }
}

/* Case study (inside the showcase) */
.case-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 24px;
  padding-bottom: var(--spacing-24);
  margin-bottom: var(--spacing-32);
  border-bottom: 1px solid var(--color-linen);
}
.case-meta dt { margin-bottom: 4px; }
.case-meta dd { font-size: var(--text-body-sm); font-weight: 500; }
.case-lead {
  font-size: var(--text-heading);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-32);
  max-width: 24ch;
  text-wrap: balance;
}
.case-block + .case-block { margin-top: var(--spacing-24); }
.case-block h4 { margin-bottom: var(--spacing-8); }
.case-block p { color: var(--color-charcoal); max-width: 68ch; }
.case-block p + p { margin-top: 0.8em; }
.case-block a { color: var(--color-ink); text-underline-offset: 3px; text-decoration-color: var(--color-mist); }
.case-block a:hover { text-decoration-color: var(--color-ink); }
.case-figures { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.case-figure { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.22); }
.case-figure-num {
  font-size: var(--text-heading-lg);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.case-figure-label { margin-top: 4px; font-size: var(--text-body-sm); color: rgba(255, 255, 255, 0.85); }
@media (max-width: 720px) {
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Feature row (first card red, the rest text-only) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--spacing-32);
  list-style: none;
  padding: 0;
}
.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 0;
}
.feature .icon { margin-bottom: 8px; }
.feature h3 {
  font-size: var(--text-subheading);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.feature p { font-size: var(--text-body-sm); line-height: 1.43; color: var(--color-charcoal); }
.feature .feature-meta { margin-top: auto; padding-top: 8px; font-family: var(--font-mdio); font-size: var(--text-caption); letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-charcoal); }
.feature a { text-decoration: none; }
/* Whole card is the link target */
.feature a.feature-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-cards); }
.feature:has(.feature-link):hover h3 { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.feature:focus-within { outline: 2px solid var(--color-ink); outline-offset: 4px; border-radius: var(--radius-cards); }
.feature a.feature-link:focus-visible { outline: none; }
/* The one place Signal Red fills a surface */
.feature--red {
  padding: 24px;
  border-radius: var(--radius-cards);
  background: var(--color-signal-red-surface);
  color: var(--color-paper);
  box-shadow: var(--shadow-sm);
}
.feature--red .eyebrow { color: var(--color-paper); }
.feature--red p,
.feature--red .feature-meta { color: var(--color-paper); }
.feature-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-body-sm);
  font-weight: 500;
}
.feature-cta .icon { width: 16px; height: 16px; transition: transform .2s ease; }
@media (max-width: 1080px) {
  .feature-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
  .feature--red { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .feature-row { grid-template-columns: 1fr; }
}

/* ---------- Skills: logo-tile grid ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 20px 12px;
  background: var(--color-paper);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-sm), var(--edge);
  text-align: center;
}
.tile-name { font-size: var(--text-body-sm); font-weight: 500; line-height: 1.3; }
.tile .eyebrow { font-size: 10px; }
@media (max-width: 960px) { .tile-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 460px) { .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.skills-extra {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 16px;
  margin-top: 16px;
}
.skills-extra h3 { margin-bottom: var(--spacing-16); }
.skills-extra .tag-list { gap: 8px; }
.skills-extra .pill { font-size: var(--text-body-sm); padding: 6px 14px; }
.cert-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.cert-list li { display: flex; align-items: center; gap: 12px; font-size: var(--text-body-sm); font-weight: 500; }
.cert-list .icon { color: var(--color-charcoal); }
@media (max-width: 860px) { .skills-extra { grid-template-columns: 1fr; } }

/* ---------- Experience ---------- */
.job-list { display: grid; gap: 16px; list-style: none; padding: 0; }
.job {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--spacing-32);
}
.job-meta { display: flex; flex-direction: column; gap: 6px; }
.job-meta .job-date { color: var(--color-ink); }
.job-meta .pill { align-self: flex-start; margin-top: 6px; }
.job h3 {
  font-size: var(--text-subheading);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.job-co { margin-top: 2px; font-size: var(--text-body-sm); color: var(--color-charcoal); }
.job-body > p { margin-top: var(--spacing-16); color: var(--color-charcoal); max-width: 70ch; }
.job-body ul:not(.tag-list) {
  margin-top: var(--spacing-12);
  padding: 0;
  list-style: none;
  max-width: 70ch;
  color: var(--color-charcoal);
}
.job-body ul:not(.tag-list) li { position: relative; padding: 4px 0 4px 20px; }
.job-body ul:not(.tag-list) li::before {
  content: "";
  position: absolute;
  left: 2px; top: 15px;
  width: 8px; height: 1px;
  background: var(--color-ink);
}
.job-body .tag-list { margin-top: var(--spacing-20); }
.log-totals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
  margin-top: 24px;
  padding: 0 8px;
}
.log-totals .log-totals-vals { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: var(--text-body-sm); font-weight: 500; }
@media (max-width: 720px) {
  .job { grid-template-columns: 1fr; gap: var(--spacing-16); }
  .job-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
  .job-meta .pill { margin-top: 0; }
}

/* ---------- Currently: testimonial-style cards ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}
.quote-card { padding: var(--spacing-24); display: flex; flex-direction: column; gap: 16px; }
.quote-head { display: flex; align-items: center; gap: 12px; }
.quote-avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-linen);
  box-shadow: var(--edge);
  flex-shrink: 0;
}
.quote-avatar .icon { width: 18px; height: 18px; }
.quote-head h3 { font-size: var(--text-body-sm); font-weight: 500; line-height: 1.3; }
.quote-head .quote-handle { font-size: var(--text-caption); color: var(--color-charcoal); }
.quote-status { margin-left: auto; align-self: flex-start; }
.quote-card p { font-size: var(--text-body-sm); line-height: 1.5; }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; } }

/* ---------- Link cards (related / listings) ---------- */
.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}
.link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--spacing-24);
  transition: box-shadow .2s ease;
}
.link-card:hover { box-shadow: var(--shadow-md); }
.link-card :is(h2, h3) { font-size: var(--text-subheading); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.link-card :is(h2, h3) a { text-decoration: none; }
.link-card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-cards); }
.link-card p { font-size: var(--text-body-sm); color: var(--color-charcoal); }
.link-card .tag-list { margin-top: 4px; }
.link-card .feature-cta { margin-top: auto; padding-top: 8px; }
.link-card:hover .feature-cta .icon { transform: translateX(2px); }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact .section-head { margin-bottom: var(--spacing-32); }

/* ---------- Footer ---------- */
.site-footer { padding: var(--spacing-64) 0 var(--spacing-48); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: var(--spacing-32);
  padding-top: var(--spacing-48);
  border-top: 1px solid var(--color-mist);
}
.footer-brand p { margin-top: var(--spacing-16); max-width: 32ch; font-size: var(--text-body-sm); color: var(--color-charcoal); }
.footer-heading { margin-bottom: var(--spacing-16); color: var(--color-ink); }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 12px; }
.footer-col a { font-size: var(--text-body-sm); color: var(--color-charcoal); text-decoration: none; }
.footer-col a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: var(--spacing-48);
  font-size: var(--text-caption);
  color: var(--color-charcoal);
}
.footer-base a { color: inherit; text-underline-offset: 3px; }
.footer-base a:hover { color: var(--color-ink); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================
   Aviation
   ========================================================= */

/* Flight trace showcase (markup generated by scripts/igc-trace.js) */
.trace-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}
.trace-map { padding: 24px 24px 20px; }
.trace-map svg, .trace-baro svg { width: 100%; height: auto; }
.trace-side { display: flex; flex-direction: column; gap: 8px; }
.trace-data { padding: 20px 24px 8px; }
.trace-data > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-linen);
}
.trace-data > div:last-child { border-bottom: 0; }
.trace-data dd { font-size: var(--text-body-sm); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.trace-baro { padding: 20px 20px 16px; margin-top: auto; }
.trace-caption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}
.trace-baro .trace-caption { margin: 0 0 12px; }
.trace-key { display: inline-flex; align-items: center; gap: 8px; }
.trace-key-line { width: 22px; height: 0; border-top: 2px solid var(--color-signal-red); }
.trace-key-task { width: 22px; height: 0; border-top: 1px dashed var(--color-ash); }

.tr-line { fill: none; stroke: var(--color-signal-red); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.tr-task { fill: none; stroke: var(--color-ash); stroke-width: 1; stroke-dasharray: 5 6; }
.tr-tp { fill: var(--color-paper); stroke: var(--color-ink); stroke-width: 1.5; }
.tr-label { font-family: var(--font-mdio); font-weight: 500; font-size: 11px; letter-spacing: 0.05em; fill: var(--color-charcoal); }
/* Barogram — white on the blue product panel */
.trace-baro .tr-line { stroke: var(--color-paper); stroke-width: 1.5; }
.tr-area { fill: rgba(255, 255, 255, 0.14); stroke: none; }
.tr-grid { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1; }
.tr-axis { font-family: var(--font-mdio); font-weight: 500; font-size: 12px; letter-spacing: 0.05em; fill: rgba(255, 255, 255, 0.8); }
@media (max-width: 960px) {
  .trace-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  /* SVG text is in viewBox units; scale it up as the plot shrinks */
  .tr-label { font-size: 18px; }
  .tr-axis { font-size: 15px; }
  .trace-map { padding: 12px 8px 16px; }
  .trace-data { padding: 12px 16px 4px; }
}

/* Journey */
.narrow { max-width: 720px; margin: 0 auto; }
.narrow .lede { color: var(--color-ink); }

/* Milestones timeline */
.timeline {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  left: 128px;
  width: 1px;
  background: var(--color-mist);
}
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: 124px; top: 26px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--color-paper);
  box-shadow: 0 0 0 1.5px var(--color-ink);
}
.tl-item--highlight::before { background: var(--color-signal-red); box-shadow: 0 0 0 1.5px var(--color-signal-red), 0 0 0 5px rgba(208, 72, 65, 0.15); }
.tl-date { padding-top: 24px; text-align: right; color: var(--color-ink); }
.tl-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
}
.tl-card.has-media { grid-template-columns: minmax(0, 1fr) 220px; }
.tl-text { padding: 20px 24px; align-self: center; }
.tl-text h3 { font-size: var(--text-subheading); font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; }
.tl-text p { margin-top: 6px; font-size: var(--text-body-sm); line-height: 1.5; color: var(--color-charcoal); max-width: 60ch; }
.tl-text a { color: var(--color-ink); text-underline-offset: 3px; }
.tl-media { position: relative; min-height: 148px; background: var(--color-linen); }
.tl-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 720px) {
  .timeline::before { left: 4px; }
  .tl-item { grid-template-columns: 1fr; gap: 8px; padding-left: 28px; }
  .tl-item::before { left: 0; top: 4px; }
  .tl-date { padding-top: 0; text-align: left; }
  .tl-card.has-media { grid-template-columns: 1fr; }
  .tl-media { order: -1; aspect-ratio: 16 / 9; min-height: 0; }
}

/* =========================================================
   Secondary pages (baseof.html): colophon, projects, gallery
   ========================================================= */
.page-header {
  max-width: 760px;
  margin: 0 auto var(--spacing-48);
  padding-top: var(--section-gap);
  text-align: center;
}
.page-header .eyebrow { display: block; margin-bottom: var(--spacing-16); }
.page-header .eyebrow a { text-decoration: none; }
.page-header .eyebrow a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.page-header h1 {
  font-size: var(--text-heading-lg);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.page-header p {
  max-width: 640px;
  margin: var(--spacing-24) auto 0;
  color: var(--color-charcoal);
  text-wrap: pretty;
}
.page-header .tag-list { justify-content: center; margin-top: var(--spacing-24); }
.page-header .btn-row { margin-top: var(--spacing-24); }

/* Prose column with full-bleed escapes for embeds and galleries */
.page-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(720px, 100%) minmax(0, 1fr);
  color: var(--color-charcoal);
}
.page-body > * { grid-column: 2; }
.page-body > * + * { margin-top: 1em; }
.page-body > iframe,
.page-body > video,
.page-body > p:has(> video),
.page-body > .gallery-grid,
.page-body > .wide,
.page-body > h2:has(+ .gallery-grid) { grid-column: 1 / -1; }
.page-body h2 {
  margin-top: var(--spacing-48);
  font-size: var(--text-heading);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}
.page-body > h2:first-child { margin-top: 0; }
.page-body h3 {
  margin-top: var(--spacing-32);
  font-family: var(--font-mdio);
  font-weight: 500;
  font-size: var(--text-caption);
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-ink);
}
.page-body h2 + *, .page-body h3 + * { margin-top: var(--spacing-16); }
.page-body strong { color: var(--color-ink); font-weight: 500; }
.page-body a { color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-mist); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.page-body a:hover { text-decoration-color: var(--color-ink); }
.page-body ul, .page-body ol { padding-left: 0; list-style: none; }
.page-body ul li, .page-body ol li { position: relative; padding-left: 20px; }
.page-body ul li + li, .page-body ol li + li { margin-top: 8px; }
.page-body ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.75em;
  width: 8px; height: 1px;
  background: var(--color-ink);
}
.page-body ol { counter-reset: item; }
.page-body ol li { counter-increment: item; padding-left: 28px; }
.page-body ol li::before {
  content: counter(item);
  position: absolute;
  left: 0; top: 0.1em;
  font-family: var(--font-mdio);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--color-ink);
}
.page-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--color-linen);
  box-shadow: var(--edge);
  color: var(--color-ink);
}
.page-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-cards);
  background: var(--color-paper);
  box-shadow: var(--shadow-sm), var(--edge);
}
.page-body > iframe,
.page-body video {
  width: 100%;
  margin-top: var(--spacing-32);
  border: 0;
  border-radius: var(--radius-cards);
  background: var(--color-paper);
  box-shadow: var(--shadow-sm), var(--edge);
}
.page-body video { background: var(--color-ink); }

/* Project / section listings */
.page-header-intro { max-width: 640px; margin: var(--spacing-24) auto 0; color: var(--color-charcoal); text-wrap: pretty; }
.page-header-intro a { color: var(--color-ink); text-underline-offset: 3px; }
.link-grid--wide { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }

/* Aviation gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}
.gallery-item {
  background: var(--color-paper);
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-sm), var(--edge);
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.gallery-item:hover { box-shadow: var(--shadow-md); }
.gallery-item a { display: block; }
.page-body .gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}
.page-body .gallery-item p {
  margin: 0;
  padding: 14px 16px 16px;
  font-size: var(--text-body-sm);
  line-height: 1.43;
  color: var(--color-charcoal);
}

/* ---------- 404 ---------- */
.not-found { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.not-found .hero { padding-bottom: var(--section-gap); }
.icon-inline { display: inline-block; width: 0.7em; height: 0.7em; vertical-align: 0.05em; stroke-width: 1.25; }
