/* mattfouts.com
   Hand-written. Colours are tokens on :root, redefined for dark mode.
   Palette: tournament-board green and buff, ink, and a brass accent. */

@font-face {
  font-family: "MF Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2027, U+2030-203A, U+20AC, U+2122;
}
@font-face {
  font-family: "MF Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2027, U+2030-203A, U+20AC, U+2122;
}
@font-face {
  font-family: "MF Chess";
  src: url("/assets/fonts/chess.woff2") format("woff2");
  font-display: block;
  unicode-range: U+2654-265F;
}

:root {
  --bg: #f5f1e6;
  --bg-alt: #ede7d8;
  --surface: #fffcf4;
  --ink: #15201b;
  --ink-soft: #2c3832;
  --muted: #56615b;
  --line: #dcd4c2;
  --line-strong: #c3b9a3;
  --accent: #1d5a42;
  --accent-hover: #164a36;
  --accent-ink: #ffffff;
  --accent-soft: #dde9e0;
  --brass: #7a5c2a;
  --band: #173f31;
  --band-ink: #f2eee2;
  --band-muted: #b9cbbf;
  --band-accent: #e3c68f;
  --sq-light: #ece4cc;
  --sq-dark: #6f9074;
  --sq-last: rgba(222, 170, 52, 0.42);
  --piece-white: #fbf8ee;
  --piece-black: #1a1c1b;
  --shadow: 0 1px 2px rgba(21, 32, 27, 0.06), 0 8px 28px rgba(21, 32, 27, 0.08);
  --radius: 14px;
  --serif: "MF Newsreader", Georgia, "Times New Roman", serif;
  --sans: "MF Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --chess: "MF Chess", "Segoe UI Symbol", "DejaVu Sans", "Noto Sans Symbols 2", serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1612;
    --bg-alt: #131c17;
    --surface: #17211c;
    --ink: #ece7da;
    --ink-soft: #d3d0c4;
    --muted: #a3ada6;
    --line: #26332c;
    --line-strong: #3a4a41;
    --accent: #86c9a6;
    --accent-hover: #a3dcbd;
    --accent-ink: #0c1410;
    --accent-soft: #1b3228;
    --brass: #d8b77c;
    --band: #0b2a20;
    --band-ink: #eee9dc;
    --band-muted: #a9bfb2;
    --band-accent: #e3c68f;
    --sq-light: #cfc6ab;
    --sq-dark: #587a5e;
    --sq-last: rgba(222, 170, 52, 0.5);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[id] { scroll-margin-top: 84px; }

.wrap { width: 100%; max-width: 1160px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 28px; } }
.narrow { max-width: 820px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.icon-inline { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; margin-left: 0.3em; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 44px; padding: 0.62rem 1.05rem;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink);
  font: 600 0.95rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  overflow-wrap: anywhere;
}
.btn:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-small { min-height: 38px; padding: 0.45rem 0.8rem; font-size: 0.9rem; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.no-js .js-only { display: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--ink); }
.mono {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 0.95rem/1 var(--serif); letter-spacing: 0.02em;
}
.brand-name { font: 600 1.12rem/1 var(--serif); letter-spacing: -0.01em; }
.nav { display: none; }
.nav ul { display: flex; gap: 4px; }
.nav a {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink-soft); font-size: 0.94rem; font-weight: 500; text-decoration: none;
}
.nav a:hover { background: var(--bg-alt); color: var(--ink); }
@media (min-width: 860px) { .nav { display: block; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(36px, 6vw, 72px); }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); } }
.eyebrow, .kicker {
  color: var(--accent); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.hero h1 {
  margin-top: 14px;
  font: 600 clamp(2.9rem, 8.2vw, 5.4rem)/0.98 var(--serif);
  letter-spacing: -0.028em;
}
.lede {
  margin-top: 22px; max-width: 36ch;
  font-size: clamp(1.18rem, 2.1vw, 1.42rem); line-height: 1.5; color: var(--ink-soft);
}
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 26px;
  padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--ink); font-size: 0.95rem; font-weight: 600;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #2f9d68; box-shadow: 0 0 0 4px rgba(47, 157, 104, 0.2); }
.roles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.roles li {
  padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--ink-soft); font-size: 0.86rem; font-weight: 500;
}
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.hero-board { display: none; }
@media (min-width: 1000px) {
  .hero-board { display: block; justify-self: end; width: 100%; max-width: 440px; }
}
.hero-board figcaption { margin-top: 14px; color: var(--muted); font-size: 0.93rem; }
.hero-board figcaption a { white-space: nowrap; }

/* ---------- board ---------- */
.board {
  container-type: inline-size;
  display: grid;
  /* minmax(0, 1fr) on both axes: an empty rank must be as tall as a full one. */
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  width: 100%; aspect-ratio: 1 / 1;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--line), var(--shadow);
  user-select: none; -webkit-user-select: none;
}
.sq { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; }
.sq-l { background: var(--sq-light); }
.sq-d { background: var(--sq-dark); }
.sq-last::before { content: ""; position: absolute; inset: 0; background: var(--sq-last); }
.sq-check::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(214, 48, 38, 0.85) 0%, rgba(214, 48, 38, 0.45) 45%, rgba(214, 48, 38, 0) 75%);
}
.co {
  position: absolute; z-index: 2;
  font: 700 10px/1 var(--sans);
  font-size: clamp(8px, 2.3cqi, 12px);
  pointer-events: none;
}
.co-r { top: 4%; left: 5%; }
.co-f { right: 6%; bottom: 3%; }
.sq-l .co { color: #4d6b52; }
.sq-d .co { color: #f4eedc; }
.pc {
  position: relative; z-index: 1; display: grid;
  font-family: var(--chess); font-weight: 400; line-height: 1;
  font-size: 34px; font-size: calc(100cqi / 8 * 0.84);
  font-variant-emoji: text;
}
.pc-fill, .pc-line { grid-area: 1 / 1; }
.pc-w .pc-fill { color: var(--piece-white); }
.pc-w .pc-line { color: var(--piece-black); }
.pc-b .pc-fill { color: var(--piece-black); }
.pc-w { filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.18)); }
.pc-b { filter: drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.35)); }

/* ---------- at a glance ---------- */
.stats { padding-bottom: clamp(40px, 6vw, 72px); }
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 24px 22px 26px 0; }
@media (min-width: 900px) {
  .stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
}
.stat dt { display: flex; align-items: baseline; gap: 8px; }
.stat-value { font: 600 clamp(2.3rem, 4.4vw, 3.1rem)/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: lining-nums; }
.stat-unit { color: var(--brass); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.stat dd { margin-top: 10px; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 9vw, 112px); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: clamp(30px, 4vw, 48px); }
.section-head h2, .contact-card h2, .notfound h1 {
  margin-top: 12px;
  font: 600 clamp(1.95rem, 4vw, 2.9rem)/1.1 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-head .intro { margin-top: 16px; color: var(--ink-soft); font-size: 1.12rem; max-width: 64ch; }

/* leadership */
.pillars { display: grid; gap: 16px; }
@media (min-width: 760px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
.pillar {
  padding: 26px 26px 28px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
}
.pillar-num { color: var(--brass); font: 600 0.9rem/1 var(--serif); letter-spacing: 0.06em; }
.pillar h3 { margin-top: 14px; font: 650 1.18rem/1.3 var(--sans); letter-spacing: -0.01em; }
.pillar p:last-child { margin-top: 10px; color: var(--ink-soft); }

/* work */
.role-list { display: grid; gap: 18px; }
.role {
  display: grid; gap: 18px; padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
@media (min-width: 900px) { .role { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 36px; padding: 34px; } }
.role-meta h3 { font: 600 1.55rem/1.15 var(--serif); letter-spacing: -0.015em; }
.role-title { margin-top: 8px; font-weight: 650; }
.role-dates { margin-top: 2px; color: var(--muted); font-variant-numeric: tabular-nums; }
.role-team { margin-top: 12px; color: var(--brass); font-size: 0.86rem; font-weight: 600; }
.role-points { display: grid; gap: 12px; }
.role-points li { position: relative; padding-left: 22px; color: var(--ink-soft); }
.role-points li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg);
}
.earlier-head { margin: clamp(36px, 5vw, 56px) 0 16px; font: 600 1.35rem/1.2 var(--serif); }
.earlier { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) {
  .earlier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .early:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.early { padding: 20px 22px; background: var(--surface); }
.early-head { display: flex; flex-wrap: wrap; column-gap: 8px; }
.early-title { font-weight: 650; }
.early-org::before { content: "· "; color: var(--muted); }
.early-org { color: var(--ink-soft); }
.early-dates { color: var(--muted); font-size: 0.88rem; }
.early-body { margin-top: 6px; color: var(--ink-soft); font-size: 0.96rem; }

/* references */
.quotes { display: grid; gap: 18px; }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quote {
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  padding: 28px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.quote blockquote p { font: 500 1.34rem/1.38 var(--serif); letter-spacing: -0.01em; text-wrap: pretty; }
.quote figcaption { display: grid; gap: 2px; padding-top: 16px; border-top: 1px solid var(--line); }
.q-name { font-weight: 650; }
.q-role { color: var(--ink-soft); font-size: 0.92rem; }
.q-date { color: var(--muted); font-size: 0.84rem; }
.more { margin-top: 22px; }

/* point of view band */
.section-band { background: var(--band); color: var(--band-ink); }
.section-band .kicker { color: var(--band-accent); }
.pull p {
  margin-top: 16px;
  font: 600 clamp(1.9rem, 4.6vw, 3.1rem)/1.12 var(--serif); letter-spacing: -0.02em; text-wrap: balance;
}
.band-body { display: grid; gap: 14px; margin-top: 26px; color: var(--band-muted); font-size: 1.1rem; }
.section-band a { color: var(--band-accent); display: inline-block; margin-top: 22px; }
.section-band a:hover { color: var(--band-ink); }
.section-band :focus-visible { outline-color: var(--band-accent); }

/* chess */
.chess-grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: start; }
@media (min-width: 1000px) { .chess-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.replay {
  padding: clamp(18px, 3vw, 28px); border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.replay-head h3 { font: 600 1.6rem/1.15 var(--serif); letter-spacing: -0.015em; }
.result {
  display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; vertical-align: 0.2em;
  background: var(--accent); color: var(--accent-ink); font: 700 0.78rem/1.5 var(--sans);
}
.replay-head p { color: var(--muted); font-size: 0.93rem; }
.replay-head p:first-of-type { margin-top: 6px; }
.replay-board { margin: 22px auto 0; max-width: 520px; border-radius: 8px; padding: 7px; }
.replay-board:focus-visible { outline-offset: 2px; }
.replay-controls { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }
.no-js .replay-controls, .no-js .replay-status { display: none; }
.ctl {
  display: inline-grid; place-items: center; width: 46px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--surface); color: var(--ink); cursor: pointer;
}
.ctl:hover { border-color: var(--ink-soft); }
.ctl[data-act="play"] { width: 58px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ctl[data-act="play"]:hover { background: var(--accent-hover); }
.ctl:disabled { opacity: 0.4; cursor: default; }
.ctl .icon { width: 20px; height: 20px; }
.ctl[data-act="play"] .icon, .ctl[data-act="first"] .icon, .ctl[data-act="last"] .icon { fill: currentColor; }
.replay-status { min-height: 1.6em; margin-top: 12px; text-align: center; color: var(--ink-soft); font-size: 0.93rem; }
.moves {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 2px 10px; margin-top: 16px; padding: 12px;
  max-height: 188px; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  font-variant-numeric: tabular-nums;
}
.moves li { display: grid; grid-template-columns: 2.1em 1fr 1fr; align-items: center; }
.mn { color: var(--muted); font-size: 0.84rem; }
.mv {
  justify-self: start; padding: 2px 6px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: 500 0.93rem/1.5 var(--sans); cursor: pointer;
}
.mv:hover { background: var(--bg-alt); }
.mv.on { background: var(--accent); color: var(--accent-ink); }
.mv-end { font-weight: 700; color: var(--accent); cursor: default; }
.no-js .mv { cursor: default; }
.fig { font-family: var(--chess); font-size: 1.2em; line-height: 1; margin-right: 1px; vertical-align: -0.06em; }
.replay-note { margin-top: 14px; color: var(--muted); font-size: 0.88rem; }

.rec-list { display: grid; gap: 0; }
.rec { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.rec:first-child { border-top: 0; padding-top: 4px; }
.rec-year { font: 600 1.3rem/1.2 var(--serif); color: var(--brass); font-variant-numeric: lining-nums; }
.rec-body h4 { font: 650 1.08rem/1.35 var(--sans); }
.rec-body p { margin-top: 6px; color: var(--ink-soft); }
.rec-body .src { font-size: 0.85rem; color: var(--muted); }
.ratings {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 12px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.rating { padding: 16px 14px; background: var(--surface); }
.rating dt { color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.rating dd { margin-top: 6px; display: grid; }
.rating dd a { font: 600 1.35rem/1.15 var(--serif); color: var(--ink); text-decoration: none; }
.rating dd a:hover { color: var(--accent); text-decoration: underline; }
.rating dd span { color: var(--muted); font-size: 0.82rem; }
@media (max-width: 480px) {
  .ratings { grid-template-columns: 1fr; }
  .rating dd { grid-template-columns: auto 1fr; align-items: baseline; gap: 8px; }
}
.footnote { margin-top: 14px; color: var(--muted); font-size: 0.93rem; }

/* credentials */
.cred-grid { display: grid; gap: clamp(28px, 5vw, 56px); }
@media (min-width: 900px) { .cred-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.degrees { display: grid; gap: 16px; align-content: start; }
.degree { padding: 24px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.degree h3 { font: 600 1.35rem/1.2 var(--serif); letter-spacing: -0.01em; }
.degree-school { margin-top: 4px; color: var(--brass); font-size: 0.9rem; font-weight: 600; }
.degree p:last-child { margin-top: 10px; color: var(--ink-soft); }
.mini-head { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.mini-head:not(:first-child) { margin-top: 30px; }
.certs { display: grid; gap: 10px; margin-top: 12px; }
.certs li { display: grid; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.cert-title { font-weight: 650; }
.cert-meta { color: var(--muted); font-size: 0.9rem; }
.ok { color: var(--accent); font-weight: 650; }
.verify { margin-top: 10px; font-size: 0.93rem; }
.tool-group { margin-top: 14px; }
.tool-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.chips li {
  padding: 5px 11px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink-soft); font-size: 0.88rem;
}

/* contact */
.contact-card {
  position: relative; overflow: hidden;
  padding: clamp(28px, 5vw, 56px); border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.contact-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; opacity: 0.12;
  background:
    repeating-conic-gradient(var(--sq-dark) 0 25%, transparent 0 50%) 0 0 / 55px 55px;
  border-radius: 24px; transform: rotate(12deg); pointer-events: none;
}
.contact-card h2 { max-width: 22ch; }
.contact-body { margin-top: 14px; max-width: 56ch; color: var(--ink-soft); font-size: 1.12rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.contact-note { margin-top: 18px; color: var(--muted); font-size: 0.93rem; }

/* footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 28px 36px; color: var(--muted); font-size: 0.92rem; }
.foot-inner { display: grid; gap: 10px; }
@media (min-width: 760px) { .foot-inner { grid-template-columns: 1fr auto; align-items: center; } .foot-meta { grid-column: 1 / -1; } }
.foot-name { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.foot-name .mono { width: 28px; height: 28px; font-size: 0.8rem; border-radius: 7px; }
.foot-links { display: flex; gap: 18px; }
.foot-links a { color: var(--ink-soft); }
.foot-meta { font-size: 0.84rem; }

/* 404 */
.notfound { padding-block: clamp(64px, 12vw, 140px); }
.notfound > p:not(.kicker):not(.cta) { margin-top: 14px; max-width: 52ch; color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- resume page ---------- */
.resume-tools { border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.resume-tools-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding-block: 10px; }
.resume-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back { display: inline-flex; align-items: center; }
.back .icon-inline { margin: 0 0.35em 0 0; }
.resume {
  max-width: 860px; margin: clamp(20px, 4vw, 44px) auto clamp(40px, 6vw, 72px);
  padding: clamp(24px, 5vw, 56px); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 0.98rem; line-height: 1.5;
}
@media (max-width: 900px) { .resume { margin-inline: 16px; } }
.r-head { padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.r-head h1 { font: 600 clamp(2rem, 5vw, 2.6rem)/1.05 var(--serif); letter-spacing: -0.02em; }
.r-tagline { margin-top: 4px; color: var(--accent); font-weight: 600; }
.r-contact { margin-top: 8px; color: var(--ink-soft); font-size: 0.94em; }
.r-contact a, .r-contact > span:not([aria-hidden]) { color: inherit; white-space: nowrap; }
.r-section { margin-top: 20px; }
.r-section h2 {
  padding-bottom: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--line-strong);
  font: 700 0.8rem/1.3 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.r-job + .r-job { margin-top: 14px; }
.r-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 16px; }
.r-line h3 { font: 700 1.04em/1.35 var(--sans); }
.r-loc, .r-dates { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.r-role { font-weight: 600; color: var(--ink-soft); }
.r-team { color: var(--muted); font-size: 0.94em; }
.resume ul { margin-top: 6px; display: grid; gap: 4px; }
.resume ul li { position: relative; padding-left: 16px; }
.resume ul li::before { content: ""; position: absolute; left: 3px; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); }
.r-section > .r-line + .r-line { margin-top: 4px; }

@media print {
  @page { size: letter; margin: 0.5in 0.55in; }
  :root {
    --bg: #fff; --bg-alt: #fff; --surface: #fff; --ink: #111; --ink-soft: #222; --muted: #444;
    --line: #bbb; --line-strong: #888; --accent: #1d5a42; color-scheme: light;
  }
  html, body { background: #fff; }
  body { font-size: 10pt; }
  .topbar, .skip, .resume-tools, .site-foot, .replay-controls { display: none !important; }
  .resume { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; border-radius: 0; font-size: 9.6pt; line-height: 1.38; }
  .r-head h1 { font-size: 22pt; }
  .r-section { margin-top: 10pt; break-inside: auto; }
  .r-job { break-inside: avoid; }
  .r-section h2 { break-after: avoid; }
  .resume a { text-decoration: none; }
}
