:root {
  --bg: #ffffff;
  --text: #24282c;
  --muted: #60676e;
  --line: #e1e4e6;
  --accent: #852b37;
  --accent-dark: #5e1a24;
  --venue: #3d625e;
  --max-width: 960px;
  --anchor-offset: 84px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--anchor-offset);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
strong { font-weight: 700; }

.container { width: min(100% - 64px, var(--max-width)); margin: 0 auto; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 20;
  padding: 8px 16px;
  background: #fff;
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 58px; gap: 24px; }
.site-title { color: var(--text); font-family: Georgia, "Times New Roman", serif; font-size: 21px; font-weight: 700; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { display: inline-flex; align-items: center; min-height: 34px; color: var(--muted); font-size: 14px; padding: 6px 0; }
.nav a:hover { color: var(--accent); }

.layout { padding: 32px 0 40px; }
.overview { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.profile { display: grid; grid-template-columns: 114px minmax(0, 1fr); column-gap: 24px; row-gap: 8px; align-items: start; min-width: 0; margin-bottom: 22px; }
.portrait { display: block; grid-column: 1; grid-row: 1 / 3; width: 114px; height: 152px; object-fit: cover; background: #f4f5f6; }
.profile-details { grid-column: 2; min-width: 0; }
.profile h1 { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 28px; line-height: 1.15; }
.role, .affiliation { margin: 0; font-size: 14px; }
.role { color: var(--muted); }
.profile-contact { grid-column: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.profile-contact > * { min-width: 0; max-width: 100%; }
.profile-email { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.links { display: flex; gap: 6px 20px; flex-wrap: wrap; width: fit-content; max-width: min(100%, 38rem); margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; }
.links li { min-width: 0; max-width: 100%; }
.links a { display: block; max-width: 100%; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #d3afb5; text-underline-offset: 4px; }

.content { min-width: 0; }
.section { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.section:last-child { margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.section h2 { margin: 0 0 13px; font-family: Georgia, "Times New Roman", serif; font-size: 23px; line-height: 1.25; font-weight: 700; }
.section p { margin: 0; }
.overview .intro { min-width: 0; padding: 0; margin: 0; border: 0; }
.intro p + p { margin-top: 10px; }
.intro { text-wrap: pretty; }
.intro a { text-decoration: underline; text-decoration-color: #d3afb5; text-underline-offset: 3px; }

.news-list { margin: 0; padding: 0; list-style: none; }
.news-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; margin: 0 0 9px; font-size: 14px; line-height: 1.5; }
.news-list li:last-child { margin-bottom: 0; }
.news-list time { color: var(--muted); font-variant-numeric: tabular-nums; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; }
.section-head h2 { margin-bottom: 0; }
.small-link { font-size: 12px; white-space: nowrap; }
.year-nav { display: flex; gap: 22px; margin: 12px 0 18px; font-size: 13px; }
.year-nav a { display: inline-flex; align-items: center; min-height: 28px; text-decoration: underline; text-decoration-color: #d3afb5; text-underline-offset: 4px; }
.publication-group { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 18px; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--line); }
.year-nav + .publication-group { padding-top: 0; margin-top: 0; border-top: 0; }
.publication-year { margin: 0; font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.65; font-variant-numeric: tabular-nums; }
.publications { margin: 0; padding: 0; list-style: none; min-width: 0; }
.publications li { padding: 0 0 18px; }
.publications li:last-child { padding-bottom: 0; }
.paper-title { display: block; color: var(--text); font-weight: 700; font-size: 15px; line-height: 1.4; }
.paper-title:hover { color: var(--accent); }
.section .authors { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.authors strong { color: var(--text); }
.section .venue { margin-top: 3px; color: var(--venue); font-size: 13px; line-height: 1.45; }
.paper-links { display: flex; flex-wrap: wrap; gap: 17px; margin-top: 4px; font-size: 12px; line-height: 1.5; }
.paper-links a { text-decoration: underline; text-decoration-color: #d3afb5; text-underline-offset: 3px; }

.archive { margin-top: 14px; }
.archive > summary { width: fit-content; padding: 4px 0; color: var(--accent); font-size: 13px; cursor: pointer; }
.archive > summary:hover { color: var(--accent-dark); }
.archive > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.archive .collapse-label { display: none; }
.archive[open] > summary .expand-label { display: none; }
.archive[open] > summary .collapse-label { display: inline; }
.archive > .news-list { margin-top: 12px; }
.archive > .publication-group { margin-top: 12px; padding-top: 16px; }

.service-role { margin: 0 0 10px; color: var(--text); font-size: 14px; font-weight: 700; }
.service-list + .service-role { margin-top: 18px; }
.service-year { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 28px; margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.service-list li { min-width: 0; padding-left: 2px; }

.contact-details { display: flex; flex-direction: column; gap: 3px; margin-top: 10px; font-size: 14px; font-style: normal; }
.contact-details a { overflow-wrap: anywhere; }
.contact-details span { color: var(--muted); }
.footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 12px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer p { margin: 0; }

@media (max-width: 1000px) {
  .container { width: min(100% - 48px, var(--max-width)); }
}

@media (max-width: 760px) {
  :root { --anchor-offset: 118px; }
  .container { width: min(100% - 40px, var(--max-width)); }
  .header-inner { flex-direction: column; align-items: flex-start; min-height: 0; padding: 12px 0 9px; gap: 3px; }
  .site-title { font-size: 19px; }
  .nav { gap: 22px; }
  .nav a { font-size: 13px; }
  .layout { padding-top: 24px; padding-bottom: 30px; }
  .overview { padding-bottom: 22px; margin-bottom: 22px; }
  .profile { grid-template-columns: 96px minmax(0, 1fr); column-gap: 20px; margin-bottom: 20px; }
  .portrait { width: 96px; height: 128px; }
  .profile h1 { font-size: 27px; }
  .links a, .paper-links a { display: inline-flex; align-items: center; min-height: 30px; }
  .paper-links { gap: 4px 18px; margin-top: 2px; }
  .section h2 { font-size: 22px; }
  .section { padding-bottom: 22px; margin-bottom: 22px; }
  .service-list { grid-template-columns: 1fr; }
  .section-head { flex-direction: row; align-items: baseline; gap: 10px; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .container { width: min(100% - 32px, var(--max-width)); }
  :root { --anchor-offset: 144px; }
  .nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 2px 12px; }
  .profile { grid-template-columns: 80px minmax(0, 1fr); column-gap: 16px; }
  .portrait { width: 80px; height: 107px; }
  .profile h1 { font-size: 25px; }
  .profile-email { font-size: 13px; }
  .affiliation, .role { font-size: 13px; }
  .profile.has-extra-links .portrait { grid-row: 1; }
  .profile.has-extra-links .profile-contact { grid-column: 1 / -1; margin-top: 4px; }
  .links { column-gap: 18px; row-gap: 2px; }
  .section-head { flex-direction: column; gap: 8px; }
  .publication-group { grid-template-columns: 1fr; gap: 10px; }
  .publication-year { color: var(--accent); }
  .news-list li { gap: 10px; grid-template-columns: 42px minmax(0, 1fr); }
  .paper-title { font-size: 15px; }
}

@media (max-width: 380px) {
  .profile-details { align-self: center; }
  .portrait { grid-row: 1; }
  .profile-contact { grid-column: 1 / -1; margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  body { font-size: 10pt; line-height: 1.45; }
  .site-header, .skip-link, .year-nav { display: none; }
  .container { width: 100%; }
  .layout { padding: 0; }
  .profile { grid-template-columns: 96px minmax(0, 1fr); column-gap: 20px; margin-bottom: 18px; }
  .portrait { width: 96px; height: 128px; }
  .publication-group { break-inside: auto; }
  .section h2, .service-role { break-after: avoid; }
  .profile, .service-list li { break-inside: avoid; }
  .publications li { break-inside: avoid; }
  .archive > summary { display: none; }
  .archive::details-content { content-visibility: visible; }
  .archive > .news-list { display: block !important; }
  .archive > .publication-group { display: grid !important; }
  a { color: var(--text); }
  .footer { margin-top: 24px; }
}
