:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #17212b;
  --muted: #5b6875;
  --border: #d9e0e6;
  --accent: #1c5b72;
  --accent-2: #8a5d23;
  --accent-soft: #dfeef3;
  --max: 1120px;
  --shadow: 0 18px 55px rgba(18, 32, 44, 0.08);
  --radius: 18px;
  --radius-sm: 10px;
}


html[data-theme="light"] {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --text: #17212b;
  --muted: #5b6875;
  --border: #d9e0e6;
  --accent: #1c5b72;
  --accent-2: #8a5d23;
  --accent-soft: #dfeef3;
  --shadow: 0 18px 55px rgba(18, 32, 44, 0.08);
}

html[data-theme="dark"] {
  --bg: #10161c;
  --surface: #161e25;
  --surface-2: #202a32;
  --text: #edf2f5;
  --muted: #a8b4bd;
  --border: #2f3b44;
  --accent: #7dc1d8;
  --accent-2: #d6a35f;
  --accent-soft: #17313b;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.66;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--surface);
  padding: .7rem 1rem;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
}
.nav-wrap { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); font-weight: 760; letter-spacing: -.015em; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--text); color: var(--bg); font-size: .84rem; letter-spacing: .04em;
}
.nav-links { display: flex; align-items: center; gap: .28rem; }
.nav-links a, .theme-toggle {
  color: var(--text); text-decoration: none; padding: .5rem .68rem; border-radius: 8px; font-size: .92rem; background: transparent; border: 0; cursor: pointer;
}
.nav-links a:hover, .theme-toggle:hover { background: var(--surface-2); color: var(--text); }
.theme-toggle { font-size: 1rem; }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--text); font-size: 1.5rem; padding: .35rem; cursor: pointer; }

main { overflow: hidden; }
.hero { padding: clamp(4.5rem, 9vw, 7.5rem) 0 4rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); align-items: center; gap: clamp(2rem, 7vw, 6rem); }
.eyebrow { color: var(--accent); font-weight: 730; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; margin: 0 0 .9rem; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.025em; line-height: 1.13; }
h1 { font-size: clamp(3.15rem, 8vw, 6rem); margin: 0; font-weight: 650; }
.hero-title { margin-top: .55rem; font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 480; color: var(--muted); max-width: 760px; }
.hero-copy { max-width: 760px; font-size: clamp(1.08rem, 2vw, 1.25rem); margin: 1.5rem 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.65rem; }
.hero-university { display: inline-block; margin: .5rem 0 .75rem; text-decoration: none; }
.hero-university:hover { opacity: .82; }
.uhh-logo { width: 220px; max-width: 52vw; height: auto; display: block; }
.affiliation-copy { display: grid; gap: .12rem; border-left: 1px solid #e1e5e9; padding-left: 1rem; line-height: 1.25; }
.affiliation-copy strong { font-size: .88rem; }
.affiliation-copy small { color: #5d6670; font-size: .75rem; }
.hero-photo-wrap { justify-self: end; width: min(100%, 430px); }
.hero-photo-frame { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: calc(var(--radius) + 6px); border: 1px solid var(--border); background: linear-gradient(145deg,var(--surface),var(--surface-2)); box-shadow: var(--shadow); }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.photo-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); font-size: .9rem; letter-spacing: .02em; }
.contact-address { margin-top: 1rem; font-style: normal; line-height: 1.7; color: color-mix(in srgb, var(--bg) 76%, transparent); }
.paper-link { display: inline-flex; align-items: center; margin-top: .55rem; font-size: .82rem; font-weight: 730; letter-spacing: .01em; text-decoration: none; border-bottom: 1px solid currentColor; }
.cv-contact { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); }
.cv-contact h3 { margin: 0 0 .45rem; font-size: .95rem; }
.cv-contact p { margin: 0 0 .55rem; font-size: .84rem; line-height: 1.55; }
.cv-contact a { word-break: break-word; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .72rem 1rem; border-radius: 10px; border: 1px solid var(--border); text-decoration: none; font-weight: 650; color: var(--text); background: var(--surface); }
.btn:hover { transform: translateY(-1px); color: var(--text); border-color: var(--accent); }
.btn.primary { color: #fff; background: #1c5b72; border-color: #1c5b72; }
.btn.primary:hover { color: #fff; background: #15495d; }
html[data-theme="dark"] .btn.primary { color: #0c1a20; background: #7dc1d8; border-color: #7dc1d8; }
html[data-theme="dark"] .btn.primary:hover { background: #94cfe2; color: #0c1a20; }

.orbit::before, .orbit::after { content: ""; position: absolute; inset: 12%; border-radius: 50%; border: 1px solid var(--border); }
.orbit::after { inset: 29%; }
.stat:last-child { border-right: 0; }
.section { padding: clamp(4.6rem, 8vw, 7rem) 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { display: grid; grid-template-columns: .75fr 1.25fr; gap: 2rem; margin-bottom: 2rem; align-items: start; }
.section-kicker { color: var(--accent); font-weight: 760; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin: .3rem 0 0; }
.section h2 { font-size: clamp(2.1rem, 5vw, 3.45rem); margin: 0; }
.section-intro { margin: .2rem 0 0; color: var(--muted); font-size: 1.08rem; max-width: 720px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.45rem; box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.alt .card { background: var(--bg); }
.card-number { color: var(--accent-2); font-weight: 760; font-size: .8rem; letter-spacing: .08em; }
.card h3 { font-size: 1.5rem; margin: .7rem 0 .55rem; }
.card p { color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tag { padding: .28rem .55rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .76rem; color: var(--muted); }

.pub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.pub-card { display: flex; flex-direction: column; min-height: 240px; }
.pub-meta { color: var(--accent-2); font-weight: 720; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.pub-card h3 { font-size: 1.35rem; margin: .6rem 0 .55rem; }
.pub-card .authors { color: var(--muted); font-size: .9rem; margin-top: auto; padding-top: 1rem; }
.pub-card .journal { font-style: italic; color: var(--muted); }
.pub-card .pub-link { margin-top: .75rem; font-size: .88rem; font-weight: 700; }
.section-more { margin-top: 1.4rem; }

.project-list { display: grid; gap: 1rem; }
.project { display: grid; grid-template-columns: 175px 1fr; gap: 1.4rem; align-items: start; padding: 1.35rem 0; border-top: 1px solid var(--border); }
.project:last-child { border-bottom: 1px solid var(--border); }
.project-year { color: var(--accent); font-weight: 760; }
.project h3 { font-size: 1.4rem; margin: 0 0 .35rem; }
.project p { margin: .3rem 0; color: var(--muted); }
.project-featured { display: grid; grid-template-columns: minmax(0, 1fr) 155px; gap: 1.4rem; align-items: center; }
.project-logo-link { display: block; justify-self: end; width: 145px; padding: .45rem; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px rgba(18,32,44,.07); transition: transform .18s ease, box-shadow .18s ease; }
.project-logo-link:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(18,32,44,.11); }
.fuel2fire-logo { width: 100%; height: auto; display: block; border-radius: 9px; }

.teaching-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.4rem; align-items: start; }
.big-number { font-family: Georgia, "Times New Roman", serif; font-size: clamp(4.2rem, 10vw, 7rem); line-height: .9; color: var(--accent); }
.big-number-label { font-size: .95rem; color: var(--muted); margin-top: .65rem; }
.course-list { display: grid; gap: .55rem; }
.course { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.course span:last-child { color: var(--muted); white-space: nowrap; }

.timeline { position: relative; margin-left: .45rem; }
.timeline::before { content: ""; position: absolute; left: 7px; top: .5rem; bottom: .5rem; width: 1px; background: var(--border); }
.timeline-item { position: relative; display: grid; grid-template-columns: 115px 1fr; gap: 1.2rem; padding: 0 0 1.55rem 1.55rem; }
.timeline-item::before { content: ""; position: absolute; left: 2px; top: .48rem; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.alt .timeline-item::before { box-shadow: 0 0 0 4px var(--surface); }
.timeline-year { color: var(--accent); font-weight: 740; font-size: .88rem; }
.timeline-title { font-weight: 730; }
.timeline-sub { color: var(--muted); font-size: .92rem; }

.contact-box { background: var(--text); color: var(--bg); border-radius: calc(var(--radius) + 4px); padding: clamp(2rem, 5vw, 3.6rem); display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; }
.contact-box h2 { margin-top: 0; color: inherit; }
.contact-box p { color: color-mix(in srgb, var(--bg) 76%, transparent); }
.contact-links { display: grid; align-content: start; gap: .6rem; }
.contact-links a { color: inherit; text-decoration-color: color-mix(in srgb, var(--bg) 40%, transparent); }

.site-footer { padding: 2rem 0 3rem; color: var(--muted); font-size: .86rem; }
.footer-wrap { display: flex; justify-content: space-between; gap: 1rem; align-items: center; border-top: 1px solid var(--border); padding-top: 1.3rem; }
.footer-links { display: flex; gap: .8rem; flex-wrap: wrap; }

.page-hero { padding: 4.5rem 0 2.7rem; }
.page-hero h1 { font-size: clamp(2.7rem, 7vw, 4.8rem); }
.page-hero p { max-width: 760px; color: var(--muted); font-size: 1.08rem; }

.filter-bar { position: sticky; top: 72px; z-index: 50; padding: .8rem 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-block: 1px solid var(--border); }
.filter-inner { display: flex; gap: .65rem; flex-wrap: wrap; align-items: center; }
.search-input { flex: 1 1 280px; min-width: 0; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .62rem .8rem; }
.filter-btn { font: inherit; font-size: .84rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .48rem .75rem; cursor: pointer; }
.filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.publication-list { padding: 2rem 0 5rem; }
.year-group { margin-bottom: 2.3rem; }
.year-group h2 { font-size: 2rem; border-bottom: 1px solid var(--border); padding-bottom: .4rem; }
.publication-item { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.publication-item p { margin: 0; }
.publication-item a { word-break: break-word; }
.publication-item.hidden, .year-group.hidden { display: none; }

.cv-grid { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; padding: 1rem 0 5rem; }
.cv-aside { position: sticky; top: 95px; align-self: start; }
.cv-aside .card { padding: 1.15rem; }
.cv-aside nav { display: grid; gap: .2rem; margin-top: .8rem; }
.cv-aside nav a { text-decoration: none; padding: .36rem .4rem; border-radius: 6px; color: var(--muted); font-size: .88rem; }
.cv-aside nav a:hover { background: var(--surface-2); color: var(--text); }
.cv-main section { padding: .5rem 0 1.4rem; border-bottom: 1px solid var(--border); }
.cv-main h2 { font-size: 1.8rem; }
.cv-entry { display: grid; grid-template-columns: 125px 1fr; gap: 1.2rem; padding: .5rem 0; }
.cv-date { color: var(--accent); font-weight: 720; font-size: .88rem; }
.cv-entry p { margin: .18rem 0; color: var(--muted); }

.legal { max-width: 780px; padding: 3rem 0 5rem; }
.legal h1 { font-size: 3rem; }
.legal h2 { margin-top: 2rem; }

@media (max-width: 900px) {
  .hero-grid, .section-head, .teaching-wrap, .contact-box, .cv-grid { grid-template-columns: 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .cv-aside { position: static; }
  .cv-aside nav { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .menu-toggle { display: inline-flex; }
  .nav-links { position: absolute; left: 1rem; right: 1rem; top: 64px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: .5rem; display: none; flex-direction: column; align-items: stretch; }
  .nav-links.open { display: flex; }
  .nav-links a, .theme-toggle { text-align: left; }
  .hero { padding-top: 3.6rem; }
  .pub-grid { grid-template-columns: 1fr; }
  .hero-photo-wrap { justify-self: start; width: min(100%, 390px); margin-top: .75rem; }
  .affiliation-copy { border-left: 0; border-top: 1px solid #e1e5e9; padding-left: 0; padding-top: .65rem; width: 100%; }
  .project { grid-template-columns: 1fr; gap: .25rem; }
  .project-featured { grid-template-columns: 1fr; }
  .project-logo-link { justify-self: start; width: 120px; margin-top: .6rem; }
  .timeline-item, .cv-entry { grid-template-columns: 1fr; gap: .25rem; }
  .footer-wrap { flex-direction: column; align-items: flex-start; }
}

@media print {
  .site-header, .hero-actions, .site-footer, .filter-bar { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .section, .page-hero { padding: 1rem 0; }
  .card { box-shadow: none; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}

/* Podcast alongside the current research project. */
.podcast-card { grid-column: 1 / -1; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 1.2rem; align-items: center; margin-top: .4rem; padding: 1.15rem; color: var(--text); text-decoration: none; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .18s ease, background .18s ease; }
.podcast-card:hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.podcast-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.podcast-artwork { display: block; width: 104px; height: 104px; object-fit: cover; border-radius: 8px; }
.podcast-copy { display: grid; gap: .35rem; min-width: 0; }
.podcast-label { font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.podcast-title { font-size: 1.12rem; font-weight: 750; line-height: 1.35; }
.podcast-description { color: var(--muted); font-size: .93rem; line-height: 1.5; }
.podcast-action { margin-top: .25rem; color: var(--accent); font-size: .88rem; font-weight: 750; }
.podcast-action > span:first-child { margin-right: .3rem; font-size: .8em; }
.podcast-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
  .podcast-card { grid-template-columns: 72px minmax(0, 1fr); gap: .85rem; padding: .9rem; align-items: start; }
  .podcast-artwork { width: 72px; height: 72px; }
  .podcast-title { font-size: 1rem; }
  .podcast-description { font-size: .88rem; }
}
