:root {
  --bg: #fafafc;
  --ink: #1c2030;
  --muted: #5d6275;
  --rule: #dfe2ea;
  --accent: #2b4aa8;
  --code-bg: #eff1f6;
  --measure: 44rem;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161d; --ink: #e6e8f0; --muted: #9aa0b4; --rule: #2b2f3d; --accent: #8ea6f2; --code-bg: #1d2029;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  padding: clamp(1.5rem, 5vw, 4rem) 1.25rem 4rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
}
body > * { max-width: var(--measure); margin-inline: auto; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { text-decoration-thickness: 0.12em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.4rem 0.7rem; z-index: 5; }

/* Header: name is the one big typographic moment */
.top { display: flex; gap: 1.75rem; align-items: center; margin-bottom: 3rem; }
top img { width: 12rem; height: 12rem; object-fit: cover; border-radius: 50%; flex: none; }
h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 72;
}
.tagline { margin: 0.5rem 0 0.9rem; color: var(--muted); }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-family: var(--sans); font-size: 0.95rem; }

/* Sections */
section { margin-bottom: 2.75rem; }
h2 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--rule);
}
h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: var(--muted); margin: 1.6rem 0 0.6rem; }
p { margin: 0 0 1em; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { margin-bottom: 0.4rem; }

/* News */
dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
dt { font-family: var(--sans); font-size: 0.95rem; color: var(--muted); font-variant-numeric: tabular-nums; }
dd { margin: 0; }

/* Publications */
ul.pubs { list-style: none; padding: 0; margin: 0; }
ul.pubs li { margin-bottom: 1.35rem; }
ul.pubs p { margin: 0; }
.pub-title { font-weight: 600; line-height: 1.4; }
.pub-authors, .pub-venue { color: var(--muted); font-size: 0.97rem; }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.note { font-style: italic; }
.pub-links { margin: 0.15rem 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 1rem; font-family: var(--sans); font-size: 0.88rem; }
.bib summary { cursor: pointer; color: var(--accent); }
.bib summary:hover { text-decoration: underline; }
.bib[open] { flex-basis: 100%; }
.bib pre { margin: 0.5rem 0 0; padding: 0.8rem 1rem; background: var(--code-bg); border-radius: 4px; overflow-x: auto; font-size: 0.8rem; line-height: 1.5; }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.92rem; }
footer p { margin: 0 0 0.25rem; }

@media (max-width: 34rem) {
  .top { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .top img { width: 6.5rem; height: 6.5rem; }
  .top img { width: 9rem; height: 9rem; }
  dl { grid-template-columns: 1fr; gap: 0; }
  dd { margin-bottom: 0.7rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { body { background: #fff; color: #000; } a { color: #000; } .skip { display: none; } }
