:root {
  --bg: #fcfcfb;
  --text: #1b1c1e;
  --muted: #5d6168;
  --faint: #8a8f97;
  --rule: #e4e4e1;
  --accent: #1d5bb8;
  --accent-soft: #e8effa;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131416;
    --text: #e7e7e5;
    --muted: #a3a7ae;
    --faint: #767b83;
    --rule: #2a2c30;
    --accent: #84b3ff;
    --accent-soft: #1c2738;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 72px 20px 48px;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Header */

h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.tagline {
  color: var(--muted);
  margin: 0 0 20px;
}

.bio {
  margin: 0 0 20px;
  max-width: 62ch;
}

.profiles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

/* Sections */

section {
  margin-top: 64px;
}

h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}

.group {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0 24px;
  margin-bottom: 24px;
}

.group-label {
  color: var(--faint);
  font-size: 0.85rem;
  font-weight: 500;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Resources */

.resources li + li {
  margin-top: 4px;
}

/* Publications */

.pub + .pub {
  margin-top: 18px;
}

.pub-title {
  display: block;
  font-weight: 600;
  line-height: 1.4;
}

.pub-authors,
.pub-venue {
  display: block;
  color: var(--muted);
  font-size: 0.925rem;
}

.pub-authors a {
  color: inherit;
}

.pub-authors a:hover {
  color: var(--accent);
}

.me {
  color: var(--text);
  font-weight: 600;
}

.pub-venue em {
  font-style: italic;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.links a {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
}

.links a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

/* Topic filter */

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -8px 0 28px;
}

.filter button {
  font: inherit;
  font-size: 0.8rem;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.filter button[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

[hidden] {
  display: none !important;
}

footer {
  margin-top: 72px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--faint);
  font-size: 0.85rem;
}

@media (max-width: 560px) {
  main {
    padding-top: 48px;
  }

  h1 {
    font-size: 2rem;
  }

  .group {
    grid-template-columns: 1fr;
  }

  .group-label {
    margin-bottom: 8px;
  }
}
