/* ------------------------------------------------------------------
   Simple academic site. Colours are tokens: change them here.
   ------------------------------------------------------------------ */
:root {
  --bg: #fbfaf7;
  --surface: #f2efe8;
  --text: #1d1d1f;
  --muted: #5d5d63;
  --rule: #e2ded4;
  --accent: #6b2d5c;          /* Warwick-ish aubergine */
  --accent-soft: #f3e8f0;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --measure: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161a;
    --surface: #222026;
    --text: #ecebef;
    --muted: #a6a4ad;
    --rule: #34313a;
    --accent: #e0a6d2;
    --accent-soft: #33252f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--sans);
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 4px 8px; z-index: 10; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; }
h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule); }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }
.page-title { font-size: 2rem; margin: 2.5rem 0 1rem; }
.muted { color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.site-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--text); text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }
nav a[aria-current="page"] { font-weight: 600; }

/* Home intro */
.intro { display: flex; gap: 1.75rem; align-items: center; margin: 2.5rem 0 1.5rem; }
.portrait { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; flex: none; background: var(--surface); }
.name { font-size: 2.1rem; margin: 0 0 0.25rem; }
.role { margin: 0 0 0.6rem; color: var(--muted); }
.links { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.95rem; }
@media (max-width: 560px) {
  .intro { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .portrait { width: 120px; height: 120px; }
}

.callout { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 0.75rem 1rem; margin: 1.5rem 0; border-radius: 0 4px 4px 0; }

/* News */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 0.75rem; padding: 0.35rem 0; }
.news time { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
@media (max-width: 480px) { .news li { grid-template-columns: 1fr; gap: 0; } }

/* Projects & people */
.projects, .people { list-style: none; padding: 0; margin: 0; }
.projects li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.projects li:last-child { border-bottom: 0; }
.projects p { margin: 0.3rem 0 0; }
.p-title { font-weight: 500; }
.p-meta { color: var(--muted); font-size: 0.9rem; }
.people li { display: flex; gap: 1rem; align-items: flex-start; padding: 0.6rem 0; }
.people img, .avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.avatar { display: grid; place-items: center; background: var(--surface); color: var(--muted); font-family: var(--serif); font-size: 1.4rem; }

/* Publications */
.pub-controls { display: flex; flex-direction: column; gap: 0.75rem; margin: 1.5rem 0 0.5rem; }
.pub-search { width: 100%; font: inherit; padding: 0.55rem 0.75rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg); color: var(--text); }
.pub-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pub-filters button { font: inherit; font-size: 0.875rem; padding: 0.3rem 0.7rem; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; }
.pub-filters button span { color: var(--muted); margin-left: 0.15rem; }
.pub-filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.pub-filters button[aria-pressed="true"] span { color: inherit; opacity: 0.8; }
.pub-count { font-size: 0.9rem; min-height: 1.4em; margin: 0; }
.pub-year { font-size: 1.15rem; border-bottom: 0; margin: 2rem 0 0.25rem; color: var(--muted); }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.pub:last-child { border-bottom: 0; }
.pub.target { background: var(--accent-soft); margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; }
.pub-title { font-weight: 600; line-height: 1.4; }
.pub-authors { font-size: 0.95rem; }
.pub-authors strong { font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
.pub-venue { font-size: 0.95rem; color: var(--muted); }
.pub-links { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem; }
.pub-links a, .bib-toggle { font: 500 0.75rem/1 var(--sans); letter-spacing: 0.02em; padding: 0.3rem 0.5rem; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; color: var(--muted); background: transparent; cursor: pointer; }
.pub-links a:hover, .bib-toggle:hover { color: var(--accent); border-color: var(--accent); }
.badge { font: 500 0.7rem/1 var(--sans); background: var(--accent-soft); color: var(--accent); padding: 0.2rem 0.45rem; border-radius: 4px; vertical-align: 0.15em; }
.bibtex { font-size: 0.78rem; line-height: 1.45; background: var(--surface); padding: 0.75rem; border-radius: 6px; overflow-x: auto; margin: 0.5rem 0 0; white-space: pre; }

/* Footer */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--rule); padding: 1.25rem 0 2rem; color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; }
.site-footer a { color: inherit; }
@media (max-width: 480px) { .site-footer .sep { display: none; } .site-footer .wrap { flex-direction: column; } }
