/* ==========================================================================
   denniskraemer.net — Design-System
   Eine einzige Stildatei. Reihenfolge: Schriften, Tokens, Reset, Typografie,
   Layout, Kopfzeile, Komponenten, Fußzeile, Hilfsklassen.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Schriften (selbst gehostet, kein Google-CDN — DSGVO)
   Beide Familien sind Variable Fonts: eine Datei deckt alle Strichstärken ab.
   latin-ext wird per unicode-range nur geladen, wenn Zeichen wie ō, ć, ř
   tatsächlich vorkommen.
   -------------------------------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   2. Farb- und Maß-Tokens

   Hell ist der Ausgangszustand. Dunkel wird an zwei Stellen gesetzt:
   einmal für "System steht auf dunkel und der Nutzer hat nichts gewählt",
   einmal für "Nutzer hat dunkel gewählt". Die Wiederholung ist Absicht —
   light-dark() wäre kürzer, würde aber auf älteren Browsern die komplette
   Farbgebung ausfallen lassen.
   -------------------------------------------------------------------------- */

:root {
  /* Flächen */
  --bg: #fdfdfc;
  --bg-subtle: #f5f4f0;
  --bg-raised: #ffffff;

  /* Text */
  --text: #1a1a19;
  --text-muted: #5a5a54;
  /* Nicht heller wählen: ab hier reißt der Kontrast von 4.5:1 für Kleintext
     (Jahreszahlen, DOIs, Kennzeilen) nach WCAG AA. */
  --text-faint: #6b6b63;

  /* Linien */
  --border: #e3e1da;
  --border-strong: #cbc8bf;

  /* Akzent — gedecktes Tintenblau */
  --accent: #2c4f7c;
  --accent-hover: #1d3757;
  --accent-subtle: #eaeff5;
  --accent-contrast: #ffffff;

  /* Fokusring */
  --focus: #2c4f7c;

  /* Schrift */
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  /* Fließende Schriftgrößen: skalieren zwischen 22rem und 80rem Viewport */
  --size-display: clamp(2.25rem, 1.55rem + 3.1vw, 3.75rem);
  --size-h1: clamp(1.95rem, 1.45rem + 2.2vw, 3rem);
  --size-h2: clamp(1.45rem, 1.22rem + 1.05vw, 2.05rem);
  --size-h3: clamp(1.12rem, 1.04rem + 0.38vw, 1.35rem);
  --size-lead: clamp(1.1rem, 1.02rem + 0.4vw, 1.35rem);
  --size-body: clamp(1rem, 0.975rem + 0.11vw, 1.0625rem);
  --size-nav: 0.975rem;
  --size-small: 0.875rem;
  --size-tiny: 0.8125rem;

  /* Maße */
  --wrap: 74rem;          /* äußerer Container */
  --measure: 40rem;       /* Lesemaß für Fließtext, ca. 68 Zeichen */
  --gap: clamp(1.25rem, 0.9rem + 1.5vw, 2.5rem);
  --section-gap: clamp(3.5rem, 2.4rem + 4.4vw, 6.5rem);
  --radius: 3px;

  /* Schatten — im Hellmodus sehr zurückhaltend */
  --shadow: 0 1px 2px rgb(26 26 25 / 0.05), 0 4px 14px rgb(26 26 25 / 0.05);

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

/* Dunkel — Systemvorgabe, sofern nicht ausdrücklich hell gewählt */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #15171b;
    --bg-subtle: #1c1f24;
    --bg-raised: #1e2228;
    --text: #e9e7e3;
    --text-muted: #a5a29b;
    --text-faint: #9a968f;
    --border: #2e323a;
    --border-strong: #414751;
    --accent: #8fb3d9;
    --accent-hover: #b0cbe8;
    --accent-subtle: #1c2733;
    --accent-contrast: #12161b;
    --focus: #8fb3d9;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 14px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

/* Dunkel — ausdrücklich gewählt */
:root[data-theme='dark'] {
  --bg: #15171b;
  --bg-subtle: #1c1f24;
  --bg-raised: #1e2228;
  --text: #e9e7e3;
  --text-muted: #a5a29b;
  --text-faint: #9a968f;
  --border: #2e323a;
  --border-strong: #414751;
  --accent: #8fb3d9;
  --accent-hover: #b0cbe8;
  --accent-subtle: #1c2733;
  --accent-contrast: #12161b;
  --focus: #8fb3d9;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 14px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   3. Reset und Grundlagen
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--size-body);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.011em;
  text-wrap: balance;
  margin: 0;
}

p,
ul,
ol {
  margin: 0 0 1.1em;
}

p:last-child,
ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: var(--gap) 0;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 0.6rem + 2.4vw, 3rem);
}

.prose {
  max-width: var(--measure);
}

main {
  display: block;
}

.section {
  padding-block: var(--section-gap);
  border-top: 1px solid var(--border);
}

.section:first-of-type {
  border-top: 0;
}

/* Abschnittsüberschrift mit feiner Oberlinie und Kennung */
.section-head {
  margin-bottom: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
}

.section-head h2 {
  font-size: var(--size-h2);
}

.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--size-tiny);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.7rem;
}

/* Skip-Link: erst bei Tastaturfokus sichtbar */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 200;
  padding: 0.7rem 1.1rem;
  /* Text- und Hintergrundfarbe getauscht: das ergibt in beiden Farbschemata
     den höchstmöglichen Kontrast. Ein fester Akzent mit weißer Schrift fiele
     im Dunkelmodus unter den Grenzwert. */
  background: var(--text);
  color: var(--bg);
  font-size: var(--size-small);
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0.75rem;
  color: var(--bg);
}

/* --------------------------------------------------------------------------
   5. Kopfzeile und Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Browser ohne color-mix bekommen eine deckende Fläche statt Transparenz. */
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header {
    background: var(--bg);
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.wordmark {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--accent);
}

.wordmark span {
  color: var(--text-faint);
  font-weight: 400;
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 0.1rem + 1vw, 1.25rem);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 0.05rem + 1.2vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.4rem 0.15rem;
  font-size: var(--size-nav);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1rem;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a[aria-current='page']::after {
  transform: scaleX(1);
}

.site-nav a[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

/* Symbol-Schaltflächen (Theme, Menü, LinkedIn, Mail) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition),
    border-color var(--transition);
}

.icon-btn:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border);
}

.icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.is-filled svg {
  fill: currentColor;
  stroke: none;
}

/* Der Umschalter zeigt immer nur ein Symbol: Mond im Hellmodus, Sonne im Dunkelmodus. */
.theme-toggle .icon-moon {
  display: block;
}
.theme-toggle .icon-sun {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-moon {
    display: none;
  }
  :root:not([data-theme='light']) .theme-toggle .icon-sun {
    display: block;
  }
}
:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}
:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme='light'] .theme-toggle .icon-moon {
  display: block;
}
:root[data-theme='light'] .theme-toggle .icon-sun {
  display: none;
}

.nav-toggle {
  display: none;
}

/* Mobile Navigation */
@media (max-width: 52rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav[data-open='true'] {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem clamp(1.15rem, 0.6rem + 2.4vw, 3rem) 1rem;
  }

  .site-nav li + li {
    border-top: 1px solid var(--border);
  }

  .site-nav a {
    padding: 0.85rem 0;
    font-size: 1rem;
  }

  .site-nav a::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   6. Hero / Einstieg
   -------------------------------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem) var(--section-gap);
}

.hero-grid {
  display: grid;
  gap: clamp(2rem, 1.2rem + 3vw, 4rem);
  align-items: start;
}

@media (min-width: 56rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 17rem;
  }
}

.hero h1 {
  font-size: var(--size-display);
  margin-bottom: 0.35em;
}

.lead {
  font-family: var(--font-serif);
  font-size: var(--size-lead);
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.hero-body {
  color: var(--text-muted);
  max-width: var(--measure);
}

.portrait {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 17rem;
  aspect-ratio: 1200 / 1801;
  object-fit: cover;
}

/* Verweise auf externe Profile unter dem Porträt */
.hero-links {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  font-size: var(--size-small);
}

.hero-links li + li {
  margin-top: 0.5rem;
}

.hero-links a {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.45;
}

.hero-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.hero-links svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  margin-top: 0.16em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   7. Publikationen
   -------------------------------------------------------------------------- */

.pub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border-block: 1px solid var(--border);
}

.pub {
  display: grid;
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: clamp(1rem, 0.7rem + 1.2vw, 1.75rem);
  align-items: start;
  padding: clamp(1.35rem, 1rem + 1.2vw, 2rem) 0;
  background: var(--bg);
  transition: background-color var(--transition);
}

.pub:hover {
  background: var(--bg-subtle);
}

@media (min-width: 40rem) {
  .pub {
    grid-template-columns: 6.96rem minmax(0, 1fr);
  }
}

.pub-cover {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: var(--shadow);
  aspect-ratio: 298 / 454;
  object-fit: cover;
  background: var(--bg-subtle);
  transition: transform var(--transition), border-color var(--transition);
}

/* Das Cover führt zum selben Ziel wie der Titel daneben. Für Screenreader ist
   der Verweis ausgeblendet und nicht anspringbar — sonst würde dieselbe
   Publikation zweimal hintereinander angesagt. Sehende bekommen die gewohnte
   Klickfläche. */
.pub-cover-link {
  display: block;
}

.pub-cover-link:hover .pub-cover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.pub-meta {
  font-size: var(--size-small);
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.pub-year {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-faint);
}

.pub-title {
  font-size: var(--size-h3);
  font-weight: 600;
  line-height: 1.32;
  margin-bottom: 0.45rem;
  /* Nicht "balance": das verteilt den Titel auf gleich lange Zeilen und bricht
     dadurch früh um. "pretty" lässt die erste Zeile voll auslaufen und
     verhindert nur einzelne Schlusswörter. */
  text-wrap: pretty;
}

.pub-title a {
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--transition), color var(--transition);
}

.pub-title a:hover {
  color: var(--accent);
  background-size: 100% 1px;
}

/* Fundstelle: Zeitschriften- und Sammelbandtitel. Bewusst größer als die
   übrigen Nebenangaben — in einer Publikationsliste ist das die zweitwichtigste
   Information nach dem Titel. Journal- und Sammelbandnamen stehen in derselben
   Größe, damit die Liste einheitlich wirkt. */
.pub-source {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.pub-source em {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05em;
  color: var(--text);
}

.pub-doi {
  font-size: var(--size-tiny);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.pub-doi a {
  color: var(--text-faint);
  text-decoration: none;
}

.pub-doi a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Textabschluss eines Abschnitts: „More publications →" */
.more-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  font-size: var(--size-small);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.more-link:hover {
  gap: 0.8rem;
  text-decoration: underline;
}

.more-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--transition);
}

/* --------------------------------------------------------------------------
   8. Presse / Public Outreach
   -------------------------------------------------------------------------- */

.press-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 0.75rem + 0.9vw, 1.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 34rem) {
  .press-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 52rem) {
  .press-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 66rem) {
  .press-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.press-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

.press-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.press-card img {
  width: 100%;
  aspect-ratio: 600 / 340;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.press-body {
  padding: 0.8rem 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.press-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.45rem;
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.4;
}

.press-outlet {
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--accent);
}

.press-date {
  font-variant-numeric: tabular-nums;
}

.press-title {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0;
  text-wrap: pretty;
}

.press-title a {
  color: var(--text);
  text-decoration: none;
}

/* Ganze Karte klickbar, ohne die Semantik des Links aufzugeben */
.press-title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.press-card {
  position: relative;
}

.press-title a:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   9. Unterseiten: Seitenkopf
   -------------------------------------------------------------------------- */

.page-head {
  padding-block: clamp(2.75rem, 2rem + 3vw, 4.5rem) clamp(2rem, 1.5rem + 2vw, 3rem);
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  font-size: var(--size-h1);
}

.page-intro {
  margin-top: 1.1rem;
  max-width: var(--measure);
  color: var(--text-muted);
  font-size: var(--size-lead);
  font-family: var(--font-serif);
  line-height: 1.5;
}

/* Zwischenüberschrift innerhalb einer Seite */
.subsection {
  padding-block: var(--section-gap) 0;
}

.subsection + .subsection {
  padding-top: clamp(2.75rem, 2rem + 3vw, 4.5rem);
}

/* Die Überschrift steckt eine Ebene tiefer in .wrap, deshalb Nachfahren-Selektor. */
.subsection h2 {
  font-size: var(--size-h2);
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--text);
  margin-bottom: clamp(1.35rem, 1rem + 1.4vw, 2.25rem);
}

/* --------------------------------------------------------------------------
   10. Generische Eintragsliste (Konferenzen, Vorträge, Funktionen)
   -------------------------------------------------------------------------- */

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.entry {
  padding-block: clamp(1.1rem, 0.85rem + 1vw, 1.6rem);
  border-top: 1px solid var(--border);
  max-width: 56rem;
}

.entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.entry-title {
  font-family: var(--font-serif);
  font-size: var(--size-h3);
  font-weight: 600;
  line-height: 1.32;
  margin: 0 0 0.4rem;
  text-wrap: pretty;
}

.entry-detail {
  font-size: var(--size-small);
  color: var(--text-muted);
  margin: 0;
}

.entry-detail + .entry-detail {
  margin-top: 0.3rem;
}

.entry-link {
  font-size: var(--size-tiny);
  word-break: break-word;
}

/* Jahresgruppen bei den Vorträgen */
.year-group + .year-group {
  margin-top: clamp(2.25rem, 1.7rem + 2.2vw, 3.5rem);
}

.year-label {
  font-family: var(--font-sans);
  font-size: var(--size-small);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin: 0 0 1.1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border);
  max-width: 56rem;
}

/* --------------------------------------------------------------------------
   11. Lebenslauf: Jahr links, Inhalt rechts
   -------------------------------------------------------------------------- */

.cv-list {
  margin: 0;
  max-width: 56rem;
}

.cv-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.5rem;
  padding-block: 0.95rem;
  border-top: 1px solid var(--border);
}

.cv-row:first-child {
  border-top: 0;
  padding-top: 0;
}

@media (min-width: 40rem) {
  .cv-row {
    grid-template-columns: 10.5rem minmax(0, 1fr);
  }
}

.cv-term {
  margin: 0;
  font-size: var(--size-small);
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cv-desc {
  margin: 0;
  color: var(--text);
}

.cv-desc .cv-note {
  display: block;
  font-size: var(--size-small);
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Aufzählung ohne Punkte, für Mitgliedschaften und Reviewtätigkeiten */
.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 56rem;
}

.plain-list li {
  padding-block: 0.7rem;
  border-top: 1px solid var(--border);
}

.plain-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.plain-list .role {
  color: var(--text-faint);
  font-size: var(--size-small);
}

.comma-list {
  max-width: 56rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   12. Projekte
   -------------------------------------------------------------------------- */

.project {
  padding-block: var(--section-gap) 0;
}

.project + .project {
  margin-top: var(--section-gap);
  border-top: 1px solid var(--border);
}

.project-grid {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2.4vw, 3rem);
  align-items: start;
}

/* Rasterelemente haben von Haus aus min-width:auto und schrumpfen deshalb nicht
   unter ihre min-content-Breite. Das .thumb-grid darin nutzt auto-fill und meldet
   dabei eine sehr große min-content-Breite — ohne diese Zeile sprengt die
   Textspalte auf schmalen Geräten das Layout. */
.project-grid > * {
  min-width: 0;
}

@media (min-width: 56rem) {
  .project-grid {
    grid-template-columns: 13rem minmax(0, 1fr);
  }
}

.project-cover {
  width: 100%;
  max-width: 13rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: var(--shadow);
  background: var(--bg-subtle);
}

.project h2 {
  font-size: var(--size-h2);
  margin-bottom: 0.9rem;
}

.project-acronym {
  color: var(--text-faint);
  font-weight: 400;
}

.project-body {
  max-width: var(--measure);
  color: var(--text-muted);
}

.project-body ul {
  padding-left: 1.2rem;
}

.project-body li {
  margin-bottom: 0.35rem;
}

/* Eckdaten als Beschreibungsliste */
.meta-dl {
  margin: 1.75rem 0 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.15rem 1.25rem;
  font-size: var(--size-small);
  border-top: 1px solid var(--border);
  padding-top: 1.1rem;
}

@media (min-width: 34rem) {
  .meta-dl {
    grid-template-columns: 10rem minmax(0, 1fr);
  }
}

.meta-dl dt {
  font-weight: 600;
  color: var(--text-faint);
}

.meta-dl dd {
  margin: 0 0 0.65rem;
  color: var(--text-muted);
  /* Lange Projektadressen wie techco-project.blogs.ruhr-uni-bochum.de
     müssen auf schmalen Geräten umbrechen dürfen. */
  overflow-wrap: break-word;
}

@media (min-width: 34rem) {
  .meta-dl dd {
    margin-bottom: 0.5rem;
  }
}

/* Reihe kleiner Cover für zugehörige Veröffentlichungen und Veranstaltungen */
.thumb-head {
  font-family: var(--font-sans);
  font-size: var(--size-tiny);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 2rem 0 1rem;
}

.thumb-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
  gap: clamp(0.9rem, 0.7rem + 0.8vw, 1.5rem);
  /* Breite und Mindestspalte sind aufeinander abgestimmt: auto-fill füllt immer
     ganze Spalten, weshalb ein zu kleiner Mindestwert die Bilder sprunghaft
     größer macht. Mit 49.5rem bleiben es sechs Spalten und die Cover landen
     bei rund 112px — dieselbe Größenordnung wie die Cover der Publikationslisten. */
  max-width: 49.5rem;
}

.thumb {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.thumb a {
  text-decoration: none;
  color: var(--text-muted);
}

.thumb img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: var(--shadow);
  background: var(--bg-subtle);
  transition: transform var(--transition), border-color var(--transition);
}

.thumb a:hover img {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.thumb-caption {
  font-size: var(--size-tiny);
  line-height: 1.4;
}

.thumb a:hover .thumb-caption {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   13. Formular
   -------------------------------------------------------------------------- */

.contact-address {
  font-style: normal;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.contact-links {
  margin-top: 1.75rem;
}

.form {
  max-width: 34rem;
  margin-top: 1.75rem;
}

.form-row {
  margin-bottom: 1.1rem;
}

@media (min-width: 34rem) {
  .form-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

.form label {
  display: block;
  font-size: var(--size-small);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form .required {
  color: var(--accent);
}

.form input,
.form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-size: var(--size-body);
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form input:focus,
.form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form textarea {
  min-height: 9rem;
  resize: vertical;
}

/* Honeypot: für Menschen unsichtbar, für Bots verlockend */
.form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  font-family: inherit;
  font-size: var(--size-body);
  font-weight: 600;
  /* Auf dem Akzent liegende Schrift: im Hellmodus weiß auf dunklem Blau,
     im Dunkelmodus dunkel auf hellem Blau. Ein Token statt konkurrierender
     Selektoren, damit die Regel nicht von der Reihenfolge abhängt. */
  color: var(--accent-contrast);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.form-note {
  font-size: var(--size-small);
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Rückmeldung nach dem Absenden */
.form-message {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 1.5rem;
  font-size: var(--size-small);
}

.form-message.is-ok {
  border-color: #2f7d4f;
  background: color-mix(in srgb, #2f7d4f 10%, transparent);
}

.form-message.is-error {
  border-color: #b3352b;
  background: color-mix(in srgb, #b3352b 10%, transparent);
}

/* --------------------------------------------------------------------------
   14. Rechtstexte (Impressum, Datenschutz)
   -------------------------------------------------------------------------- */

.legal {
  max-width: var(--measure);
  padding-block: var(--section-gap) 0;
}

.legal h2 {
  font-size: var(--size-h3);
  margin: 2.5rem 0 0.75rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal address {
  font-style: normal;
  margin-bottom: 1.1rem;
}

.legal .placeholder {
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1rem;
  font-size: var(--size-small);
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}

/* --------------------------------------------------------------------------
   15. Fußzeile
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding-block: clamp(2.5rem, 1.8rem + 2.6vw, 4rem);
  margin-top: var(--section-gap);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 1.75rem;
}

.footer-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.footer-affil {
  font-size: var(--size-small);
  color: var(--text-muted);
  max-width: 22rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--size-small);
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: var(--size-tiny);
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   16. Hilfsklassen
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Solange kein JavaScript gelaufen ist, bleibt der Theme-Umschalter verborgen —
   er wäre ohne Skript wirkungslos. */
.no-js .theme-toggle {
  display: none;
}
