:root {
  --ink: #292727;
  --muted: #6b6663;
  --accent: #861f41;
  --line: #e4deda;
  --font: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.55 var(--font);
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: #c7a2ae;
}
a:hover { color: #54122a; text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: #eedde3; }

.site { max-width: 1080px; margin: 0 auto; padding: 0 42px; }
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0 17px;
  border-bottom: 1px solid var(--line);
}
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.header-logo {
  width: 78px;
  height: 52px;
  object-fit: cover;
  flex: none;
}
.name { display: block; font-size: 29px; line-height: 1.14; letter-spacing: -.65px; }
.affiliation { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; }
nav { display: flex; flex-wrap: wrap; gap: 5px 25px; font-size: 16px; }
nav a { color: var(--muted); text-decoration: none; padding: 5px 0; }
nav a.current, nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; }

main { padding: 25px 0 0; }
h1, h2, h3 { font-weight: 400; line-height: 1.27; }
h1 { margin: 0; font-size: 33px; letter-spacing: -.55px; }
h2 { margin: 0; font-size: 21px; }
h3 { margin: 0; font-size: 18px; }
p { margin: 0 0 11px; }
.home-layout, .teaching-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(160px, 23vw, 270px);
  align-items: start;
  column-gap: clamp(24px, 5vw, 55px);
}
.home-layout {
  grid-template-areas: "title photo" "intro photo";
  grid-template-rows: auto 1fr;
  row-gap: 10px;
}
.home-title { grid-area: title; font-size: 27px; }
.intro { grid-area: intro; }
.teaching-layout { grid-template-areas: "courses photo"; }
.teaching-primary { grid-area: courses; }
.site-photo {
  grid-area: photo;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 16%), 0 2px 10px rgb(0 0 0 / 12%);
}
.accent-link { color: var(--accent); font-weight: 700; }
.market { color: var(--accent); margin: 16px 0 10px; }
.document-links { display: flex; flex-wrap: wrap; gap: 4px 21px; font-size: 14px; }

.page-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin-bottom: 16px;
}
.page-heading > a { font-size: 15px; }
.research-section, .teaching-section { border-top: 1px solid var(--line); }
.research-section { padding: 18px 0 21px; }
.research-section h2 { font-size: 17px; margin-bottom: 11px; color: var(--muted); }
.paper + .paper { margin-top: 16px; }
.paper h3, .project summary { font-size: 19px; }
.paper h3 a { font-weight: 700; color: var(--ink); text-decoration-color: #d4c5c7; }
.paper h3 a:hover { color: var(--accent); }
.paper p { font-size: 15px; line-height: 1.5; margin: 4px 0 0; }
.paper .coauthors { color: var(--muted); }
.paper .status { color: var(--accent); }
.paper-actions { margin-top: 7px; font-size: 14px; }
.paper-actions > a { display: inline-block; margin-right: 13px; }
.paper-actions > details { display: inline; }
summary { color: var(--accent); cursor: pointer; }
.paper-actions summary { display: inline list-item; }
.paper-actions details[open] { display: block; margin-top: 5px; }
.paper-actions details p, .project > p { max-width: 75ch; }
.paper-actions details p { margin-top: 7px; border-left: 1px solid var(--line); padding-left: 12px; }
.project summary { color: var(--ink); line-height: 1.35; }
.project summary:hover { color: var(--accent); }

.teaching-documents { font-size: 15px; }
.teaching-section { padding: 15px 0 17px; }
.teaching-section h2 { font-size: 19px; margin-bottom: 10px; }
.teaching-section h2 span { color: var(--muted); font-size: 16px; }
.instructor-courses { list-style: none; margin: 0; padding: 0; }
.course-meta { margin-left: 6px; color: var(--muted); font-size: 13px; }
.course-project { margin-top: 4px; max-width: 58ch; font-size: 14px; }
.course .course-project p { display: block; margin: 0 0 3px; font-size: inherit; color: var(--muted); }
.course + .course { margin-top: 6px; }
.course h3 { display: inline; font-size: 16px; }
.course p { display: inline; margin-left: 7px; color: var(--muted); font-size: 13px; }
.course > a { display: inline-block; margin-left: 7px; font-size: 13px; }
.course .document-links { margin-top: 2px; }
.ta-columns { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; }
.ta-columns h3 { font-size: 15px; color: var(--muted); }
.ta-columns ul { list-style: none; padding: 0; margin: 4px 0 0; }
.ta-columns li { margin-bottom: 2px; font-size: 14px; line-height: 1.45; }
.ta-columns li span { color: var(--muted); font-size: 12px; white-space: nowrap; }


.footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
  border-top: 1px solid var(--line);
  margin: 20px 0 0;
  padding: 11px 0 13px;
  font-size: 13px;
  color: var(--muted);
}
.footer p { margin: 2px 0 0; font-size: 12px; line-height: 1.4; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.elsewhere { display: flex; gap: 13px; flex-wrap: wrap; }
.skip { position: absolute; top: -100px; left: 15px; padding: 8px; background: white; z-index: 2; }
.skip:focus { top: 8px; }

@media (max-width: 820px) {
  .site { padding: 0 27px; }
  .header { flex-wrap: wrap; gap: 8px 20px; }
}
@media (max-width: 620px) {
  .site { padding: 0 20px; }
  .header { padding: 16px 0 13px; }
  .header-logo { width: 58px; height: 42px; }
  .name { font-size: 24px; }
  nav { gap: 5px 21px; font-size: 15px; }
  main { padding-top: 19px; }
  .ta-columns { gap: 12px; }
  .footer { flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
  .home-layout, .teaching-layout { grid-template-columns: minmax(0, 1fr); }
  .home-layout {
    grid-template-areas: "title" "intro" "photo";
    grid-template-rows: auto;
    row-gap: 16px;
  }
  .teaching-layout {
    grid-template-areas: "courses" "photo";
    row-gap: 19px;
  }
}
@media (max-width: 360px) {
  .name { font-size: 22px; }
  .ta-columns { grid-template-columns: 1fr; }
}
@media print {
  .site { max-width: none; padding: 0; }
  .header { padding-top: 0; }
  nav, .skip, .footer { display: none; }
  .paper, .course { break-inside: avoid; }
  a { color: inherit; }
}


/* Compact homepage layout — desktop only */
@media (min-width: 900px) {

  /* Reduce empty space above and below content */
  .home-main {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  /* Bring Welcome closer to the introduction */
  .home-main .home-title {
    margin-top: 0;
    margin-bottom: 0.65rem;
  }

  /* Slightly tighten paragraph spacing */
  .home-main .intro p {
    margin-top: 0;
    margin-bottom: 0.7rem;
    line-height: 1.48;
  }

  /* Keep the job-market announcement compact */
  .home-main .intro p.market {
    margin-top: 0.15rem;
    margin-bottom: 0.45rem;
  }

  /* Bring the document links closer to the text */
  .home-main .document-links {
    margin-top: 0.3rem;
  }
}


@media (min-width: 900px) {

  /* Slightly reduce header and footer height */
  .site:has(.home-main) .header {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .site:has(.home-main) .footer {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
}

