/* Gemeinsame Bausteine aller Themes (wird vor das style.css des Themes gesetzt).
   Alles ist an Klassen gebunden, damit es kein Theme ungewollt beeinflusst.
   Farben/Abstände kommen aus den Variablen des jeweiligen Themes. */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); }

/* ---------- Aufklapper (Abstract) ---------- */
.disclosure > summary {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; list-style: none; user-select: none;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before {              /* Chevron, 1.5px Strich wie alle Icons */
  content: ""; width: 6px; height: 6px; flex: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform 200ms var(--ease-out);
}
.disclosure[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.disclosure[open] > .disclosure-body { animation: disclosure-in 200ms var(--ease-out); }
@keyframes disclosure-in { from { opacity: 0; transform: translateY(-8px); } }

/* Neuere Browser: Höhe weich auf- (200ms) und schneller zuklappen (120ms) */
@supports (interpolate-size: allow-keywords) {
  .disclosure { interpolate-size: allow-keywords; }
  .disclosure::details-content {
    block-size: 0; overflow-y: clip;
    transition: block-size 120ms ease-in, content-visibility 120ms allow-discrete;
  }
  .disclosure[open]::details-content {
    block-size: auto; transition-duration: 200ms; transition-timing-function: var(--ease-out);
  }
}

/* ---------- Dropdown-Menü (wächst aus dem Button heraus) ---------- */
.menu { position: relative; }
.menu > summary {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; list-style: none; user-select: none;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after {
  content: ""; width: 5px; height: 5px; flex: none;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 200ms var(--ease-out);
}
.menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 20;
  min-width: 224px; padding: 8px;
  background: var(--surface, #fff); color: var(--text, #111);
  border: 1px solid var(--border, rgba(0, 0, 0, .1)); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .06), 0 16px 32px rgba(15, 23, 42, .06);
  transform-origin: top right;
  animation: menu-in 200ms var(--ease-out);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px) scale(.96); } }
.menu-panel a {
  display: block;
  padding: 8px 12px; border-radius: 4px;           /* 12px außen − 8px Innenabstand */
  color: var(--text, #111); text-decoration: none; font-size: .875rem; white-space: nowrap;
  transition: background-color 120ms ease-out;
}
.menu-panel a:hover { background: var(--hover, rgba(0, 0, 0, .05)); }
.menu-label { margin: 0; padding: 12px 12px 4px; font-size: .75rem; font-weight: 600; color: var(--muted, #666); }
.menu-label:first-child { padding-top: 4px; }

/* ---------- Weniger Bewegung, wenn im System so eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after, ::details-content {
    animation: none !important; transition: none !important;
  }
}

/* Nur für Screenreader sichtbar (z. B. Spaltenköpfe ohne sichtbaren Text) */
.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; }

/* Theme "profile" – feste Profilspalte links, Serif nur für Name und Überschriften,
   ein Akzent (Navy) ausschließlich für Links, Fokus und den aktiven Menüpunkt. */
:root {
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --r1: 4px; --r2: 8px; --r3: 12px;

  /* Neutrale Töne leicht Richtung Navy getönt */
  --bg: #f8f9fb;
  --surface: #ffffff;
  --text: #17202b;
  --muted: #5a6575;            /* 5.6:1 auf dem Hintergrund */
  --border: rgba(23, 32, 43, .10);
  --hover: rgba(23, 32, 43, .05);
  --chip: rgba(23, 32, 43, .06);
  --accent: #1d4f86;
  --accent-soft: rgba(29, 79, 134, .10);
  --on-accent: #ffffff;
  --tile: transparent;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c; --surface: #1a2029; --text: #e7ebf0; --muted: #9ea8b6;
    --border: rgba(231, 235, 240, .12); --hover: rgba(231, 235, 240, .06); --chip: rgba(231, 235, 240, .08);
    --accent: #8cbcf0; --accent-soft: rgba(140, 188, 240, .14); --on-accent: #12161c; --tile: #ffffff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--s6); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 var(--s4); }
a { color: var(--accent); text-decoration: none; transition: color 120ms ease-out; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r1); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: var(--s4); top: var(--s4); z-index: 30; background: var(--surface); padding: var(--s2) var(--s4); }

.layout { max-width: 72rem; margin: 0 auto; padding: 0 var(--s5); display: grid; grid-template-columns: 256px 1fr; gap: var(--s8); }

/* ---------- Profilspalte ---------- */
.profile-inner { position: sticky; top: 0; padding: var(--s8) 0 var(--s6); max-height: 100vh; overflow-y: auto; }
.portrait img { width: 176px; aspect-ratio: 1; object-fit: cover; object-position: 50% 20%; border-radius: var(--r3); }
.name { font-family: var(--serif); font-size: 1.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin: var(--s5) 0 var(--s2); }
.name a { color: var(--text); }
.role { color: var(--muted); font-size: .875rem; line-height: 1.5; margin: 0; }

.nav { display: flex; flex-direction: column; margin: var(--s6) 0 var(--s5); }
.nav a {
  position: relative; padding: var(--s1) 0 var(--s1) var(--s4);
  color: var(--muted); font-size: .875rem;
}
.nav a::before {                           /* Markierung des aktiven Abschnitts */
  content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0;
  background: var(--accent); border-radius: 2px; transform: translateY(-50%);
  transition: height 200ms var(--ease-out);
}
.nav a:hover { color: var(--text); }
.nav a[aria-current] { color: var(--text); font-weight: 600; }
.nav a[aria-current]::before { height: 16px; }

.profiles { list-style: none; padding: 0 0 0 var(--s4); margin: 0; font-size: .875rem; }
.profiles li { padding: var(--s1) 0; }
.profiles a { color: var(--muted); }
.profiles a:hover { color: var(--accent); }

/* ---------- Inhalt ---------- */
.content { padding: var(--s8) 0 0; min-width: 0; }
section { margin-bottom: var(--s9); }
.intro { margin-bottom: var(--s7); }        /* Einleitung führt direkt ins Spotlight */
.lead { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.75; max-width: 40rem; }
.lead p:last-child { margin: 0; }
.lead a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; margin: 0 0 var(--s6); }
h3 { font-size: 1.0625rem; line-height: 1.45; font-weight: 600; letter-spacing: -.01em; margin: 0 0 var(--s2); }

/* Publikationen: Gruppen über Abstand (48px), keine Trennlinien */
/* Spotlight und Other Publications bewusst gleich groß */
.pub { display: grid; grid-template-columns: 240px 1fr; gap: var(--s6); margin-bottom: var(--s7); }
.pub-media { display: grid; gap: var(--s3); align-content: start; }
.pub-media img { border-radius: var(--r2); background: var(--tile); }
.year { font-size: .8125rem; font-weight: 600; color: var(--muted); margin: 0 0 var(--s1); font-variant-numeric: tabular-nums; }
.authors, .venue { font-size: .875rem; line-height: 1.5; color: var(--muted); margin: 0; }
.authors strong { color: var(--text); font-weight: 600; }
.venue a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }

.buttons { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
/* Paper-Links: deutlich sichtbar (Akzentfarbe = "hier kann man klicken"),
   beim Darüberfahren voll eingefärbt. 36px hoch = bequem antippbar. */
.btn {
  display: inline-flex; align-items: center; gap: var(--s1); height: 36px; padding: 0 var(--s4);
  font-size: .875rem; font-weight: 600; line-height: 1; color: var(--accent);
  background: var(--accent-soft); border-radius: var(--r2);
  transition: background-color 120ms ease-out, color 120ms ease-out;
}
.btn:hover { background: var(--accent); color: var(--on-accent); }

.disclosure { margin-top: var(--s4); }
.disclosure > summary { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.disclosure > summary:hover { color: var(--text); }
.abstract { font-size: .9375rem; line-height: 1.7; padding-top: var(--s3); max-width: 42rem; }
.abstract p:last-child { margin: 0; }

/* Talks & Projekte */
.entry { display: grid; grid-template-columns: 144px 1fr; gap: var(--s6); margin-bottom: var(--s5); font-size: .875rem; line-height: 1.55; }
/* Logos: der Generator schneidet weiße Ränder ab und gibt jedem Logo dieselbe optische
   Fläche (--logo-w × --logo-h, max. 144×48). Rechtsbündig -> gemeinsame Kante zum Text. */
.entry-logo { display: flex; justify-content: flex-end; align-items: flex-start; }
.entry-logo img {
  width: var(--logo-w); height: var(--logo-h); max-width: 100%; object-fit: contain;
  background: var(--tile); border-radius: var(--r1);
}
.entry-body p { margin: 0; }
.entry-body strong { font-size: 1rem; font-weight: 600; }
.entry-body a { color: var(--text); }
.entry-body a:hover { color: var(--accent); }

/* Lebenslauf */
.cv-table { margin: 0 0 var(--s6); }
.cv-table table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.cv-table th { text-align: left; font-family: var(--serif); font-size: 1.0625rem; font-weight: 700; padding: 0 0 var(--s3); }
.cv-table td { vertical-align: top; padding: 0 0 var(--s4); }
.cv-table td:first-child { width: 144px; color: var(--muted); padding-right: var(--s5); white-space: nowrap; font-variant-numeric: tabular-nums; }
#cv > p { font-size: .875rem; color: var(--muted); }

.contact img { width: 224px; background: var(--tile); border-radius: var(--r1); }

/* Weiße Bildhintergründe automatisch ausblenden: "multiply" verrechnet jedes Pixel mit
   dem Seitenhintergrund. Weiß wird so exakt zum Hintergrundgrau, alle anderen Farben
   bleiben (praktisch) unverändert. Die Bilddateien selbst werden nicht verändert.
   Das Porträtfoto ist bewusst ausgenommen. */
.pub-media img, .entry-logo img, .contact img { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  /* Auf dunklem Grund würde "multiply" die Bilder abdunkeln -> dort weiße Kachel */
  .pub-media img, .entry-logo img, .contact img { mix-blend-mode: normal; padding: var(--s1); }
}

.page-title { font-family: var(--serif); font-size: 2rem; letter-spacing: -.015em; margin: 0 0 var(--s5); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }

.footer { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); padding: var(--s5) 0 var(--s7); border-top: 1px solid var(--border); font-size: .8125rem; color: var(--muted); }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------- Tablet & Handy: Profil wird zum Kopfbereich ---------- */
@media (max-width: 56rem) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .profile-inner { position: static; max-height: none; padding: var(--s7) 0 0; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s5); align-items: center; }
  .portrait img { width: 96px; border-radius: var(--r3); }   /* wie Desktop, relativ etwas runder */
  .name { margin: 0 0 var(--s1); font-size: 1.375rem; }
  .nav, .profiles { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: var(--s1) var(--s4); }
  .nav { display: flex; margin: var(--s5) 0 var(--s2); }
  .nav a { padding: var(--s1) 0; }
  .nav a::before { display: none; }
  .nav a[aria-current] { font-weight: 400; color: var(--muted); }
  .profiles { display: flex; padding: 0; }
  .content { padding-top: var(--s7); }
}
/* ---------- Kompakte Kopfleiste (nur schmale Bildschirme, nach dem Herunterscrollen) ---------- */
.minibar { display: none; }
@media (max-width: 56rem) {
  html { scroll-padding-top: 72px; }
  .minibar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
    position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: 56px; padding: 0 var(--s5);
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.5) blur(12px); -webkit-backdrop-filter: saturate(1.5) blur(12px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%); visibility: hidden;
    transition: transform 120ms ease-in, visibility 0s linear 120ms;          /* raus: schnell */
  }
  .minibar.is-visible {
    transform: none; visibility: visible;
    transition: transform 200ms var(--ease-out), visibility 0s;               /* rein: etwas ruhiger */
  }
}
.minibar-id { display: flex; align-items: center; gap: var(--s3); min-width: 0; color: var(--text); font-family: var(--serif); font-weight: 700; white-space: nowrap; }
.minibar-avatar img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; object-position: 50% 20%; }
.minibar-menu > summary { width: 40px; height: 40px; justify-content: center; border-radius: var(--r2); color: var(--text); }
.minibar-menu > summary::after { display: none; }
.minibar-menu > summary:hover { background: var(--hover); }
/* Drei Striche, die sich beim Öffnen zu einem X drehen */
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 1.5px; border-radius: 1px; background: currentColor; }
.burger { position: relative; transition: background-color 120ms ease-out; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; transition: transform 200ms var(--ease-out); }
.burger::before { transform: translateY(-6px); }
.burger::after { transform: translateY(6px); }
.minibar-menu[open] .burger { background: transparent; }
.minibar-menu[open] .burger::before { transform: rotate(45deg); }
.minibar-menu[open] .burger::after { transform: rotate(-45deg); }

/* ---------- Handy: Bilder als kompakte Leiste über dem Text ---------- */
@media (max-width: 40rem) {
  .pub { grid-template-columns: 1fr; gap: var(--s4); }
  /* Bilder nebeneinander, max. 160px hoch, Seitenverhältnis bleibt, linksbündig */
  .pub-media { display: flex; flex-wrap: nowrap; gap: var(--s3); align-items: flex-start; }
  /* Feste Höhe -> Breite folgt aus dem Seitenverhältnis (auch bevor das Bild geladen ist).
     Ist die Zeile zu schmal, schrumpft die Box und das Bild passt sich ohne Verzerrung ein. */
  .pub-media img {
    flex: 0 1 auto; min-width: 0; width: auto; height: 160px; max-width: 100%;
    object-fit: contain; object-position: left center;
  }
  .pub-media-multi img { height: 128px; }
  /* Talks & Projekte bleiben zweispaltig: kleine Logo-Box links, Text rechts */
  .entry { grid-template-columns: 96px 1fr; gap: var(--s4); }
  .entry-logo img { width: calc(var(--logo-w) * .66); height: calc(var(--logo-h) * .66); }
}

/* ---------- Einheitlicher Link-Stil ----------
   Links im Fließtext (Einleitung, Lebenslauf, Abstracts, Kontakt, Beschreibungen, Unterseiten):
   Textfarbe + feine Unterstreichung in der Akzentfarbe, beim Darüberfahren ganz in Akzentfarbe.
   Titel von Talks/Projekten bleiben ohne Unterstreichung, Buttons und Menüs sind nicht betroffen. */
.lead a, .cv-table a, .abstract a, .contact a, .page a, .entry-body a {
  color: var(--text);
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1px; text-underline-offset: .2em;
  transition: color 120ms ease-out;
}
.lead a:hover, .cv-table a:hover, .abstract a:hover, .contact a:hover, .page a:hover, .entry-body a:hover {
  color: var(--accent);
}
/* Titel (fett gesetzte Links) */
.entry-body strong a, .entry-body a:has(> strong) { text-decoration: none; }
.entry-body strong a:hover, .entry-body a:has(> strong):hover { text-decoration: underline; text-decoration-color: var(--accent); }
/* Buttons in Talks/Projekten sind keine Fließtext-Links: gleiches Aussehen wie bei den Papern */
.entry-body .btn { color: var(--accent); text-decoration: none; }
.entry-body .btn:hover { color: var(--on-accent); }

/* Variante "profile-serif": wie Profile, aber
   - Source Serif 4 statt Noto Serif (für Überschriften gebaut, harmoniert besser mit Inter)
   - klare Regel: Serif nur für Name und Überschriften, aller Fließtext in Inter */
:root { --serif: "Source Serif 4", Georgia, serif; }

.name, h2, .page-title, .minibar-id, .cv-table th {
  font-optical-sizing: auto;            /* feinere Formen bei großen Größen */
  font-weight: 600;
}
.name { font-size: 1.625rem; letter-spacing: -.02em; }
h2 { font-size: 1.75rem; letter-spacing: -.02em; }
.page-title { font-size: 2.25rem; letter-spacing: -.02em; }
.cv-table th { font-size: 1.125rem; }

/* Einleitung in derselben Schrift wie der übrige Text, hervorgehoben über Größe */
.lead { font-family: var(--sans); font-size: 1.125rem; line-height: 1.7; }
