/* ==========================================================================
   Lee Rogers — editorial design system
   Print-publication vocabulary: warm paper, hairline rules, one commanding
   Fraunces headline per page, numbered sections, a single flat ink band.
   Single stylesheet, no framework. Self-hosted variable fonts.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts (self-hosted latin variable WOFF2)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  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";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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";
  src: url("/assets/fonts/inter-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  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;
}
/* size-adjusted local fallbacks — near-zero CLS while the webfonts load */
@font-face {
  font-family: "Fraunces-fallback";
  src: local("Georgia");
  size-adjust: 100.9%; ascent-override: 97%; descent-override: 26%; line-gap-override: 0%;
}
@font-face {
  font-family: "Inter-fallback";
  src: local("Arial");
  size-adjust: 107.4%; ascent-override: 90.2%; descent-override: 22.5%; line-gap-override: 0%;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* light: warm paper + ink + one teal */
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-2: #F3EFE7;
  --ink-panel: #141D26;
  --heading: #141D26;
  --text: #333E48;
  --muted: #5F6B76;
  --accent: #0E7C86;          /* >=24px numerals & graphics only */
  --accent-strong: #0A5B63;   /* all small text links */
  --accent-soft: #E7F0EE;
  --line: #E4DFD3;
  --line-strong: #141D26;
  --on-dark: #F4F1EA;
  --on-dark-muted: rgba(244, 241, 234, 0.72);
  --band-accent: #4CC3B8;     /* accent used on ink panels */
  --band-accent-strong: #7AD6CC;
  --sheet-shadow: 0 18px 40px -18px rgba(20, 29, 38, 0.35);

  /* type */
  --font-display: "Fraunces", "Fraunces-fallback", Georgia, serif;
  --font-text: "Inter", "Inter-fallback", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* fluid scale */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --step-2: clamp(1.3rem, 1.19rem + 0.55vw, 1.55rem);
  --step-3: clamp(1.6rem, 1.38rem + 1.1vw, 2.1rem);
  --step-4: clamp(1.9rem, 1.5rem + 2vw, 2.75rem);
  --step-5: clamp(2.4rem, 1.7rem + 3.4vw, 3.75rem);
  --step-6: clamp(2.9rem, 1.7rem + 5.6vw, 5rem);

  /* layout */
  --shell: 1120px;
  --measure: 66ch;
  --radius: 4px;
  --rule: 1px solid var(--line);
  --rule-strong: 2px solid var(--line-strong);
  --section-pad: clamp(64px, 10vw, 112px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13181D;
    --surface: #1A2026;
    --surface-2: #20262C;
    --ink-panel: #0E1317;
    --heading: #F2EFE9;
    --text: #B9C0C6;
    --muted: #8B939B;
    --accent: #4CC3B8;
    --accent-strong: #7AD6CC;
    --accent-soft: rgba(76, 195, 184, 0.12);
    --line: #2A3138;
    --line-strong: #F2EFE9;
    --on-dark: #F2EFE9;
    --on-dark-muted: rgba(242, 239, 233, 0.7);
    --sheet-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  color: var(--heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.55em;
}

p { margin: 0 0 1.1em; text-wrap: pretty; }

img { max-width: 100%; height: auto; }

a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--heading); text-decoration-color: currentColor; }

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

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

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

.kicker, .eyebrow {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--muted);
  margin: 0 0 0.9em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink-panel);
  color: var(--on-dark);
  padding: 10px 18px;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

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

.btn-ghost {
  border-color: var(--line);
  color: var(--heading);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--heading); color: var(--heading); }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: var(--rule);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--heading);
  text-decoration: none;
}
.brand:hover { color: var(--heading); }
.brand-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-role {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}
@media (max-width: 719px) { .brand-role { display: none; } }

.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 8px 2px;
  margin-inline: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}
.site-nav a:hover { color: var(--heading); }
.site-nav a[aria-current="page"] {
  color: var(--heading);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.site-nav .btn-nav {
  margin-left: 16px;
  margin-right: 0;
  background: var(--heading);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 18px;
  border-radius: var(--radius);
}
.site-nav .btn-nav:hover,
.site-nav .btn-nav[aria-current="page"] { background: var(--accent-strong); color: #fff; box-shadow: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: var(--rule);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--heading);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: var(--rule);
    box-shadow: var(--sheet-shadow);
    padding: 0 24px 22px;
  }
  .nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav li { border-top: var(--rule); }
  .site-nav a { display: block; padding: 14px 2px; margin: 0; font-size: 1rem; }
  .site-nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
  .site-nav .btn-nav { margin: 14px 0 0; text-align: center; }
  .site-nav li:has(.btn-nav) { border-top: none; }

  .nav-open .nav-toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle-bar:last-child { transform: translateY(-4px) rotate(-45deg); }
}

/* --------------------------------------------------------------------------
   Home hero (paper, not panel)
   -------------------------------------------------------------------------- */
.hero-ed { padding: clamp(56px, 9vw, 104px) 0 0; }
.hero-ed .kicker {
  border-top: var(--rule-strong);
  padding-top: 16px;
  margin-bottom: 0;
}
.hero-ed h1 {
  font-size: var(--step-6);
  font-weight: 520;
  line-height: 1.04;
  letter-spacing: -0.028em;
  max-width: 15ch;
  margin: 0.35em 0 0.3em;
}
.hero-ed h1 em {
  font-style: italic;
  font-weight: 480;
  color: var(--accent-strong);
}
.hero-ed .lead {
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 54ch;
  margin-bottom: 2em;
}
.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  padding-bottom: 48px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-glyph { color: var(--muted); flex-shrink: 0; }
.hero-glyph .glyph-dot { color: var(--accent); }
@media (max-width: 860px) { .hero-glyph { display: none; } }

/* --------------------------------------------------------------------------
   Stats band (ruled, no chips)
   -------------------------------------------------------------------------- */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: var(--rule);
}
.stat { padding: 22px 24px 22px 0; }
.stat + .stat { border-left: var(--rule); padding-left: 24px; }
.stat .num {
  display: block;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.05;
  color: var(--heading);
  font-variant-numeric: lining-nums tabular-nums;
}
.stat .label {
  display: block;
  margin-top: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
@media (max-width: 720px) {
  .stats-band { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd) { border-left: none; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: var(--rule); }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding-block: var(--section-pad); }
.section-tight { padding-top: clamp(40px, 6vw, 64px); }

.section-rule {
  display: flex;
  align-items: baseline;
  gap: 14px;
  border-top: var(--rule);
  padding-top: 14px;
  margin-bottom: 40px;
}
.section-rule .idx {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
.section-rule .lbl {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--muted);
}

.section-head { max-width: 62ch; margin-bottom: 44px; }
.section-head h2 { font-size: var(--step-4); font-weight: 580; }
.section-head p { color: var(--text); font-size: var(--step-1); }

/* --------------------------------------------------------------------------
   Numbered trio (replaces icon cards)
   -------------------------------------------------------------------------- */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.trio > article {
  border-top: var(--rule);
  padding: 28px 32px 8px 0;
}
.trio > article + article { border-left: var(--rule); padding-left: 32px; }
.trio .n {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-text);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
.trio h3 { font-size: var(--step-2); }
.trio p { max-width: 40ch; }
.card-link {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--accent-strong);
  text-decoration: none;
}
.card-link::after { content: " →"; display: inline-block; transition: transform 0.18s ease; }
.card-link:hover { color: var(--heading); }
.trio > article:hover .card-link::after,
.card-link:hover::after { transform: translateX(3px); }
@media (max-width: 860px) {
  .trio { grid-template-columns: 1fr; }
  .trio > article + article { border-left: none; padding-left: 0; }
  .trio > article { padding-right: 0; }
}

/* --------------------------------------------------------------------------
   Ink band (the one dark moment)
   -------------------------------------------------------------------------- */
.band-ink {
  background: var(--ink-panel);
  color: var(--on-dark);
  padding: clamp(56px, 8vw, 88px) 0;
}
.band-ink .inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.band-ink .big-stat {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(4.5rem, 11vw, 8rem);
  line-height: 0.95;
  color: var(--band-accent);
  font-variant-numeric: lining-nums tabular-nums;
}
.band-ink h2 { color: var(--on-dark); font-size: var(--step-3); }
.band-ink p { color: var(--on-dark-muted); max-width: 58ch; }
.band-ink p:last-child { margin-bottom: 0; }
.band-ink a { color: var(--band-accent); }
.band-ink a:hover { color: var(--band-accent-strong); }
.band-ink :focus-visible { outline-color: var(--band-accent); }
@media (max-width: 720px) {
  .band-ink .inner { grid-template-columns: 1fr; gap: 18px; }
}

/* --------------------------------------------------------------------------
   Case list (home featured band + work index)
   -------------------------------------------------------------------------- */
.case-list {
  list-style: none;
  counter-reset: case;
  margin: 0 0 1.6em;
  padding: 0;
  border-bottom: var(--rule);
}
.case { counter-increment: case; border-top: var(--rule); }
.case > a {
  display: grid;
  grid-template-columns: 72px 1fr;
  column-gap: 28px;
  padding: 30px 0;
  color: inherit;
  text-decoration: none;
  transition: background 0.18s ease;
}
.case > a::before {
  content: counter(case, decimal-leading-zero);
  grid-row: 1 / span 4;
  font-family: var(--font-text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--accent-strong);
  font-variant-numeric: tabular-nums;
}
.case .where {
  grid-column: 2;
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}
.case h3 {
  grid-column: 2;
  font-size: var(--step-2);
  margin: 0 0 0.3em;
  transition: color 0.15s ease;
}
.case p { grid-column: 2; max-width: 62ch; margin-bottom: 0.4em; }
.case .case-metric {
  grid-column: 2;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.case .case-metric strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1em;
  color: var(--accent-strong);
}
.case > a:hover { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.case > a:hover h3 { color: var(--accent-strong); }
.stat-inline {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 520;
  color: var(--accent-strong);
}
.case-more { margin-top: 10px; }
@media (max-width: 720px) {
  .case > a { grid-template-columns: 1fr; row-gap: 2px; }
  .case > a::before { grid-row: auto; margin-bottom: 6px; }
  .case .where, .case h3, .case p, .case .case-metric { grid-column: 1; }
}

/* --------------------------------------------------------------------------
   Page hero (interior)
   -------------------------------------------------------------------------- */
.page-hero { padding: clamp(48px, 7vw, 80px) 0 0; }
.page-hero .shell {
  border-bottom: var(--rule);
  padding-bottom: 40px;
}
.page-hero .eyebrow {
  border-top: var(--rule-strong);
  padding-top: 16px;
  margin-bottom: 1.1em;
}
.page-hero h1 {
  font-size: var(--step-5);
  font-weight: 560;
  letter-spacing: -0.022em;
  line-height: 1.07;
  margin-bottom: 0.25em;
}
.page-subtitle {
  color: var(--muted);
  font-size: var(--step-1);
  margin: 0;
  max-width: 56ch;
}
.post-meta {
  margin: 18px 0 0;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.page-body {
  padding-top: 48px;
  padding-bottom: var(--section-pad);
}
.page-body .prose,
.prose { max-width: var(--measure); }

/* --------------------------------------------------------------------------
   Prose
   -------------------------------------------------------------------------- */
.prose h2 {
  font-size: var(--step-3);
  border-top: var(--rule);
  padding-top: 1.1em;
  margin-top: 2.8em;
}
.prose > h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.prose h3 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h4 {
  font-family: var(--font-text);
  font-size: var(--step-0);
  font-weight: 650;
  color: var(--heading);
  margin-top: 2.2em;
  margin-bottom: 0.7em;
}
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--accent-strong); }
.prose blockquote {
  margin: 2em 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--heading);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 480;
  font-size: var(--step-2);
  line-height: 1.45;
  color: var(--heading);
}
.prose blockquote p { margin-bottom: 0.5em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: none; border-top: var(--rule); margin: 2.5em 0; }
.prose code {
  font-size: 0.88em;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 0.12em 0.4em;
}
.prose pre {
  background: var(--surface-2);
  border: var(--rule);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
}
.prose pre code { background: none; padding: 0; }

/* --------------------------------------------------------------------------
   Case-study pages
   -------------------------------------------------------------------------- */
.cs-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  column-gap: 56px;
  padding-top: 48px;
  padding-bottom: var(--section-pad);
}
.cs-aside { align-self: start; }
@media (min-width: 981px) {
  .cs-aside { position: sticky; top: 88px; }
}

.cs-glance h2 {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--muted);
  margin: 0 0 2px;
}
.cs-glance dl { margin: 0; }
.cs-glance dl > div {
  border-top: var(--rule);
  padding: 12px 0;
  margin-top: 12px;
}
.cs-glance dt {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.cs-glance dd {
  margin: 3px 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--heading);
}

.cs-metrics { margin-top: 28px; border-top: var(--rule-strong); }
.cs-metric { border-bottom: var(--rule); padding: 14px 0; }
.cs-metric .num {
  display: block;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 520;
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--accent-strong);
  font-variant-numeric: lining-nums tabular-nums;
}
.cs-metric .label {
  display: block;
  margin-top: 3px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.45;
}

.cs-callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  border-block: var(--rule);
  padding: 26px 0;
  margin: 2.2em 0;
}
.cs-callout .big-stat {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}
.cs-callout h3 { margin: 0 0 0.25em; font-size: var(--step-1); }
.cs-callout p { margin: 0; color: var(--muted); max-width: 46ch; }
@media (max-width: 600px) { .cs-callout { grid-template-columns: 1fr; gap: 10px; } }

.cs-related {
  margin-top: 3em;
  border-top: var(--rule);
  padding-top: 1.2em;
}
.cs-related h2 {
  border: none; padding: 0; margin: 0 0 0.6em;
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--muted);
}
.cs-related ul { list-style: none; padding: 0; margin: 0; }
.cs-related li { margin-bottom: 0.4em; }

.cs-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-top: var(--rule-strong);
  padding-top: 28px;
  padding-bottom: var(--section-pad);
  flex-wrap: wrap;
}
.pager-link {
  display: block;
  max-width: 34ch;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: var(--step-1);
  color: var(--heading);
  text-decoration: none;
  line-height: 1.3;
}
.pager-link span {
  display: block;
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 4px;
}
.pager-link:hover { color: var(--accent-strong); }
.pager-next { text-align: right; margin-left: auto; }
.pager-prev + .btn-ghost { margin-inline: auto; }

@media (max-width: 980px) {
  .cs-layout { grid-template-columns: 1fr; }
  .cs-body { order: 1; }
  .cs-aside { order: 2; margin-top: 40px; }
  .cs-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
}

/* --------------------------------------------------------------------------
   Work index
   -------------------------------------------------------------------------- */
.work-section-label {
  margin-top: 3em;
  border-top: var(--rule);
  padding-top: 1.1em;
  font-size: var(--step-3);
}

/* --------------------------------------------------------------------------
   Insights list
   -------------------------------------------------------------------------- */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.6em;
  border-top: var(--rule);
}
.post-list li {
  border-bottom: var(--rule);
  padding: 24px 0;
  margin: 0;
}
.post-list a {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--heading);
  text-decoration: none;
  line-height: 1.25;
}
.post-list a:hover { color: var(--accent-strong); }
.post-blurb { margin: 6px 0 0; color: var(--text); max-width: 60ch; }
.post-list .post-date {
  display: block;
  margin-top: 8px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.post-related {
  max-width: var(--measure);
  padding-top: 8px;
}
.post-related h2 {
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  color: var(--muted);
  margin-bottom: 0.8em;
}
.post-related ul { list-style: none; padding: 0; margin: 0 0 2em; }
.post-related li { margin-bottom: 0.5em; }

/* --------------------------------------------------------------------------
   Experience: editorial CV ledger
   -------------------------------------------------------------------------- */
.timeline { border-top: var(--rule); margin: 1.6em 0 2.4em; padding: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  column-gap: 32px;
  border-bottom: var(--rule);
  padding: 26px 0;
}
.timeline-item > * { grid-column: 2; }
.timeline-item .period {
  grid-column: 1;
  grid-row: 1 / span 4;
  padding: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline-item h3 { font-size: var(--step-2); margin-bottom: 0.1em; }
.timeline-item .org { display: block; color: var(--heading); font-weight: 600; margin-bottom: 0.5em; }
.timeline-item ul { margin: 0.4em 0 0; }
@media (max-width: 720px) {
  .timeline-item { grid-template-columns: 1fr; }
  .timeline-item .period { grid-row: auto; grid-column: 1; order: -1; margin-bottom: 8px; }
  .timeline-item > * { grid-column: 1; }
}

/* education */
.edu-grid { margin: 1.4em 0 2em; border-top: var(--rule); }
.edu-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  border-bottom: var(--rule);
  padding: 16px 0;
}
.edu-card .degree { font-weight: 600; color: var(--heading); }
.edu-card .school { color: var(--muted); font-size: 0.9375rem; text-align: right; }
@media (max-width: 600px) {
  .edu-card { grid-template-columns: 1fr; gap: 2px; }
  .edu-card .school { text-align: left; }
}

/* skills: typeset runs, not pills */
.skill-badges {
  display: block;
  list-style: none;
  margin: 0 0 1.6em;
  padding: 0;
  max-width: var(--measure);
}
.skill-badges li {
  display: inline;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}
.skill-badges li:not(:last-child)::after {
  content: "  ·  ";
  color: var(--muted);
  opacity: 0.6;
  white-space: pre;
}

/* --------------------------------------------------------------------------
   Page CTA (ruled invitation)
   -------------------------------------------------------------------------- */
.page-cta {
  margin-top: 4em;
  border-top: var(--rule-strong);
  border-bottom: var(--rule);
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.page-cta h2 {
  font-size: var(--step-2);
  font-style: italic;
  font-weight: 520;
  margin: 0;
  border: none;
  padding: 0;
}
.page-cta p { margin: 0; max-width: 44ch; color: var(--text); }
.page-cta .cta-alt {
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   About portrait (renders a placeholder until assets/img/portrait.jpg exists)
   -------------------------------------------------------------------------- */
.about-portrait {
  float: right;
  width: min(220px, 38vw);
  aspect-ratio: 4 / 5;
  margin: 6px 0 20px 28px;
  border: var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about-portrait.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-portrait.is-placeholder img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  opacity: 0.85;
}
@media (max-width: 560px) {
  .about-portrait { float: none; margin: 0 0 24px; width: min(220px, 60vw); }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-panel);
  color: var(--on-dark-muted);
  border-top: var(--rule-strong);
  padding: 56px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--on-dark);
  margin: 0 0 6px;
}
.footer-tag { font-size: 0.9375rem; margin: 0; color: var(--on-dark-muted); max-width: 34ch; }

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav a, .footer-contact a {
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
  text-decoration: none;
}
.footer-nav a:hover, .footer-contact a:hover { color: var(--band-accent-strong); }
.footer-contact p { font-size: 0.9375rem; margin: 8px 0 0; color: var(--on-dark-muted); }
.site-footer :focus-visible { outline-color: var(--band-accent); }

.footer-legal {
  border-top: 1px solid rgba(244, 241, 234, 0.16);
  padding-top: 22px;
}
.colophon {
  font-size: 0.8125rem;
  margin: 0;
  color: rgba(244, 241, 234, 0.55);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.error-page {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 15vh 24px 18vh;
}
.error-code {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-size: clamp(6rem, 20vw, 12rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.1em;
}
@supports not (-webkit-text-stroke: 1px black) {
  .error-code { color: var(--accent); }
}
.error-page h1 { font-size: var(--step-3); }
.error-page p { color: var(--muted); max-width: 46ch; margin-bottom: 1.6em; }

/* --------------------------------------------------------------------------
   Motion: scroll reveals (gated on .js). If site.js never runs, the fallback
   animation un-hides everything after 1.6s so content can't be stranded;
   site.js sets .js-ready to cancel it.
   -------------------------------------------------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js:not(.js-ready) [data-reveal] { animation: reveal-fallback 0.4s ease 1.6s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 0.7, 0.3, 1);
  transition-delay: calc(var(--ri, 0) * 70ms);
}
/* pure-CSS stagger indices */
.trio > article:nth-child(2) { --ri: 1; }
.trio > article:nth-child(3) { --ri: 2; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
