:root {
  color-scheme: light;
  --paper: #fafaf7;
  --ink: #282e2b;
  --muted: #636b65;
  --accent: #326749;
  --accent-hover: #163e28;
  --link-underline: #9bb3a0;
  --line: #dddfd6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171c19;
  --ink: #e7ece6;
  --muted: #a7b2a8;
  --accent: #9dccac;
  --accent-hover: #c4edcf;
  --link-underline: #63856c;
  --line: #354037;
}

/* Follow the browser even when JavaScript is unavailable. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --paper: #171c19;
    --ink: #e7ece6;
    --muted: #a7b2a8;
    --accent: #9dccac;
    --accent-hover: #c4edcf;
    --link-underline: #63856c;
    --line: #354037;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 32px; }
body { margin: 0; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
button { font: inherit; }
[hidden] { display: none !important; }
.page { width: min(100% - 96px, 960px); margin-inline: auto; }
.skip-link { position: absolute; top: -80px; left: 24px; padding: 12px; background: var(--paper); z-index: 1; }
.skip-link:focus { top: 12px; }

.site-header { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 33px 27px; border-bottom: 1px solid var(--line); }
.wordmark { font-family: Georgia, "Times New Roman", serif; font-size: 29px; font-weight: 700; letter-spacing: -2px; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--accent); }
.site-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 26px; align-items: center; font-size: 14px; line-height: 1.6; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); text-decoration: underline; }
.theme-toggle { display: grid; place-items: center; width: 32px; height: 32px; padding: 6px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.theme-toggle:hover { color: var(--accent); background: var(--line); }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
.file-type { font-size: 0.65em; letter-spacing: 0.035em; vertical-align: 0.12em; margin-left: 3px; }

.intro { display: grid; grid-template-columns: minmax(0, 1fr) 224px; column-gap: 64px; padding-block: 62px 56px; }
.eyebrow { margin: 0 0 13px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(34px, 4vw, 46px); line-height: 1.15; letter-spacing: -1.6px; }
.bio { margin-top: 27px; font-size: 16px; line-height: 1.75; }
.bio p { margin: 0 0 17px; }
.bio a { text-decoration-color: var(--link-underline); }
.portrait { margin: 37px 0 0; align-self: start; }
.portrait img { width: 100%; height: 290px; display: block; object-fit: cover; object-position: center 42%; border-radius: 14px; }
.contact { color: var(--muted); white-space: nowrap; }
.contact button { background: transparent; border: 0; padding: 0; color: var(--muted); cursor: pointer; text-align: left; }
.contact button:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.contact button span { margin-left: 4px; }

.research { border-top: 1px solid var(--line); padding-top: 30px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 400; letter-spacing: -0.5px; }
.all-publications { font-size: 13px; text-decoration: none; white-space: nowrap; }
.all-publications span { margin-left: 4px; }
.publications { list-style: none; margin: 0; padding: 0; }
.publication { display: grid; grid-template-columns: 188px minmax(0, 1fr); align-items: start; gap: 26px; margin-bottom: 38px; }
.publication-image { display: block; margin-top: 3px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; }
.publication-image picture { display: block; width: 100%; height: 100%; }
.publication-image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.publication-year { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
h3 { margin: 0 0 7px; max-width: 760px; font-size: 16px; line-height: 1.5; font-weight: 600; }
h3 a { color: var(--ink); text-decoration: none; }
h3 a:hover { color: var(--accent); }
.authors { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.authors strong { color: var(--ink); font-weight: 500; }
.venue { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-style: italic; line-height: 1.6; }
.publication-summary { margin: 10px 0 0; font-size: 14px; line-height: 1.7; }
.publication-links { display: flex; gap: 20px; margin-top: 9px; font-size: 12px; font-weight: 500; }
.publication-links a { text-decoration: none; }
.publication-links a:hover { text-decoration: underline; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 48px; padding-block: 22px 36px; color: var(--muted); font-size: 12px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer > a { white-space: nowrap; }

@media (max-width: 780px) {
  .page { width: min(100% - 56px, 640px); }
  .intro { grid-template-columns: minmax(0, 1fr) 160px; column-gap: 30px; padding-top: 44px; }
  .portrait img { height: 210px; }
  .intro-copy { display: contents; }
  .eyebrow, h1 { grid-column: 1; }
  .eyebrow { align-self: end; }
  h1 { align-self: center; font-size: 38px; }
  .portrait { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  .bio { grid-column: 1 / -1; }
  .publication { grid-template-columns: 148px minmax(0, 1fr); gap: 22px; }
}

@media (max-width: 480px) {
  .page { width: calc(100% - 40px); }
  .site-header { padding-block: 22px 20px; }
  .site-header nav { display: grid; grid-template-columns: repeat(2, auto); gap: 7px 18px; font-size: 12px; }
  .contact { justify-self: start; }
  .theme-toggle { justify-self: end; }
  .intro { grid-template-columns: minmax(0, 1fr) 100px; column-gap: 18px; padding-block: 34px 35px; }
  .portrait img { height: 145px; }
  .eyebrow { font-size: 9px; line-height: 1.7; letter-spacing: 0.09em; margin-bottom: 8px; }
  h1 { font-size: 32px; letter-spacing: -1px; }
  .bio { font-size: 15px; line-height: 1.75; }
  .section-heading { align-items: start; flex-direction: column; gap: 10px; margin-bottom: 28px; }
  h2 { font-size: 25px; }
  .publication { grid-template-columns: 1fr; gap: 14px; margin-bottom: 34px; }
  .publication-image { width: min(100%, 240px); margin-top: 0; }
  h3 { font-size: 15px; }
  .publication-year { font-size: 11px; }
  .publication-summary { font-size: 13px; }
  .site-footer { margin-top: 35px; }
}

@media print {
  :root[data-theme], :root:not([data-theme]) { color-scheme: light; --paper: #fff; --ink: #000; --muted: #333; --accent: #000; --accent-hover: #000; --link-underline: #777; --line: #ccc; background: white; color: black; }
  .page { width: 100%; }
  .site-header, .contact, .site-footer, .skip-link { display: none; }
  .intro { padding-top: 0; }
  .publication { break-inside: avoid; }
  a { color: inherit; }
}
