:root {
  --bg: #fdfcfa;
  --text: #1f2328;
  --muted: #5f6672;
  --accent: #1f5f8b;
  --rule: #e3e0da;
  --done: #2f7d4f;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --text: #e6e6e3;
    --muted: #9aa0a8;
    --accent: #7db4dc;
    --rule: #2c3036;
    --done: #6cc292;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

.site-header, main, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.site-name {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

nav a { color: var(--muted); text-decoration: none; }
nav a:hover { color: var(--accent); }
nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

main { padding-top: 1.5rem; padding-bottom: 3rem; }

h1, h2, h3 {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.25;
}

h1 { font-size: 1.9rem; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.2rem; margin: 2.2rem 0 0.6rem; }
h3 { font-size: 1.05rem; margin: 0 0 0.3rem; }

.lead { font-size: 1.15rem; color: var(--muted); }

.crumb {
  margin: 0;
  font: 0.9rem system-ui, sans-serif;
  color: var(--muted);
}

.timeline { list-style: none; padding: 0; }
.timeline li { margin-bottom: 0.5rem; }
.timeline .when {
  display: block;
  font: 0.85rem system-ui, sans-serif;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.pubs { padding-left: 1.2rem; }
.pubs li { margin-bottom: 0.7rem; }

.paper {
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}
.paper .year { font-weight: 400; color: var(--muted); }
.paper .meta { margin: 0.1rem 0; color: var(--muted); font-size: 0.95rem; }
.paper details { margin-top: 0.4rem; }
.paper summary { cursor: pointer; color: var(--accent); font: 0.9rem system-ui, sans-serif; }
.paper details p { margin: 0.5rem 0 0; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}
.gallery figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.4rem; }

.progress { margin: 2rem 0 1rem; font-family: system-ui, sans-serif; }
.progress .bar {
  height: 0.6rem;
  background: var(--rule);
  border-radius: 999px;
  overflow: hidden;
}
.progress .bar span { display: block; height: 100%; background: var(--done); }
.progress p { margin: 0.4rem 0 0; font-size: 0.95rem; }

.table-wrap { overflow-x: auto; }
.passes {
  width: 100%;
  border-collapse: collapse;
  font: 0.95rem system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.passes th, .passes td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}
.passes th { color: var(--muted); font-weight: 600; }
.passes .num { text-align: right; white-space: nowrap; }
.passes tr:not(.done) td:last-child { color: var(--muted); }
.passes tr.done td:last-child { color: var(--done); }

footer {
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  font: 0.85rem system-ui, sans-serif;
  color: var(--muted);
}
