/* Stefan Funkner – personal website
   Layout: one centred 1200px column; full-width colour bands keep their own inner wrapper.
   Colours: slate (Schiefer) with a signal-red accent, derived from the old site. */

@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --accent: #c8102e;         /* Signalrot: bars, rules, large accents only (not body text) */
  --primary: #2b3a42;        /* Schiefer: text, links, buttons, bands (11:1 on white) */
  --primary-dark: #1c272d;
  --ink: #1c2430;
  --ink-soft: #333d4a;
  --muted: #4a5565;
  --rule: #dadde6;
  --tint: #eceef4;
  --band-text: #cdd6dc;
  --bg: #ffffff;
  /* station colours, muted to sit beside slate and red */
  --s-leipzig: #6b7f99;
  --s-bochum: #8a9d4a;
  --s-fukui: #d08a2a;
  --s-karlsruhe: #3f5765;
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1200px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 16px; top: 16px; z-index: 20; background: var(--bg); padding: 8px 12px; }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--primary); font-weight: 700; font-size: 19px; }
.brand::before { content: ""; width: 10px; height: 32px; background: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; font-weight: 600; font-size: 16px; }
.site-nav a { text-decoration: none; padding: 12px 0; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.lang { color: var(--muted); }
.lang a { padding: 12px 2px; }
.lang strong { color: var(--primary); }

/* Hero */
.hero .wrap { padding-block: 80px 88px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-text { flex: 999 1 480px; min-width: 0; }
.eyebrow { margin: 0 0 16px; font-size: 15px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); }
.hero h1 { margin: 0 0 24px; font-size: clamp(44px, 7vw, 64px); line-height: 1.05; font-weight: 700; color: var(--primary); letter-spacing: -0.01em; }
.lede { margin: 0 0 32px; font-size: 22px; line-height: 1.5; color: var(--ink-soft); max-width: 640px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border: 2px solid var(--primary); border-radius: 4px; font-weight: 600; text-decoration: none; }
.btn-solid { background: var(--primary); color: #ffffff; }
.btn-solid:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #ffffff; }
.btn-outline { color: var(--primary); }
.hero-photo { flex: 1 1 340px; max-width: 460px; margin: 0; position: relative; }
.photo-credit { position: absolute; right: 8px; bottom: 6px; font-size: 13px; font-weight: 700; line-height: 1; color: var(--ink-soft); }
.hero-photo img { display: block; width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }

/* Facts band */
.facts { background: var(--primary); color: #ffffff; }
.facts .wrap { padding-block: 44px; }
.facts-grid { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 32px; }
.fact dd { margin: 0; }
.fact dt { font-size: 28px; font-weight: 700; line-height: 1.25; }
.fact dd { color: var(--band-text); }

/* Sections */
.section { padding-block: 88px; }
.section h2 { margin: 0 0 32px; font-size: 32px; line-height: 1.2; color: var(--primary); }
.section-intro { margin: -20px 0 40px; color: var(--muted); max-width: 680px; }
.tinted { background: var(--tint); }

.about .wrap { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.about h2 { flex: 1 1 220px; margin: 0; }
.about-text { flex: 999 1 560px; min-width: 0; max-width: 760px; display: flex; flex-direction: column; gap: 16px; color: var(--ink-soft); }
.about-text p { margin: 0; }

.inquiry { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px 32px; margin: 0; padding: 0; list-style: none; }
.inquiry li { border-top: 4px solid var(--accent); padding-top: 20px; }
.inquiry .num { display: block; font-size: 52px; line-height: 1; font-weight: 700; color: var(--primary); margin-bottom: 16px; font-variant-numeric: tabular-nums; }
.inquiry h3 { margin: 0 0 10px; font-size: 22px; line-height: 1.3; color: var(--ink); }
.inquiry p { margin: 0; font-size: 16px; color: var(--muted); }

/* Timeline */
.timeline { margin-bottom: 48px; }
.tl-marks { position: relative; height: 34px; font-size: 13px; font-weight: 600; color: var(--primary); }
.tl-mark { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
.tl-mark::after { content: ""; width: 2px; height: 8px; margin-top: 2px; background: var(--primary); }
.tl-bar { position: relative; height: 28px; background: var(--bg); border: 1px solid var(--rule); }
.tl-seg { position: absolute; top: 0; bottom: 0; }
.tl-tick { position: absolute; top: 6px; bottom: 6px; width: 2px; background: #ffffff; }
.tl-axis { position: relative; height: 24px; margin-top: 8px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-axis span { position: absolute; transform: translateX(-50%); }
.tl-seg.c-leipzig { background: var(--s-leipzig); }
.tl-seg.c-bochum { background: var(--s-bochum); }
.tl-seg.c-fukui { background: var(--s-fukui); }
.tl-seg.c-karlsruhe { background: var(--s-karlsruhe); }
.station.c-leipzig { border-top-color: var(--s-leipzig); }
.station.c-bochum { border-top-color: var(--s-bochum); }
.station.c-fukui { border-top-color: var(--s-fukui); }
.station.c-karlsruhe { border-top-color: var(--s-karlsruhe); }

.stations { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.station { background: var(--bg); padding: 24px; border-top: 6px solid; display: flex; flex-direction: column; gap: 8px; }
.station-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.station h3 { margin: 0; font-size: 22px; color: var(--ink); }
.station .years { font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.station .field { margin: 0; font-weight: 600; color: var(--primary); }
.station p { margin: 0; font-size: 15px; color: var(--muted); }

/* Publications */
.pub-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pub-head h2 { margin: 0; }
.pub-head a { color: var(--accent); font-weight: 600; }
.pub-head a:hover { color: var(--primary); }
.pub-note { margin: 0 0 28px; color: var(--muted); }
.pubs { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.pub { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-block: 24px; border-top: 1px solid var(--rule); }
.pub .year { flex: 0 0 64px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.pub .body { flex: 999 1 480px; min-width: 0; }
.pub .title { font-weight: 600; font-size: 18px; line-height: 1.4; }
.pub .meta { color: var(--muted); font-size: 16px; }
.pub .cites { flex: 0 0 auto; align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--primary); background: var(--tint); padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.placeholder { border: 2px dashed var(--rule); padding: 24px; color: var(--muted); background: var(--bg); }

/* Contact */
.contact { border-top: 1px solid var(--rule); }
.contact .wrap { padding-block: 72px; display: flex; flex-wrap: wrap; gap: 32px 64px; }
.contact h2 { flex: 1 1 220px; margin: 0; font-size: 32px; color: var(--primary); }
.contact address, .contact .col { flex: 1 1 240px; font-style: normal; color: var(--ink-soft); display: flex; flex-direction: column; gap: 4px; }

/* Plain text pages (imprint, privacy) */
.prose { max-width: 760px; }
.prose h1 { margin: 0 0 32px; font-size: clamp(36px, 6vw, 48px); line-height: 1.1; color: var(--primary); }
.prose h2 { margin: 40px 0 12px; font-size: 24px; color: var(--ink); }
.prose p, .prose ul { margin: 0 0 16px; color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--primary); color: var(--band-text); font-size: 14px; }
.site-footer .wrap { padding-block: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.site-footer a { color: #ffffff; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }

@media (max-width: 560px) {
  .section { padding-block: 64px; }
  .hero .wrap { padding-block: 48px 64px; }
  .lede { font-size: 20px; }
  .section h2, .contact h2 { font-size: 27px; }
  .station { padding: 20px; }
}

/* Publications page: entries grouped by year, optional visual abstract on the right */
.page-h { margin: 0 0 16px; font-size: clamp(36px, 6vw, 48px); line-height: 1.1; color: var(--primary); }
.page-intro { margin: 0 0 56px; color: var(--muted); max-width: 760px; }
.year-block { display: flex; flex-wrap: wrap; gap: 8px 32px; padding-block: 24px; border-top: 2px solid var(--primary); }
.year-h { flex: 0 0 120px; margin: 0; font-size: 28px; line-height: 1.2; color: var(--primary); font-variant-numeric: tabular-nums; }
.entries { flex: 999 1 560px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.entry { display: flex; flex-wrap: wrap; gap: 16px 32px; padding-block: 18px; border-top: 1px solid var(--rule); }
.entry:first-child { border-top: 0; padding-top: 4px; }
.entry-text { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.entry .title { font-weight: 600; font-size: 18px; line-height: 1.4; }
.entry .meta { color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.badge, .entry .cites { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge { color: #ffffff; background: var(--primary); }
.entry .cites { color: var(--primary); background: var(--tint); }
.va[hidden] { display: none; }
.va { flex: 1 1 200px; max-width: 260px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.va img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: var(--bg); }
.va figcaption { font-size: 12px; color: var(--muted); }
