/* Solarized-inspired colors, with stronger text contrast for long-form reading. */
:root {
  color-scheme: light;
  --background: #fdf6e3;
  --surface: #eee8d5;
  --heading: #073642;
  --text: #526970;
  --muted: #657b83;
  --accent: #177970;
  --line: #d9d6c5;
  --header: rgb(253 246 227 / 96%);
  --focus: #b58900;
  --header-height: 81px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #002b36;
  --surface: #073642;
  --heading: #eee8d5;
  --text: #a6b6b6;
  --muted: #93a1a1;
  --accent: #6bc7b9;
  --line: #28505a;
  --header: rgb(0 43 54 / 96%);
  --focus: #b58900;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 24px); }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--background); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { text-decoration: underline; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 6px; border-radius: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, .section-heading h2, .paper h4 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; color: var(--heading); }
.container { width: min(100% - 112px, 1040px); margin-inline: auto; }
.skip-link { position: fixed; left: 20px; top: -100px; z-index: 100; background: var(--heading); color: var(--background); padding: 8px 16px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 10; background: var(--header); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.header-inner { min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.wordmark { color: var(--heading); text-decoration: none; font-size: 1.0625rem; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.wordmark span { color: var(--accent); margin-left: 2px; }
.wordmark:hover { text-decoration: none; color: var(--accent); }
.header-controls { display: flex; align-items: center; gap: 30px; }
nav { display: flex; gap: 26px; }
nav a { position: relative; color: var(--muted); font-size: .875rem; text-decoration: none; padding-block: 10px; }
nav a:hover, nav a[aria-current="location"] { color: var(--heading); text-decoration: none; }
nav a::after { position: absolute; content: ""; height: 2px; background: var(--accent); bottom: 3px; left: 0; right: 0; transform: scaleX(0); transition: transform 160ms ease; }
nav a[aria-current="location"]::after, nav a:hover::after { transform: scaleX(1); }
.theme-toggle { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: transparent; font-size: .875rem; }
.theme-toggle:hover { background: var(--surface); color: var(--heading); }
.theme-toggle svg { flex-shrink: 0; }
.icon-sun, [data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.about-section { display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 76px; align-items: start; padding-block: 64px 66px; }
.about-intro { grid-column: 1; }
.profile-photo { grid-column: 2; grid-row: 1 / 3; display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 35%; border: 1px solid var(--line); border-radius: 6px; }
.section-eyebrow, .detail-label { font-size: .75rem; font-weight: 600; line-height: 1.5; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.section-eyebrow { color: var(--accent); margin-bottom: 14px; }
h1 { font-size: clamp(2.5rem, 5vw, 3.75rem); line-height: 1.16; letter-spacing: -.045em; }
.affiliation { margin-top: 15px; color: var(--muted); font-size: 1rem; }
.affiliation span { padding-inline: 9px; color: var(--line); }
.intro-email { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; }
.intro-email .email-address, .intro-email a { color: var(--accent); overflow-wrap: anywhere; }
.intro-email .cv-link { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 600; white-space: nowrap; }
.intro-email .cv-link[aria-disabled="true"] { color: var(--muted); cursor: default; text-decoration: none; }
.intro-grid { grid-column: 1; display: grid; gap: 28px; margin-top: 30px; }
.bio { max-width: 620px; font-size: 1.0625rem; line-height: 1.8; }
.bio p + p { margin-top: 15px; }
.profile-details { border-left: 1px solid var(--line); padding-left: 28px; }
.profile-details p { margin-top: 10px; font-size: .9375rem; line-height: 1.8; }
.text-link { display: inline-block; font-size: .875rem; text-decoration: none; margin-top: 17px; }
.text-link span { margin-left: 5px; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 17px; }
.profile-links .text-link { margin-top: 0; white-space: nowrap; }
.profile-links [aria-disabled="true"] { color: var(--muted); cursor: default; text-decoration: none; }
.page-section { padding-block: 42px 54px; border-top: 1px solid var(--line); }
.section-heading { display: flex; gap: 24px; justify-content: space-between; align-items: baseline; margin-bottom: 32px; }
.section-heading h2 { font-size: 2.125rem; line-height: 1.3; letter-spacing: -.025em; }
.section-caption { color: var(--muted); font-size: .8125rem; }
.research-group + .research-group { margin-top: 56px; }
.group-title { font-size: .75rem; letter-spacing: .11em; font-weight: 600; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.paper + .paper { margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.project-list { list-style: none; margin: 24px 0 0; padding: 0; }
.project-list > li + li { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--line); }
.project-list .paper-authors { margin-top: 10px; }
.paper-designation { margin-top: 10px; color: var(--accent); font-size: .875rem; font-weight: 600; }
.paper h4 { font-size: 1.375rem; line-height: 1.45; letter-spacing: -.015em; }
.paper h4 a { color: inherit; text-decoration: none; }
.paper h4 a:hover { color: var(--accent); text-decoration: underline; }
.paper-authors { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.paper-status { margin-top: 6px; font-size: .875rem; font-style: italic; }
.paper-citation { margin-top: 6px; font-size: .875rem; }
.abstract { margin-top: 13px; }
.abstract summary { display: flex; gap: 9px; align-items: center; width: fit-content; min-height: 36px; list-style: none; color: var(--accent); font-size: .875rem; }
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.disclosure-icon { width: 10px; height: 10px; position: relative; }
.disclosure-icon::before, .disclosure-icon::after { position: absolute; content: ""; background: currentColor; }
.disclosure-icon::before { width: 10px; height: 1px; top: 4px; }
.disclosure-icon::after { width: 1px; height: 10px; left: 4px; transition: transform 160ms ease; }
details[open] .disclosure-icon::after { transform: rotate(90deg); }
.abstract-content { max-width: 780px; padding: 15px 20px; margin-top: 9px; border-left: 2px solid var(--accent); background: var(--surface); font-size: .9375rem; }
.abstract-content p + p { margin-top: 12px; }
.paper-links { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; font-size: .875rem; }
.paper-links a { text-decoration: none; }
.paper-links a:hover { text-decoration: underline; }
.project-description { max-width: 78ch; margin-top: 16px; font-size: 1rem; line-height: 1.8; }
.contact-section { padding-bottom: 64px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-grid p, address { margin-top: 12px; font-style: normal; font-size: .9375rem; }
.contact-grid a { overflow-wrap: anywhere; }
.site-footer { padding-block: 24px 32px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer a span { margin-left: 6px; }

@media (max-width: 760px) {
  .container { width: calc(100% - 48px); }
  .header-controls { gap: 20px; }
  nav { gap: 20px; }
  .about-section { grid-template-columns: minmax(0, 1fr) 200px; column-gap: 34px; padding-block: 46px 48px; }
  .section-heading { margin-bottom: 28px; }
}

@media (max-width: 580px) {
  :root { --header-height: 116px; }
  .header-inner { min-height: 115px; gap: 0; flex-wrap: wrap; padding-block: 14px 8px; }
  .wordmark { width: 100%; }
  .header-controls { width: 100%; justify-content: space-between; gap: 16px; }
  nav { gap: 25px; }
  .theme-toggle { min-height: 36px; }
  .about-section { grid-template-columns: minmax(0, 1fr); }
  .profile-photo { grid-column: 1; grid-row: auto; width: min(100%, 220px); margin-top: 28px; }
  .intro-grid { grid-template-columns: 1fr; gap: 26px; margin-top: 27px; }
  .profile-details { padding-left: 18px; }
  .profile-details p { margin-top: 8px; }
  .bio { font-size: 1rem; }
  .affiliation { font-size: .9375rem; }
  .affiliation span { padding-inline: 5px; }
  .section-heading { flex-wrap: wrap; gap: 7px; }
  .section-heading h2 { font-size: 1.875rem; }
  .section-caption { width: 100%; }
  .page-section { padding-block: 34px 42px; }
  .paper h4 { font-size: 1.25rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding-bottom: 24px; }
}

@media (max-width: 400px) {
  .header-controls { gap: 12px; }
  nav { gap: 18px; }
  .theme-toggle { min-width: 40px; padding-inline: 10px; }
  .theme-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; --background: white; --surface: white; --heading: black; --text: #222; --muted: #444; --accent: #222; --line: #ccc; }
  .container { width: 100%; }
  .site-header, .skip-link, .site-footer, .abstract summary { display: none; }
  .about-section { padding-top: 0; }
  .page-section { padding-block: 24px; }
  .paper { break-inside: avoid; }
  a { text-decoration: none; }
}
