:root {
  --bg: #fbfaf7;
  --fg: #1d1d1f;
  --muted: #5f5f66;
  --rule: #e3e0d8;
  --accent: #2b5d8a;
  --chip: #eef2f6;
  --maxw: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --fg: #e6e6e6;
    --muted: #a2a5ab;
    --rule: #2c2f34;
    --accent: #8ab4dd;
    --chip: #22272e;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  -webkit-text-size-adjust: 100%;
}

.masthead, main, footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1rem;
}

.masthead { padding-top: 3.5rem; }

h1 {
  font-size: 2.4rem;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.01em;
}

.tagline { color: var(--muted); margin: 0.35rem 0 1rem; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font: 0.9rem/1.4 system-ui, sans-serif;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
nav a { text-decoration: none; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }

section { padding: 1.6rem 0 0.4rem; scroll-margin-top: 1rem; }

h2 {
  font: 600 0.8rem/1.2 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 1rem;
}

h3 { font-size: 1.05rem; margin: 0; }
h3.sub { font-size: 0.95rem; margin: 1.4rem 0 0.5rem; }

.lede { font-size: 1.1rem; margin-top: 0.4rem; }

.interests { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.interests span {
  background: var(--chip);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font: 0.82rem/1.6 system-ui, sans-serif;
}

.entry { margin-bottom: 1.2rem; }
.entry.compact { margin-bottom: 0.7rem; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.when, .where, .note {
  color: var(--muted);
  font: 0.88rem/1.5 system-ui, sans-serif;
}
.where { margin: 0.1rem 0 0.3rem; }
.thesis-title { margin: 0.2rem 0 0.4rem; }

ul { padding-left: 1.2rem; margin: 0.3rem 0; }
li { margin-bottom: 0.35rem; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding-left: 0.9rem; text-indent: -0.9rem; }
ul.plain li::before { content: "–\00a0"; color: var(--muted); }

.math { font-style: italic; white-space: nowrap; }

dl.grid {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
}
dl.grid dt { font: 600 0.88rem/1.6 system-ui, sans-serif; }
dl.grid dd { margin: 0; }

footer {
  margin-top: 2.5rem;
  padding-top: 1rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font: 0.88rem/1.5 system-ui, sans-serif;
}

@media (max-width: 34rem) {
  body { font-size: 16px; }
  h1 { font-size: 2rem; }
  dl.grid { grid-template-columns: 1fr; gap: 0 0; }
  dl.grid dd { margin-bottom: 0.6rem; }
}
