/* =========================================================
   1. Variablen
   ========================================================= */
:root {
  --bg: #000;
  --text: #fff;
  --accent: #ff2b2b;
  --muted: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.15);

  --font: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Archivo", "Inter", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 72px;
  --name-size: clamp(2.6rem, 7.6vw, 10rem); /* Grösse des Namens im Hero */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================================
   2. Reset / Basis
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--text);
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

.accent {
  color: var(--accent);
}

/* =========================================================
   3. Cursor (nur Geräte mit Maus)
   ========================================================= */
.cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body,
  a,
  button {
    cursor: none;
  }

  .cursor {
    display: block;
  }
}

.cursor__dot,
.cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  will-change: transform;
}

.cursor__dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--accent);
}

.cursor__ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
              margin 0.35s var(--ease), background-color 0.35s var(--ease),
              opacity 0.3s;
}

.cursor__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.2s;
}

/* Über Links & Buttons */
.cursor.is-hover .cursor__ring {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(255, 43, 43, 0.15);
}

/* Über Projekten: grosser roter Kreis mit Text */
.cursor.is-project .cursor__ring {
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  background: var(--accent);
}

.cursor.is-project .cursor__label {
  opacity: 1;
}

.cursor.is-project .cursor__dot,
.cursor.is-hidden .cursor__dot,
.cursor.is-hidden .cursor__ring {
  opacity: 0;
}

/* =========================================================
   4. Header & Navigation
   ========================================================= */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

/* Dunkler, transparenter Hintergrund mit weicher Kante nach unten,
   damit das Menü auch über hellen Fotos lesbar bleibt.
   Farbe folgt --bg (z.B. orange bei Katerzmorga). */
.header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(var(--header-h) + 48px);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--bg) 75%, transparent) 0%,
    color-mix(in srgb, var(--bg) 45%, transparent) 55%,
    transparent 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  /* Unschärfe läuft ebenfalls weich aus */
  mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}

.header__logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav__link {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.3s;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav__link.is-active {
  color: var(--accent);
}

/* Burger (nur mobil) */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  background: none;
  border: 0;
  position: relative;
  z-index: 101;
}

.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s var(--ease);
}

.nav-toggle span:first-child { top: 11px; }
.nav-toggle span:last-child  { top: 19px; }

.nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle span:last-child  { transform: translateY(-4px) rotate(-45deg); }

/* =========================================================
   5. Hero / Startseite
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

/* Name oben – das Portrait berührt ihn nur ganz leicht */
.hero__name {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 2vh) var(--gutter) 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 0.25em;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--name-size);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero__first,
.hero__last {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: rise 1.2s var(--ease) forwards;
}

.hero__last {
  animation-delay: 0.15s;
}

/* Kopie des Namens VOR dem Portrait (von main.js erzeugt).
   Hover = Fokuswechsel: Name wächst leicht und wird scharf,
   das Portrait tritt unscharf in den Hintergrund. */
.hero__name,
.hero__image img {
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease), opacity 0.7s var(--ease);
}

.hero__name--front {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  filter: blur(10px);
}

.hero.name-focus .hero__name {
  transform: scale(1.05);
}

.hero.name-focus .hero__name--front {
  opacity: 1;
  filter: blur(0);
}

.hero.name-focus .hero__image img {
  filter: blur(4px) brightness(0.7);
}

/* Vorname nur als Outline */
.hero__first {
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}

/* Freigestelltes Portrait, unten verankert, vor dem Namen */
.hero__image {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fade 1.4s var(--ease) 0.4s forwards;
  pointer-events: none;
}

/* Höhe = Bildschirm minus Header minus Name.
   Faktor näher bei 1 = weniger Überlappung, kleiner = Kopf ragt mehr in den Namen */
.hero__image img {
  height: calc(100svh - var(--header-h) - 2vh - 0.9 * var(--name-size));
  min-height: 380px;
  width: auto;
  max-width: none;
}

.hero__scroll {
  position: absolute;
  z-index: 3;
  bottom: 2rem;
  left: var(--gutter);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.3s;
}

.hero__scroll:hover {
  color: var(--accent);
}

/* ---------- Rote Punkte & Wellen ---------- */
.hero__dots {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.dot {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(255, 43, 43, 0.7);
  pointer-events: auto;
  animation: dot-in 0.4s var(--ease) both, dot-pulse 1.2s ease-in-out 0.4s infinite;
}

/* Grössere unsichtbare Klickfläche */
.dot::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
}

.dot.is-leaving {
  pointer-events: none;
  animation: dot-out 0.35s var(--ease) forwards;
}

/* Klecks-Welle: Grösse & Form animiert main.js (Web Animations API) */
.ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  pointer-events: none;
}

@keyframes dot-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@keyframes dot-out {
  to { transform: scale(0); opacity: 0; }
}

@keyframes dot-pulse {
  50% { transform: scale(1.25); }
}

/* =========================================================
   6. Sections (allgemein)
   ========================================================= */
.section {
  padding: clamp(80px, 14vw, 160px) var(--gutter);
  border-top: 1px solid var(--line);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: clamp(40px, 6vw, 80px);
}

/* Über mich */
.about {
  max-width: 820px;
  margin-left: auto;
  display: grid;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.about__lead {
  color: var(--text);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.3;
  font-weight: 300;
}

/* Filter */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.filter__btn {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.filter__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Überraschungs-Button ---------- */
.surprise {
  position: relative;
  margin-left: auto;
  padding: 0.6rem 1.4rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background-color 0.3s, color 0.3s, transform 0.3s var(--ease);
}

.surprise:hover {
  background: var(--accent);
  color: var(--text);
  transform: scale(1.05);
}

/* Ebene für die Feuerwerks-Funken (über den Button hinaus sichtbar) */
.surprise__sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.spark {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

@media (max-width: 600px) {
  .surprise {
    margin-left: 0;
  }
}

.filter__btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text);
}

/* Arbeiten */
.works {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: clamp(24px, 4vw, 56px);
}

.work {
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.work.is-hiding {
  opacity: 0;
  transform: scale(0.96);
}

.work[hidden] {
  display: none;
}

.work__thumb {
  aspect-ratio: 4 / 3;
  background: #151515;
  margin-bottom: 1rem;
  overflow: hidden;
}

.work__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.work:hover .work__thumb img {
  transform: scale(1.05);
}

.work__title {
  font-size: 1.25rem;
  font-weight: 500;
  transition: color 0.3s;
}

.work:hover .work__title {
  color: var(--accent);
}

.work__meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* =========================================================
   Projektseite (z.B. projekte/bildserie-ivo.html)
   ========================================================= */
.project {
  padding: calc(var(--header-h) + clamp(40px, 8vw, 100px)) var(--gutter) clamp(40px, 6vw, 80px);
}

.project__back {
  display: inline-block;
  margin-bottom: clamp(32px, 5vw, 64px);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.3s;
}

.project__back:hover {
  color: var(--accent);
}

.project__category {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.project__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 8rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.95;
  margin-bottom: 2rem;
}

.project__text {
  max-width: 640px;
  font-size: 1.15rem;
  color: var(--muted);
}

.project__hint {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.project-nav {
  padding: 0 var(--gutter) clamp(60px, 8vw, 100px);
}

/* Abstand, wenn der Zurück-Link direkt auf einen Projekt-Block folgt */
.project-block + .project-nav {
  padding-top: clamp(60px, 8vw, 110px);
}

/* Bildserie: bearbeitet, RAW liegt darüber und wird bei Hover sichtbar */
.series {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(12px, 2vw, 24px);
  padding: 0 var(--gutter) clamp(60px, 8vw, 100px);
}

.series__item {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #111;
}

.series__item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series__raw {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.series__label {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  padding: 0.3rem 0.6rem;
  background: rgba(0, 0, 0, 0.6);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.series__item:hover .series__raw,
.series__item.is-raw .series__raw,
.series__item:hover .series__label,
.series__item.is-raw .series__label {
  opacity: 1;
}

.series__item:hover .series__label,
.series__item.is-raw .series__label {
  transform: none;
}

/* Serie ohne RAW-Effekt: sanfter Zoom bei Hover */
.series--plain .series__item img {
  transition: transform 0.8s var(--ease);
}

.series--plain .series__item:hover img {
  transform: scale(1.03);
}

/* Reihen-Layout: Hoch- & Querformate gemischt.
   Jedes Bild wächst proportional zu seinem Seitenverhältnis (--r),
   dadurch sind alle Bilder einer Reihe gleich hoch und die Reihe
   füllt genau die volle Breite → oben und unten bündig. */
.series--rows {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vw, 24px);
}

.series__row {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
}

.series--rows .series__item {
  flex: var(--r, 1.5) 1 0;
  aspect-ratio: var(--r, 1.5);
}

.series--rows .series__item img {
  transition: transform 0.8s var(--ease);
}

.series--rows .series__item:hover img {
  transform: scale(1.03);
}

/* Ohne Abstand unten (wenn danach direkt ein Projekt-Block folgt) */
.series--flush {
  padding-bottom: 0;
}

/* Bild über die volle Breite */
.series__item--wide {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
}

@media (max-width: 768px) {
  .series {
    grid-template-columns: 1fr;
  }

  /* Handy: Bilder untereinander, volle Breite */
  .series__row {
    flex-direction: column;
  }

  .series--rows .series__item {
    flex: none;
  }

  .series__item--wide {
    aspect-ratio: 3 / 2;
  }
}

/* ---------- Projektseite: Bausteine ---------- */
.project-image {
  padding: 0 var(--gutter);
}

.project-image img {
  width: 100%;
}

.project-block {
  padding: clamp(60px, 8vw, 110px) var(--gutter) 0;
}

.project-block__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: clamp(24px, 3vw, 40px);
}

/* YouTube-Einbettungen */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: clamp(12px, 2vw, 24px);
}

.videos:has(.video) {
  margin-bottom: 2rem;
}

.video {
  aspect-ratio: 16 / 9;
}

/* Einzelnes Video über die volle Breite (Projektseite) */
.video-feature {
  padding: 0 var(--gutter);
}

.video-feature .video {
  max-width: 1400px;
  margin: 0 auto;
  background: #111;
}

/* Instagram-Reels: 3 nebeneinander, auf dem Handy untereinander */
.reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  padding: 0 var(--gutter);
  max-width: 1300px;
  margin: 0 auto;
}

/* Reel-Kachel (Vorschau, Klick öffnet Popup) */
.reel {
  position: relative;
  aspect-ratio: 4 / 5;
  padding: 0;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.reel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s;
}

.reel:hover img {
  transform: scale(1.04);
  filter: brightness(0.8);
}

.reel__play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: transform 0.4s var(--ease);
}

.reel:hover .reel__play {
  transform: scale(1.12);
}

/* Popup mit dem Instagram-Reel */
.reel-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 16px;
}

.reel-modal[hidden] {
  display: none;
}

.reel-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade 0.3s ease forwards;
}

.reel-modal__box {
  --w: min(400px, 100%);
  position: relative;
  width: var(--w);
  max-height: calc(100vh - 32px);
  max-height: calc(100svh - 32px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  animation: modal-in 0.5s var(--ease) both;
}

.reel-modal__frame iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
}

.reel-modal__link {
  display: block;
  padding: 0.9rem;
  background: #000;
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.reel-modal__link:hover {
  color: var(--accent);
}

.reel-modal__close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}

.reels-link {
  padding: clamp(24px, 3vw, 40px) var(--gutter) 0;
  text-align: center;
}

@media (max-width: 900px) {
  .reels {
    grid-template-columns: minmax(0, 420px);
    justify-content: center;
  }
}

/* ---------- "Coming soon"-Bild (Video folgt) ---------- */
.soon {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

.soon img {
  width: 100%;
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
}

.soon:hover img {
  transform: scale(1.04);
  filter: brightness(0.45) blur(2px);
}

.soon__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  pointer-events: none;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
}

/* Buchstaben steigen nacheinander auf */
.soon__text span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(6deg);
  transition: opacity 0.5s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i) * 35ms);
}

.soon:hover .soon__text span {
  opacity: 1;
  transform: none;
}

/* Roter "Aufnahme"-Punkt */
.soon__dot {
  width: 0.35em;
  height: 0.35em;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}

.soon:hover .soon__dot {
  opacity: 1;
  transform: scale(1);
  animation: rec 1.2s ease-in-out 0.5s infinite;
}

@keyframes rec {
  50% { opacity: 0.2; }
}

/* Touch-Geräte (kein Hover): Text immer sichtbar */
@media (hover: none) {
  .soon img { filter: brightness(0.55); }
  .soon__text span, .soon__dot { opacity: 1; transform: none; }
}

/* ---------- Illustrations-Raster (quadratisch) ---------- */
.illu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 24px);
  padding: 0 var(--gutter) clamp(60px, 8vw, 100px);
}

.illu-grid__item {
  aspect-ratio: 1;
  overflow: hidden;
  background: #fff;
}

.illu-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.illu-grid__item:hover img {
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .illu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Video über einer Bildserie: Abstand zu den Fotos */
.video-feature--spaced {
  margin-bottom: clamp(12px, 2vw, 24px);
}

/* Altes 4:3-Material (z.B. VHS) – schmaler, damit es nicht zu hoch wird */
.video--4x3 {
  aspect-ratio: 4 / 3;
}

.video-feature .video--4x3 {
  max-width: min(1000px, calc(80vh * 4 / 3));
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Runder Link-Button */
.pill {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: background-color 0.3s, color 0.3s;
}

.pill:hover {
  background: var(--text);
  color: var(--bg);
}

/* Social-Media-Liste */
.socials {
  border-top: 1px solid var(--line);
}

.socials a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding 0.4s var(--ease);
}

.socials a:hover {
  padding-left: 1rem;
}

.socials__platform {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
  text-transform: uppercase;
}

.socials__handle {
  color: var(--muted);
}

/* Award: Bild + Text nebeneinander */
.award {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
}

.award__text p:last-child {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 520px;
}

@media (max-width: 768px) {
  .award {
    grid-template-columns: 1fr;
  }
}

/* ---------- Storyboard-Viewer ---------- */
.storyboard {
  padding: 0 var(--gutter);
}

/* Weisses "Papier", auf dem die Zeichnungen liegen */
.storyboard__stage {
  position: relative;
  aspect-ratio: 1.6;
  max-height: 80vh;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}

.storyboard__slides {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

.storyboard__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(calc(var(--dir, 1) * 12%)) scale(0.96) rotate(calc(var(--dir, 1) * 1.5deg));
  filter: blur(8px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.9s var(--ease),
    filter 0.7s var(--ease),
    visibility 0s 0.9s;
}

.storyboard__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.storyboard__slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  filter: none;
  transition-delay: 0s;
}

/* Ausgehende Szene fliegt in die Gegenrichtung */
.storyboard__slide.is-leaving {
  visibility: visible;
  transform: translateX(calc(var(--dir, 1) * -12%)) scale(0.96) rotate(calc(var(--dir, 1) * -1.5deg));
  transition-delay: 0s;
}

.storyboard__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.3s, background-color 0.3s, transform 0.3s var(--ease);
}

.storyboard__nav--prev { left: 1rem; }
.storyboard__nav--next { right: 1rem; }

.storyboard__stage:hover .storyboard__nav,
.storyboard__nav:focus-visible {
  opacity: 1;
}

.storyboard__nav:hover {
  background: var(--accent);
  transform: scale(1.08);
}

.storyboard__nav:disabled {
  opacity: 0 !important;
  pointer-events: none;
}

.storyboard__bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem 0;
}

.storyboard__counter {
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
}

.storyboard__current {
  color: var(--text);
}

.storyboard__progress {
  flex: 1;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.storyboard__progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  transition: transform 0.7s var(--ease);
}

.storyboard__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.storyboard__thumb {
  flex: 0 0 auto;
  width: clamp(72px, 9vw, 120px);
  aspect-ratio: 1.6;
  padding: 0;
  border: 0;
  background: #fff;
  opacity: 0.35;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: opacity 0.3s, outline-color 0.3s;
}

.storyboard__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storyboard__thumb:hover {
  opacity: 0.7;
}

.storyboard__thumb.is-active {
  opacity: 1;
  outline-color: var(--accent);
}

/* Quadratische Variante (z.B. Gestaltgesetze) */
.storyboard--square .storyboard__stage {
  aspect-ratio: 1;
  max-height: none;
  width: min(100%, 80vh);
}

.storyboard--square .storyboard__bar,
.storyboard--square .storyboard__thumbs {
  width: min(100%, 80vh);
  margin: 0 auto;
}

.storyboard--square .storyboard__thumb {
  aspect-ratio: 1;
  width: clamp(56px, 7vw, 84px);
}

.storyboard-nav {
  padding-top: clamp(40px, 6vw, 80px);
}

@media (hover: none) {
  .storyboard__nav {
    opacity: 1;
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .storyboard__slide {
    transform: none !important;
    filter: none;
  }
}

/* ---------- Farbthema Katerzmorga (orange) ---------- */
.theme-katerzmorga {
  --bg: #d99b63;
  --text: #3a2416;
  --muted: rgba(58, 36, 22, 0.75);
  --line: rgba(58, 36, 22, 0.25);
  --accent: #3a2416;
}

/* Farbübergang beim Klick auf ein Projekt (main.js) */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  clip-path: circle(0px at var(--x) var(--y));
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1);
}

.page-transition.is-active {
  clip-path: circle(150vmax at var(--x) var(--y));
}

/* Kontakt */
.contact {
  display: grid;
  gap: 2rem;
}

.contact__mail {
  font-size: clamp(1.4rem, 5vw, 3.5rem);
  font-weight: 300;
  overflow-wrap: anywhere;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  justify-self: start;
  transition: border-color 0.3s, color 0.3s;
}

.contact__mail:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.contact__links {
  display: flex;
  gap: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
}

.contact__links a {
  color: var(--muted);
  transition: color 0.3s;
}

.contact__links a:hover {
  color: var(--accent);
}

/* Footer */
.footer {
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

/* =========================================================
   7. Animationen
   ========================================================= */
@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  to { opacity: 1; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__first, .hero__last, .hero__image, .reveal {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__image { transform: translateX(-50%); }
  .dot { animation: none; }
}

/* =========================================================
   8. Responsive
   ========================================================= */
@media (max-width: 768px) {
  :root {
    --name-size: clamp(2.4rem, 12vw, 5rem);
  }

  /* Vorname & Nachname untereinander */
  .hero__name {
    flex-direction: column;
    align-items: center;
  }

  .hero__first {
    -webkit-text-stroke-width: 1.5px;
  }

  .hero__image img {
    height: auto;
    min-height: 0;
    width: 135vw;
  }

  .nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }

  .nav__link {
    font-size: 2rem;
  }

  .nav-open .nav {
    opacity: 1;
    visibility: visible;
  }

  .nav-open {
    overflow: hidden;
  }
}
