@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500&family=Inter:wght@400;500&display=swap');

:root {
  --bg: #faf8f4;
  --ink: #1d1b18;
  --text: #4c4740;
  --muted: #70685e;
  --soft: #9a9084;
  --line: rgba(91, 79, 69, 0.16);
  --link-line: rgba(91, 79, 69, 0.30);
}

* {
  box-sizing: border-box;
}

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

.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 54px 54px 88px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 76px;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

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

nav > div:last-child a {
  margin-left: 26px;
}

.site-title {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.025em;
}

nav a:hover,
nav a.active {
  color: var(--ink);
}

nav a.active {
  border-bottom: 1px solid rgba(29, 27, 24, 0.42);
  padding-bottom: 5px;
}

.bio-page nav {
  margin-bottom: 62px;
}

.page-title {
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0 0 22px;
  color: var(--ink);
}

.bio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 54px;
  align-items: start;
}

.bio-layout > div {
  max-width: 570px;
  padding-top: 8px;
}

.bio-photo {
  width: 238px;
  aspect-ratio: 4 / 5.35;
  object-fit: cover;
  object-position: 50% 20%;
  filter: saturate(1.02) contrast(1.04);
}

.bio {
  font-size: 18.5px;
  line-height: 1.70;
  color: var(--text);
  margin: 0;
  max-width: 570px;
}

.bio:first-child {
  font-size: 23px;
  line-height: 1.38;
  color: var(--ink);
  margin-bottom: 28px;
}

.bio + .bio {
  margin-top: 19px;
}

section + section {
  margin-top: 34px;
  padding-top: 0;
  border-top: 0;
}

h2 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 16px;
}

.research-entry {
  padding: 6px 0 8px;
  border-top: 0;
}

.research-entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.research-entry h3 {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.30;
  letter-spacing: -0.015em;
  margin: 0 0 3px;
  color: var(--ink);
}

.research-entry h3 a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--link-line);
}

.research-meta {
  font-size: 17px;
  line-height: 1.30;
  color: #5f574e;
  margin: 0 0 5px;
}

.research-description {
  font-size: 16.5px;
  line-height: 1.52;
  color: var(--text);
  max-width: 720px;
  margin: 0 0 4px;
}

.research-note,
.research-journal,
.research-links {
  font-size: 14.5px;
  line-height: 1.42;
  color: var(--muted);
  margin: 0;
}

.research-links {
  margin-top: 3px;
}

.research-links a,
.research-description a,
.bio a,
footer a,
.writing-list a {
  color: #574f46;
  text-decoration: none;
  border-bottom: 1px solid var(--link-line);
}

.research-links a:hover,
.research-description a:hover,
.bio a:hover,
.writing-list a:hover,
footer a:hover {
  color: var(--ink);
  border-bottom-color: rgba(29, 27, 24, 0.62);
}

.separator {
  margin: 0 9px;
  color: rgba(112, 104, 94, 0.42);
}

.writing-list {
  max-width: 760px;
}

.writing-entry {
  margin-bottom: 26px;
}

.writing-entry p {
  margin: 0;
  font-size: 18px;
  line-height: 1.42;
  color: var(--text);
}

.writing-inline-note {
  font-size: 0.78em;
  color: var(--muted);
  white-space: nowrap;
}

.writing-inline-note a {
  color: var(--muted);
  border-bottom-color: rgba(112, 104, 94, 0.30);
}

footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 76px;
  padding-top: 24px;
  border-top: 1px solid rgba(91, 79, 69, 0.10);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  letter-spacing: 0.035em;
}

footer a {
  margin-right: 22px;
}

@media (max-width: 820px) {
  .page {
    padding: 36px 25px 70px;
  }

  nav {
    display: block;
    margin-bottom: 58px;
  }

  nav div:last-child {
    margin-top: 18px;
  }

  nav > div:last-child a {
    margin: 0 16px 0 0;
  }

  .page-title {
    font-size: clamp(32px, 10vw, 42px);
    margin-bottom: 32px;
  }

  .bio-layout {
    display: block;
  }

  .bio-layout > div {
    padding-top: 0;
  }

  .bio-photo {
    width: 220px;
    margin-top: 34px;
  }

  .bio:first-child {
    font-size: 20px;
  }

  .research-entry h3 {
    font-size: 17px;
  }

  .writing-entry p {
    font-size: 17px;
  }

  .writing-inline-note {
    white-space: normal;
  }
}


/* New Yorker–leaning refinements */
.research-entry + .research-entry {
  margin-top: 2px;
}

.publications-section .research-entry + .research-entry {
  margin-top: 4px;
}

h2 {
  margin-bottom: 20px;
}

.research-entry h3 {
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.bio:first-child {
  font-family: "EB Garamond", Georgia, "Times New Roman", serif;
}

nav, footer, h2 {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


/* Teaching page: match research page entry rhythm exactly */
.teaching-page .research-entry {
  padding: 6px 0 8px;
}

.teaching-page .research-entry + .research-entry {
  margin-top: 2px;
}


/* Small extra breathing room after first teaching entry */
.teaching-page .research-links {
  margin-bottom: 12px;
}


.bio-contact {
  margin-top: 18px;
  font-family: Inter, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.bio-contact a {
  color: inherit;
  text-decoration: none;
}

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

.bio-contact .separator {
  margin: 0 10px;
  opacity: 0.5;
}

footer {
  display: none;
}


.bio-inline-links {
  margin: 19px 0 0;
  font-size: 16px;
  line-height: 1.72;
  color: var(--muted);
}

.bio-inline-links a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--link-line);
}

.bio-inline-links a:hover {
  color: var(--ink);
}


/* Final polish: presentation links, teaching titles, writing note */
.research-links.jmp-links {
  font-size: 14.5px;
  line-height: 1.42;
}

.research-links.jmp-links a {
  font-size: inherit;
}

.teaching-page .teaching-entry h3 {
  font-size: 20px;
}

.writing-note {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.35;
  color: var(--muted);
  font-style: italic;
}

.writing-note a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(112, 104, 94, 0.30);
}

.writing-note a:hover {
  color: var(--ink);
  border-bottom-color: rgba(29, 27, 24, 0.62);
}
