/* Minimal, text-first academic style. System fonts only: fast, private, no external requests. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --band: #e9eef5;
  --text: #1e1e1e;
  --muted: #4f565d;
  --line: #d9dee4;
  --accent: #8a4a1d;
  --accent-hover: #6e3a15;
  --accent-soft: #f5ede6;
  --measure: 56rem; /* page container: wide enough for one header row */
  --prose: 46rem;   /* comfortable reading width for paragraphs */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; top: 0.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.site-header, main, .site-footer { max-width: var(--measure); margin-inline: auto; padding-inline: 1.25rem; }
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem;
  padding-block: 1.25rem 0.75rem; border-bottom: 1px solid var(--line);
}
/* Narrow screens: "English" stays beside the name, the menu drops to its own row. */
@media (max-width: 60rem) {
  .site-header .lang { order: 2; }
  .site-header nav { order: 3; flex-basis: 100%; }
}
/* Home page: the hero already shows the name, so the header has no brand. */
.no-brand { justify-content: center; }
.no-brand nav { order: 0; flex-basis: auto; justify-content: center; }
.no-brand .lang { order: 0; }
.brand { font-weight: 650; font-size: 1.15rem; color: var(--text); text-decoration: none; margin-right: auto; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding-block: 0.15rem; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--text); }
.site-header nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.lang { font-size: 0.9rem; border: 1px solid var(--accent); border-radius: 999px; padding: 0.1rem 0.75rem; text-decoration: none; color: var(--accent); }
.lang:hover { background: var(--accent-soft); }

main { padding-block: 2rem 3rem; min-height: 60vh; }
h1 { font-size: clamp(1.8rem, 4vw, 2.3rem); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; margin: 2.25rem 0 0.75rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--line); }
.lede { font-size: 1.1rem; color: var(--muted); }
.note { color: var(--muted); font-size: 0.92rem; margin-top: -0.25rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
main > p, address { max-width: var(--prose); }
h1, h2 { text-wrap: balance; }

/* Full-width pale band behind the home intro, without causing horizontal scroll. */
.band { background: var(--band); box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); padding-block: 1.75rem; margin-top: -2rem; margin-bottom: 2rem; }
.intro { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; border: 2px solid var(--accent); border-radius: 999px; padding: 0.4rem 1.2rem; font-weight: 550; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.outline { background: transparent; color: var(--accent); }
.btn.outline:hover { background: var(--accent); color: #fff; }
.buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 0.9rem; }
.intro > div:not(.portrait) { flex: 1 1 18rem; }
.portrait { width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; flex: none; }
.monogram { display: grid; place-items: center; background: #fff; color: var(--accent); font-size: 2.6rem; font-weight: 650; letter-spacing: 0.04em; }
.role { color: var(--muted); margin-bottom: 0.75rem; }
.linkrow { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 0; }

.chips, .plain, .items { list-style: none; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips li { background: var(--accent-soft); border-radius: 999px; padding: 0.2rem 0.85rem; font-size: 0.95rem; }
.items li { padding-block: 0.6rem; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.item-title { margin: 0; }
.item-meta { margin: 0; color: var(--muted); font-size: 0.92rem; }

.timeline { display: grid; grid-template-columns: 10.5rem 1fr; gap: 0.5rem 1rem; margin: 0; }
.timeline dt { color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline dd { margin: 0; }
@media (max-width: 34rem) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline dd { margin-bottom: 0.75rem; }
}

.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub p { margin: 0; }
.pub-title { font-weight: 600; }
.pub-alt { color: var(--muted); font-size: 0.95rem; font-style: italic; }
.pub-authors, .pub-venue { color: var(--muted); font-size: 0.95rem; }
.pub-authors strong { color: var(--text); font-weight: 650; }
.pub-meta { margin-top: 0.3rem !important; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem; font-size: 0.85rem; }
.tag { border: 1px solid var(--line); border-radius: 4px; padding: 0 0.45rem; color: var(--muted); }
.pub-links { display: inline-flex; flex-wrap: wrap; gap: 0 0.75rem; margin-left: 0.25rem; }
.year h2 { position: sticky; top: 0; background: var(--bg); margin-top: 1.5rem; padding-block: 0.4rem; z-index: 1; }

.filters { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 1.25rem 0 0.75rem; }
@media (min-width: 40rem) { .filters { grid-template-columns: 2fr 1fr 1fr; } }
.filters input, .filters select {
  font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.55rem 0.7rem; width: 100%;
}
.count { color: var(--muted); font-size: 0.92rem; }

address { font-style: normal; margin-bottom: 1rem; }
.plain li { margin-bottom: 0.3rem; }
.site-footer { padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print {
  .site-header nav, .lang, .filters, .skip { display: none; }
  body { background: #fff; color: #000; }
}
