/* ===== DESIGN TOKENS ===== */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Fonts */
  --font-display: 'Clash Display', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ===== DARK THEME (default for film portfolio) ===== */
:root, [data-theme="dark"] {
  --color-bg: #0a0a0c;
  --color-surface: #111114;
  --color-surface-2: #18181c;
  --color-surface-offset: #1e1e24;
  --color-border: #2a2a32;
  --color-divider: #222228;

  --color-text: #e8e6e3;
  --color-text-muted: #8a8890;
  --color-text-faint: #55535a;

  --color-accent: #e8443a;
  --color-accent-hover: #d63a30;
  --color-accent-muted: rgba(232, 68, 58, 0.15);

  --color-warm: #f5c542;
  --color-cool: #5b8def;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

[data-theme="light"] {
  --color-bg: #f5f4f0;
  --color-surface: #ffffff;
  --color-surface-2: #fafaf8;
  --color-surface-offset: #eeedea;
  --color-border: #d8d6d2;
  --color-divider: #e2e0dc;

  --color-text: #1a1a1e;
  --color-text-muted: #6b6970;
  --color-text-faint: #a8a6ae;

  --color-accent: #d63a30;
  --color-accent-hover: #c02e24;
  --color-accent-muted: rgba(214, 58, 48, 0.1);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

/* ===== GLOBAL STYLES ===== */
body {
  background: var(--color-bg);
  color: var(--color-text);
  overflow-x: hidden;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
a:hover {
  color: var(--color-accent-hover);
}

/* ===== HEADER / NAV ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: oklch(from var(--color-bg) l c h / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.site-header.hidden {
  transform: translateY(-100%);
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.logo {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.logo:hover { color: var(--color-text); }
.logo-mark {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  overflow: visible;
}
.logo-mark .logo-play {
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 19px 14px;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease;
}
.logo-mark .logo-play:hover,
.logo-mark .logo-play:focus-visible {
  transform: scale(1.25);
  filter: drop-shadow(0 0 6px currentColor);
  outline: none;
}
.logo-mark .logo-play.is-active {
  animation: logoPlayPulse 1.4s ease-in-out infinite;
}
@keyframes logoPlayPulse {
  0%, 100% { transform: scale(1); filter: none; }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 8px currentColor); }
}

/* Showreel-Badge im Lightbox-Titel */
.showreel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--color-accent, #d4f24a);
  color: #0a0a0a;
  vertical-align: middle;
}
.showreel-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a0a0a;
  animation: showreelBlink 1.4s ease-in-out infinite;
}
@keyframes showreelBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-1) 0;
  position: relative;
  transition: color var(--transition-interactive);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  padding: var(--space-1);
  position: relative;
  z-index: 200;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--color-bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-10);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
    z-index: 150;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li {
    list-style: none;
  }
  .nav-links a {
    font-size: var(--text-xl);
    font-family: var(--font-display);
    font-weight: 500;
  }
  .site-header {
    padding: var(--space-3) var(--space-4);
  }
}

/* ===== HERO ===== */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-32) var(--space-6) var(--space-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ===== HERO-SHOWREEL: ambient background collage ===== */
.hero-showreel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
  pointer-events: none;
}
.hero-showreel__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  background: #000;
}
.hero-showreel__layer.is-active { opacity: 1; }
.hero-showreel__layer video,
.hero-showreel__layer iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}
/* YouTube iframe needs to be oversized so the chrome/letterboxing doesn't show */
.hero-showreel__layer iframe {
  width: 177.78vh;
  height: 56.25vw;
  min-width: 100%;
  min-height: 100%;
}
.hero-showreel__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 60% at 50% 50%,
      rgba(0,0,0,0.72) 0%,
      rgba(0,0,0,0.68) 50%,
      rgba(0,0,0,0.82) 100%),
    linear-gradient(to bottom,
      rgba(0,0,0,0.65) 0%,
      rgba(0,0,0,0.7) 45%,
      var(--color-bg) 100%);
  pointer-events: none;
}
[data-theme="light"] .hero-showreel__vignette {
  background:
    radial-gradient(ellipse 65% 60% at 50% 50%,
      rgba(255,255,255,0.72) 0%,
      rgba(255,255,255,0.65) 50%,
      rgba(255,255,255,0.78) 100%),
    linear-gradient(to bottom,
      rgba(255,255,255,0.65) 0%,
      rgba(255,255,255,0.72) 45%,
      var(--color-bg) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-showreel__layer { transition: none; }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    oklch(from var(--color-bg) l c h / 0.3) 0%,
    oklch(from var(--color-bg) l c h / 0.7) 50%,
    var(--color-bg) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}
.hero-title .accent {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  line-height: 1.5;
}

.hero-cta {
  display: inline-flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-interactive);
  text-decoration: none;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-2);
  transform: translateY(-1px);
  color: var(--color-text);
}

.scroll-indicator {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== SECTIONS ===== */
.section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
}

.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: var(--space-10);
}

/* ===== PROJECT GRID ===== */
.projects-grid {
  column-count: 2;
  column-gap: var(--space-6);
}
.projects-grid > .project-card {
  break-inside: avoid;
  margin-bottom: var(--space-6);
  display: block;
}
.projects-grid > .project-card.featured {
  column-span: all;
}
@media (max-width: 768px) {
  .projects-grid {
    column-count: 1;
  }
  .projects-grid > .project-card.featured {
    column-span: none;
  }
}

.project-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-interactive), box-shadow var(--transition-interactive), border-color var(--transition-interactive);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
  display: block;
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
  color: var(--color-text);
}


.project-card.featured .project-img {
  max-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-card.featured .project-img img {
  width: auto;
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
  margin: 0 auto;
}

.project-img {
  background: var(--color-surface-2);
  overflow: hidden;
  position: relative;
  line-height: 0;
}
.project-img img,
.project-img video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.project-card:hover .project-img img {
  transform: scale(1.03);
}
.project-img video {
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Trailer-Button (auf Poster) + Lightbox */
.project-img { position: relative; }
.trailer-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px 7px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  z-index: 2;
}
.trailer-btn:hover,
.trailer-btn:focus-visible {
  background: rgba(0,0,0,0.82);
  border-color: rgba(255,255,255,0.4);
  outline: none;
  transform: translateY(-1px);
}
.trailer-btn svg { display: block; }

.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 32px);
}
.trailer-modal[aria-hidden="false"] { display: flex; }
.trailer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
  animation: trailerFade 0.18s ease both;
}
.trailer-modal__bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 14vh;
  background: #000;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(0,0,0,0.6);
}
.trailer-modal__bar--top {
  top: 0;
  transform: translateY(-100%);
  animation: cinemascopeTop 0.42s cubic-bezier(.22,.8,.18,1) 0.05s both;
}
.trailer-modal__bar--bottom {
  bottom: 0;
  transform: translateY(100%);
  animation: cinemascopeBottom 0.42s cubic-bezier(.22,.8,.18,1) 0.05s both;
}
.trailer-modal__dialog {
  position: relative;
  z-index: 3;
  width: min(1100px, 100%);
  background: var(--color-surface, #111);
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: trailerPop 0.32s cubic-bezier(.2,.7,.2,1) 0.32s both;
}
.trailer-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.08));
}
.trailer-modal__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text, #eee);
}
.trailer-modal__close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-muted, #aaa);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.trailer-modal__close:hover,
.trailer-modal__close:focus-visible {
  background: var(--color-surface-2, rgba(255,255,255,0.06));
  color: var(--color-text, #fff);
  border-color: var(--color-border, rgba(255,255,255,0.12));
  outline: none;
}
.trailer-modal__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  line-height: 0;
}
.trailer-modal__player iframe,
.trailer-modal__player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
body.modal-open { overflow: hidden; }

@keyframes trailerFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes trailerPop {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cinemascopeTop {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
@keyframes cinemascopeBottom {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.trailer-modal.is-closing .trailer-modal__dialog {
  animation: trailerPopOut 0.18s ease both;
}
.trailer-modal.is-closing .trailer-modal__bar--top {
  animation: cinemascopeTopOut 0.32s cubic-bezier(.6,.0,.78,.2) 0.12s both;
}
.trailer-modal.is-closing .trailer-modal__bar--bottom {
  animation: cinemascopeBottomOut 0.32s cubic-bezier(.6,.0,.78,.2) 0.12s both;
}
.trailer-modal.is-closing .trailer-modal__backdrop {
  animation: trailerFadeOut 0.2s ease 0.32s both;
}
@keyframes trailerPopOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(4px) scale(0.99); }
}
@keyframes cinemascopeTopOut {
  from { transform: translateY(0); }
  to { transform: translateY(-100%); }
}
@keyframes cinemascopeBottomOut {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}
@keyframes trailerFadeOut { from { opacity: 1; } to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .trailer-modal__backdrop,
  .trailer-modal__dialog,
  .trailer-modal__bar--top,
  .trailer-modal__bar--bottom { animation: none; }
  .trailer-modal__bar--top,
  .trailer-modal__bar--bottom { transform: translateY(0); }
}
@media (max-width: 600px) {
  .trailer-btn { font-size: 11px; padding: 6px 10px 6px 9px; bottom: 10px; right: 10px; }
  .trailer-modal { padding: 0; }
  .trailer-modal__dialog { border-radius: 0; height: 100%; width: 100%; display: flex; flex-direction: column; }
  .trailer-modal__player { flex: 1; aspect-ratio: auto; }
  .trailer-modal__bar { height: 10vh; }
}

/* Text-only card (no image) */
.project-card.text-only .project-info {
  padding: var(--space-6) var(--space-5) var(--space-6);
}
.project-card.text-only .project-title {
  font-size: var(--text-xl);
}

.project-info {
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: var(--space-2);
  column-gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.project-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
}
.project-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.project-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-text-faint);
}

.project-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.project-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

.project-tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}
.project-tag {
  font-size: var(--text-xs);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-accent-muted);
  color: var(--color-accent);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.project-tag:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* ===== FILTER-BAR (Projekte) ===== */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 var(--space-6);
  padding: 1.1rem 1.3rem 1rem;
  background: var(--color-surface, rgba(255,255,255,0.03));
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius: 14px;
}
.filter-bar__row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.filter-bar__legend {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted, #888);
  min-width: 4.5rem;
  flex: 0 0 auto;
}
.filter-bar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.filter-bar__row--meta {
  margin-top: 0.2rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.06));
  justify-content: space-between;
}
.filter-bar__count {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted, #888);
}
.filter-bar__reset {
  background: transparent;
  border: none;
  color: var(--color-accent, #ff5640);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.filter-bar__reset:hover { opacity: 0.75; }

.chip {
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.34rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.18));
  background: transparent;
  color: var(--color-text, #f1efe8);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  line-height: 1;
  letter-spacing: 0.01em;
}
.chip:hover {
  border-color: var(--color-accent, #ff5640);
  color: var(--color-accent, #ff5640);
}
.chip.is-active {
  background: var(--color-accent, #ff5640);
  border-color: var(--color-accent, #ff5640);
  color: #1a1a1a;
}
.chip.is-active:hover {
  filter: brightness(1.06);
  color: #1a1a1a;
}
[data-theme="light"] .chip.is-active {
  color: #fff;
}

/* Projekt-Karten ein- und ausblenden */
.project-card {
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.project-card.is-hidden {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
}
.projects-grid.is-empty::after {
  content: "Keine Projekte zu dieser Kombination. Filter zurücksetzen?";
  display: block;
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-muted, #888);
  font-style: italic;
}

@media (max-width: 760px) {
  .filter-bar {
    padding: 0.9rem 1rem 0.8rem;
  }
  .filter-bar__legend {
    min-width: 0;
    flex: 1 0 100%;
    margin-bottom: -0.2rem;
  }
  .chip {
    font-size: 0.78rem;
    padding: 0.32rem 0.7rem;
  }
}

/* ===== ABOUT SECTION ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.about-image {
  aspect-ratio: 3/4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-2);
  max-width: 400px;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.about-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.about-text p:last-of-type {
  margin-bottom: var(--space-6);
}

.stats-row {
  display: flex;
  gap: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: var(--space-8);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-divider);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-8);
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-8) - 4px);
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
}
.timeline-year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}
.timeline-title {
  font-weight: 600;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.timeline-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.contact-text h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-4);
}
.contact-text p {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.contact-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: all var(--transition-interactive);
}
.contact-link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-muted);
  color: var(--color-text);
  transform: translateX(4px);
}
.contact-link-icon {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}
.contact-link-label {
  font-size: var(--text-sm);
  font-weight: 500;
}
.contact-link-value {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-left: auto;
}

/* ===== FOOTER ===== */
.site-footer {
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-links {
  display: flex;
  gap: var(--space-4);
}
.footer-links a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color var(--transition-interactive);
}
.footer-links a:hover {
  color: var(--color-text-muted);
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
  opacity: 1;
}
@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}
@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ===== PAGE SECTIONS (About, Legal) ===== */
.page-hero {
  padding: calc(var(--space-32) + var(--space-8)) var(--space-6) var(--space-12);
  text-align: center;
}
.page-hero .section-label {
  margin-bottom: var(--space-3);
}
.page-hero .section-title {
  margin-bottom: var(--space-4);
}

.page-content {
  max-width: var(--content-default);
  margin: 0 auto;
  padding: 0 var(--space-6) var(--space-16);
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.page-content p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.page-content ul {
  color: var(--color-text-muted);
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}
.page-content li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

/* ===== FILM STRIP DECORATION ===== */
.film-strip {
  position: absolute;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  opacity: 0.06;
}
.film-strip-top { top: 0; }
.film-strip-bottom { bottom: 0; }
.film-perfs {
  display: flex;
  gap: 20px;
  animation: filmScroll 20s linear infinite;
}
.film-perf {
  width: 12px;
  height: 20px;
  border-radius: 2px;
  border: 1.5px solid var(--color-text);
  flex-shrink: 0;
}
@keyframes filmScroll {
  to { transform: translateX(-320px); }
}

/* Reel badge */
.reel-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-warm);
  background: rgba(245, 197, 66, 0.1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  max-width: 100%;
  white-space: normal;
  line-height: 1.3;
  word-break: break-word;
}

.reel-badge svg {
  flex-shrink: 0;
}

/* Bessere Lesbarkeit der Badges im Light Mode */
[data-theme="light"] .reel-badge {
  color: #8a5a00;
  background: rgba(245, 197, 66, 0.22);
}
[data-theme="light"] .video-warning-label {
  color: #8a5a00;
  background: rgba(245, 197, 66, 0.22);
}

/* Mobile: hide meta separators so wrapped badges don't show orphan dots */
@media (max-width: 640px) {
  .project-meta .project-dot {
    display: none;
  }
  .project-meta {
    column-gap: var(--space-2);
  }
  .reel-badge {
    font-size: 10.5px;
    padding: 3px 10px;
  }
}

/* Vimeo / iframe embed wrapper inside project cards */
.project-img .video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.project-img .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.project-img .video-embed[hidden] {
  display: none;
}

/* Content warning overlay before iframe loads */
.project-img .video-warning {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  text-align: center;
  cursor: pointer;
}
.project-img .video-warning-inner {
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}
.project-img .video-warning-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-warm);
  background: rgba(245, 197, 66, 0.12);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.project-img .video-warning-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0;
}
.project-img .video-warning-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-family: inherit;
  font-size: var(--text-sm);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.project-img .video-warning-button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.32);
}

/* Titel-Link in Karten ohne aussen-Link */
.project-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.project-title a:hover {
  color: var(--color-warm);
}



/* ===== KONAMI / SNAKE OVERLAY ===== */
.konami-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: konamiFadeIn 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes konamiFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
.konami-frame {
  background: var(--color-bg, #fafaf7);
  border: 1px solid var(--color-border, #2a2a2a);
  border-radius: 8px;
  width: min(700px, 96vw);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.konami-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border, #2a2a2a);
}
.konami-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
}
.konami-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent, #d4f24a);
  box-shadow: 0 0 10px var(--color-accent, #d4f24a);
  animation: konamiBlink 1.2s ease-in-out infinite;
}
@keyframes konamiBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.konami-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  color: var(--color-muted, #9a9a93);
}
.konami-score strong,
.konami-hi strong {
  color: var(--color-text);
  font-weight: 600;
}
.konami-close {
  background: transparent;
  border: 1px solid var(--color-border, #2a2a2a);
  color: var(--color-text);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease;
}
.konami-close:hover {
  background: var(--color-border, #2a2a2a);
}
.konami-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--color-bg, #fafaf7);
}
.konami-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--color-border, #2a2a2a);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  color: var(--color-muted, #9a9a93);
}
@media (max-width: 540px) {
  .konami-foot { flex-direction: column; gap: 4px; align-items: flex-start; }
}
/* ===== MARQUEE: Stationen & Auszeichnungen ===== */
.marquee-section {
  border-top: 1px solid var(--color-border, #2a2a2a);
  border-bottom: 1px solid var(--color-border, #2a2a2a);
  background: var(--color-surface, #111111);
  overflow: hidden;
  padding: 28px 0;
}
.marquee {
  width: 100%;
  overflow: hidden;
  /* Sanfte Fade-Ränder links und rechts */
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 8%, black 92%, transparent 100%);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 60s linear infinite;
  will-change: transform;
}
.marquee__group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.marquee__item {
  display: inline-block;
  font-family: var(--font-display, 'Clash Display', system-ui, sans-serif);
  font-size: clamp(1.05rem, 1.4vw + 0.6rem, 1.5rem);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.005em;
  white-space: nowrap;
  padding: 0 1.6rem;
}
.marquee__sep {
  display: inline-block;
  color: var(--color-accent, #d4f24a);
  font-size: 0.75em;
  flex-shrink: 0;
  /* Ein bisschen Luft um den Stern */
  padding: 0 0.4rem;
  /* Leicht abgesetzt nach unten zentriert */
  transform: translateY(-1px);
}
@keyframes marqueeScroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ===== PAGE TRANSITIONS · Filmschnitt ===== */
.page-cut {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.page-cut__top,
.page-cut__bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 51%; /* leichte Überlappung in der Mitte */
  background: #000;
  transform: translateY(-101%);
  will-change: transform;
}
.page-cut__top { top: 0; }
.page-cut__bottom {
  bottom: 0;
  transform: translateY(101%);
}
.page-cut__flash {
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
}
.page-cut__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  font-family: var(--font-display, 'Clash Display', system-ui, sans-serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.6rem);
  letter-spacing: 0.04em;
  color: #f6f6f6;
  opacity: 0;
  mix-blend-mode: difference;
  text-shadow: 0 0 40px rgba(0,0,0,0.4);
}

/* --- CUT (outgoing) --- */
.page-cut--cut .page-cut__top {
  animation: cutTop 280ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.page-cut--cut .page-cut__bottom {
  animation: cutBottom 280ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.page-cut--cut .page-cut__label {
  animation: cutLabel 340ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.page-cut--flashing .page-cut__flash {
  animation: cutFlash 110ms ease-out forwards;
}

@keyframes cutTop {
  0%   { transform: translateY(-101%); }
  100% { transform: translateY(0); }
}
@keyframes cutBottom {
  0%   { transform: translateY(101%); }
  100% { transform: translateY(0); }
}
@keyframes cutFlash {
  0%, 100% { opacity: 0; }
}
@keyframes cutLabel {
  0%, 100% { opacity: 0; }
}

/* --- REVEAL (incoming, neue Seite) --- */
/* Start: vollständig schwarz, nicht animiert */
.page-cut--reveal-start .page-cut__top { transform: translateY(0); }
.page-cut--reveal-start .page-cut__bottom { transform: translateY(0); }

/* Reveal-Animation */
.page-cut--reveal .page-cut__top {
  animation: revealTop 340ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.page-cut--reveal .page-cut__bottom {
  animation: revealBottom 340ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes revealTop {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-101%); }
}
@keyframes revealBottom {
  0%   { transform: translateY(0); }
  100% { transform: translateY(101%); }
}

@media (prefers-reduced-motion: reduce) {
  .page-cut { display: none; }
}

/* ===== PLANETLUX-BLOCK ===== */
.section--planetlux {
  padding-top: 0;
  padding-bottom: 6rem;
}
.planetlux-block {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 980px;
  padding-top: 3rem;
  border-top: 1px solid var(--color-border, #2a2a2a);
}
.planetlux-eyebrow {
  display: block;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted, #9a9a9a);
  margin-bottom: 0.6rem;
}
.planetlux-title {
  font-family: var(--font-display, 'Clash Display', system-ui, sans-serif);
  font-size: clamp(1.5rem, 2.4vw + 0.6rem, 2.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--color-text);
}
.planetlux-body p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--color-text-muted, #b5b5b5);
  margin: 0 0 0.9rem 0;
  max-width: 60ch;
}
.planetlux-body a {
  color: var(--color-text);
  border-bottom: 1px solid currentColor;
  transition: opacity 160ms ease;
}
.planetlux-body a:hover { opacity: 0.65; }
.planetlux-link {
  margin-top: 1.2rem !important;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}
.planetlux-link a {
  border-bottom: none;
  color: var(--color-accent, #d4f24a);
}
@media (max-width: 720px) {
  .planetlux-block {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    padding-top: 2.2rem;
  }
}



/* ===== HORIZONTAL PIN-AND-SCROLL TIMELINE (about.html) ===== */
.timeline-section {
  /* Section ist 6× viewport hoch, damit reichlich Scroll-Strecke da ist */
  position: relative;
  height: 600vh;
  background: var(--color-bg);
}
.timeline-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  width: 100%;
}
.timeline-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 3.2rem 2.5rem 1.6rem;
  text-align: center;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    var(--color-bg) 65%,
    rgba(0,0,0,0) 100%
  );
}
.timeline-header .section-label,
.timeline-header .section-title {
  margin: 0;
}
.timeline-hint {
  margin: 0.4rem 0 0;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted, #888);
  opacity: 0.75;
}
.timeline-hint-arrow {
  display: inline-block;
  animation: tlScrollHint 1.6s ease-in-out infinite;
}
@keyframes tlScrollHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.timeline-track {
  position: absolute;
  top: 9rem;
  bottom: 4rem;
  left: 0;
  width: max-content;
  min-width: 100%;
  padding: 0 50vw;
  /* Items spannen volle Höhe, Card-Position regelt der innere Flex */
  display: flex;
  align-items: stretch;
  will-change: transform;
}
.timeline-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(to right,
    transparent 0,
    var(--color-border, rgba(255,255,255,0.15)) 6%,
    var(--color-border, rgba(255,255,255,0.15)) 94%,
    transparent 100%);
  pointer-events: none;
}

.tl-item {
  position: relative;
  flex: 0 0 22rem;
  margin-right: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.tl-item--top {
  justify-content: flex-start;
  padding-top: 1.5rem;
}
.tl-item--bottom {
  justify-content: flex-end;
  padding-bottom: 1.5rem;
}
.tl-year {
  display: block;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
  color: var(--color-accent, #ff5640);
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.tl-dot {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  background: var(--color-text, #f1efe8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--color-bg);
  transition: transform 0.3s ease, background 0.3s ease;
}
/* Dot sitzt mittig auf der Schiene, unabhängig von der Card-Position */
.tl-item .tl-dot {
  top: 50%;
}
.tl-dot--award {
  background: var(--color-accent, #ff5640);
}
.tl-dot--future {
  background: transparent;
  border: 2px dashed var(--color-text, #f1efe8);
  width: 14px;
  height: 14px;
}
.tl-card {
  background: var(--color-surface, rgba(255,255,255,0.04));
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  border-radius: 14px;
  padding: 1.4rem 1.6rem;
  text-align: left;
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease, border-color 0.4s ease, background 0.4s ease;
}
.tl-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, "Clash Display", sans-serif);
  font-size: 1.18rem;
  line-height: 1.2;
}
.tl-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted, #b8b4a8);
  line-height: 1.45;
}
.tl-item.is-active .tl-card {
  transform: translateY(-3px);
  border-color: var(--color-accent, #ff5640);
}
.tl-item.is-active .tl-dot {
  transform: translate(-50%, -50%) scale(1.4);
}

/* Connector-Linie zwischen Card und Dot auf der Schiene.
   Anchor an die Item-Mitte (= Track-Mitte = Schiene) statt an die Card. */
.tl-card {
  position: relative;
}
.tl-item::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--color-border, rgba(255,255,255,0.25));
  transform: translateX(-50%);
  z-index: 1;
  transition: background 0.3s ease;
  pointer-events: none;
}
.tl-item--top::after {
  /* von Track-Mitte hoch bis zur Card-bottom (Card-Höhe variabel, ~10-13rem) */
  top: auto;
  bottom: 50%;
  height: calc(50% - 12rem);
}
.tl-item--bottom::after {
  /* von Track-Mitte runter bis zur Card-top */
  top: 50%;
  bottom: auto;
  height: calc(50% - 12rem);
}
.tl-item.is-active::after {
  background: var(--color-accent, #ff5640);
}

/* Light theme */
[data-theme="light"] .tl-card {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.1);
}
[data-theme="light"] .tl-dot {
  box-shadow: 0 0 0 4px var(--color-bg);
}

/* Mobile-Fallback: vertikale Liste, kein Pin */
@media (max-width: 760px) {
  .timeline-section {
    height: auto;
  }
  .timeline-pin {
    position: relative;
    height: auto;
    overflow: visible;
  }
  .timeline-header {
    position: relative;
    padding: 3rem 1.5rem 1rem;
    background: none;
  }
  .timeline-hint { display: none; }
  .timeline-track {
    position: relative;
    top: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    padding: 1rem 1.25rem 4rem;
    flex-direction: column;
    align-items: stretch;
    transform: none !important;
  }
  .timeline-rail {
    position: absolute;
    left: 1.7rem;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
    background: linear-gradient(to bottom,
      transparent 0,
      var(--color-border, rgba(255,255,255,0.15)) 6%,
      var(--color-border, rgba(255,255,255,0.15)) 94%,
      transparent 100%);
  }
  .tl-item {
    flex: 0 0 auto;
    margin: 0 0 1.5rem;
    padding: 0 0 0 3rem;
    text-align: left;
  }
  .tl-item--top, .tl-item--bottom {
    padding-top: 0;
    padding-bottom: 0;
  }
  .tl-item--top::after, .tl-item--bottom::after { display: none; }
  .tl-dot {
    left: 1.7rem;
    top: 1.2rem;
    bottom: auto;
    transform: translate(-50%, 0);
  }
  .tl-item--top .tl-dot, .tl-item--bottom .tl-dot {
    top: 1.2rem; bottom: auto;
  }
  .tl-item.is-active .tl-dot { transform: translate(-50%, 0) scale(1.4); }
  .tl-year { margin-bottom: 0.3rem; }
}

/* Reduced Motion: kein Pin */
@media (prefers-reduced-motion: reduce) {
  .timeline-section { height: auto; }
  .timeline-pin { position: relative; height: auto; }
  .timeline-header { position: relative; background: none; }
  .timeline-track { position: relative; top: auto; bottom: auto; transform: none !important; }
}

/* ============================================
   FESTIVAL MAP (Feature 6)
   ============================================ */
.festival-section {
  padding-top: 2rem;
  padding-bottom: 6rem;
}
.festival-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  align-items: start;
}
.festival-map-wrap {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
}
.festival-map {
  width: 100%;
  height: 540px;
  background: var(--color-bg, #0a0a0a);
}
.festival-map-legend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  background: rgba(15,15,15,0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.78);
  pointer-events: none;
}
:root[data-theme="light"] .festival-map-legend {
  background: rgba(255,255,255,0.85);
  color: rgba(20,20,20,0.78);
  border-color: rgba(0,0,0,0.08);
}
.festival-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f1efe8;
  display: inline-block;
  flex-shrink: 0;
}
:root[data-theme="light"] .festival-legend-dot {
  background: #1a1a1a;
}
.festival-legend-dot--award,
:root[data-theme="light"] .festival-legend-dot--award {
  width: 12px;
  height: 12px;
  background: #ff5640;
  box-shadow: 0 0 10px rgba(255, 86, 64, 0.65);
}
.festival-legend-dot--award + span {
  margin-right: 0.5rem;
}

/* List */
.festival-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 540px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-right: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.festival-list::-webkit-scrollbar { width: 6px; }
.festival-list::-webkit-scrollbar-track { background: transparent; }
.festival-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 6px; }
.festival-list-item {
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
:root[data-theme="light"] .festival-list-item {
  background: rgba(0,0,0,0.025);
  border-color: rgba(0,0,0,0.07);
}
.festival-list-item:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  transform: translateX(2px);
}
:root[data-theme="light"] .festival-list-item:hover {
  border-color: rgba(0,0,0,0.18);
  background: rgba(0,0,0,0.04);
}
.festival-list-item.is-active {
  border-color: var(--color-accent, #e63946);
  background: rgba(230,57,70,0.08);
}
.festival-list-item .fli-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}
.festival-list-item .fli-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.005em;
}
.festival-list-item .fli-year {
  font-size: 0.78rem;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.festival-list-item .fli-city {
  font-size: 0.78rem;
  opacity: 0.6;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.festival-list-item .fli-film {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}
.festival-list-item .fli-award {
  font-size: 0.78rem;
  color: var(--color-accent, #e63946);
  font-weight: 500;
  margin-top: 0.1rem;
}

/* Map pins (Leaflet divIcon) */
.fmap-icon { background: transparent; border: none; }
.fmap-pin {
  display: block;
  width: var(--pin-size, 13px);
  height: var(--pin-size, 13px);
  border-radius: 50%;
  background: var(--pin-color, rgba(255,255,255,0.9));
  border: 2px solid rgba(0,0,0,0.55);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}
.fmap-pin--award {
  border: 2px solid #fff;
  box-shadow: 0 0 0 0 rgba(255,86,64,0.55);
  animation: fmapPulse 2.4s ease-out infinite;
}
@keyframes fmapPulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,57,70,0.55); }
  70%  { box-shadow: 0 0 0 14px rgba(230,57,70,0); }
  100% { box-shadow: 0 0 0 0 rgba(230,57,70,0); }
}
.leaflet-marker-icon:hover .fmap-pin { transform: scale(1.25); }

/* Leaflet popup override */
.leaflet-popup-content-wrapper.fmap-popup,
.fmap-popup .leaflet-popup-content-wrapper {
  background: rgba(15,15,15,0.94);
  color: rgba(255,255,255,0.92);
  border-radius: 0.6rem;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 36px rgba(0,0,0,0.5);
}
.fmap-popup .leaflet-popup-tip {
  background: rgba(15,15,15,0.94);
  border: 1px solid rgba(255,255,255,0.08);
}
:root[data-theme="light"] .fmap-popup .leaflet-popup-content-wrapper,
:root[data-theme="light"] .fmap-popup .leaflet-popup-tip {
  background: rgba(255,255,255,0.97);
  color: rgba(15,15,15,0.92);
  border-color: rgba(0,0,0,0.08);
}
.fmap-popup .leaflet-popup-content {
  margin: 0.7rem 0.9rem;
  font-family: inherit;
  line-height: 1.4;
}
.fmap-popup-name {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}
.fmap-popup-meta {
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.35rem;
}
.fmap-popup-film {
  font-size: 0.82rem;
  opacity: 0.85;
}
.fmap-popup-award {
  font-size: 0.78rem;
  color: var(--color-accent, #e63946);
  margin-top: 0.25rem;
  font-weight: 500;
}
.leaflet-container a.leaflet-popup-close-button { color: rgba(255,255,255,0.6); }
:root[data-theme="light"] .leaflet-container a.leaflet-popup-close-button { color: rgba(0,0,0,0.5); }

/* Leaflet attribution toned down */
.leaflet-control-attribution {
  background: rgba(15,15,15,0.6) !important;
  color: rgba(255,255,255,0.5) !important;
  font-size: 0.65rem !important;
}
.leaflet-control-attribution a { color: rgba(255,255,255,0.7) !important; }
:root[data-theme="light"] .leaflet-control-attribution {
  background: rgba(255,255,255,0.7) !important;
  color: rgba(0,0,0,0.55) !important;
}
:root[data-theme="light"] .leaflet-control-attribution a { color: rgba(0,0,0,0.7) !important; }

/* Mobile */
@media (max-width: 880px) {
  .festival-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .festival-map { height: 380px; }
  .festival-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

/* Festival list - actual class names from festivals.js */
.festival-list-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.15rem;
}
.festival-list-year {
  font-size: 0.78rem;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.festival-list-place {
  font-size: 0.7rem;
  opacity: 0.55;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
}
.festival-list-name {
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  margin-bottom: 0.2rem;
}
.festival-list-film {
  font-size: 0.85rem;
  opacity: 0.85;
}
.festival-list-film--neutral { opacity: 0.6; font-style: italic; }
.festival-list-role { opacity: 0.65; }
.festival-list-award {
  font-size: 0.78rem;
  color: var(--color-accent, #e63946);
  font-weight: 500;
  margin-top: 0.3rem;
  letter-spacing: 0.01em;
}
.festival-list-note {
  font-size: 0.74rem;
  opacity: 0.55;
  margin-top: 0.2rem;
  font-style: italic;
}

/* Popup additional classes */
.fmap-popup-inner { min-width: 200px; }
.fmap-popup-year {
  font-size: 0.7rem;
  opacity: 0.55;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.fmap-popup-place {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-bottom: 0.4rem;
}
.fmap-popup-note {
  font-size: 0.74rem;
  opacity: 0.6;
  margin-top: 0.25rem;
  font-style: italic;
}
.fmap-popup-link {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: var(--color-accent, #e63946);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.fmap-popup-link:hover { opacity: 0.8; }

/* ============================================
   POPCORN BUCKET
   ============================================ */
.popcorn-bucket {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15,15,15,0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.88);
  opacity: 0;
  transform: translateY(16px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.25s ease, border-color 0.25s ease;
}
.popcorn-bucket.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.popcorn-bucket:hover {
  background: rgba(25,25,25,0.9);
  border-color: rgba(255,86,64,0.45);
  color: #fff;
}
.popcorn-bucket:active { transform: translateY(0) scale(0.94); }
.popcorn-bucket svg { width: 26px; height: 26px; }
.popcorn-bucket .pb-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-accent, #ff5640);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 6px rgba(255,86,64,0.5);
  pointer-events: none;
}
:root[data-theme="light"] .popcorn-bucket {
  background: rgba(255,255,255,0.85);
  color: rgba(20,20,20,0.85);
  border-color: rgba(0,0,0,0.08);
}
:root[data-theme="light"] .popcorn-bucket:hover {
  background: rgba(255,255,255,0.95);
}
@media (max-width: 600px) {
  .popcorn-bucket {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
  .popcorn-bucket svg { width: 22px; height: 22px; }
}

/* ============================================
   POPCORN-TOGGLE: An / Aus
   Sitzt links neben dem Bucket. Immer sichtbar (auf Desktop).
   ============================================ */
.popcorn-toggle {
  position: fixed;
  bottom: 1.7rem;
  right: calc(1.5rem + 56px + 12px);
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15,15,15,0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  padding: 0;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}
.popcorn-toggle:hover {
  background: rgba(25,25,25,0.78);
  border-color: rgba(255,86,64,0.35);
  color: #fff;
}
.popcorn-toggle:active { transform: scale(0.94); }
.popcorn-toggle svg { width: 22px; height: 22px; }
.popcorn-toggle .pt-slash {
  opacity: 0;
  transform-origin: 16px 16px;
  transform: scale(0);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.5, 0, 0.3, 1.4);
}
.popcorn-toggle.is-off .pt-slash {
  opacity: 1;
  transform: scale(1);
}
.popcorn-toggle .pt-spark {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.popcorn-toggle.is-off .pt-spark {
  opacity: 0;
}
.popcorn-toggle.is-off {
  color: rgba(255,255,255,0.42);
}

/* Footer-Nahbereich: Toggle und Bucket sanft ausblenden, damit nichts das Impressum überlappt. */
.popcorn-toggle.is-near-footer,
.popcorn-bucket.is-near-footer {
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  pointer-events: none;
}
:root[data-theme="light"] .popcorn-toggle {
  background: rgba(255,255,255,0.7);
  color: rgba(20,20,20,0.6);
  border-color: rgba(0,0,0,0.06);
}
:root[data-theme="light"] .popcorn-toggle:hover {
  background: rgba(255,255,255,0.92);
  color: rgba(20,20,20,0.95);
}
:root[data-theme="light"] .popcorn-toggle.is-off {
  color: rgba(20,20,20,0.35);
}
@media (max-width: 600px) {
  .popcorn-toggle {
    bottom: 1.2rem;
    right: calc(1rem + 48px + 10px);
    width: 38px;
    height: 38px;
  }
  .popcorn-toggle svg { width: 19px; height: 19px; }
}

/* ============================================
   FILMKREBS-MASKOTTCHEN
   Kleiner Krebs lugt hinter Projektkarten hervor.
   ============================================ */
.mascot {
  position: absolute; /* relativ zum Document, scrollt mit */
  width: 76px;
  height: 58px;
  left: -200px;
  top: -200px;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  color: var(--color-accent);
  /* Sanftes, neugieriges Hervorlugen, kein Dash */
  transition: left 1.1s cubic-bezier(0.22, 0.7, 0.3, 1),
              top 1.1s cubic-bezier(0.22, 0.7, 0.3, 1),
              opacity 0.7s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
  will-change: left, top, opacity;
}

/* Clip-Path simuliert das Hervorlugen hinter der Karten-Kante.
   Nur der Teil außerhalb der Karte (Augen + halber Kopf) ist sichtbar. */
.mascot--from-left {
  clip-path: inset(0 50% 0 0);
}
.mascot--from-right {
  clip-path: inset(0 0 0 50%);
}

.mascot--visible {
  pointer-events: auto;
  cursor: pointer;
}

.mascot--leaving {
  transition: left 0.7s cubic-bezier(0.5, 0, 0.75, 0.4),
              top 0.7s cubic-bezier(0.5, 0, 0.75, 0.4),
              opacity 0.55s ease;
}

/* Sofortiger Position-Reset zwischen Hide und nächstem Peek */
.mascot--no-transition {
  transition: none !important;
}

.mascot-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Schatten unter dem Krebs leicht pulsieren wenn sichtbar */
.mascot--visible .m-shadow {
  animation: mascot-shadow 1.6s ease-in-out infinite;
}
@keyframes mascot-shadow {
  0%, 100% { transform: scaleX(1); opacity: 0.55; }
  50%      { transform: scaleX(0.85); opacity: 0.4; }
}
.m-shadow { transform-origin: 40px 58px; }

/* Augen-Pupillen-Übergang */
.m-eyes {
  transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.5, 1);
}

/* Blinzeln: Augen kurz zuhalten via scale-Y auf dem ganzen m-eyes-Container */
.mascot--blinking .m-eyes {
  animation: mascot-blink 0.22s ease;
}
@keyframes mascot-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* Idle-Wackeln: leichte Schwingung wenn sichtbar.
   Side-spezifisch, weil der Krebs seitlich um 90° gedreht hervorlugt. */
.mascot-svg {
  transform-origin: 50% 50%;
}
/* from-left: Krebs lugt hinter linker Karten-Kante hervor.
   SVG -90deg drehen, sodass die Augen (urspr. oben) nach links zeigen, also raus aus der Karte. */
.mascot--from-left .mascot-svg {
  transform: rotate(-90deg);
}
/* from-right: Krebs lugt hinter rechter Karten-Kante hervor. Augen zeigen nach rechts. */
.mascot--from-right .mascot-svg {
  transform: rotate(90deg);
}
.mascot--visible.mascot--from-left .mascot-svg {
  animation: mascot-idle-left 2.4s ease-in-out infinite;
}
.mascot--visible.mascot--from-right .mascot-svg {
  animation: mascot-idle-right 2.4s ease-in-out infinite;
}
@keyframes mascot-idle-left {
  0%, 100% { transform: rotate(-91.5deg); }
  50%      { transform: rotate(-88.5deg); }
}
@keyframes mascot-idle-right {
  0%, 100% { transform: rotate(88.5deg); }
  50%      { transform: rotate(91.5deg); }
}

/* Linke Schere als origin-Pivot setzen für Wave */
.m-claw-left {
  transform-origin: 16px 32px;
  transition: transform 0.2s ease;
}
.m-claw-right {
  transform-origin: 64px 32px;
}

/* Wave-Animation: linke Schere klappt rauf und runter */
.mascot--waving .m-claw-left {
  animation: mascot-wave 0.42s ease-in-out 4;
}
@keyframes mascot-wave {
  0%   { transform: rotate(0deg) translateY(0); }
  30%  { transform: rotate(-32deg) translate(2px, -4px); }
  60%  { transform: rotate(-18deg) translate(2px, -2px); }
  100% { transform: rotate(0deg) translateY(0); }
}

/* Freude-Hopser beim Winken, side-spezifisch damit Rotation erhalten bleibt */
.mascot--waving.mascot--from-left .mascot-svg {
  animation: mascot-bounce-left 0.6s ease, mascot-idle-left 2.4s ease-in-out infinite 0.6s;
}
.mascot--waving.mascot--from-right .mascot-svg {
  animation: mascot-bounce-right 0.6s ease, mascot-idle-right 2.4s ease-in-out infinite 0.6s;
}
@keyframes mascot-bounce-left {
  0%, 100% { transform: rotate(-90deg) translateY(0); }
  30%      { transform: rotate(-85deg) translateY(-6px); }
  60%      { transform: rotate(-90deg) translateY(0); }
}
@keyframes mascot-bounce-right {
  0%, 100% { transform: rotate(90deg) translateY(0); }
  30%      { transform: rotate(85deg) translateY(-6px); }
  60%      { transform: rotate(90deg) translateY(0); }
}

/* Reach: Schere streckt sich nach vorn beim Popcorn-Aufpicken.
   from-left: Krebs ist um -90deg rotiert, also "vorn" = links im Wrap = unten im rotierten Bild.
   Wir lassen die untere (rechte) Schere rausgreifen, weil die im rotierten Bild oben liegt. */
.mascot--reaching.mascot--from-left .m-claw-right {
  animation: mascot-reach 0.55s ease-out;
}
.mascot--reaching.mascot--from-right .m-claw-left {
  animation: mascot-reach-mirror 0.55s ease-out;
}
@keyframes mascot-reach {
  0%   { transform: rotate(0deg) translate(0, 0); }
  45%  { transform: rotate(-22deg) translate(4px, -8px); }
  100% { transform: rotate(0deg) translate(0, 0); }
}
@keyframes mascot-reach-mirror {
  0%   { transform: rotate(0deg) translate(0, 0); }
  45%  { transform: rotate(22deg) translate(-4px, -8px); }
  100% { transform: rotate(0deg) translate(0, 0); }
}

/* Throw: Schere holt aus und schnippt das Popcorn weg */
.mascot--throwing.mascot--from-left .m-claw-right {
  animation: mascot-throw 0.5s ease-in-out;
}
.mascot--throwing.mascot--from-right .m-claw-left {
  animation: mascot-throw-mirror 0.5s ease-in-out;
}
@keyframes mascot-throw {
  0%   { transform: rotate(0deg); }
  35%  { transform: rotate(28deg); }
  55%  { transform: rotate(-40deg); }
  100% { transform: rotate(0deg); }
}
@keyframes mascot-throw-mirror {
  0%   { transform: rotate(0deg); }
  35%  { transform: rotate(-28deg); }
  55%  { transform: rotate(40deg); }
  100% { transform: rotate(0deg); }
}

/* Chomp: kurzer Squish des Körpers beim Schmatzen */
.mascot--chomp.mascot--from-left .mascot-svg {
  animation: mascot-chomp-left 0.36s ease-in-out;
}
.mascot--chomp.mascot--from-right .mascot-svg {
  animation: mascot-chomp-right 0.36s ease-in-out;
}
@keyframes mascot-chomp-left {
  0%, 100% { transform: rotate(-90deg) scale(1, 1); }
  50%      { transform: rotate(-90deg) scale(1.06, 0.92); }
}
@keyframes mascot-chomp-right {
  0%, 100% { transform: rotate(90deg) scale(1, 1); }
  50%      { transform: rotate(90deg) scale(1.06, 0.92); }
}

/* Fliegendes Popcorn beim Aufpicken: kleines cremefarbenes Stück */
.mascot-popcorn-fly {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d6 0%, #f3dc8a 55%, #d6b85a 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  will-change: left, top, transform, opacity;
}

/* Light-Theme: dunklere Augen, gleiche Akzent-Farbe */
[data-theme="light"] .mascot {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

/* Mobil: kleiner */
@media (max-width: 720px) {
  .mascot { width: 60px; height: 46px; }
}
