/* Biografie (#/biography, js/biografie.js, 26.09.2026). Alles steht unter .bioseite, damit nichts davon die Welten verändert.
   Seit dem Abend eine Scroll-Welt (Marc: «da müssen wir wieder Videos einbauen, so eine Scroll-World»): Marcs vier Bilder liegen
   fest hinter der Seite und gehen beim Scrollen ineinander über, später spult der Scroll dort den Flug.
   Darüber die Texte auf milchigem Glas wie die Tafeln der Zukunft, die Fotos ohne Rahmen (Marc: keine weissen Rahmen).
   Das Ausblenden der Welten und die Kopfzeile regelt welten.css (body.auf-bioseite). */
body.auf-bioseite { background: #090909; }
.bioseite {
  --rand: clamp(16px, 3vw, 44px);
  --breite: 1320px;
  --glas: rgba(214, 210, 205, 0.46);
  --glas-kante: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  position: relative; display: block; color: var(--schwarz);
  padding: 0 var(--rand) calc(var(--player-h, 0px) + 110px);
  overflow-x: clip;
}
.bioseite > * { max-width: var(--breite); margin-left: auto; margin-right: auto; position: relative; z-index: 1; }
.bioseite p { margin: 0; }

/* Die Welt hinter der Seite */
.bioseite > .bio-welt { position: fixed; inset: 0; z-index: 0; max-width: none; margin: 0; overflow: hidden; background: #090909; pointer-events: none; }
.bio-welt-bild, .bio-welt-flug { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: opacity, transform; transform: scale(1.08); }
.bio-welt-bild:first-child { opacity: 1; }
.bio-welt-flug { opacity: 1; transform: none; }
/* Ein leichter Schleier, damit Name und Marken auf jedem Bild lesbar sind */
.bio-welt-schleier { position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 30%, rgba(9, 9, 9, 0.45) 0%, rgba(9, 9, 9, 0.12) 60%, rgba(9, 9, 9, 0.25) 100%); }

/* Milchiges Glas wie die Tafeln der Zukunft */
.bio-glas {
  background: var(--glas); color: var(--schwarz); padding: clamp(18px, 2.4vw, 32px);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: var(--glas-kante);
}

/* Auftakt: Marken und Name frei auf der Welt, die grosse Bio auf Glas, daneben das Foto */
.bio-auftakt { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(22px, 4vh, 40px); padding: clamp(96px, 13vh, 150px) 0 clamp(48px, 8vh, 96px); }
.bio-marken { display: flex; flex-wrap: wrap; gap: 8px; }
.bio-marke { display: inline-block; background: var(--weiss); color: var(--schwarz); padding: 3px 8px; font-size: 0.8rem; }
.bio-marke.bio-zeitraum { background: transparent; color: var(--weiss); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85); }
.bio-name { margin: 0.16em 0 0; font-size: clamp(3.2rem, 9.6vw, 9.5rem); line-height: 0.88; letter-spacing: -0.055em; font-weight: 700; color: var(--weiss); text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35); }
.bio-auftakt-reihe { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(20px, 3.5vw, 56px); align-items: center; }
.bio-lead { font-size: clamp(1.14rem, 1.7vw, 1.5rem); line-height: 1.45; letter-spacing: -0.01em; }

/* Kapitel: Glas und Fotos nebeneinander, abwechselnd links und rechts, dazwischen viel Welt */
.bio-kapitel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; margin-top: clamp(26vh, 40vh, 480px); scroll-margin-top: 80px; }
.bio-kapitel.rechts .bio-satz { order: 2; }
.bio-kapitel.ohne-bilder { grid-template-columns: minmax(0, 1fr); }
.bio-kapitel.ohne-bilder .bio-satz { max-width: 46rem; }
.bio-titel { margin: 0 0 0.4em; font-size: clamp(2rem, 4.6vw, 4rem); line-height: 0.95; letter-spacing: -0.045em; font-weight: 700; }
.bio-text { font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.5; max-width: 34em; }

/* Wege: schwarze Tafeln auf dem Glas */
.bio-wege { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px !important; }
.bio-weg { display: inline-flex; align-items: center; gap: 8px; background: var(--schwarz); color: var(--weiss); padding: 8px 13px 9px; text-decoration: none; font-weight: 600; font-size: 0.92rem; line-height: 1.2; }
.bio-weg::after { content: "→"; font-weight: 400; transition: transform 0.25s var(--ease); }
.bio-weg:hover::after, .bio-weg:focus-visible::after { transform: translateX(3px); }
.bio-weg:focus-visible { outline: 2px solid var(--weiss); outline-offset: 2px; }
.bio-weg .punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--kobalt); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6); }
.bio-schluss > .bio-wege .bio-weg { background: var(--weiss); color: var(--schwarz); }
/* Links nach draussen (seine Diplomarbeit): Pfeil schräg nach oben, sie öffnen ein neues Fenster */
.bio-weg.raus::after { content: "↗"; }
.bio-weg.raus:hover::after, .bio-weg.raus:focus-visible::after { transform: translate(2px, -2px); }

/* Fotos ohne Rahmen, leicht versetzt, mit kleiner Unterschrift */
.bio-bilder { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; gap: 0; }
.bio-foto { position: relative; margin: 0; transition: transform 0.45s var(--ease), opacity 0.8s var(--ease); }
.bio-foto button { display: block; width: 100%; cursor: zoom-in; }
.bio-foto img { display: block; width: 100%; height: auto; background: #111; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55); }
.bio-foto figcaption { margin-top: 8px; font-size: 0.7rem; line-height: 1.3; color: var(--weiss); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
@media (hover: hover) {
  .bio-foto:hover { transform: translateY(-4px); z-index: 5; }
}
.bio-foto:focus-within { z-index: 5; }
.bio-bilder[data-n="1"] .bio-foto { grid-column: 1 / 13; }
.bio-bilder[data-n="2"] .bio-foto:nth-child(1) { grid-column: 1 / 9; grid-row: 1; }
.bio-bilder[data-n="2"] .bio-foto:nth-child(2) { grid-column: 6 / 13; grid-row: 1; margin-top: 34%; }
.bio-bilder[data-n="3"] .bio-foto:nth-child(1) { grid-column: 1 / 8; grid-row: 1; }
.bio-bilder[data-n="3"] .bio-foto:nth-child(2) { grid-column: 7 / 13; grid-row: 1; margin-top: 22%; }
.bio-bilder[data-n="3"] .bio-foto:nth-child(3) { grid-column: 3 / 10; grid-row: 2; margin-top: -8%; }

/* Schluss: nur die drei Fotos und die Wege */
.bio-schluss { margin-top: clamp(26vh, 40vh, 480px); display: grid; gap: 18px; }
.bio-schluss .bio-bilder { max-width: 980px; }
.bio-schluss .bio-bilder[data-n="3"] .bio-foto:nth-child(1) { grid-column: 1 / 6; grid-row: 1; }
.bio-schluss .bio-bilder[data-n="3"] .bio-foto:nth-child(2) { grid-column: 5 / 10; grid-row: 1; margin-top: 16%; }
.bio-schluss .bio-bilder[data-n="3"] .bio-foto:nth-child(3) { grid-column: 9 / 13; grid-row: 1; margin-top: 4%; }
.bio-schluss > .bio-wege { margin-top: clamp(40px, 7vh, 80px) !important; }
/* Ab vier Fotos eine Galerie (28.09.2026, Marcs neue Bilder): drei Spalten, die mittlere tiefer, die rechte leicht versetzt */
.bioseite .bio-bilder.bio-galerie { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(30px, 5vw, 76px) clamp(18px, 3vw, 44px); }
.bio-galerie .bio-foto { grid-column: auto; grid-row: auto; }
.bio-galerie .bio-foto:nth-child(3n + 2) { margin-top: 16%; }
.bio-galerie .bio-foto:nth-child(3n) { margin-top: 5%; }
/* Steht das letzte Foto allein in seiner Reihe, rückt es in die Mitte */
.bio-galerie .bio-foto:last-child:nth-child(3n + 1) { grid-column: 2; margin-top: 8%; }

/* Ein Bild für sich (Marcs Lieblingsbild, 28.09.2026): gross, ohne Glas, nie höher als der Bildschirm */
.bio-buehne { margin-top: clamp(26vh, 40vh, 480px); }
.bio-buehne .bio-bilder { display: block; }
.bio-buehne .bio-foto { width: min(100%, calc(84svh * var(--v, 1.5))); margin: 0 auto; }
.bio-buehne .bio-foto figcaption { font-size: 0.76rem; }
/* Ein Film für sich (Marc, 02.10.2026): gross wie das Lieblingsbild, eine stumme Schleife. Er öffnet nichts, darum hebt er sich beim Zeigen nicht an */
.bio-film video { display: block; width: 100%; height: auto; aspect-ratio: var(--v, 1); object-fit: cover; background: #111; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55); }
@media (hover: hover) {
  .bio-film:hover { transform: none; }
}

/* Beim Hereinscrollen */
.bioseite .kommt { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.bioseite .kommt.da { opacity: 1; transform: none; }

/* Grosses Foto */
.bio-gross { position: fixed; inset: 0; z-index: 60 !important; max-width: none !important; display: grid; place-items: center; padding: 56px clamp(12px, 5vw, 80px) calc(var(--player-h, 0px) + 28px);
  background: rgba(18, 17, 16, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.bio-gross figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; }
.bio-gross img { display: block; max-width: 100%; max-height: calc(100svh - var(--player-h, 0px) - 170px); width: auto; height: auto; object-fit: contain; }
.bio-gross figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; color: var(--weiss); font-size: 0.8rem; text-align: center; }
.bio-gross .bio-weg { background: var(--weiss); color: var(--schwarz); font-family: var(--schrift); }
.bio-gross-zu, .bio-gross-zurueck, .bio-gross-vor { position: absolute; color: var(--weiss); font-size: 1.9rem; line-height: 1; padding: 10px 14px; }
.bio-gross-zu { top: 10px; right: 12px; }
.bio-gross-zurueck { left: 6px; top: 50%; transform: translateY(-50%); }
.bio-gross-vor { right: 6px; top: 50%; transform: translateY(-50%); }
.bio-gross :focus-visible { outline-color: var(--weiss); }

/* Telefon: alles untereinander, die Fotos als Streifen zum Wischen */
@media (max-width: 760px) {
  .bio-auftakt { min-height: 0; justify-content: flex-start; }
  .bio-auftakt-reihe, .bio-kapitel { grid-template-columns: minmax(0, 1fr); }
  .bio-kapitel.rechts .bio-satz { order: 0; }
  .bio-kapitel, .bio-schluss, .bio-buehne { margin-top: 38vh; }
  .bioseite .bio-bilder {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 6px calc(-1 * var(--rand)) 0; padding: 12px var(--rand) 18px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .bioseite .bio-bilder::-webkit-scrollbar { display: none; }
  .bioseite .bio-bilder.bio-galerie { gap: 14px; }
  .bioseite .bio-bilder .bio-foto { flex: 0 0 min(78vw, 360px); margin: 0 !important; scroll-snap-align: center; }
  .bioseite .bio-auftakt .bio-bilder .bio-foto { flex-basis: min(88vw, 420px); }
  /* Das grosse Bild bleibt auf dem Telefon ein Bild über die ganze Breite, kein Streifen */
  .bioseite .bio-buehne .bio-bilder { display: block; overflow: visible; margin: 0 calc(-1 * var(--rand)); padding: 0; }
  .bioseite .bio-buehne .bio-foto { width: 100%; }
  .bioseite .bio-buehne .bio-foto figcaption { padding: 0 var(--rand); }
  .bio-gross-zurueck, .bio-gross-vor { top: auto; bottom: calc(var(--player-h, 0px) + 6px); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bio-foto, .bio-weg::after, .bioseite .kommt { transition: none; }
  .bio-welt-bild { transform: none; }
}
