/* ============================================================
   FARBEN & FONTS — hier zentral ändern

   WICHTIG: Schrift ist IMMER rot, nie weiß. Weiß ist ausschließlich
   für den Cursor-Glow und dünne Rahmenlinien der Platzhalterbilder
   reserviert. --red-soft ist die gleiche rote Farbe, nur gedimmt,
   für Fließtext (Lesbarkeit), niemals weiß.
   ============================================================ */
:root {
  --black: #000000;
  --red: rgb(255, 0, 0);
  --red-soft: rgba(255, 0, 0, 0.72);
  --red-dim: rgba(255, 0, 0, 0.4);
  --red-faint: rgba(255, 0, 0, 0.22);
  --white: #ffffff;

  /* Schriften: genau zwei, konsequent getrennt.
     --font-display (Arial): alles, was Überschrift/Label ist: Navigation,
       Sprach-/Ansichts-Schalter, Karten-Titel + Kategorie + Jahr,
       Projekt-Titel/Jahr/Kategorie, Reiter, Zwischenüberschriften,
       CV-Abschnittstitel.
     --font-body (Helvetica Neue): alles Gelesene: Fließtext, CV-Einträge,
       Bildunterschriften, Lightbox, Buttons, Kachel-Titel, Credits. */
  --font-display: Arial, Helvetica, sans-serif;

  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--black);
  color: var(--red);
  font-family: var(--font-body);
  overflow: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   CUSTOM CURSOR — weicher Glow-Punkt (einzige weiße Fläche)
   ============================================================ */
#cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.35) 45%, rgba(255,255,255,0) 75%);
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, opacity 0.2s ease;
}
#cursor-glow.hover {
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
}
#cursor-glow.dragging {
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  opacity: 0.7;
}

@media (hover: none) {
  #cursor-glow { display: none; }
  html, body { cursor: auto; }
}

/* ============================================================
   TITEL — treibt mit auf der Fläche (wie bei der Referenzseite),
   Position wird per JS gesetzt (siehe TITLE_X/TITLE_Y in main.js)
   ============================================================ */
#site-title {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
/* Titel-Grafik — fertiges Bild (images/site-title-facade.png,
   transparenter Hintergrund), ersetzt den früheren CSS-Fassadentext.
   Gleiche Breite wie der vorherige Textblock. */
.facade-image {
  width: clamp(280px, 34vw, 420px);
  height: auto;
  display: block;
}

/* ============================================================
   ECKEN-NAVIGATION
   ============================================================ */
.ui-label {
  position: fixed;
  z-index: 850;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--red-dim);
  cursor: none;
  transition: color 0.25s ease, opacity 0.25s ease;
}
.ui-label:hover,
.ui-label.active { color: var(--red); }

#corner-tl { top: 32px; left: 32px; }
#corner-bottom { bottom: 32px; left: 50%; transform: translateX(-50%); }
#surprise-btn { top: 32px; right: 32px; }
/* Überschneidet sich sonst mit dem Schließen-X eines offenen Projekts/
   Panels — nur auf der Landing Page sichtbar (siehe main.js). */
#surprise-btn.hidden { display: none; }

.ui-vertical {
  top: 50%;
  left: 24px;
  transform-origin: left center;
  transform: translateY(-50%) rotate(-90deg) translateX(-50%);
}
.ui-vertical-right {
  left: auto;
  right: 24px;
  transform-origin: right center;
  transform: translateY(-50%) rotate(90deg) translateX(50%);
}

.drag-hint {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 500;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-faint);
  pointer-events: none;
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ============================================================
   SPRACHUMSCHALTER — unten links
   ============================================================ */
#lang-switch {
  position: fixed;
  bottom: 32px;
  left: 32px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
}
#lang-switch button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--red-dim);
  cursor: none;
  transition: color 0.2s ease;
}
#lang-switch button:hover,
#lang-switch button.active { color: var(--red); }
#lang-switch .lang-sep { color: var(--red-faint); }

/* ============================================================
   ANSICHT-UMSCHALTER (RASTER / ORBIT) — direkt oberhalb DE/EN
   ============================================================ */
#view-switch {
  position: fixed;
  bottom: 60px;
  left: 32px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
}
#view-switch button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--red-dim);
  cursor: none;
  transition: color 0.2s ease;
}
#view-switch button:hover,
#view-switch button.active { color: var(--red); }
#view-switch .lang-sep { color: var(--red-faint); }

/* ============================================================
   PANNBARE FLÄCHE
   ============================================================ */
#world-viewport {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}
#world {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  will-change: transform;
}

/* ---------- Karten ---------- */
.card {
  position: absolute;
  top: 0;
  left: 0;
  width: 230px;
  cursor: none;
  will-change: transform, opacity;
}
.card-frame {
  width: 100%;
  background:
    repeating-linear-gradient(45deg, #0a0a0a 0 2px, #000 2px 4px);
  border: none;
  position: relative;
  overflow: hidden;
}
/* Nur Platzhalter-Karten (ohne Bild) bekommen ein festes Format —
   Karten mit Bild nehmen automatisch dessen Originalformat an
   (Hoch-, Quer- oder Quadratformat, wie auf der Referenzseite). */
.card-frame--placeholder {
  aspect-ratio: 4 / 3;
}
.card-frame img {
  width: 100%;
  height: auto;
  display: block;
}
.card-placeholder-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-faint);
  text-align: center;
  padding: 0 10%;
}
.card-caption {
  margin-top: 10px;
  line-height: 1.35;
  opacity: 0;
  transform-origin: top left;
  /* --caption-scale wird per JS auf 1 / Kartenskalierung gesetzt, damit
     die Schrift bei größer skalierten Karten (z.B. Teaser-Bilder) IMMER
     gleich groß bleibt — nur das Bild wird größer, nie die Schrift. */
  transform: translateY(-4px) scale(var(--caption-scale, 1));
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.card.hovered .card-caption {
  opacity: 1;
  transform: translateY(0) scale(var(--caption-scale, 1));
}
.card-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--red-soft);
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.card.hovered .card-title { color: var(--red); }
.card-category {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--red-dim);
  text-transform: uppercase;
  margin-top: 3px;
}
.card-year {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--red-dim);
  margin-top: 2px;
}

/* ============================================================
   PROJEKT-DETAILANSICHT
   ============================================================ */
#detail-panel {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  overflow-y: auto;
}
#detail-panel.open {
  opacity: 1;
  pointer-events: auto;
}
.detail-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 130px 6vw 100px;
}
.detail-year {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.detail-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  margin: 0 0 6px;
  color: var(--red);
  text-transform: uppercase;
  line-height: 1.05;
}
.detail-category {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
/* Zusätzliche Zeile unter der Kategorie (z.B. "Royal Danish Academy") —
   nur in der Detailansicht, nicht auf der Landing-Page-Karte. Nur
   sichtbar, wenn project.school gesetzt ist (siehe fillDetail in main.js). */
.detail-school {
  display: none;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red-dim);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 2px 0 48px;
}
.detail-school.visible {
  display: block;
}
.detail-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}
.detail-image:not(.has-image) {
  aspect-ratio: 16/9;
  background:
    repeating-linear-gradient(45deg, #0d0d0d 0 2px, #000 2px 4px);
  border: 1px solid rgba(255,255,255,0.14);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--red-dim);
  text-transform: uppercase;
}
.detail-image-img {
  display: none;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
}
.detail-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--red-soft);
  max-width: 620px;
  margin: 0 0 48px;
}
.detail-text p {
  margin: 0 0 1.4em;
  white-space: pre-line;
}
.detail-text p:last-child {
  margin-bottom: 0;
}
/* Klickbares Wort innerhalb des Fließtexts (z.B. "Prozess"), das direkt
   zu einem bestimmten Medien-Inhalt springt — siehe project.textLinks
   in data.js und fillDetail in main.js. */
.detail-text-link {
  font: inherit;
  text-decoration: underline;
  font-style: italic;
  color: inherit;
  cursor: none;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.15s ease;
}
.detail-text-link:hover {
  color: var(--red);
}
/* Kontext-Bild, das rechts neben dem Fließtext schwebt (z.B. Lageplan) —
   wird per JS vor einem bestimmten Absatz eingefügt (siehe fillDetail in
   main.js), sodass es auf Höhe dieses Absatzes zu schweben beginnt. */
.detail-context-image {
  float: right;
  width: min(600px, 68vw);
  height: auto;
  margin: 0 0 24px 32px;
}
/* Loopendes Video am Ende des Fließtexts (project.endVideo) — z.B.
   Circular Encounters: steht direkt nach dem letzten Absatz, spielt
   automatisch, stumm, in Dauerschleife, kein Player/Controls. */
.detail-end-video {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  margin: 8px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
/* Bild-Kacheln unter dem Fließtext (project.tiles) — z.B. Photography. */
.detail-tiles {
  display: flex;
  gap: 18px;
  width: 100%;
  max-width: 620px;
  margin-top: 28px;
}
.detail-tile {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #000;
  overflow: hidden;
  cursor: pointer;
}
.detail-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.3s ease;
}
.detail-tile:hover img {
  transform: scale(1.04);
}
.detail-tile .detail-tile-title--center {
  top: 0;
  height: auto;
}
.detail-tile-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12.5%; /* unteres Achtel des Bildes */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-align: center;
  font-family: var(--font-display);
  color: var(--red);
  font-size: 18px;
  line-height: 1.3;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.detail-text .detail-credits {
  margin: 28px 0 0;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.03em;
  color: var(--red-dim);
}
.detail-media {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-bottom: 40px;
}
.detail-media span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--red);
  text-transform: uppercase;
  border-bottom: 1px solid var(--red-dim);
  padding-bottom: 4px;
}
.detail-media span[data-tab] {
  cursor: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.detail-media span[data-tab].active {
  color: var(--red);
  border-color: var(--red);
}
.detail-media span[data-tab]:not(.active) {
  color: var(--red-dim);
}

/* ---------- Interventions: erscheinen direkt im Fließtext, nach der
   Projektbeschreibung — jeweils Nummer/Titel, kurzer Text, loopendes
   Video (falls vorhanden) und kleine Links zu den Zeichnungen/
   Renderings genau DIESER Intervention. ---------- */
.detail-interventions {
  max-width: 620px;
  margin: 0 0 48px;
}
.intervention {
  padding: 36px 0;
}
.intervention-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: var(--red);
  text-transform: uppercase;
  margin: 0 0 14px;
  line-height: 1.2;
}
.intervention-number {
  color: var(--red-dim);
  margin-right: 14px;
}
.intervention-text {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--red-soft);
  margin: 0 0 20px;
}
.intervention-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: cover;
  margin: 0 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.intervention-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.intervention-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--red-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--red-dim);
  padding-bottom: 3px;
  cursor: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.intervention-link:hover {
  color: var(--red);
  border-color: var(--red);
}

/* ---------- Diashow: öffnet sich beim Klick auf einen Reiter ----------
   Weiterklickbarer/sliden­barer Filmstreifen (Referenz: schaum-official.com)
   — Bilder im Originalzuschnitt, mit sichtbarem Abstand zueinander,
   per Pfeil, Pfeiltaste, Klick auf ein Bild oder frei per Trackpad/
   Touch durchblätterbar. */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#lightbox.open { opacity: 1; pointer-events: auto; }

#lightbox-track {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#lightbox-track::-webkit-scrollbar { display: none; }

#lightbox-strip {
  display: flex;
  align-items: center;
  gap: 36px;
}
/* Echte Platzhalter-Elemente statt Padding vor/nach den Bildern: Safari/
   Chrome zählen nachlaufendes Padding eines Scroll-Containers nicht
   zuverlässig zur scrollbaren Fläche (nur das führende) — dadurch ließ
   sich das letzte Bild nie ganz mittig scrollen. Mit echten Elementen
   funktioniert das Zentrieren in beide Richtungen zuverlässig. */
.lightbox-spacer {
  flex: 0 0 48vw;
  height: 1px;
}
.lightbox-slide {
  flex: 0 0 auto;
  height: 74vh;
  scroll-snap-align: center;
  cursor: none;
}
.lightbox-slide img {
  height: 100%;
  width: auto;
  max-width: 70vw;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
}
/* Video-Folie (z.B. Prozess-Animation) — Bedienelemente bleiben klickbar,
   daher kein pointer-events:none wie bei den Bildern. */
.lightbox-slide video {
  height: 100%;
  width: auto;
  max-width: 70vw;
  object-fit: contain;
  display: block;
  cursor: auto;
}
.lightbox-slide--full video {
  max-width: 92vw;
}
/* Für einzelne Bilder, die bewusst den Bildschirm ausfüllen sollen
   (z.B. die große Kontext-Zeichnung) — über item.full in js/data.js. */
.lightbox-slide--full {
  height: 92vh;
}
.lightbox-slide--full img {
  max-width: 92vw;
}
/* Raster-Folie am Ende einer Diashow (z.B. Materialsamples-PDF bei
   Layers + Symbiosis) — zeigt alle Bilder auf einmal statt einzeln,
   analog zum Elements-Raster bei Gasolina, aber als letzte Folie
   innerhalb der normalen Diashow — über item.grid in js/data.js. */
.lightbox-slide--grid {
  height: 92vh;
  width: 92vw;
  max-width: 1400px;
  overflow-y: auto;
  cursor: auto;
  -webkit-overflow-scrolling: touch;
}
.lightbox-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 10px 4px 40px;
}
.lightbox-grid img {
  width: 100%;
  height: auto;
  max-width: none;
  display: block;
  pointer-events: none;
  user-select: none;
}
@media (max-width: 900px) {
  .lightbox-grid { grid-template-columns: repeat(2, 1fr); }
}
/* Bild + Text nebeneinander (z.B. Gletscherschmelze mit Quellenangabe)
   — über item.sideText in js/data.js. */
.lightbox-slide--with-text {
  display: flex;
  align-items: center;
  gap: 44px;
}
.lightbox-slide--with-text img {
  max-width: 54vw;
}
.lightbox-slide-text {
  max-width: 28vw;
  max-height: 84vh;
  overflow-y: auto;
  color: var(--red-soft);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
  cursor: auto;
}

#lightbox-caption {
  margin-top: 22px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-body);
}
#lightbox-caption-text {
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red-soft);
}
#lightbox-counter {
  font-size: 12px;
  color: var(--red-dim);
}
#lightbox-close {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 960;
  background: none;
  border: none;
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#lightbox-close:hover { opacity: 0.6; transform: rotate(90deg); }
#lightbox-prev,
#lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 960;
  background: none;
  border: none;
  color: var(--red);
  font-size: 48px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: none;
  padding: 12px;
  transition: opacity 0.2s ease;
}
#lightbox-prev:hover,
#lightbox-next:hover { opacity: 0.55; }
#lightbox-prev { left: 16px; }
#lightbox-next { right: 16px; }
#lightbox-prev.hidden,
#lightbox-next.hidden { display: none; }

/* ---------- PDF-Betrachter: vertikal durchscrollbar, kein Download ----------
   Öffnet sich beim Klick auf den "PDF"-Reiter. Die Seiten werden als
   Bilder untereinander gestapelt (statt die Datei zu verlinken) — so
   lässt sich das Dokument lesen, aber nicht als PDF herunterladen. */
#pdf-viewer {
  position: fixed;
  inset: 0;
  z-index: 970;
  background: rgba(0, 0, 0, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#pdf-viewer.open { opacity: 1; pointer-events: auto; }
#pdf-viewer-track {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#pdf-viewer-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 90px 20px 90px;
}
.pdf-page {
  width: min(640px, 88vw);
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
#pdf-viewer-close {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 980;
  background: none;
  border: none;
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#pdf-viewer-close:hover { opacity: 0.6; transform: rotate(90deg); }

/* Kleine Auswahl, wenn es mehr als ein PDF gibt (z.B. Programme /
   Glossary) — Position wird per JS neben dem "PDF"-Reiter gesetzt. */
#pdf-picker {
  position: fixed;
  z-index: 990;
  background: var(--black);
  border: 1px solid var(--red-dim);
  min-width: 150px;
  display: none;
  flex-direction: column;
  padding: 4px 0;
  /* Passt nicht jede Auswahl in den sichtbaren Bereich (z.B. Prozess
     mit mehreren Unterreitern) — dann wird die Liste selbst scrollbar,
     statt Einträge unerreichbar unten abzuschneiden. */
  max-height: min(280px, calc(100vh - 24px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#pdf-picker.open { display: flex; }
#pdf-picker button {
  background: none;
  border: none;
  color: var(--red);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  padding: 9px 16px;
  cursor: none;
  transition: background 0.15s ease, color 0.15s ease;
}
#pdf-picker button:hover {
  background: var(--red-faint);
}

/* ---------- Film-Betrachter: Vimeo-Player als Vollbild-Overlay ---------- */
#film-viewer {
  position: fixed;
  inset: 0;
  z-index: 970;
  background: rgba(0, 0, 0, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#film-viewer.open { opacity: 1; pointer-events: auto; }
#film-viewer-frame-wrap {
  width: min(1100px, 88vw);
}
#film-viewer-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}
#film-viewer-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
#film-viewer-link {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--red-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--red-dim);
  padding-bottom: 2px;
  cursor: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
#film-viewer-link:hover {
  color: var(--red);
  border-color: var(--red);
}
#film-viewer-close {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 980;
  background: none;
  border: none;
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#film-viewer-close:hover { opacity: 0.6; transform: rotate(90deg); }

/* ---------- Elements-Betrachter: alle Element-Bilder als Raster ---------- */
#elements-viewer {
  position: fixed;
  inset: 0;
  z-index: 970;
  background: rgba(0, 0, 0, 0.97);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#elements-viewer.open { opacity: 1; pointer-events: auto; }
#elements-viewer-track {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
#elements-viewer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 90px 40px 90px;
  max-width: 1600px;
  margin: 0 auto;
}
.elements-grid-item {
  width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
@media (max-width: 900px) {
  #elements-viewer-grid { grid-template-columns: repeat(2, 1fr); padding: 80px 16px; }
}
#elements-viewer-close {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 980;
  background: none;
  border: none;
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#elements-viewer-close:hover { opacity: 0.6; transform: rotate(90deg); }

.detail-link {
  display: none;
  margin-top: 36px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--red);
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
  cursor: none;
  transition: opacity 0.2s ease;
}
.detail-link:hover { opacity: 0.7; }

#detail-close,
#static-close,
#surprise-close {
  position: fixed;
  top: 28px;
  right: 32px;
  z-index: 900;
  background: none;
  border: none;
  color: var(--red);
  font-size: 30px;
  line-height: 1;
  font-family: var(--font-body);
  cursor: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#detail-close:hover,
#static-close:hover,
#surprise-close:hover { opacity: 0.6; transform: rotate(90deg); }

/* ============================================================
   STATISCHE PANELS (INFO / CV / CONTACT)
   ============================================================ */
#static-panel {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#static-panel.open { opacity: 1; pointer-events: auto; }
.static-inner {
  max-width: 700px;
  margin: 0 auto;
  padding: 160px 6vw;
}
.static-block { display: none; }
.static-block.active { display: block; }
.static-block h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  font-size: 14px;
  letter-spacing: 0.15em;
  margin-bottom: 24px;
}
.static-block p {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--red-soft);
}

/* ---------- CV: Foto, Kontaktdaten, Einträge ---------- */
.cv-meta {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--red-soft);
  margin-bottom: 28px;
}
.cv-photo {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid rgba(255,255,255,0.14);
  display: block;
  margin-bottom: 28px;
}
.cv-bio {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--red-soft);
  margin: 0 0 8px;
}
.cv-info-link {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--red);
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
  cursor: none;
  transition: opacity 0.2s ease;
}
.cv-info-link:hover { opacity: 0.7; }
.cv-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 44px 0 18px;
}

/* KONTAKT: viel Abstand zwischen der E-Mail-Adresse und dem Impressum,
   damit das Rechtliche erst beim Weiterscrollen auftaucht. */
.static-block[data-block="contact"] .cv-section-title:first-of-type {
  margin-top: 70vh;
}

.cv-entry { margin-bottom: 20px; }
.cv-entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-body);
}
.cv-entry-role {
  font-size: 15px;
  color: var(--red);
}
.cv-entry-date {
  font-size: 13px;
  color: var(--red-dim);
  white-space: nowrap;
}
.cv-entry-org {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--red-soft);
  margin-top: 2px;
}
.cv-entry-desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--red-soft);
  margin: 8px 0 0;
}

/* ---------- CV: Sprachbalken ---------- */
.cv-lang { margin-bottom: 20px; }
.lang-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.lang-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--red-soft);
  min-width: 80px;
}
.lang-bar-track {
  flex: 1;
  max-width: 200px;
  height: 3px;
  background: rgba(255, 0, 0, 0.15);
}
.lang-bar-fill {
  height: 100%;
  background: var(--red-dim);
}

/* ---------- CV: Software-Skills ---------- */
.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}
.cv-skills span {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--red-soft);
}

/* ============================================================
   SURPRISE — interaktives 3D-Objekt
   ============================================================ */
#surprise-panel {
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--black);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#surprise-panel.open {
  opacity: 1;
  pointer-events: auto;
}
#surprise-canvas-wrap {
  position: absolute;
  inset: 0;
}
#surprise-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#surprise-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 850;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-faint);
  pointer-events: none;
}
#song-popup {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 0, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
#song-popup.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#song-popup .song-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#song-popup .song-artist {
  font-family: var(--font-body);
  color: var(--red-dim);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.surprise-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--red-dim);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
  /* Karten (Orbit wie Raster) werden auf dem Handy per max-width gedeckelt,
     statt eine feste Breite zu setzen — die Kartenbreite kommt normalerweise
     per JS als Inline-Style (siehe buildCard in main.js) und würde eine
     einfache .card{width:...}-Regel hier ignorieren. max-width greift
     trotzdem, auch bei groß skalierten Teaser-Karten (project.scale > 1),
     damit auf kleinen Screens mehr Projekte gleichzeitig sichtbar sind,
     statt 1-2 riesiger Bilder. */
  .card { max-width: 42vw; }

  /* PROJECTS/CONTACT waren auf Mobile komplett ausgeblendet (display:none)
     — jetzt stattdessen als kleiner, nicht gedrehter Textstapel oben
     rechts, zusammen mit SURPRISE (das sonst mit PROJECTS an der gleichen
     Stelle kollidieren würde). */
  .ui-vertical,
  .ui-vertical-right {
    transform: none;
    transform-origin: initial;
  }
  #corner-tl { top: 20px; left: 20px; }
  #corner-bottom { bottom: 20px; }
  #edge-left { top: 20px; left: auto; right: 20px; }
  #edge-right { top: 40px; right: 20px; }
  #surprise-btn { top: 60px; right: 20px; }
  .drag-hint { display: none; }

  /* PROJECTS/CONTACT verschwinden (wie SURPRISE schon vorher), sobald ein
     Projekt oder Panel offen ist — sonst liegen sie unter dem Schließen-X
     oben rechts. Auf Desktop bleibt das wirkungslos, da edge-left/-right
     dort an ihrer ursprünglichen Position (Bildschirmrand, vertikal) gar
     nicht mit dem X kollidieren. */
  #edge-left.hidden,
  #edge-right.hidden { display: none; }
}
