@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond-VF.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/EBGaramond-Italic-VF.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  --ink: #1c1c1c;
  --muted: #5f6368;
  --title: #980000;
  --rule: #dadce0;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--serif); font-size: 17.33px; line-height: 1.5; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--title); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .4rem .7rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* header: site title left, pages right */
.top { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 12px 24px; }
.top.scrolled { box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.site-title { font-size: 20px; text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { font-weight: 700; }

main { max-width: 1040px; margin: 0 auto; padding: 0 24px 72px; }

/* home */
h1 { font-size: 44px; font-weight: 700; line-height: 1.2; margin: 56px 0 44px; }
.intro { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.portrait { display: block; width: 300px; aspect-ratio: 300 / 337; object-fit: cover; }
.portrait-fallback { display: none; width: 300px; aspect-ratio: 300 / 337; background: #f1f3f4; color: var(--muted); font-size: 56px; align-items: center; justify-content: center; }
.intro-text p { margin-bottom: 1.2rem; }

/* section headings (Research, Teaching, CV) */
h2 { font-size: 21.33px; font-weight: 700; line-height: 1.5; margin: 44px 0 8px; }
main > h2:first-child, main > section:first-child h2 { margin-top: 40px; }

/* research entries */
.paper { border-bottom: 1px solid var(--rule); padding: 18px 0 14px; }
.paper details > summary { list-style: none; display: flex; align-items: flex-start; gap: 20px; cursor: pointer; }
.paper details > summary::-webkit-details-marker { display: none; }
.paper-head { flex: 1; min-width: 0; }
.paper-line { margin: 0; font-size: 16px; line-height: 1.38; }
.title { color: var(--title); font-weight: 700; }
a.title { text-decoration: underline; text-decoration-color: var(--title); }
.status { margin: 6px 0 0; padding-left: 22px; font-size: 16px; line-height: 1.38; }
.status li { margin: 2px 0; }
.chev { flex: none; width: 10px; height: 10px; margin: 8px 6px 0 0; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details[open] .chev { transform: rotate(-135deg); margin-top: 12px; }
.abstract { padding: 10px 36px 4px 0; }
.abstract p { font-size: 16px; line-height: 1.55; margin: 0; }

/* teaching */
.place { font-style: italic; margin: 0 0 4px; }
.courses { margin: 0 0 8px; padding-left: 22px; }
.courses li { margin: 3px 0; }

/* cv */
.cv-links { margin: 0 0 24px; }
.cv-pages { display: grid; gap: 20px; min-height: 20rem; }
.cv-pages canvas { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
.pdf-fallback { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); background: #f1f3f4; }

.foot { max-width: 1040px; margin: 0 auto; padding: 0 24px 32px; font-size: 14px; color: var(--muted); }

@media (max-width: 760px) {
  .top { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 20px; }
  .nav { gap: 20px; }
  .nav .long { display: none; }
  main { padding: 0 20px 56px; }
  .foot { padding: 0 20px 28px; }
  h1 { font-size: 34px; margin: 32px 0 28px; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .portrait, .portrait-fallback { width: 200px; }
  .abstract { padding-right: 0; }
}
@media (min-width: 761px) { .nav .short { display: none; } }
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
@media print { .top, .skip { display: none; } details > .abstract { display: block; } }
