:root {
  --bg: #ffffff;
  --fg: #16181d;
  --muted: #5c6370;
  --line: #e3e6ea;
  --accent: #7a1330;
  --accent-soft: #fdf2f5;
  --code-bg: #f5f6f8;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --fg: #e8eaed;
    --muted: #9aa2af;
    --line: #2a2e36;
    --accent: #f2879f;
    --accent-soft: #23181d;
    --code-bg: #1c1f25;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
        "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------------------------------------------------------------- header */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  z-index: 10;
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding-top: 14px; padding-bottom: 14px;
}
header.site a.home {
  font-weight: 650; letter-spacing: -0.01em; color: var(--fg);
  text-decoration: none; font-size: 16px;
}
header.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
header.site nav a {
  color: var(--muted); text-decoration: none; font-size: 15px;
}
header.site nav a:hover, header.site nav a[aria-current] { color: var(--accent); }

/* ------------------------------------------------------------------ hero */
.hero { padding: 56px 0 8px; }
.hero-top { display: flex; gap: 26px; align-items: flex-start; }
.hero img.avatar {
  width: 104px; height: 104px; border-radius: 50%;
  object-fit: cover; flex: none; border: 1px solid var(--line);
}
.hero h1 {
  font-size: 30px; line-height: 1.2; margin: 0 0 6px;
  letter-spacing: -0.02em; font-weight: 680;
}
.hero .role { color: var(--muted); margin: 0 0 14px; font-size: 16px; }
.lede { font-size: 19px; line-height: 1.6; margin: 22px 0 0; }
.lede strong { font-weight: 640; }

.links { display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0 0; font-size: 15px; }
.links a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }
.links a:hover { border-bottom-color: currentColor; }

/* ----------------------------------------------------------------- cards */
h2.section {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--muted); font-weight: 620; margin: 52px 0 4px;
}
.card {
  display: block; text-decoration: none; color: inherit;
  border-top: 1px solid var(--line); padding: 22px 0;
}
.card:last-of-type { border-bottom: 1px solid var(--line); }
.card h3 {
  margin: 0 0 6px; font-size: 19px; font-weight: 640;
  letter-spacing: -0.01em; color: var(--fg);
}
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card:hover h3 { color: var(--accent); }
.card .more { color: var(--accent); font-size: 15px; }

/* ------------------------------------------------------------------ prose */
main { padding-bottom: 72px; }
article h1 {
  font-size: 28px; line-height: 1.25; letter-spacing: -0.02em;
  margin: 48px 0 10px; font-weight: 680;
}
article .standfirst { font-size: 19px; color: var(--muted); margin: 0 0 34px; }
article h2 {
  font-size: 20px; margin: 40px 0 10px; letter-spacing: -0.01em; font-weight: 650;
}
article p { margin: 0 0 16px; }
article ul { margin: 0 0 16px; padding-left: 22px; }
article li { margin: 0 0 8px; }
a { color: var(--accent); }
code {
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--code-bg); padding: 1px 5px; border-radius: 4px;
}

figure { margin: 28px 0; }
figure img, figure video { width: 100%; border: 1px solid var(--line); border-radius: 6px; display: block; }
figcaption { color: var(--muted); font-size: 14.5px; margin-top: 9px; }

.callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 14px 18px; margin: 26px 0; border-radius: 0 6px 6px 0;
}
.callout p { margin: 0; }

table { border-collapse: collapse; width: 100%; margin: 24px 0; font-size: 15.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 620; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ----------------------------------------------------------------- footer */
footer.site {
  border-top: 1px solid var(--line); padding: 26px 0 44px;
  color: var(--muted); font-size: 14.5px;
}
footer.site a { color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding-top: 36px; }
  .hero-top { gap: 18px; }
  .hero img.avatar { width: 76px; height: 76px; }
  .hero h1 { font-size: 25px; }
  .lede { font-size: 17.5px; }
  article h1 { font-size: 24px; }
}
