/* ============================================================
   Carsten V Photography — Stylesheet
   ============================================================ */

/* --- Lokale Schriften (DSGVO-konform, kein Google-Server) --- */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 200 600;
  font-display: swap;
  src: url('../fonts/raleway-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 200 600;
  font-display: swap;
  src: url('../fonts/raleway-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC,
    U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- CSS Variablen --- */
:root {
  --bg:         #F7F5F2;
  --text:       #0D0D0D;
  --muted:      #8A8A8A;
  --line:       rgba(13, 13, 13, 0.1);
  --surface:    #EEECEA;   /* Hintergrund für Bildfelder */
  --nav-h:      58px;
  --font:       'Raleway', 'Avenir Next', 'Avenir', -apple-system, sans-serif;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:   cubic-bezier(0.0, 0.0, 0.2, 1);
  --ease-expo:  cubic-bezier(0.16, 1, 0.3, 1);   /* Expo-out: schnell anfahren, sanft landen */
  --pad-x:      56px;

  --fs-xs:      0.70rem;
  --fs-sm:      0.82rem;
  --fs-base:    1rem;
  --fs-heading: clamp(1.5rem, 3.5vw, 2.8rem);
}

@media (max-width: 768px) {
  :root { --pad-x: 20px; }
}

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

/* Cursor nur auf Geräten mit präzisem Zeiger verstecken */
@media (hover: hover) and (pointer: fine) {
  *, *::before, *::after { cursor: none; }
}

:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 4px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

button {
  background: none;
  border: none;
  font-family: var(--font);
  color: inherit;
  cursor: pointer;
}

/* ============================================================
   Benutzerdefinierter Cursor — Pfeil-Symbol
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  .cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
  }

  /* SVG-Pfeil im Cursor-Element (wird per JS eingefügt) */
  .cursor svg {
    display: block;
    transition: transform 0.22s var(--ease), opacity 0.22s;
  }

  /* Beim Hover über Links/Buttons: kleiner und transparent */
  .cursor.hover svg {
    transform: scale(0.72);
    opacity: 0.35;
  }
}

/* ============================================================
   Reduzierte Bewegung respektieren
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration:  0.01ms !important;
  }
}

/* ============================================================
   Einblend-Animationen
   ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Dünne horizontale Linie wächst vor den Karten herein */
@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ============================================================
   Navigation
   ============================================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad-x);
  background: rgba(247, 245, 242, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  transition: transform 0.45s var(--ease), background 0.55s ease, backdrop-filter 0.55s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  border-bottom-color: var(--line);
}

nav.hidden { transform: translateY(-100%); }

/* Transparente Nav auf der Hero-Seite */
nav.hero-mode {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent !important;
}
nav.hero-mode .nav-logo { color: rgba(255, 255, 255, 0.88); }
nav.hero-mode .nav-logo:hover { opacity: 1; }
nav.hero-mode .nav-links a { color: rgba(255, 255, 255, 0.62); opacity: 1; }
nav.hero-mode .nav-links a:hover,
nav.hero-mode .nav-links a.active { color: #fff; opacity: 1; }
nav.hero-mode .nav-hamburger span { background: rgba(255, 255, 255, 0.88); }

/* Dropdown im Hero-Modus: dunkel statt hell */
nav.hero-mode .nav-dropdown {
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(255, 255, 255, 0.10);
}
nav.hero-mode .nav-dropdown a {
  color: rgba(255, 255, 255, 0.55);
  opacity: 1;
}
nav.hero-mode .nav-dropdown a:hover,
nav.hero-mode .nav-dropdown a.active {
  color: #fff;
  opacity: 1;
}

.nav-logo {
  font-size: var(--fs-sm);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 0.25s;
  padding: 10px 0;
}

.nav-logo:hover { opacity: 0.4; }

.nav-links {
  display: flex;
  gap: 44px;
  align-items: center;  /* Projekte + Über mich auf gleicher Höhe */
}

.nav-links a {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.62;
  transition: opacity 0.25s;
  padding: 10px 0;
}

.nav-links a:hover,
.nav-links a.active { opacity: 1; }

/* ============================================================
   Projekte-Dropdown (Desktop)
   ============================================================ */

/* Wrapper macht Positionierungs-Kontext für das Dropdown */
.nav-dropdown-wrapper {
  position: relative;
  display: flex;
  align-items: center;  /* Link-Text mittig im Wrapper */
}

/* Das aufklappende Menü.
   top: 100% statt calc(100% + 10px) → kein Hover-Gap zwischen Link und Menü.
   Die visuelle Lücke entsteht durch padding-top. */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  /* Unsichtbar & nach oben verschoben als Ausgangszustand */
  transform: translateX(-50%) translateY(-6px);
  background: rgba(247, 245, 242, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  padding: 10px 0 6px; /* padding-top = visuelle Lücke zum Nav-Link */
  min-width: 200px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  z-index: 300;
}

/* Beim Hover über den Wrapper aufklappen — :not(:empty) verhindert leere Box */
.nav-dropdown-wrapper:hover .nav-dropdown:not(:empty),
.nav-dropdown-wrapper:focus-within .nav-dropdown:not(:empty) {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Einzelne Dropdown-Links */
.nav-dropdown a {
  display: block;
  padding: 9px 22px;
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.58;
  transition: opacity 0.18s;
  white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a.active { opacity: 1; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-right: -10px;
}

.nav-hamburger span {
  display: block;
  height: 1px;
  background: var(--text);
  transition: transform 0.38s var(--ease), opacity 0.3s;
  pointer-events: none;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 199;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 44px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay a {
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.2s;
  padding: 8px 20px;
}

.nav-overlay a:hover { opacity: 0.35; }

/* ============================================================
   Footer
   ============================================================ */
footer {
  padding: 48px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}

footer a {
  transition: color 0.2s;
  padding: 4px 0;
}

footer a:hover { color: var(--text); }

/* ============================================================
   Seitenlayout
   ============================================================ */
.page {
  min-height: 100vh;
  padding-top: var(--nav-h);
}

/* ============================================================
   Startseite — Hero
   ============================================================ */
.home-hero {
  padding: clamp(80px, 14vw, 156px) var(--pad-x) clamp(52px, 6vw, 80px);
  text-align: center;
  animation: fadeUp 1.0s var(--ease-out) both;
}

/* Name — nicht zu groß, klar lesbar */
.home-hero .hero-name {
  display: block;
  font-size: clamp(1.1rem, 2.4vw, 1.9rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 10px;
}

/* "Photography" — gleiche Größe, gedämpfter */
.home-hero .hero-sub {
  display: block;
  font-size: clamp(1.1rem, 2.4vw, 1.9rem);
  font-weight: 200;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   Hero-Slideshow (Startseite)
   ============================================================ */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
  background: #0D0D0D;
}

/* Container aller Slide-Bilder */
.hero-slides {
  position: absolute;
  inset: 0;
}

/* Einzelner Slide (Hintergrundbild) */
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 3.5s ease; /* langsame Überblendung */
  filter: grayscale(25%) brightness(0.72);
}

/* Aktiver Slide: eingeblendet + Ken-Burns-Zoom */
.hero-slide.active {
  opacity: 1;
  animation: kenBurns 12s ease-out forwards; /* langsamer Zoom */
}

@keyframes kenBurns {
  from { transform: scale(1.07); }
  to   { transform: scale(1.0);  }
}

/* Radialer Vignette-Overlay für Lesbarkeit */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.12) 70%);
  z-index: 1;
}

/* Übergangs-Gradient am unteren Rand: Hero → dunkler Seiteninhalt */
.hero-slideshow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 260px;
  background: linear-gradient(to bottom, transparent 0%, #1E1E1E 100%);
  z-index: 2;
  pointer-events: none;
}

/* Zentrierter Text + CTA */
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 var(--pad-x);
  color: #fff;
}

/* Fotografen-Name — groß, elegant */
.hero-slideshow .hero-name {
  font-family: var(--font);
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  font-weight: 200;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 0.85rem;
  color: #fff;
  opacity: 0;
  animation: fadeIn 1.8s var(--ease) 0.5s both;
}

/* "Photography" — kleiner, gedämpft */
.hero-slideshow .hero-sub {
  font-family: var(--font);
  font-size: clamp(0.60rem, 1.3vw, 0.82rem);
  font-weight: 300;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.60);
  opacity: 0;
  animation: fadeIn 1.8s var(--ease) 1.1s both;
}

/* CTA-Bereich: "Projekte" · "About" */
.hero-cta {
  display: flex;
  align-items: center;
  gap: 2.8rem;
  margin-top: 3.6rem;
  opacity: 0;
  animation: fadeIn 1.6s var(--ease) 1.7s both;
}

.hero-cta-link {
  font-family: var(--font);
  font-size: clamp(0.58rem, 1.1vw, 0.76rem);
  font-weight: 400;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  padding-bottom: 3px;
  transition: color 0.35s ease, border-color 0.35s ease;
}

.hero-cta-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.85);
}

/* Vertikale Trennlinie zwischen den CTAs */
.hero-cta-sep {
  display: block;
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

/* Scroll-Indikator unten */
.hero-scroll-btn {
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.50);
  padding: 10px;
  transition: color 0.35s;
  opacity: 0;
  animation: fadeIn 1.2s var(--ease) 2.4s both;
}

.hero-scroll-btn:hover { color: rgba(255, 255, 255, 0.88); }

.hero-scroll-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  animation: scrollDrift 2.8s ease-in-out 3.8s infinite;
}

/* Sanftes Auf-und-Ab des Scroll-Pfeils */
@keyframes scrollDrift {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ============================================================
   Startseite — Projekt-Grid (2 Spalten)
   ============================================================ */
.projekte-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--pad-x) 80px;
}

/* Projekt-Karte — keine eigene Opacity-Animation, damit Kinder unabhängig einblenden */
.projekt-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.85s var(--ease), box-shadow 0.85s var(--ease);
  /* Karte ist jetzt quadratisch (kein Text-Bereich darunter) */
}

@media (hover: hover) {
  .projekt-card:hover {
    transform: translateY(-9px);
    box-shadow:
      0 2px 4px  rgba(13, 13, 13, 0.04),
      0 8px 22px rgba(13, 13, 13, 0.07),
      0 24px 56px rgba(13, 13, 13, 0.08);
  }
}

/* Seitenname dezent als Label über dem Grid */
.projekte-label {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--pad-x) 28px;
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1.0s var(--ease) 0.05s both;
}

/* Dünne Linie links neben "Selected Work" wächst herein */
.projekte-label::before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  width: 28px;
  height: 1px;
  background: var(--muted);
  margin-right: 14px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: lineGrow 0.7s var(--ease-expo) 0.18s both;
}

/* Bild-Wrapper: quadratisch (Padding-Trick), Passe-partout via absoluter Positionierung.
   Eigene fadeIn-Animation über CSS-Custom-Properties (--img-delay, --img-dur). */
.projekt-card-img {
  position: relative;
  width: 100%;
  background: var(--surface);
  overflow: hidden;
  opacity: 0;
  animation: fadeIn var(--img-dur, 1.4s) var(--ease) var(--img-delay, 0.1s) both;
}

/* padding-bottom: 100% = Breite des Elements → Quadrat */
.projekt-card-img::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}

/* Bild absolut platziert: 10% Abstand auf allen Seiten,
   object-fit: contain zentriert das Bild im 80×80%-Bereich */
.projekt-card-img img {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  object-position: center center;
  /* Kurze Transition für magnetischen Hover-Effekt (Rückfeder) */
  transition: transform 0.55s var(--ease), opacity 0.4s;
  will-change: transform;
}

/* Titel-Overlay: oben-links über dem Foto, bündig mit Foto-Linke-Kante.
   Einblend-Animation erbt --title-delay / --title-dur vom Eltern-Card. */
.projekt-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  /* Bündig mit Foto-Linke-Kante (entspricht left: 13% des Bildes) */
  padding-top: 8%;
  padding-left: 13%;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn var(--title-dur, 1.0s) var(--ease) var(--title-delay, 0.5s) both;
}

/* Serientitel: Hero-CTA-Stil — klein, gesperrt, mit Strich davor */
.projekt-card-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.56rem, 1.0vw, 0.72rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

/* Kurzer Strich links vom Titel (wie "— Selected Work") */
.projekt-card-title::before {
  content: '';
  display: block;
  width: 16px;
  height: 1px;
  flex-shrink: 0;
}

/* Bild-Hover wird via JavaScript gesteuert (magnetischer Effekt) */

/* ============================================================
   Startseite — Dunkles Theme (body.home-dark)
   Sorgt für nahtlosen Übergang aus der Hero-Slideshow heraus.
   ============================================================ */
body.home-dark {
  background: #1E1E1E; /* Etwas weniger dunkel als vorher (#191919) */
}

/* "Selected Work" — hell auf dunklem Grund */
body.home-dark .projekte-label {
  color: rgba(255, 255, 255, 0.32);
  padding-top: 56px; /* Luft nach der Hero-Sektion */
}
body.home-dark .projekte-label::before {
  background: rgba(255, 255, 255, 0.32);
}

/* Karten-Passe-partout: dunkler, weniger kontraststark */
body.home-dark .projekt-card-img {
  background: #2A2A2A;
}

/* Bilder etwas kleiner im Rahmen (mehr Luft) */
body.home-dark .projekt-card-img img {
  top: 13%;
  left: 13%;
  width: 74%;
  height: 74%;
}

/* Titeltext: Hell, wie die CTA-Links in der Hero-Sektion */
body.home-dark .projekt-card-title {
  color: rgba(255, 255, 255, 0.78);
}

/* Strich: dieselbe Farbe wie der Titel, leicht gedimmt */
body.home-dark .projekt-card-title::before {
  background: rgba(255, 255, 255, 0.45);
}

/* Hover-Schatten stärker auf dunklem Hintergrund */
@media (hover: hover) {
  body.home-dark .projekt-card:hover {
    box-shadow:
      0 4px 8px  rgba(0, 0, 0, 0.35),
      0 12px 30px rgba(0, 0, 0, 0.50),
      0 28px 64px rgba(0, 0, 0, 0.55);
  }
}

/* Footer auf dunklem Grund */
body.home-dark footer {
  border-top-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.32);
}
body.home-dark footer a:hover { color: rgba(255, 255, 255, 0.75); }

/* ============================================================
   Projekt-Seite — Header
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 44px var(--pad-x) 0;
  transition: color 0.2s;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.back-link:hover  { color: var(--text); }

.back-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.projekt-header {
  padding: 32px var(--pad-x) 36px;
  text-align: center;
  animation: fadeUp 0.8s var(--ease-out) both;
}

.projekt-header h1 {
  font-size: var(--fs-heading);
  font-weight: 200;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.projekt-header .bildanzahl {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================================
   Foto-Grid (Projektseite — Thumbnail-Übersicht)
   ============================================================ */
.foto-grid {
  display: grid;
  /* Responsive: 4 Spalten → 3 → 2 → 1 */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 4px;
  padding: 0 var(--pad-x) 80px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Einzelnes Thumbnail — quadratisch (Padding-Trick), wie Homepage-Karten */
.foto-grid-item {
  position: relative;
  width: 100%;
  background: var(--surface);
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.6s var(--ease-out) both;
}

/* Quadrat erzwingen */
.foto-grid-item::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}

.foto-grid-item img {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  object-fit: contain;
  object-position: center center;
  transition: transform 0.55s var(--ease), opacity 0.3s;
  will-change: transform;
}

/* Dezenter Overlay beim Hover */
.foto-grid-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: background 0.4s var(--ease);
  pointer-events: none;
}

@media (hover: hover) {
  .foto-grid-item:hover img {
    transform: scale(1.04);
    opacity: 0.92;
  }

  .foto-grid-item:hover::after {
    background: rgba(13, 13, 13, 0.06);
  }
}

/* ============================================================
   Serien-Beschreibung (unter dem Foto-Grid auf projekt.html)
   ============================================================ */
.serie-beschreibung {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px var(--pad-x) 80px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.serie-beschreibung p {
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.92;
  color: rgba(13, 13, 13, 0.58);
  margin-bottom: 1rem;
}

/* Erster Absatz etwas prominenter */
.serie-beschreibung p:first-child {
  font-weight: 400;
  color: rgba(13, 13, 13, 0.75);
  letter-spacing: 0.01em;
}

.serie-beschreibung p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: #1C1A18; /* Dunkelgrau (warm), weniger kontraststark als #111 */
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  /* Sanftes Ein- und Ausblenden */
  transition: opacity 0.4s var(--ease);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* Bild-Bühne */
.lb-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 56px 80px;
}

/* Nur der Rahmen bestimmt die Zentrierung — Caption absolut daneben */
.lb-content {
  position: relative;
}

/* Caption: absolut rechts neben dem Rahmen, bündig mit Oberkante */
.lb-caption {
  position: absolute;
  left: calc(100% + 1.5rem);
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  width: 120px;
  padding-top: 2px;
}

.lb-cap-title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.lb-cap-place,
.lb-cap-year {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.04em;
}

/* Weißer Passe-partout-Rahmen um das Lightbox-Bild */
.lb-frame {
  width: min(80vh, 80vw);
  height: min(80vh, 80vw);
  background: #E8E5E2; /* Alt-weiß (warm), harmoniert mit --surface #EEECEA */
  display: flex;
  align-items: center;
  justify-content: center;
  /* Start-Zustand: leicht verkleinert und transparent */
  transform: scale(0.94);
  opacity: 0;
  /* Glatter Übergang beim Ein- und Ausblenden */
  transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease);
  will-change: transform, opacity;
}

/* Aktiver Zustand des Rahmens */
.lightbox.active .lb-frame {
  transform: scale(1);
  opacity: 1;
}

/* Beim Bildwechsel kurz zurückscalen */
.lb-frame.changing {
  transform: scale(0.97);
  opacity: 0;
}

/* Das angezeigte Bild — sitzt mit 10% Abstand im weißen Rahmen */
.lb-img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* Schließen-Button */
.lb-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.25s, transform 0.4s var(--ease);
  z-index: 10;
  padding: 0;
}

.lb-close:hover {
  color: rgba(255, 255, 255, 0.95);
  transform: rotate(90deg);
}

.lb-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* Navigations-Buttons (Prev / Next) */
.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.25s, transform 0.25s;
  z-index: 10;
  padding: 0;
}

.lb-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.lb-prev {
  left: 16px;
  /* Leichter Hover-Shift nach links */
}
.lb-prev:hover { transform: translateY(-50%) translateX(-3px); }

.lb-next {
  right: 16px;
}
.lb-next:hover { transform: translateY(-50%) translateX(3px); }

.lb-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bild-Zähler unten */
.lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-xs);
  font-weight: 300;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.32);
  font-feature-settings: 'tnum';
  white-space: nowrap;
}

/* ============================================================
   Lightbox — Mobile Portrait
   Caption unterhalb des Bildes, Bild voll sichtbar
   ============================================================ */
/* Portrait-Modus: iPhone und iPad — Caption unterhalb des Bildes */
@media (max-width: 1024px) and (orientation: portrait) {
  .lb-stage {
    padding: 56px 20px 20px;
    align-items: center;
  }

  /* Caption unter das Bild schieben → flex statt absolute */
  .lb-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Bild kleiner, damit Caption noch Platz hat */
  .lb-frame {
    width: min(78vw, 55vh);
    height: min(78vw, 55vh);
  }

  /* Caption: aus absoluter Position herausnehmen, unter das Bild */
  .lb-caption {
    position: static;
    width: min(78vw, 55vh);
    padding-top: 0.75rem;
    text-align: left;
  }
}

/* ============================================================
   Lightbox — Mobile Landscape
   Caption rechts, Bild vertikal zentriert
   ============================================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .lb-stage {
    padding: 48px 60px;
  }

  /* Bild vertikal mittig zur Caption ausrichten */
  .lb-content {
    align-items: center;
  }

  /* Bild an Viewport-Höhe anpassen damit es nicht abgeschnitten wird */
  .lb-frame {
    width: min(72vh, 60vw);
    height: min(72vh, 60vw);
  }
}

/* ============================================================
   Über mich
   ============================================================ */
.ueber-section {
  max-width: 1020px;
  margin: 0 auto;
  padding: 64px var(--pad-x) 100px;
}

.ueber-grid {
  display: grid;
  grid-template-columns: min(300px, 38%) 1fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 90px;
}

.ueber-foto img {
  width: 100%;
  object-fit: contain;
  background: var(--surface);
}

.ueber-text h1 {
  font-size: var(--fs-heading);
  font-weight: 200;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ueber-text .beruf {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}

.ueber-text p {
  color: rgba(13, 13, 13, 0.65);
  margin-bottom: 18px;
  line-height: 1.92;
  font-size: var(--fs-base);
  font-weight: 300;
}

/* Awards */
.awards-section h2 {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 44px;
  color: var(--muted);
}

.badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  -webkit-tap-highlight-color: transparent;
}

.badge-item img {
  max-height: 96px;
  max-width: 144px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.5;
  transition: filter 0.5s var(--ease), opacity 0.5s;
}

.badge-item:hover img,
.badge-item:focus img {
  filter: grayscale(0);
  opacity: 1;
}

.badge-item span {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-placeholder {
  width: 136px;
  height: 86px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.3s;
}

.badge-placeholder:hover { opacity: 1; }

/* Kontakt-Bereich auf der Über-mich-Seite */
.kontakt-section {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.kontakt-section h2 {
  font-size: var(--fs-xs);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: var(--muted);
}

.kontakt-section p {
  color: rgba(13, 13, 13, 0.65);
  font-size: var(--fs-base);
  font-weight: 300;
  line-height: 1.92;
  margin-bottom: 10px;
}

.kontakt-email {
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: 400;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: border-color 0.3s, opacity 0.3s;
}

.kontakt-email:hover {
  opacity: 0.6;
  border-color: transparent;
}

/* ============================================================
   Textseiten (Impressum, Datenschutz)
   ============================================================ */
.text-page {
  max-width: 660px;
  margin: 0 auto;
  padding: 64px var(--pad-x) 100px;
}

.text-page h1 {
  font-size: var(--fs-heading);
  font-weight: 200;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.text-page h2 {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 40px 0 12px;
}

.text-page p,
.text-page address {
  font-style: normal;
  font-weight: 300;
  color: rgba(13, 13, 13, 0.62);
  line-height: 1.92;
  margin-bottom: 12px;
  font-size: var(--fs-base);
}

.text-page a {
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s;
}

.text-page a:hover { border-color: var(--text); }

/* ============================================================
   Responsive — Tablet (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  nav { padding: 0 var(--pad-x); }

  .nav-links     { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  .home-hero {
    padding-top: clamp(80px, 16vw, 120px);
    padding-bottom: 44px;
  }

  /* Projekt-Grid: 1 Spalte auf Tablet */
  .projekte-grid {
    grid-template-columns: 1fr;
    padding-bottom: 64px;
  }

  /* Foto-Grid: 2 Spalten auf Tablet */
  .foto-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: 64px;
  }

  /* Lightbox-Buttons */
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }

  .lb-stage { padding: 56px 56px; }

  /* Über mich: einspaltig */
  .ueber-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .ueber-foto    { max-width: 240px; }
  .ueber-section { padding-top: 48px; }

  footer { padding: 36px var(--pad-x); gap: 24px; }
}

/* ============================================================
   Responsive — Smartphone (≤ 540px)
   ============================================================ */
@media (max-width: 540px) {
  /* Foto-Grid: 1 Spalte auf kleinen Smartphones */
  .foto-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  /* Lightbox: weniger Padding, Bilder füllen den Schirm */
  .lb-stage {
    padding: 52px 44px;
  }

  .lb-btn {
    width: 44px;
    height: 44px;
  }

  .lb-prev { left: 4px; }
  .lb-next { right: 4px; }

  /* Badges untereinander */
  .badges-row   { gap: 20px; }
  .badge-placeholder { width: 120px; height: 76px; }

  .ueber-foto { max-width: 100%; }
}

/* ============================================================
   Responsive — Sehr kleine Geräte (≤ 360px)
   ============================================================ */
@media (max-width: 360px) {
  .home-hero .hero-name  { letter-spacing: 0.14em; }
  .projekt-header h1     { letter-spacing: 0.1em; }
  .nav-overlay a         { font-size: 1.4rem; }
}
