:root {
  --bg: #fbfaf7;
  --text: #1f2328;
  --muted: #5f6670;
  --line: #e4e1da;
  --accent: #b23a31;
  --max: 760px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --text: #e6e4df;
    --muted: #9aa0a8;
    --line: #2c3036;
    --accent: #ec7a6f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 Charter, "Bitstream Charter", "Iowan Old Style", Georgia, serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top, main, footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
  padding-top: 28px;
  padding-bottom: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
}

.brand { color: var(--text); font-weight: 600; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--accent); text-decoration: none; }

section { padding: 36px 0; border-bottom: 1px solid var(--line); }
section:last-child { border-bottom: 0; }

h1 { font-size: 2.2rem; line-height: 1.2; margin: 0 0 6px; }
h2 {
  font: 600 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}
h3 { font-size: 1.15rem; margin: 0 0 8px; }

.intro { display: flex; gap: 32px; align-items: flex-start; padding-top: 48px; }
.intro-text { flex: 1; }
.role { color: var(--muted); margin-top: 0; font-size: 0.95rem; }
.portrait { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; }

.links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; }

.interests-lead { font-weight: 600; margin: 0 0 6px; }
.interests { margin: 0 0 32px; padding-left: 1.2em; }
.interests li { margin-bottom: 2px; }

.project + .project { margin-top: 32px; }
.project figure { margin: 0 0 16px; }
.when { color: var(--muted); font-size: 0.9rem; margin: -4px 0 8px; }
.project img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }
.tags { color: var(--muted); font-size: 0.9rem; }

.pubs { list-style: none; padding: 0; margin: 0; }
.pubs li { margin-bottom: 18px; display: flex; flex-direction: column; }
.pub-title { font-weight: 600; color: var(--text); }
.pub-title:hover { color: var(--accent); }
.pub-authors, .pub-venue, .note, .muted { color: var(--muted); font-size: 0.95rem; }
.note { font-size: 0.85rem; margin: 0; }
.pubs-sub { margin: 32px 0 2px; }
.pubs-sub + .muted { margin: 0 0 16px; }

.cv { list-style: none; padding: 0; margin: 0; }
.cv li { display: grid; grid-template-columns: 96px 1fr; gap: 16px; margin-bottom: 14px; }
.cv-when { color: var(--muted); font-size: 0.95rem; font-variant-numeric: tabular-nums; }

footer { color: var(--muted); font-size: 14px; padding-top: 12px; padding-bottom: 40px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .intro { flex-direction: column-reverse; gap: 20px; padding-top: 28px; }
  .portrait { width: 112px; height: 112px; }
  h1 { font-size: 1.8rem; }
  .cv li { grid-template-columns: 1fr; gap: 0; }
}
