:root {
  --ink: #141413;
  --grey: #3D3D3A;
  --muted: #8C8C88;
  --rule: #E4E4E0;
  --purple: #8077DD;
  --purple-pale: #EFEDFF;
  --blue: #226CE0;
  --teal: #048A81;
  --teal-pale: #D5EDEB;
  --plum: #5D507F;
  --bg: #FFFFFF;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Lato", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--ink); letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; color: var(--plum); }
.nav { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--grey); font-size: 15px; letter-spacing: 0.04em; padding-bottom: 3px; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { color: var(--purple); border-bottom-color: var(--purple); text-decoration: none; }

.wrap {
  max-width: 1080px; margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: 280px 1fr; gap: 64px;
}

.sidebar { position: sticky; top: 96px; align-self: start; text-align: center; }

.photo {
  position: relative; width: 200px; height: 200px; margin: 0 auto 20px;
  border-radius: 50%; overflow: hidden;
  background: var(--purple-pale); border: 3px solid var(--purple);
  display: flex; align-items: center; justify-content: center;
}
.photo .initials { font-size: 56px; font-weight: 300; color: var(--purple); letter-spacing: 0.04em; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.sidebar h1 { font-size: 30px; font-weight: 700; margin: 0; line-height: 1.2; }
.ipa {
  font-family: "Charis SIL", "Doulos SIL", "Noto Serif", Georgia, serif;
  font-size: 18px; color: var(--grey); margin: 6px 0 2px;
}
.pronouns { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.affil { font-size: 15px; color: var(--grey); line-height: 1.5; margin: 0 0 18px; }
.affil strong { color: var(--ink); font-weight: 700; }

.icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.icons a { color: var(--purple); font-size: 24px; line-height: 1; transition: color 0.15s, transform 0.15s; }
.icons a:hover { color: var(--plum); transform: translateY(-2px); text-decoration: none; }
.email { margin-top: 14px; font-size: 14px; color: var(--grey); }

main section { padding-bottom: 40px; }
main section[hidden] { display: none; }
main { min-height: 60vh; }

h2 { font-size: 28px; font-weight: 700; margin: 0 0 20px; }
h2::after { content: ""; display: block; width: 40px; height: 3px; background: var(--purple); margin-top: 8px; border-radius: 2px; }
h3 { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--plum); margin: 32px 0 14px; }
h3:first-of-type { margin-top: 8px; }

p { margin: 0 0 16px; }
.lede { font-size: 18px; }
.hl { color: var(--purple); font-weight: 700; }

.entry { display: grid; grid-template-columns: 96px 1fr; gap: 20px; margin-bottom: 20px; }
.entry.same-year { margin-top: -6px; }
.note { font-size: 14px; color: var(--muted); margin-top: 24px; }
.entry .when { color: var(--muted); font-size: 15px; padding-top: 2px; }
.entry .title { font-weight: 700; margin: 0; line-height: 1.4; }
.entry .title a { color: var(--ink); }
.entry .title a:hover { color: var(--blue); }
.entry .meta { margin: 2px 0 0; color: var(--grey); font-size: 15.5px; line-height: 1.5; }
.entry .meta em { color: var(--grey); }
.entry .desc { margin: 6px 0 0; font-size: 15.5px; color: var(--grey); }
.me { font-weight: 700; color: var(--ink); }

.links { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.links a {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--teal); border: 1.5px solid var(--teal); background: var(--teal-pale);
  padding: 1px 10px; border-radius: 999px;
}
.links a:hover { background: var(--teal); color: #fff; text-decoration: none; }

.cv-button {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--purple-pale); color: var(--purple); border: 2px solid var(--purple);
  font-weight: 700; padding: 8px 20px; border-radius: 999px; margin-bottom: 8px;
}
.cv-button:hover { background: var(--purple); color: #fff; text-decoration: none; }

footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }

@media (max-width: 820px) {
  .wrap { grid-template-columns: 1fr; gap: 32px; padding-top: 32px; }
  .sidebar { position: static; }
  .photo { width: 160px; height: 160px; }
  .nav { gap: 16px; }
}
@media (max-width: 520px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .entry { grid-template-columns: 1fr; gap: 2px; }
}
