/* ─────────────────────────────────────────────────────────────
   Tennis-Sepp.ch — Custom styles
   Built on top of Pico CSS v2 (green theme).
   Vibe: early-2000s tasteful, magazine-like, warm and dignified.
   ───────────────────────────────────────────────────────────── */

/* === Accessibility skip-link ============================== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--pico-primary, #1f9646);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

.h1-nick {
  display: block;
  font-size: 0.55em;
  font-weight: 400;
  font-style: italic;
  color: var(--pico-muted-color);
  margin-top: 0.1em;
}

/* Romanic quote translation in small */
.quote-translate { color: var(--pico-muted-color); font-size: 0.85em; }

/* Hero quote */
.hero-quote { margin: 0 0 1rem; padding: 0; border: none; }
.hero-quote p {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  color: var(--pico-h2-color);
}
.hero-quote footer {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--pico-muted-color);
}

/* === Palette tuned to the logo green === */
:root {
  /* Forest green sampled from the cartoon logo */
  --pico-primary:                #1f9646;
  --pico-primary-background:     #1f9646;
  --pico-primary-border:         #1f9646;
  --pico-primary-hover:          #167033;
  --pico-primary-hover-background:#167033;
  --pico-primary-hover-border:   #167033;
  --pico-primary-focus:          rgba(31, 150, 70, 0.25);
  --pico-primary-inverse:        #ffffff;

  /* Warm paper-ish background */
  --pico-background-color:       #f7f1e3;
  --pico-card-background-color:  #fffdf6;
  --pico-card-sectioning-background-color: #f1e9d2;
  --pico-muted-border-color:     #d8cdb0;

  /* Text — all headings green */
  --pico-color:                  #2a2a24;
  --pico-h1-color:               #1d6c33;
  --pico-h2-color:               #1d6c33;
  --pico-h3-color:               #1d6c33;
  --pico-h4-color:               #1d6c33;
  --pico-h5-color:               #1d6c33;
  --pico-h6-color:               #1d6c33;
  --pico-muted-color:            #6b6a5b;

  /* Geometry — slightly smaller radii feel more 2000s */
  --pico-border-radius:          0.4rem;
  --pico-spacing:                1.2rem;
  --pico-typography-spacing-vertical: 1.2rem;

  /* Custom tokens */
  --sepp-rule:                   #c9bb96;
  --sepp-clay:                   #c46a3c;
  --sepp-paper-shadow:           0 1px 0 #fffefb inset, 0 2px 6px -2px rgba(45,40,20,0.18);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* === Scroll-driven progress variable ======================
   --p ramps from 0 → 1 over the first 200px of scroll, entirely
   on the compositor. Drives the header shrink without any JS.
   Falls back to p=0 (expanded) on browsers without scroll-driven
   animations (Firefox <140 etc). */
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

@keyframes sepp-scroll-progress {
  from { --p: 0; }
  to   { --p: 1; }
}

/* === Subtle paper texture for the body — only modern browsers; cheap and tasteful === */
body {
  background-color: var(--pico-background-color);
  background-image:
    radial-gradient(circle at 25% 15%, rgba(0,0,0,0.025) 1px, transparent 1.5px),
    radial-gradient(circle at 75% 85%, rgba(0,0,0,0.02) 1px, transparent 1.5px);
  background-size: 5px 5px, 7px 7px;
  font-feature-settings: "kern", "liga";
}

/* === Use serif body type for prose — gives gravitas, magazine feel === */
.prose,
section blockquote,
.gallery figcaption,
.card p {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

/* But keep tabular data and metadata sans-serif */
table,
.meta,
.dates,
nav,
.eyebrow {
  font-family: system-ui, -apple-system, sans-serif;
}

/* === Header ==============================================
   Sticky shrinking header, driven entirely by scroll-driven CSS
   animations. No JS. The custom property --p ramps 0 → 1 over the
   first 200px of scroll (see @keyframes sepp-scroll-progress).
   To stay buttery-smooth we only animate compositor-friendly props:
     • logo + h1 size      → transform: scale()  (no layout reflow)
     • subtitle/dates fade → opacity              (no layout reflow)
     • padding             → small, contained reflow (header only)
   No backdrop-filter, no layout snap, no class toggle. */
.site-header {
  --p: 0;
  --logo-w-max:  140px;                            /* logo layout width when expanded */
  --logo-w-min:  44px;                             /* logo layout width when collapsed */
  --logo-w:      calc(var(--logo-w-max) - (var(--logo-w-max) - var(--logo-w-min)) * var(--p));
  --h1-size:     calc(2.5rem - 1.2rem * var(--p));  /* 2.50 → 1.30rem */
  --pad-top:     calc(0.9rem  - 0.6rem * var(--p)); /* 0.90 → 0.30rem */
  --pad-bot:     calc(0.9rem  - 0.6rem * var(--p)); /* 0.90 → 0.30rem */
  --hgroup-fade: calc(1 - var(--p));
  --hgroup-h:    calc(var(--hgroup-fade) * 2.4rem);

  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #fffdf6 0%, #f7f1e3 100%);
  border-bottom: 1px solid var(--pico-muted-border-color);
  /* Track: beige line that the green progress bar grows on top of.
     Replaces the former solid green 3 px box-shadow. */
  box-shadow: 0 1px 0 #fff inset, 0 3px 0 var(--sepp-rule);
  padding-top: var(--pad-top);
  padding-bottom: var(--pad-bot);

  /* Allow paint to extend below for the 3 px progress bar. */
  contain: layout style;

  animation: sepp-scroll-progress linear both;
  animation-timeline: scroll(root block);
  animation-range: 0 200px;
}

/* Reading-progress bar: green stripe under the header that grows
   from 0 % to 100 % as the page scrolls. Pure CSS via scroll-driven
   animation. Browsers without scroll-timeline support simply leave
   the bar at 0, the beige track in the box-shadow stays visible. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 3px;
  width: calc(var(--page-progress, 0) * 100%);
  background: var(--pico-primary);
  pointer-events: none;
}
/* Only opt into the scroll-driven animation in browsers that actually
   support it. Without this guard, Firefox <140 would snap the
   animation to its "to" keyframe via document-timeline fallback and
   show a permanently-100 % bar. */
@supports (animation-timeline: scroll()) {
  .site-header::after {
    animation: sepp-page-progress linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 100%;
  }
  @keyframes sepp-page-progress {
    from { width: 0; }
    to   { width: 100%; }
  }
}

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

.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  text-align: left;
}

.site-header .logo {
  /* Layout-width animation: the box actually shrinks with --p so
     the header collapses to a compact bar. `contain: layout` on
     the header confines the reflow. */
  width: var(--logo-w);
  height: auto;
  flex-shrink: 0;
  transform-origin: left center;
  filter: drop-shadow(0 4px 8px rgba(30, 80, 40, 0.22));
  will-change: width;
}

.site-header .brand:hover .logo {
  transform: rotate(-3deg) translateY(-2px);
  transition: transform 0.25s ease;
}

.site-header hgroup {
  transform-origin: left center;
  /* Pico defaults add a margin-bottom to <hgroup> that throws off
     the brand's vertical centering — zero it out so h1 sits on the
     brand's mid-line when collapsed. */
  margin: 0;
}

.site-header hgroup h1 {
  margin: 0 0 0.15em;
  font-size: var(--h1-size);
  line-height: 1;
  color: var(--pico-primary);
  letter-spacing: 0.01em;
  font-weight: 800;
  text-shadow: 0 1px 0 #fff;
}

.site-header hgroup .subtitle {
  margin: 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--pico-color);
  opacity: var(--hgroup-fade);
  max-height: var(--hgroup-h);
  overflow: hidden;
  will-change: opacity;
}

.site-header hgroup .dates {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  letter-spacing: 0.04em;
  opacity: var(--hgroup-fade);
  max-height: var(--hgroup-h);
  overflow: hidden;
  will-change: opacity;
}

.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
  padding: 0;
  margin: 0;
  list-style: none;
  line-height: 1.1;
}

.site-header nav li {
  padding: 0;
  line-height: 1.1;
}

.site-header nav a {
  color: var(--pico-color);
  text-decoration: none;
  margin: 0;
  padding: 0.15rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-header nav a:hover,
.site-header nav a:focus {
  color: var(--pico-primary);
  border-bottom-color: var(--pico-primary);
}

/* === Hero ================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-block: 1px solid var(--pico-muted-border-color);
  margin-bottom: 3rem;
}

.hero-image {
  position: relative;
  height: clamp(320px, 50vh, 560px);
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.74) saturate(0.95) sepia(0.05);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(30, 80, 40, 0.20) 0%,
    rgba(20, 30, 25, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  margin: -7rem auto 0;
  max-width: 920px;
  box-sizing: border-box;
  padding: 2.25rem 2rem 2rem;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-radius: var(--pico-border-radius);
  box-shadow:
    var(--sepp-paper-shadow),
    0 16px 48px -20px rgba(34,40,20,0.35);
  z-index: 3;
}

.hero-content .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--pico-primary);
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--pico-primary);
  border-radius: 2px;
  margin: 0 0 1rem;
}

.hero-content h2 {
  font-family: Georgia, serif;
  font-size: clamp(1.45rem, 3.6vw, 2.2rem);
  line-height: 1.3;
  margin: 0 0 1.1rem;
  color: var(--pico-h2-color);
  font-style: italic;
  font-weight: 400;
  border-bottom: 1px double var(--sepp-rule);
  padding-bottom: 1rem;
}

.hero-content .lede {
  font-family: Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--pico-color);
  margin: 0;
  max-width: 62ch;
}

/* === Sections ============================================= */
main,
body > section {
  /* container width handled by .container */
}

section {
  padding-block: 2.75rem;
}

section h2 {
  position: relative;
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  border-bottom: 3px double var(--sepp-rule);
  padding-bottom: 0.5rem;
}

/* Green accent bar over the border-bottom: grows section by section
   like a progress bar through the page. */
section h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  height: 3px;
  width: var(--h2-bar, 8%);
  background: var(--pico-primary);
  transition: width 0.4s ease;
}
main > section:nth-of-type(2) h2 { --h2-bar: 8%;  }  /* Zur Person */
main > section:nth-of-type(3) h2 { --h2-bar: 22%; }  /* Lebensweg */
main > section:nth-of-type(4) h2 { --h2-bar: 36%; }  /* Tennis-Karriere */
main > section:nth-of-type(5) h2 { --h2-bar: 50%; }  /* Bilder-Galerie */
main > section:nth-of-type(6) h2 { --h2-bar: 64%; }  /* Presse */
main > section:nth-of-type(7) h2 { --h2-bar: 78%; }  /* Radio-Porträt */
main > section:nth-of-type(8) h2 { --h2-bar: 92%; }  /* Todesanzeige */

.prose {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.75;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.t-body p { hyphens: auto; -webkit-hyphens: auto; }

/* === Zur-Person Portrait ================================== */
.about-prose {
  display: grid;
  grid-template-columns: minmax(0, 56ch) 360px;
  column-gap: 2.5rem;
  align-items: start;
  max-width: none;
}
.about-prose > :not(.about-portrait) {
  grid-column: 1;
}
.about-portrait {
  grid-column: 2;
  grid-row: 1 / span 99;
  width: 100%;
  margin: 0;
  position: sticky;
  /* The site-header is sticky and may wrap to two rows at intermediate
     widths. The 2-column About-layout is only active at ≥1100 px, where
     the header fits comfortably on one row (~80 px collapsed). */
  top: 6rem;
}
.about-portrait picture,
.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--sepp-paper-shadow);
}
@media (max-width: 1100px) {
  .about-prose {
    display: block;
    max-width: 68ch;
  }
  .about-portrait {
    float: none;
    position: static;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 1.25rem;
  }
}


.prose p { margin: 0 0 1.1rem; }

.prose a,
.gallery figcaption a,
.footer-grid a {
  color: var(--pico-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose a:hover { color: var(--pico-primary-hover); }

blockquote {
  border-left: 4px solid var(--pico-primary);
  background: var(--pico-card-sectioning-background-color);
  padding: 1rem 1.25rem;
  margin: 2rem 0;
  font-style: italic;
  border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
  font-size: 1.05rem;
}

blockquote footer {
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.875rem;
  color: var(--pico-muted-color);
}

/* === Tennis cards ========================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  margin: 2rem 0;
}

@media (min-width: 1280px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1536px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-top: 4px solid var(--pico-primary);
  border-radius: var(--pico-border-radius);
  padding: 1.25rem 1.25rem 1.4rem;
  margin: 0;
  box-shadow: var(--sepp-paper-shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    var(--sepp-paper-shadow),
    0 12px 26px -16px rgba(34,40,20,0.35);
}

.card h3 {
  margin: 0 0 0.5rem;
  color: var(--pico-primary);
  font-size: 1.08rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  line-height: 1.55;
  font-size: 0.98rem;
}

/* === Tables (striped, bordered) =========================== */
.table-heading {
  margin-top: 3rem;
  font-size: 1.2rem;
  color: var(--pico-h3-color);
  border-bottom: 1px solid var(--sepp-rule);
  padding-bottom: 0.4rem;
}

table {
  margin-top: 1rem;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--pico-muted-border-color);
  background: var(--pico-card-background-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
}

table thead {
  background: var(--pico-primary);
  color: #fff;
}

table th {
  color: #fff;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  text-transform: uppercase;
  padding: 0.7rem 0.9rem;
  border-bottom: 0;
}

table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

table tbody tr:nth-child(even) td {
  background: var(--pico-card-sectioning-background-color);
}

table tbody tr:last-child td { border-bottom: 0; }

figcaption {
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  margin-top: 0.5rem;
  font-style: italic;
}

/* === Gallery — photo-print style =========================== */
.gallery {
  /* CSS column Masonry: each card takes its natural height, the
     columns balance themselves. No more stretched-to-tallest cards. */
  column-count: 4;
  column-gap: 1.4rem;
  margin: 2rem 0;
}
@media (max-width: 1280px) { .gallery { column-count: 3; } }
@media (max-width: 900px)  { .gallery { column-count: 2; } }
@media (max-width: 560px)  { .gallery { column-count: 1; } }

.gallery figure {
  /* Each card is one column item — must not break across columns. */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 1.4rem;
  background: #ffffff;
  padding: 10px 10px 14px;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 10px 20px -12px rgba(34,40,20,0.35);
}

.gallery figure.is-clickable { cursor: zoom-in; }
.gallery figure.is-clickable:focus-visible {
  outline: 2px solid var(--pico-primary);
  outline-offset: 3px;
}

/* === Lightbox =============================================== */
dialog#lightbox[open] {
  /* Reset Pico's dialog{display:flex;width:inherit;min-width:100%;…}
     which would lay image + caption side-by-side and stretch the box.
     Scope to [open] so Pico's dialog:not([open]){display:none} keeps
     the dialog hidden when closed. */
  display: block;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border: none;
  padding: 2rem 1.5rem;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  color: #fff;
  box-sizing: border-box;
}
dialog#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.85);
}
dialog#lightbox .lb-img {
  display: block;
  /* Constrain to ~75 % of the viewport so the caption fits under the
     image and the prev/next buttons stay clear on the sides. */
  max-width: min(75vw, 1100px);
  max-height: 72vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  box-shadow: 0 16px 40px -16px rgba(0,0,0,0.6);
  background: #fff;
}
dialog#lightbox .lb-caption {
  margin: 0.9rem auto 0;
  /* Leave at least 4 rem on each side to clear the fixed prev/next
     buttons that sit at the viewport edges. */
  max-width: min(70ch, calc(100vw - 8rem));
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #f5f5f5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
dialog#lightbox .lb-caption strong { color: #fff; }
dialog#lightbox .lb-close {
  position: fixed;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  padding: 0;
  /* Hide any text inside the button — we draw the X with two pseudo-element bars */
  font-size: 0;
  line-height: 0;
}
dialog#lightbox .lb-close::before,
dialog#lightbox .lb-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.1rem;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}
dialog#lightbox .lb-close::before { transform: translate(-50%, -50%) rotate(45deg); }
dialog#lightbox .lb-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
dialog#lightbox .lb-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

dialog#lightbox .lb-prev,
dialog#lightbox .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font: 400 1.8rem/1 system-ui, -apple-system, sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 0.15rem;
}
dialog#lightbox .lb-prev { left:  0.8rem; }
dialog#lightbox .lb-next { right: 0.8rem; }
dialog#lightbox .lb-prev:hover,
dialog#lightbox .lb-next:hover {
  background: rgba(0, 0, 0, 0.8);
}
dialog#lightbox .lb-prev:disabled,
dialog#lightbox .lb-next:disabled {
  opacity: 0.3;
  cursor: default;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 1px;
}
.gallery picture { display: block; }

.gallery figcaption {
  /* Page-side caption shows only the <strong> title. The full caption
     (incl. body text) is reused inside the lightbox dialog. */
  padding: 0.55rem 0.3rem 0.15rem;
  font-size: 0;
  line-height: 0;
}

.gallery figcaption strong {
  display: block;
  color: var(--pico-primary);
  font-family: system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* === Radio card =========================================== */
.radio-card {
  margin-top: 1.5rem;
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-left: 4px solid var(--pico-primary);
  border-radius: var(--pico-border-radius);
  padding: 1.75rem;
  box-shadow: var(--sepp-paper-shadow);
}

.radio-card header h3 {
  margin: 0 0 0.25rem;
  color: var(--pico-primary);
  font-weight: 700;
}

.radio-card header .meta {
  margin: 0 0 1rem;
  color: var(--pico-muted-color);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.radio-card audio {
  width: 100%;
  display: block;
  margin: 0.5rem 0 1.25rem;
}


.radio-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.radio-card footer small {
  color: var(--pico-muted-color);
  font-size: 0.78rem;
}

/* === Press card =========================================== */
.press-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.press-thumb {
  display: block;
  border-radius: .4rem;
  overflow: hidden;
  box-shadow: var(--sepp-paper-shadow);
  transition: transform .2s ease;
}

.press-thumb:hover { transform: scale(1.02); }

.press-thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.press-body > *:first-child { margin-top: 0; }
.press-body > *:last-child  { margin-bottom: 0; }

.press-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}

.press-footer small {
  color: var(--pico-muted-color);
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .press-card {
    grid-template-columns: 1fr;
  }
  .press-thumb {
    max-width: 280px;
    margin: 0 auto;
  }
}

/* === Footer =============================================== */
.site-footer {
  margin-top: 4rem;
  padding-block: 2rem 3rem;
  background: linear-gradient(180deg, transparent 0%, #efe7cf 100%);
}

/* Crown the footer with the same double-line as the section h2s, but
   fully overlaid with green (= 100 % stop of the progress bar). We
   layer two background gradients on the hr: a 3 px green stripe on top
   of the 3 px beige double-line — so the visual matches a heading bar
   with --h2-bar at 100 %. */
.site-footer hr {
  border: none;
  margin: 0 0 2rem;
  height: 3px;
  background:
    linear-gradient(var(--pico-primary), var(--pico-primary)) center / 100% 3px no-repeat,
    linear-gradient(var(--sepp-rule), var(--sepp-rule)) center / 100% 1px no-repeat;
  background-color: transparent;
  color: transparent;
}

.footer-logo {
  width: 56px;
  height: auto;
  display: block;
  margin: 0 0 0.75rem;
  filter: drop-shadow(0 2px 4px rgba(30,80,40,0.18));
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--pico-color);
}

.footer-grid strong {
  display: block;
  color: var(--pico-color);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid li { margin-bottom: 0.3rem; }
.footer-grid a { display: inline-block; padding-block: 0.25rem; }

/* === Timeline / Lebensweg ================================= */
.timeline {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  position: relative;
}

/* Center vertical rule */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 160px;
  width: 2px;
  background: var(--sepp-rule);
}

.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  padding: 0 0 1.75rem;
  align-items: start;
}

.t-item:last-child { padding-bottom: 0; }

.t-marker {
  position: relative;
  text-align: right;
  padding-right: 1.25rem;
  font-family: system-ui, -apple-system, sans-serif;
}

.t-marker::after {
  content: "";
  position: absolute;
  top: 0.55rem;
  right: -7px;
  width: 14px;
  height: 14px;
  background: var(--pico-primary);
  border: 3px solid var(--pico-background-color);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--pico-primary);
}

.t-year {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--pico-primary);
  line-height: 1.2;
  padding-top: 0.2rem;
}

.t-body {
  background: var(--pico-card-background-color);
  border: 1px solid var(--pico-muted-border-color);
  border-left: 3px solid var(--pico-primary);
  border-radius: var(--pico-border-radius);
  padding: 0.9rem 1.1rem 1rem;
  box-shadow: var(--sepp-paper-shadow);
}

.t-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--pico-primary);
  font-family: system-ui, -apple-system, sans-serif;
}

.t-body p {
  margin: 0;
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 560px) {
  .timeline::before { left: 10px; }
  .t-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding-left: 28px;
  }
  .t-marker {
    text-align: left;
    padding-right: 0;
  }
  .t-marker::after {
    left: -23px;
    right: auto;
    top: 0.35rem;
  }
}

/* === Responsive tweaks ==================================== */
@media (max-width: 720px) {
  .site-header { --logo-w-max: 120px; --logo-w-min: 36px; }
  .site-header hgroup h1 { font-size: 2rem; }
  .site-header .container { justify-content: center; }
  .site-header nav ul {
    justify-content: center;
    gap: 0 0.9rem;
    line-height: 1.1;
  }
  .site-header nav li {
  padding: 0;
  line-height: 1.1;
}
  .site-header nav a {
    padding: 0.55rem 0;
    font-size: 0.88rem;
    line-height: 1.1;
    border-bottom-width: 1px;
  }
  .hero-content {
    margin: -5rem auto 0;
    padding: 1.75rem 1.25rem;
    width: calc(100% - 2rem);
  }
}

/* === Fallback for browsers without scroll-driven animations ===
   In Firefox <140 (pref disabled), --p stays at its initial 0.
   That gives the splash/expanded state forever — acceptable, but
   we make sure nothing looks broken. */
@supports not (animation-timeline: scroll()) {
  .site-header {
    /* Without a scroll timeline the animation would run on the
       document timeline with duration:0s + fill:both, snapping --p
       to the "to" keyframe (=1) and stranding the header collapsed.
       Disable the animation so the --p: 0 fallback below sticks. */
    animation: none;
    --p: 0;
  }
}
