:root {
  --text: #1a1a1a;
  --muted: #555;
  --rule: #ddd;
  --accent: #4e2a84;        /* Northwestern purple */
  --accent-dark: #3b1f63;
  --bg: #ffffff;
  --max: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 20px;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 17px;
  line-height: 1.55;
}

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

/* Top banner */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -20px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-name {
  font-size: 1.25rem;
  color: var(--accent-dark);
}
.site-name:hover { text-decoration: none; }
.site-nav { display: flex; gap: 26px; }
.site-nav a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  color: var(--text);
}
.site-nav a:hover, .site-nav a.active { color: var(--accent); text-decoration: none; }
.site-nav a.active { font-weight: 600; }
main.subpage { margin-top: 48px; }
main.subpage h2 { font-size: 1.7rem; margin-bottom: 20px; }
html { scroll-behavior: smooth; }
section, .hero { scroll-margin-top: 72px; }

/* Header */
.hero {
  max-width: var(--max);
  margin: 56px auto 24px;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
.headshot {
  width: 220px;
  height: auto;
  border-radius: 4px;
  flex-shrink: 0;
}
.hero-text h1 {
  margin: 0 0 6px;
  font-size: 2.2rem;
  font-weight: normal;
  letter-spacing: 0.01em;
}
.affil { margin: 0 0 10px; font-size: 1.05rem; }
.fields { margin: 0 0 6px; color: var(--muted); }
.jm-note { margin: 0 0 16px; font-style: italic; }
.links { margin: 0; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; font-size: 0.95rem; }
.btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
}
.btn:hover { background: var(--accent); color: #fff; text-decoration: none; }


/* Sections */
main { max-width: var(--max); margin: 0 auto; }
section { margin-bottom: 48px; }
h2 {
  font-size: 1.35rem;
  font-weight: normal;
  margin: 0 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
  color: var(--accent-dark);
}
h2 + h2, section > h2:not(:first-child) { margin-top: 36px; }
h3 { font-size: 1.1rem; font-weight: bold; margin: 0 0 4px; }

.paper { margin-bottom: 28px; }
.meta { color: var(--muted); margin: 0 0 6px; }
.paper-links { margin: 0 0 10px; font-size: 0.95rem; }
.paper-links a + a::before { content: "\00b7"; color: var(--muted); margin: 0 8px; }
.abstract { margin: 0; text-align: justify; hyphens: auto; }

details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.95rem;
  list-style: none;
}
details summary::before { content: "+ "; }
details[open] summary::before { content: "\2212\00a0"; }
details summary::-webkit-details-marker { display: none; }
details .abstract { margin-top: 8px; }

ul.wip, ul.plain { list-style: none; padding: 0; margin: 0 0 18px; }
ul.wip li, ul.plain li { margin-bottom: 8px; }
ul.wip .title { font-weight: bold; }
ul.wip .meta { display: block; margin: 0; }

.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px 28px; }
.ref { font-size: 0.95rem; line-height: 1.45; }
.ref a { overflow-wrap: anywhere; }

footer {
  max-width: var(--max);
  margin: 40px auto 48px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Mobile */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { flex-direction: column; gap: 20px; margin-top: 32px; }
  .site-header-inner { height: auto; padding: 10px 20px; flex-wrap: wrap; gap: 6px 16px; }
  .site-nav { gap: 16px; flex-wrap: wrap; }
  .site-nav a { font-size: 0.95rem; }
  .headshot { width: 160px; }
  .hero-text h1 { font-size: 1.8rem; }
  .abstract { text-align: left; }
}

@media print {
  .site-header, .btn { display: none; }
  body { font-size: 11pt; }
  details { display: block; }
  details summary { display: none; }
}

.coming-soon { color: var(--muted); font-style: italic; }
ul.wip li { margin-bottom: 14px; }
ul.wip details { margin-top: 2px; }
