:root {
  --bg: #fbfaf7;
  --text: #1f1f1c;
  --muted: #6b6a64;
  --rule: #e4e1d9;
  --accent: #8a2c1c;          /* UMass-adjacent maroon */
  --chip: #f1eee7;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161614;
    --text: #e8e6e0;
    --muted: #9c9a92;
    --rule: #2e2d29;
    --accent: #e08a74;
    --chip: #23221f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 48px;
}

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

h1, h2, h3 { font-family: "Source Serif 4", Georgia, serif; font-weight: 600; }

/* Hero */
.hero {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}
.photo {
  width: 160px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}
h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 8px; }
.role { margin: 0 0 16px; color: var(--muted); }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 500; font-size: 0.95rem; }

/* Sections */
section { margin-top: 48px; }
h2 {
  font-size: 1.35rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule);
}
#about p { margin: 0 0 14px; }

.interests { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px !important; }
.interests span {
  background: var(--chip);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* News */
.news { list-style: none; padding: 0; margin: 0; }
.news li { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 5px 0; }
.news time, .edu time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.92rem; }

/* Publications */
.note { color: var(--muted); font-size: 0.88rem; margin: -6px 0 20px; }
.pub { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: start; margin-bottom: 30px; }
.thumb {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; padding: 6px;
  background: #fff;                 /* figures are drawn on white; keep them readable in dark mode */
  border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb:hover { border-color: var(--accent); }
.pub h3 { font-size: 1.08rem; line-height: 1.35; margin: 0 0 4px; }
.pub h3 a { color: var(--text); }
.pub h3 a:hover { color: var(--accent); }
.pub p { margin: 0; font-size: 0.93rem; }
.authors { color: var(--muted); }
.authors b { color: var(--text); font-weight: 600; }
.venue { font-style: italic; }
.tags { display: flex; gap: 8px; margin-top: 6px !important; }
.tags a {
  font-size: 0.78rem;
  font-weight: 500;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1px 8px;
}
.tags a:hover { border-color: var(--accent); text-decoration: none; }

/* Service */
.service { list-style: none; padding: 0; margin: 0; }
.service li { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 5px 0; }
.service b { font-weight: 600; }
.service span { color: var(--muted); }

/* Education */
.edu { list-style: none; padding: 0; margin: 0; }
.edu li { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.edu time { white-space: nowrap; }

footer { margin-top: 64px; color: var(--muted); font-size: 0.82rem; }

@media (max-width: 600px) {
  .wrap { padding-top: 40px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .photo { width: 128px; }
  .news li { grid-template-columns: 1fr; gap: 0; padding: 7px 0; }
  .pub { grid-template-columns: 112px 1fr; gap: 14px; }
  .service li { grid-template-columns: 1fr; gap: 0; padding: 6px 0; }
}
.authors sup { font-size: 0.7em; margin-left: 1px; }
