:root {
  --bg: #faf7f1;
  --paper: #fffdf9;
  --text: #201f1c;
  --muted: #6e6962;
  --accent: #8a6f5a;
  --line: #ddd4c8;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a:hover { opacity: 0.72; }

.site-shell {
  width: min(calc(100% - 44px), var(--max));
  margin: 0 auto;
}

header {
  padding: 30px 0 22px;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.site-name {
  color: var(--text);
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 700;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.98rem;
  padding-bottom: 3px;
}

nav a.active {
  border-bottom: 1px solid var(--accent);
}

main { padding: 58px 0 76px; }

.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 68px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  line-height: 1.16;
  font-weight: 500;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(2.65rem, 6vw, 4.7rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 26px;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
}

h3 {
  margin: 0 0 9px;
  font-size: 1.22rem;
}

.lead {
  max-width: 640px;
  margin: 0 0 15px;
  font-size: 1.12rem;
}

.muted { color: var(--muted); }

.contact-row {
  margin-top: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 13px 22px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.91rem;
}

.portrait-wrap {
  justify-self: end;
  width: min(100%, 430px);
}

.portrait {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 23%;
  border: 1px solid var(--line);
}

.section-rule {
  margin: 62px 0 38px;
  border: 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 24px;
}

.section-heading h2 { margin: 0; }

.research-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.preview-item {
  padding: 28px 34px 30px 0;
}

.preview-item + .preview-item {
  padding-left: 34px;
  border-left: 1px solid var(--line);
}

.preview-item h3.next { margin-top: 22px; }

.label {
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.preview-item p,
.paper p,
.discussion p {
  margin: 8px 0 0;
  color: var(--muted);
}

.page-intro {
  max-width: 760px;
  margin-bottom: 48px;
}

.page-intro h1 {
  font-size: clamp(2.5rem, 4vw, 3.6rem);
  margin-bottom: 16px;
}

.research-section + .research-section {
  margin-top: 52px;
}

.research-section > h2,
.teaching-section > h2 {
  padding-bottom: 11px;
  margin-bottom: 0;
  font-size: 1.55rem;
  border-bottom: 1px solid var(--line);
}

.paper,
.discussion,
.course-row {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.paper-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}

.paper-title {
  font-size: 1.15rem;
  font-weight: 600;
}

.paper-links {
  white-space: nowrap;
  display: flex;
  gap: 18px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
}

.authors {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.96rem;
}

.discussion-title {
  font-weight: 600;
}

.teaching-section {
  max-width: 900px;
}

.course-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.course-row strong { font-weight: 600; }
.course-row span { color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  padding: 23px 0 34px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
}

.small-link {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
}

/* Home: advisor / visiting facts */
.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 18px;
  margin: 22px 0 0;
  font-size: 0.98rem;
}

.facts dt {
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 4px;
}

.facts dd { margin: 0; }

/* Research: abstract and presentations */
.paper p.abstract {
  margin-top: 12px;
  color: var(--text);
  max-width: 860px;
}

.paper p.presented {
  margin-top: 12px;
  font-size: 0.92rem;
  max-width: 860px;
}

.presented span {
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Teaching: institution headings */
.teaching-section + .teaching-section { margin-top: 52px; }

.teaching-section h2 .role {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
}

/* Teaching: evaluation scores lead, years are secondary */
.course-row { align-items: center; }

.evals {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
}

.eval {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.course-row .eval-score {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 500;
}

.eval-scale {
  color: var(--muted);
  font-size: 0.9rem;
}

.eval-year,
.course-note {
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.course-note { font-size: 0.9rem; letter-spacing: 0; }

footer a { color: inherit; }

@media (max-width: 800px) {
  .site-shell { width: min(calc(100% - 30px), var(--max)); }

  header { padding-top: 22px; }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  nav { gap: 18px; }

  main { padding-top: 38px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .portrait-wrap {
    justify-self: start;
    width: min(100%, 480px);
  }

  .research-preview { grid-template-columns: 1fr; }

  .preview-item { padding: 24px 0; }

  .preview-item + .preview-item {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .paper-top {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .paper-links { white-space: normal; }

  .course-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
