:root {
  color-scheme: light dark;
  --background: #fcfbf8;
  --text: #292e2b;
  --secondary: #626a64;
  --link: #345b49;
  --line: #e2e5dd;
  --focus: #27754d;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; border-radius: 1px; }
p { margin: 0 0 1rem; }
strong { font-weight: 600; }
h1, h2, h3 { color: var(--text); }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { margin: 0 0 14px; font-size: 2.1rem; line-height: 1.2; letter-spacing: -.055rem; }
h2 { margin: 0; font-size: 1.6rem; line-height: 1.3; letter-spacing: -.025rem; }
h3 { margin: 0 0 .45rem; font-size: 1.03rem; font-weight: 600; line-height: 1.45; }

.page { max-width: 940px; padding: 64px 40px 32px; margin: 0 auto; }
.intro { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 44px; align-items: center; }
.intro-copy { min-width: 0; }
.bio { font-size: 1.0625rem; line-height: 1.65; }
.bio p:last-child { margin: 0; }
.portrait { display: block; width: 100%; height: auto; border-radius: 3px; }
.social-links { position: relative; display: flex; flex-wrap: wrap; justify-content: flex-start; width: fit-content; max-width: 100%; margin-top: 18px; gap: 3px 16px; font-size: .85rem; line-height: 1.8; }
.social-links > a, .email-toggle { white-space: nowrap; }
.email-toggle { display: inline-block; color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; cursor: pointer; list-style: none; }
.email-toggle::-webkit-details-marker { display: none; }
.email-toggle:hover { text-decoration-thickness: 2px; }
.email-card { position: absolute; z-index: 2; top: calc(100% + 10px); right: 0; width: max-content; max-width: calc(100vw - 48px); padding: 13px 35px 13px 15px; border: 1px solid var(--line); border-radius: 4px; background: var(--background); box-shadow: 0 5px 18px rgb(0 0 0 / 9%); text-align: left; }
.email-address { overflow-wrap: anywhere; }
.email-close { position: absolute; top: 4px; right: 5px; width: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--secondary); font: inherit; font-size: 1.15rem; line-height: 1; cursor: pointer; }

.work-section { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 34px; }
.work-links { display: flex; flex-wrap: wrap; gap: .2rem 1rem; list-style: none; padding: 0; margin: .65rem 0 0; font-size: .83rem; line-height: 1.7; }

.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.all-publications { font-size: .8rem; white-space: nowrap; }
.work-list { margin-top: 14px; }
.work-item { padding: 17px 0; }
.work-toggle { position: relative; display: block; padding-right: 26px; list-style: none; cursor: pointer; }
.work-toggle::-webkit-details-marker { display: none; }
.work-title { display: block; color: var(--text); font-size: 1.03rem; line-height: 1.5; }
.project-name { color: var(--link); font-weight: 700; }
.title-separator { color: var(--secondary); padding: 0 .12em; }
.authors { display: block; margin-top: 5px; color: var(--secondary); font-size: .83rem; line-height: 1.65; }
.authors strong { color: var(--text); font-weight: 650; }
.venue { display: block; margin-top: 4px; font-size: .78rem; color: var(--secondary); }
.work-chevron { position: absolute; right: 3px; top: 7px; width: 7px; height: 7px; border-right: 1px solid var(--secondary); border-bottom: 1px solid var(--secondary); transform: rotate(45deg); transition: transform .18s ease; }
.work-disclosure[open] .work-chevron { transform: translateY(3px) rotate(225deg); }
.work-details { padding: 10px 26px 2px 0; }
.work-summary { margin: 0; font-size: .91rem; line-height: 1.7; }
.work-details .work-links { margin-top: 7px; }
.work-details .work-links:first-child { margin-top: 0; }
.contribution-note { margin: 8px 0 0; color: var(--secondary); font-size: .75rem; }
.skip-link { position: absolute; top: -100px; left: 24px; padding: 8px 12px; background: var(--background); z-index: 1; }
.skip-link:focus { top: 12px; }

@media (prefers-color-scheme: dark) {
  :root { --background: #181b18; --text: #e5e8e1; --secondary: #aeb7ad; --link: #abd0b8; --line: #353e34; --focus: #abd0b8; }
}
@media (max-width: 700px) {
  .page { padding: 44px 28px 28px; }
  .intro { grid-template-columns: 160px minmax(0, 1fr); gap: 28px; }
  h1 { font-size: 1.85rem; }
}
@media (max-width: 640px) {
  .page { padding: 30px 24px 24px; }
  .intro { grid-template-columns: 100px minmax(0, 1fr); gap: 20px; }
  .profile { grid-column: 1; grid-row: 1; }
  .intro-copy { display: contents; }
  h1 { grid-column: 2; grid-row: 1; font-size: 1.85rem; margin: 0; }
  .bio, .social-links { grid-column: 1 / -1; }
  .social-links { margin-top: 0; column-gap: 12px; }
  h2 { font-size: 1.45rem; }
  .work-section { margin-top: 28px; padding-top: 24px; }
}
@media (pointer: coarse) {
  .social-links > a, .email-toggle, .work-links a, .all-publications { min-height: 44px; display: inline-flex; align-items: center; }
  .email-close { width: 32px; height: 32px; }
  .work-toggle { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .work-chevron { transition: none; }
}
@media print {
  :root { --background: #fff; --text: #222; --secondary: #444; --link: #222; --line: #ccc; }
  .page { max-width: none; padding: 0; }
  .skip-link { display: none; }
  .work-section { margin-top: 24px; padding-top: 20px; }
  .work-item { break-inside: avoid; }
}
