/* Layout: a single 1080px column on a quiet chart-paper ground; the hero carries a faint graticule,
   everything else is type, rules and a few considered cards. */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eaeef4;
  --fg: #121a2b;
  --muted: #5b6579;
  --line: #d8dee8;
  --accent: #0b7a8a;
  --accent-ink: #075f6c;
  --accent-soft: rgba(11, 122, 138, 0.10);
  --amber: #b97c08;
  --grid: rgba(18, 26, 43, 0.07);
  --fig-1: #0f8fa6;
  --fig-2: #c47a0a;
  --fig-3: #6250d6;
  --fig-1-soft: rgba(15, 143, 166, 0.14);
  --fig-2-soft: rgba(196, 122, 10, 0.16);
  --fig-3-soft: rgba(98, 80, 214, 0.14);
  --shadow: 0 1px 2px rgba(18, 26, 43, 0.06), 0 8px 24px rgba(18, 26, 43, 0.06);
  --font-sans: "IBM Plex Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius: 10px;
  --max: 1080px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120;
    --surface: #111a2c;
    --surface-2: #182339;
    --fg: #e7ecf4;
    --muted: #9aa6ba;
    --line: #233149;
    --accent: #35c3d4;
    --accent-ink: #86dde8;
    --accent-soft: rgba(53, 195, 212, 0.12);
    --amber: #f0b641;
    --grid: rgba(231, 236, 244, 0.06);
    --fig-1: #1f9fb0;
    --fig-2: #b8842a;
    --fig-3: #8a7fe6;
    --fig-1-soft: rgba(31, 159, 176, 0.22);
    --fig-2-soft: rgba(184, 132, 42, 0.24);
    --fig-3-soft: rgba(138, 127, 230, 0.24);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120;
  --surface: #111a2c;
  --surface-2: #182339;
  --fg: #e7ecf4;
  --muted: #9aa6ba;
  --line: #233149;
  --accent: #35c3d4;
  --accent-ink: #86dde8;
  --accent-soft: rgba(53, 195, 212, 0.12);
  --amber: #f0b641;
  --grid: rgba(231, 236, 244, 0.06);
  --fig-1: #1f9fb0;
  --fig-2: #b8842a;
  --fig-3: #8a7fe6;
  --fig-1-soft: rgba(31, 159, 176, 0.22);
  --fig-2-soft: rgba(184, 132, 42, 0.24);
  --fig-3-soft: rgba(138, 127, 230, 0.24);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
p + p { margin-top: 0.9em; }
.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.02em; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--accent); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--fg); color: var(--bg);
  display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav-links a:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--fg); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px;
  color: var(--muted); background: transparent; border: 0; cursor: pointer; font: inherit;
}
.icon-btn:hover { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.menu-btn { display: none; }
@media (max-width: 760px) {
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 62px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 10px; font-size: 1.05rem; }
  .menu-btn { display: inline-grid; }
  .nav-actions .hide-sm { display: none; }
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 70% at 70% 40%, transparent 30%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; padding-block: 64px 40px; }
.hero h1 { margin-top: 14px; }
.hero .lede { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.4; margin-top: 18px; max-width: 30ch; font-weight: 500; letter-spacing: -0.01em; }
.hero .body { margin-top: 20px; max-width: 58ch; color: var(--muted); }
.hero .body strong { color: var(--fg); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 8px;
  font-weight: 500; font-size: 0.95rem; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
  cursor: pointer; font-family: inherit;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.primary:hover { opacity: 0.9; }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.portrait { position: relative; justify-self: end; width: min(100%, 360px); }
.portrait img { border-radius: 14px; aspect-ratio: 3 / 4; object-fit: cover; box-shadow: var(--shadow); max-width: 100%; }
.portrait figcaption {
  position: absolute; left: 14px; bottom: 14px; padding: 6px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--fg);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
}
.facts { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid var(--line); margin-top: 0; }
.facts .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.fact { padding: 18px 0; border-left: 1px solid var(--line); padding-left: 20px; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact b { display: block; font-size: 1.55rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.fact span { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 48px; }
  .portrait { justify-self: start; width: min(100%, 300px); }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); row-gap: 0; }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact { border-top: 1px solid var(--line); }
  .fact:nth-child(-n+2) { border-top: 0; }
}

/* Sections */
.section { padding-block: 64px; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-head h2 { margin-top: 10px; }
.section-head .more { white-space: nowrap; font-size: 0.95rem; }
.section-head p { color: var(--muted); max-width: 62ch; margin-top: 10px; }
@media (max-width: 640px) { .section-head { flex-direction: column; align-items: flex-start; gap: 8px; } .section { padding-block: 48px; } }

/* Now */
.now-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.now {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.now .label { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.now .label i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.now .label i.amber { background: var(--amber); }
.now h3 { font-size: 1.08rem; }
.now p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .now-grid { grid-template-columns: 1fr; } }

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--muted); }
.card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card h3 a { color: var(--fg); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card .stars { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; white-space: nowrap; }
.card .stars svg { width: 13px; height: 13px; fill: currentColor; }
.card .stars[hidden] { display: none; }
.card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.card .cat { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { font-family: var(--font-mono); font-size: 0.72rem; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.card .links { display: flex; flex-wrap: wrap; gap: 12px; position: relative; z-index: 1; font-size: 0.86rem; }
.card .links a { font-weight: 500; }
.card .links a::before { content: "↗ "; opacity: 0.6; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filters button {
  font: inherit; font-size: 0.88rem; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.filters button:hover { color: var(--fg); border-color: var(--muted); }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Publications */
.pub-year { display: grid; grid-template-columns: 90px 1fr; gap: 24px; padding-block: 28px; border-top: 1px solid var(--line); }
.pub-year:first-of-type { border-top: 0; padding-top: 0; }
.pub-year > .year { font-family: var(--font-mono); font-size: 1.1rem; color: var(--muted); padding-top: 4px; }
.pub-list { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pub { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pub .venue { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-block; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-ink);
}
.chip.plain { background: var(--surface-2); color: var(--muted); }
.pub h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.35; }
.pub .authors { color: var(--muted); font-size: 0.93rem; }
.pub .authors b { color: var(--fg); font-weight: 600; }
.pub .summary { color: var(--muted); font-size: 0.95rem; max-width: 70ch; }
.pub .links { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.86rem; margin-top: 2px; }
.pub .links a, .pub .links summary { font-weight: 500; color: var(--accent-ink); cursor: pointer; }
.pub .links a::before { content: "↗ "; opacity: 0.6; }
.pub details { display: contents; }
.pub details summary { list-style: none; }
.pub details summary::-webkit-details-marker { display: none; }
.pub details summary::before { content: "\2193 "; opacity: 0.6; }
.pub details[open] summary::before { content: "\2191 "; opacity: 0.6; }
.pub pre {
  flex-basis: 100%; width: 100%; margin: 6px 0 0; padding: 14px 16px; border-radius: 8px; overflow-x: auto;
  background: var(--surface-2); font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.5; color: var(--fg);
}
.metrics { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 18px; font-family: var(--font-mono); font-size: 0.86rem; color: var(--muted); }
.metrics b { color: var(--fg); font-weight: 600; font-size: 1.05rem; }
.coauthors { display: flex; flex-wrap: wrap; gap: 8px; }
.coauthors li { list-style: none; }
.coauthors ul { display: contents; }
@media (max-width: 640px) { .pub-year { grid-template-columns: 1fr; gap: 10px; } }

/* Timeline (about) */
.timeline { display: flex; flex-direction: column; }
.entry { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding-block: 26px; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; padding-top: 0; }
.entry .when { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); padding-top: 5px; line-height: 1.5; }
.entry .when b { display: block; color: var(--fg); font-weight: 500; }
.entry h3 { font-size: 1.12rem; }
.entry .org { color: var(--muted); margin-top: 2px; font-size: 0.95rem; }
.entry ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.95rem; }
.entry li + li { margin-top: 4px; }
.entry .tags { margin-top: 12px; }
@media (max-width: 640px) { .entry { grid-template-columns: 1fr; gap: 6px; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
.story .text { max-width: 62ch; }
.story .text p { color: var(--muted); }
.story .text p strong { color: var(--fg); font-weight: 600; }
.story img { border-radius: 14px; box-shadow: var(--shadow); }
@media (max-width: 860px) { .story { grid-template-columns: 1fr; } .story img { max-width: 520px; } }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 40px; }
.skill-group h3 { font-size: 0.78rem; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.skill-group .tags li { font-size: 0.8rem; background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
@media (max-width: 700px) { .skills { grid-template-columns: 1fr; } }
.awards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.awards li { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.awards b { display: block; font-weight: 600; }
.awards span { color: var(--muted); font-size: 0.92rem; }
.awards .when { font-family: var(--font-mono); font-size: 0.74rem; color: var(--accent-ink); display: block; margin-bottom: 4px; letter-spacing: 0.04em; }
@media (max-width: 640px) { .awards { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; }
table.projects { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.projects th, table.projects td { text-align: left; padding: 12px 14px 12px 0; vertical-align: top; border-top: 1px solid var(--line); }
table.projects th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; border-top: 0; }
table.projects td.when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }
table.projects td.name b { font-weight: 600; }
table.projects td.name span { display: block; color: var(--muted); font-size: 0.85rem; }
table.projects td.role { color: var(--muted); min-width: 260px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px; background: var(--surface); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { font-size: 0.78rem; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--fg); }
.site-footer .tagline { color: var(--muted); max-width: 44ch; font-size: 0.95rem; }
.contact-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.contact-line code { font-family: var(--font-mono); font-size: 0.9rem; background: var(--surface-2); padding: 4px 8px; border-radius: 6px; user-select: all; }
.copy-btn { font: inherit; font-size: 0.8rem; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.copy-btn:hover { color: var(--fg); border-color: var(--muted); }
.site-footer .legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; font-family: var(--font-mono); }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > div:first-child { grid-column: 1 / -1; } }
.page-title { padding-block: 56px 8px; }
.page-title h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 12px; }
.page-title p { color: var(--muted); max-width: 62ch; margin-top: 14px; font-size: 1.05rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Blog */
.post-list { display: flex; flex-direction: column; }
.post-item { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding-block: 26px; border-top: 1px solid var(--line); min-width: 0; }
.post-item:first-child { border-top: 0; padding-top: 0; }
.post-item .when { color: var(--muted); padding-top: 5px; display: flex; flex-direction: column; gap: 2px; }
.post-item .when time { color: var(--fg); }
.post-item h2, .post-item h3 { font-size: 1.25rem; }
.post-item h3 { font-size: 1.12rem; }
.post-item h2 a, .post-item h3 a { color: var(--fg); }
.post-item p { color: var(--muted); margin-top: 6px; max-width: 64ch; }
.post-item .tags { margin-top: 12px; }
@media (max-width: 640px) { .post-item { grid-template-columns: 1fr; gap: 6px; } .post-item .when { flex-direction: row; gap: 12px; } }

.article { max-width: 760px; padding-block: 56px 72px; }
.article-head .eyebrow a { color: inherit; }
.article-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-top: 14px; }
.article-head .lede { font-size: 1.2rem; line-height: 1.5; color: var(--muted); margin-top: 16px; }
.article-head .meta { color: var(--muted); margin-top: 16px; }
.article-head .tags { margin-top: 12px; }
.article-body { margin-top: 40px; font-size: 1.05rem; line-height: 1.7; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 { font-size: 1.45rem; margin-top: 2.2em; letter-spacing: -0.015em; }
.article-body h3 { font-size: 1.15rem; margin-top: 1.8em; }
.article-body p { max-width: 70ch; }
.article-body ul, .article-body ol { padding-left: 1.4em; max-width: 70ch; }
.article-body li + li { margin-top: 0.4em; }
.article-body strong { font-weight: 600; }
.article-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.article-body blockquote p { margin: 0; }
.article-body pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.55; }
.article-body code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.article-body pre code { background: none; padding: 0; font-size: inherit; }
.article-body figure { margin: 1.6em 0; }
.article-body figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-top: 8px; }
.article-body table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.article-body th, .article-body td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.article-body .table-wrap { overflow-x: auto; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.article-foot { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; font-size: 0.95rem; }
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.share-label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.share-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; font: inherit; }
.share-btn:hover { color: var(--fg); border-color: var(--muted); text-decoration: none; }
.share-btn svg { width: 17px; height: 17px; fill: currentColor; }
.share-btn.done { color: var(--accent-ink); border-color: var(--accent); }

/* Figures in articles */
.article-body figure.fig { margin: 2em 0; }
.article-body figure.fig svg { display: block; width: 100%; height: auto; max-width: 100%; font-family: var(--font-mono); color: var(--fg); }
.article-body figure.fig figcaption { font-family: var(--font-sans); font-size: 0.9rem; color: var(--muted); margin-top: 12px; max-width: 70ch; line-height: 1.5; }
.article-body figure.fig figcaption b { color: var(--fg); font-weight: 600; }

/* Credential badges */
.now.has-badge { position: relative; padding-right: 150px; }
.now .badge-link { position: absolute; top: 18px; right: 18px; width: 120px; height: 120px; }
.now .badge-link img { width: 120px; height: 120px; display: block; }
.now .badge-link:hover { text-decoration: none; }
@media (max-width: 520px) { .now.has-badge { padding-right: 22px; } .now .badge-link { position: static; margin-bottom: 10px; width: 96px; height: 96px; } .now .badge-link img { width: 96px; height: 96px; } }
.awards li.with-badge { display: flex; gap: 14px; align-items: flex-start; }
.awards li.with-badge img { flex: 0 0 64px; width: 64px; height: 64px; }
