:root {
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --accent: rgb(107, 21, 107);
  --rule: #e0e0e0;
  --bg: #fff;
}

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

html { font-size: 17px; }

body {
  max-width: 700px;
  margin: 3rem auto;
  padding: 0 1.25rem;
  font-family: "Iowan Old Style", "Source Serif 4", "Source Serif Pro", Charter, Georgia, serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

/* ── Header ── */
header { margin-bottom: 2.5rem; }

header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.contact {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.contact a {
  color: var(--muted);
  text-decoration: none;
}

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

.contact .sep { margin: 0 0.35rem; color: var(--rule); }

footer .sep { margin: 0 0.5rem; color: #bbb; }

/* ── Nav ── */
nav { border-top: 1px solid var(--rule); padding-top: 0.75rem; }

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0;
}

nav ul li { margin-right: 1.5rem; }

nav a {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}

nav a:hover { color: var(--accent); }

/* ── Section headings ── */
h2 {
  font-size: 0.8rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.75rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Body text ── */
p { margin: 0 0 1rem; }

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

/* ── Projects (home page teasers) ── */
.project-list { margin: 0; padding: 0; list-style: none; }

.project-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.project-list li:last-child { border-bottom: none; }

.project-list .proj-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  min-width: 11rem;
  flex-shrink: 0;
}

.project-list .proj-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── Project detail pages ── */
.project-detail { margin-bottom: 2.5rem; }

.project-detail h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.project-detail p { color: var(--ink); }

.project-detail .proj-link { font-size: 0.9rem; }

/* ── Teaching cases ── */
.case { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--rule); }
.case:last-of-type { border-bottom: none; }

.case h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.case p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.5rem; }

/* ── Research streams ── */
.streams { margin: 0; padding: 0; list-style: none; }

.streams li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.streams li:last-child { border-bottom: none; }

/* ── Writing list (projects page) ── */
.writing-list { margin: 0; padding: 0; list-style: none; }

.writing-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.writing-list li:last-child { border-bottom: none; }

/* ── Footer ── */
footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  color: var(--muted);
}

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

footer a:hover { color: var(--accent); }

/* ── Email reveal button styled as a link ── */
button.email-reveal {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

button.email-reveal:hover { color: var(--accent); }

#email { font-size: 0.9rem; color: var(--muted); }

@media (max-width: 480px) {
  body { margin: 1.5rem auto; }
  header h1 { font-size: 1.6rem; }
}
