/* ========================================= */
/* CORE VARIABLES â€” DEEP CANVAS PALETTE      */
/* ========================================= */
/* Fonts are loaded asynchronously in index.html for better performance */
:root {
  /* Der Goldene Schnitt (Phi) als mathematisches Fundament */
  --phi: 1.618;
  --phi-inv: 0.618;
  --phi-2: 2.618;
  --phi-3: 4.236;
  
  /* Haupttextfarbe (Dark Mode) */
  --text-primary: #eae6df;
  /* SekundÃ¤re Textfarbe (etwas gedimmter) */
  --text-secondary: #8f8a82;
  /* Farbe fÃ¼r unwichtige Texte/Platzhalter */
  --text-muted: #5c5852;
  /* Haupt-Akzentfarbe (Champagner/Gold) */
  --accent-bronze: #c2a373;
  /* Transparente Variante der Akzentfarbe */
  --accent-bronze-soft: rgba(194, 163, 115, 0.15);
  /* Warmer Farbton fÃ¼r Highlights */
  --accent-warm: #d8bf96;
  /* Farbe fÃ¼r dezente Rahmen/Linien */
  --border-soft: rgba(234, 230, 223, 0.05);
  /* Farbe fÃ¼r Rahmen bei Hover-Effekten */
  --border-hover: rgba(194, 163, 115, 0.2);
  /* Schriftart fÃ¼r Ãœberschriften */
  --font-display: "Cormorant Garamond", "Georgia", serif;
  /* Schriftart fÃ¼r FlieÃŸtext */
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  /* Kurven für weiche Animationen */
  --ease-smooth: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  /* Dauer der Animationen (Lang, Mittel, Kurz) */
  --t-slow: 1.4s var(--ease-smooth);
  --t-med: 0.8s var(--ease-smooth);
  --t-fast: 0.4s var(--ease-smooth);
  /* SVG Signatur Farbe fÃ¼r den dunklen Modus */
  --signature-color: #eae6df;
  /* DAS DUNKLE KUNSTWERK (Hintergrund-Farbverlauf) */
  background: #0a0c10;
  /* Solid dark color as requested */
  --bg-burgermenu: rgba(10, 12, 16, 0.98);
  --text-burgermenu: rgba(234, 230, 223, 0.85);
}

/* ============================================ */
/* Hellmodus                                    */
/* ============================================ */
body.light-mode {
  /*WICHTIG*/
  /* Haupttextfarbe für den Hellmodus */
  --text-primary: #0f0e0d;
  /* Sehr dunkles Anthrazit, fast Schwarz */
  /* Sekundäre Textfarbe im Hellmodus */
  --text-secondary: #302e2c;
  /* Deutlich dunkleres Grau */
  /* Farbe für unwichtigen Text und Buttons im Hellmodus */
  --text-muted: #45413c;
  /* Deutlich dunkler als vorher für bessere Lesbarkeit */
  /* Hintergrundfarbe fÃ¼r Container im Hellmodus */
  --bg-mid: rgba(255, 255, 255, 0.4);

  /* VERKNÃœPFUNG FÃœR DEIN MENÃœ (EXAKT DIE NAMEN VON UNTEN) */
  --bg-menu-dynamic: rgba(235, 229, 216, 0.95);
  --text-menu-dynamic: #151413;

  /* Rahmenfarbe im Hellmodus */
  --border-soft: rgba(21, 20, 19, 0.08);
  --border-hover: rgba(163, 131, 80, 0.25);

  /* Akzente fÃ¼r den Hellmodus leicht abdunkeln fÃ¼r Kontrast */
  --accent-bronze: #a38350;
  --accent-bronze-soft: rgba(163, 131, 80, 0.15);
  --accent-warm: #8a6935;

  /* SVG Signatur Farbe fÃ¼r den hellen Modus */
  --signature-color: #151413;
  /* Solid Museum Paper Background */
  background: #ebe5d8;
  color: var(--text-primary);

  /* UNFEHLBARER SCHRIFT-FIX: Zwingt die Links im geÃ¶ffneten MenÃ¼ auf dein dunkles Anthrazit */
  .main-nav .nav-link {
    color: #151413 !important;
    opacity: 1 !important;
  }

  /* BehÃ¤lt den edlen Gold-/Bronzeton beim Hovern im Hellmodus */
  .main-nav .nav-link:hover {
    color: var(--accent-warm) !important;
  }
}

/* Animationseinstellungen (Bewegung des Hintergrunds) — @keyframes liquidArt removed (#6): was unused */

/* ========================================= */
/* FIX: HÃ„SSLICHEN KASTEN IM HELLMODUS LÃ–SCHEN */
/* ========================================= */
body.light-mode .main-header,
body.light-mode .view-section {
  /* Entfernt stÃ¶rende Rahmen */
  border: none !important;
  box-shadow: none !important;
}

/* Header-Korrektur fÃ¼r Hellmodus (Milchglas) */
body.light-mode .main-header {
  background: rgba(235, 229, 216, 0.5) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

/* Art-ripple single definition — second duplicate removed below (#4) */
.art-ripple {
  position: fixed;
  top: 0;
  left: 0;
  /* Farbe und Verlauf des Ripple-Effekts */
  background: rgba(194, 163, 115, 0.25);
  /* Harmonisch warm (Bronze-Ton) */
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

/* ========================================= */
/* BASE STYLES                               */
/* ========================================= */

/* Reset aller Elemente: Entfernt StandardabstÃ¤nde und sorgt fÃ¼r einheitliche SchriftglÃ¤ttung */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; /* Merged from duplicate * selector (#10) */
}

/* Grundeinstellungen für das gesamte Dokument */
html {
  background-color: transparent;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Einstellungen für den Body (Hauptbereich) */
body {
  font-family: var(--font-body);
  /* Nutzt die Schriftart aus deinen Variablen */
  min-height: 100vh;
  min-height: 100dvh;
  line-height: var(--phi);
  /* Zeilenabstand exakt nach dem Goldenen Schnitt (1.618) für harmonischen Lesefluss */
  font-weight: 300;
  font-size: 16px;
  /* slightly larger for readability */
  color: var(--text-primary);
  /* Haupt-Textfarbe */
  background: transparent;
  /* Removed: transition: color 0.5s ease — caused massive cascade recalc on theme toggle (#5) */
  /* Individual elements already have their own color transitions */
  isolation: isolate;
  /* Erzeugt einen isolierten Kontext (wichtig für Ebenen) */
}

/* Farbe, die erscheint, wenn du Text mit der Maus markierst */
::selection {
  background: rgba(194, 163, 115, 0.4);
  color: #fff;
}



/* =================================================== */
/* DER FADEN - DYNAMISCHE PHYSIK-SIMULATION            */
/* =================================================== */

/* Container für die Physik-Animation */
#faden-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  /* Liegt hinter dem restlichen Inhalt */
  pointer-events: none;
}

@media (max-width: 1366px) and (hover: none) and (pointer: coarse),
  (max-width: 1024px) {
  #faden-canvas {
    display: none !important;
  }
  .portfolio-tabs {
    display: none !important;
  }
}

/* ========================================= */
/* ANIMATIONS & REVEALS                      */
/* ========================================= */

/* Grundanimation beim Laden der Seite */
.page-reveal {
  animation: pageIn 1.5s ease-out both;
}

@keyframes pageIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Animation für Elemente, die beim Scrollen erscheinen */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--t-slow),
    transform var(--t-slow);
}

/* Animation für einzelne Unter-Elemente */
.scroll-reveal-item {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--t-med),
    transform var(--t-med);
}

/* Klasse, die zugewiesen wird, wenn ein Element sichtbar sein soll */
.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Spezielle Animation für den Hero-Bereich (Startseite/Header) */
.hero-section {
  animation: heroReveal 1.2s var(--ease-out) both;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================= */
/* HEADER & NAVIGATION (PLASTISCHES GLAS MIT LICHTREFLEKTION)*/
/* ========================================================= */
.main-header {
  width: 100%;
  padding: 2.5rem 5vw 2rem;
  /* Noch größer für das Desktop-Logo */
  transition:
    padding 0.4s ease,
    background 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000 !important;
  /* Muss über der .main-nav (9999) liegen, damit das X sichtbar bleibt */

  /* Glas-Effekt für Premium-Look */
  background: rgba(10, 12, 16, 0.5) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;

  /* Rahmen (dezente Reflektionen) */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;

  /* Schatten für Tiefe */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;

  margin-top: -5px;
  /* GPU-composited layer prevents scroll jank from fixed header */
  transform: translateY(-5px) translateZ(0);
  will-change: transform;
}

.main-header.scrolled {
  padding: 1rem 5vw 1rem;
  background: rgba(10, 12, 16, 0.5) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5) !important;
}

body.light-mode .main-header.scrolled {
  background: rgba(235, 229, 216, 0.5) !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
}

.main-header.scrolled .logo-link {
  max-width: 250px;
}

/* ============================================================ */
/* OPTIMIERTE GLASANPASSUNG: Harmonischer Look im Light Mode    */
/* ============================================================ */
.main-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;

  /* 1 Pixel Höhe für die feine Linie */
  height: 1px;

  /* Sehr weiches, halbtransparentes warmes Beige/Bronze */
  background: rgba(234, 230, 223, 0.08) !important;

  /* Der dunkle Schatten zur Trennung vom Hintergrund bleibt */
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.069) !important;
  /* Schatten für Tiefe */

  pointer-events: none;
  opacity: 1;
}

/* Deaktiviert Linie und Schatten im Light-Mode */
body.light-mode .main-header::after {
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  transition: opacity 0.5s ease;
}

.logo-wrapper {
  width: 100%;
  max-width: 1400px;
  /* Extrem vergrößert für Desktop */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0.96;
  transition:
    opacity var(--t-fast),
    transform var(--t-fast);
  z-index: 1001;
}

.logo-wrapper:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.logo-link {
  width: 100%;
  max-width: 400px;
  /* Macht das Logo deutlich größer auf großen Bildschirmen */
  display: block;
  transition: max-width 0.4s ease;
}

.logo {
  width: 100%;
  height: auto;
  display: block;
  filter: brightness(1.02);
  /* Logo leicht aufhellen */
}

/* ========================================= */
/* SVG SIGNATURE ADAPTION                    */
/* ========================================= */
/* Übergangseinstellungen für Farbänderungen */
.logo svg path,
.logo svg line,
.logo svg polyline,
.logo svg circle,
.logo svg rect {
  transition:
    stroke 0.5s var(--ease-smooth),
    fill 0.5s var(--ease-smooth);
}

/* Setzt die Kontur-Farbe auf die Signature-Variable */
.logo svg path,
.logo svg line,
.logo svg polyline {
  stroke: var(--signature-color);
}

/* Setzt die Füll-Farbe für Flächen auf die Signature-Variable */
.logo svg path:not([fill="none"]),
.logo svg circle,
.logo svg rect {
  fill: var(--signature-color);
}

.signature-line {
  fill: transparent;
  transform-origin: center;
}

/* ========================================= */
/* MOBILE MENU TOGGLE                        */
/* ========================================= */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  position: fixed;
  left: 5vw;
  top: 4.3rem;
  /* Center of desktop header logo */
  transform: translateY(-50%);
  margin: 0;
  z-index: 10002 !important;
  transition:
    top 0.4s ease,
    transform 0.4s ease,
    color 0.4s ease;
}

.main-header.scrolled + .mobile-menu-toggle {
  top: 2rem;
  /* Center of scrolled desktop header */
}

@media (max-width: 1024px) {
  .mobile-menu-toggle {
    top: 4rem;
    /* Center of mobile header */
    width: 32px;
    height: 32px;
  }

  .mobile-menu-toggle .burger-focus-svg {
    width: 26px;
    height: 26px;
  }

  .main-header.scrolled + .mobile-menu-toggle {
    top: 2rem;
    /* Center of scrolled mobile header */
  }
}

/* ========================================================
 PREMIUM THEME TOGGLE (SVG ANIMATION)
 ======================================================== */
.mobile-header-theme-toggle {
  display: flex !important;
  z-index: 1001 !important;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  color: var(--text-primary);
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s ease;
  padding: 5px;
}

.mobile-header-theme-toggle:hover {
  /* Kein Scale mehr für den Schalter, nur leichte Transparenz/Glow falls gewünscht */
  opacity: 0.9;
}

@media (max-width: 768px) {
  .mobile-header-theme-toggle {
    transform: scale(0.85);
    transform-origin: center right;
  }
}

/* ========================================================
 THEME SWITCH (SCHALTER) 
 ======================================================== */
.theme-switch-track {
  width: 46px;
  height: 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  transition:
    background 0.4s ease,
    border-color 0.4s ease;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
}

.theme-switch-thumb {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  /* Im Dunkelmodus: Dunkler Schieber mit goldenem Icon */
  background: #1a1a1a;
  color: #d4be98;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.4s ease,
    color 0.4s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-icon {
  width: 12px;
  height: 12px;
  position: absolute;
  transition: transform 0.5s ease;
}

.icon-flash-off {
  opacity: 1;
  transition:
    opacity 0.3s ease,
    transform 0.5s ease;
  transform: rotate(0deg) scale(1);
  transform-origin: center;
}

.icon-flash {
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.5s ease;
  transform: scale(0.5);
  transform-origin: center;
}

/* ========================================================
 LIGHT MODE: THEME TOGGLE
 ======================================================== */
body.light-mode .mobile-header-theme-toggle {
  color: #151413 !important;
}

body.light-mode .theme-switch-track {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15);
}

body.light-mode .theme-switch-thumb {
  transform: translateX(22px);
  /* Im Hellmodus: Heller Schieber mit dunklem Icon */
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

body.light-mode .icon-flash-off {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

body.light-mode .icon-flash {
  opacity: 1;
  transform: scale(1);
}

/* ========================================================
 SVG BURGER ZU FOCUS-FRAME TRANSFORMATION
 ======================================================== */
.mobile-menu-toggle {
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.burger-focus-svg {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.focus-path {
  transition:
    d 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    stroke 0.5s ease,
    opacity 0.5s ease;
}

/* HOVER: Focus Frame (Kamera Sucher) */
@media (hover: hover) {
  .mobile-menu-toggle:hover {
    color: var(--accent-bronze);
  }
  .mobile-menu-toggle:hover .p-tl {
    d: path("M 8 2 L 2 2 L 2 8");
  }
  .mobile-menu-toggle:hover .p-tr {
    d: path("M 16 2 L 22 2 L 22 8");
  }
  .mobile-menu-toggle:hover .p-bl {
    d: path("M 8 22 L 2 22 L 2 16");
  }
  .mobile-menu-toggle:hover .p-br {
    d: path("M 16 22 L 22 22 L 22 16");
  }
  .mobile-menu-toggle:hover .p-ml {
    d: path("M 8 12 L 12 12 L 16 12");
  }
  .mobile-menu-toggle:hover .p-mr {
    d: path("M 12 8 L 12 12 L 12 16");
  }
}

/* ACTIVE: "X" (Schließen-Button) - Überschreibt Hover */
.mobile-menu-toggle.active .p-tl {
  d: path("M 12 12 L 4 4 L 4 4");
}
.mobile-menu-toggle.active .p-tr {
  d: path("M 12 12 L 20 4 L 20 4");
}
.mobile-menu-toggle.active .p-bl {
  d: path("M 12 12 L 4 20 L 4 20");
}
.mobile-menu-toggle.active .p-br {
  d: path("M 12 12 L 20 20 L 20 20");
}
.mobile-menu-toggle.active .p-ml {
  opacity: 0;
  transform: scale(0.5);
  transform-origin: center;
}
.mobile-menu-toggle.active .p-mr {
  opacity: 0;
  transform: scale(0.5);
  transform-origin: center;
}

/* Leichte Drehung für das "X" */
.mobile-menu-toggle.active .burger-focus-svg {
  transform: rotate(90deg);
}

/* Das mobile Navigationsmenü (Sidebar) */
.main-nav {
  position: fixed !important;
  top: 0 !important;
  left: -2px !important;
  right: auto !important;
  bottom: 0 !important;

  height: 100vh !important;
  height: 100dvh !important;

  width: 350px !important;
  max-width: 80vw !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;

  /* FIX: Das !important sitzt jetzt HINTER der Variable, damit der Browser sie erzwingt */
  background: var(--bg-menu-dynamic, rgba(10, 12, 16, 0.98)) !important;
  --text-menu-dynamic: rgba(234, 230, 223, 0.8);
  /* removed backdrop-filter here to save GPU on mobile when off-screen */
  box-shadow: none !important;
  gap: 1.8rem !important;
  padding: 8.5rem 2rem 2rem 2rem !important;
  /* Top padding ensures content never hits the burger icon */
  margin: 0 !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  transform: translateX(-100%);
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.4s ease,
    /* Macht den Farbwechsel seidenweich */ box-shadow 0.4s ease !important;
  z-index: 10001 !important;
  /* Overlay über den Header (10000) */
}

/* GPU OPTIMIERUNG: Blur auf Mobile deaktiviert, da es die Performance stark beeinträchtigt */
/* .main-nav.active {
  backdrop-filter: blur(15px) !important;
  -webkit-backdrop-filter: blur(15px) !important;
} */

/* ========================================================
   LINKS & BUTTONS (ULTRA FEIN)
   ======================================================== */
.nav-content-center {
  margin: auto 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1.8rem !important;
}

.nav-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.8rem !important;
  width: 100% !important;
  text-align: center !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Schriftstile der Navigationspunkte */
.nav-link {
  display: inline-block !important;
  font-size: 0.8rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.3em !important;

  /* FIX: Auch hier erzwingen wir die Variable mit einem !important dahinter */
  color: var(--text-menu-dynamic, rgba(234, 230, 223, 0.8)) !important;

  text-decoration: none !important;
  text-transform: uppercase;
  transition:
    color 0.3s ease,
    letter-spacing 0.3s ease !important;
}

/* Einstellungen für den Theme-Toggle Button */
.theme-toggle {
  min-width: 120px !important;
  height: 32px !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.2em !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-width: 1px !important;
}

/* Hover-Effekte für Links */
.nav-link:hover {
  color: var(--accent-warm) !important;
  /* Farbe beim Drüberfahren */
  letter-spacing: 0.38em !important;
  /* Leichte Ausdehnung beim Hover */
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
  opacity: 1;
}

/* ========================================================
   BURGER MENU FOOTER
   ======================================================== */
.nav-footer {
  margin-top: auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1.2rem !important;
  width: 100% !important;
  padding-top: 2rem !important;
  border-top: 1px solid rgba(150, 150, 150, 0.2) !important;
}

.nav-social-link {
  color: var(--text-menu-dynamic, rgba(234, 230, 223, 0.8)) !important;
  transition:
    color 0.3s ease,
    transform 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.nav-social-link:hover {
  color: var(--accent-warm) !important;
  transform: translateY(-2px) !important;
}

.nav-footer-links {
  display: flex !important;
  gap: 0.8rem !important;
  align-items: center !important;
}

.nav-footer-links a,
.nav-footer-links span {
  color: var(--text-menu-dynamic, rgba(234, 230, 223, 0.5)) !important;
  font-size: 0.65rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.15em !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  transition: color 0.3s ease !important;
}

.nav-footer-links a:hover {
  color: var(--accent-warm) !important;
}

.nav-copyright,
.nav-credits {
  color: var(--text-menu-dynamic, rgba(234, 230, 223, 0.4)) !important;
  font-size: 0.55rem !important;
  font-weight: 300 !important;
  letter-spacing: 0.1em !important;
  margin: 0 !important;
  text-transform: uppercase !important;
  text-align: center !important;
}

.nav-credits {
  margin-top: -0.8rem !important;
}

/* ======================================================================== */
/* WECHSEL-BUTTON: DEIN SCHÖNER ORIGINAL-FARBVERLAUF MIT SANFTEM 3D-EFFEKT  */
/* ======================================================================== */
.theme-toggle {
  min-width: 160px;
  height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  /* HINTERGRUND: Haupt-Farbverlauf des Buttons */
  background: var(--accent-bronze) !important;
  border: 1px solid transparent !important;
  /* TEXTFARBE: Button-Text */
  color: #0b0a0a !important;
  padding: 0 28px;
  border-radius: 40px;
  cursor: pointer;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  /* RAHMEN & SCHATTEN: Für den 3D-Effekt */
  border-top: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow:
    0 10px 25px rgba(194, 163, 115, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-top: 1.5rem;
}

.theme-toggle:hover {
  transform: scale(1.03) translateY(-2px);
  /* HOVER RAHMEN: Ändert sich bei Berührung */
  border-top: 1px solid rgba(0, 0, 0, 0.15) !important;
  border-left: 1px solid rgba(0, 0, 0, 0.1) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important;
  /* HOVER HINTERGRUND: Etwas heller/anderer Verlauf */
  background: var(--accent-warm) !important;
  box-shadow:
    0 15px 30px rgba(194, 163, 115, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 -8px 16px rgba(0, 0, 0, 0.05) !important;
}

/* HELLMODUS ANPASSUNG FÜR BUTTON */
body.light-mode .theme-toggle {
  /* HINTERGRUND: Hellere Optik für Light Mode */
  background: rgba(255, 255, 255, 0.4) !important;
  color: var(--text-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.7) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-right: 1px solid rgba(21, 20, 19, 0.15) !important;
  border-bottom: 1px solid rgba(21, 20, 19, 0.25) !important;
  box-shadow: 0 8px 20px rgba(21, 20, 19, 0.05) !important;
}

body.light-mode .theme-toggle:hover {
  background: rgba(21, 20, 19, 0.05) !important;
  border-top: 1px solid rgba(21, 20, 19, 0.2) !important;
  border-left: 1px solid rgba(21, 20, 19, 0.15) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.7) !important;
  box-shadow: inset 0 6px 12px rgba(21, 20, 19, 0.08) !important;
}

/* ========================================= */
/* HERO & CONTENT GRID                       */
/* ========================================= */
.hero-spacer-section {
  padding: 2rem 0 0;
  display: flex;
  justify-content: center;
}

/* DEKORATIVE LINIE: Verlauf hier anpassbar */
.hero-line {
  height: 1px;
  width: 100px;
  background: rgba(194, 163, 115, 0.35);
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  text-align: center;
  padding: calc(12rem * var(--phi)) 0 calc(2rem * var(--phi));
  /* Pushes content below the massive fixed header - berechnet nach Phi */
  z-index: 1;
  position: relative;
}

/* HERO LABEL: Farbe durch Variable definiert */
.hero-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  color: var(--accent-bronze);
  font-weight: 400;
  opacity: 0.8;
}

/* HERO TITEL: Farbe durch Variable definiert */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.8rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  line-height: 1.25;
  max-width: 100%;
  font-style: italic;
}

/* HERO TEXT: Farbe durch Variable definiert */
.hero-copy {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  max-width: 480px;
  line-height: 1.9;
}

.content-wrapper {
  max-width: 1800px; /* Erhöht für weniger negative Flächen */
  margin: 0 auto;
  padding: 4.5rem 5vw 8rem;
  display: grid;
  gap: 7rem;
  position: relative;
}

/* SECTION HEADERS */
.portfolio-section {
  margin-bottom: 0;
  opacity: 1 !important;
  transform: translateY(0) !important;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
  position: relative;
}

.section-header {
  text-align: center;
  margin-top: calc(2rem * var(--phi));
  margin-bottom: calc(3rem * var(--phi));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.section-title-group {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 22px;
  gap: 0.6rem;
}

/* TITEL-LINIE: Verlauf hier anpassbar */
.section-title-group::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 1px;
  background: rgba(194, 163, 115, 0.25);
}

/* ========================================= */
/* SECTION TYPOGRAPHY                        */
/* ========================================= */
.section-number {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--text-muted);
  /* Farbe der kleinen Sektionsnummer */
  letter-spacing: 0.65em;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  color: var(--text-secondary);
  /* Farbe der Sektionsüberschrift */
}

.section-subtitle {
  font-family: var(--font-display);
  max-width: 550px;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  /* Farbe des Untertitels */
  letter-spacing: 0.06em;
  font-style: italic;
  line-height: 1.85;
}

/* ============================================================ */
/* PORTFOLIO TABS - SCHÖNE REITER / TABS NAVIGATION             */
/* ============================================================ */
.portfolio-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  position: relative;
  justify-items: center;
}

.portfolio-tab-button {
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 50px; /* Sehr abgerundet für die großen Boxen */
  cursor: pointer;
  position: relative;
  font-family: var(--font-body);
  font-size: 1.05rem; /* Deutlich größer */
  text-transform: uppercase;
  letter-spacing: 0.18em; /* Etwas mehr Spacing für die größere Schrift */
  color: var(--text-muted);
  font-weight: 400;
  padding: 24px 60px; /* Sehr großes Padding für mächtige Boxen */
  transition:
    color var(--t-fast),
    border-color var(--t-fast),
    background-color var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tab-label {
  display: block;
}

@media (min-width: 1024px) {
  .portfolio-tabs {
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 3rem;
  }
  .portfolio-tab-button {
    font-size: 1.35rem;
    padding: 35px 80px;
    letter-spacing: 0.22em;
    border-radius: 60px;
  }
}

/* Hover-Effekt: Textfarbe und Rahmen */
.portfolio-tab-button:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: rgba(194, 163, 115, 0.03);
  /* Ganz subtiler Akzent */
}

/* Aktiver Zustand */
.portfolio-tab-button.active {
  color: var(--text-primary);
  border-color: var(--accent-bronze);
  background: var(--accent-bronze-soft);
}

.tab-indicator {
  display: none !important;
  /* Verstecke die Linie, da wir nun Pill-Buttons nutzen */
}

/* ========================================= */
/* VIEW CONTROLS (Grid/List)                 */
/* ========================================= */
.view-controls {
  display: flex;
  justify-content: center;
  gap: 0.2rem;
  margin-bottom: 2rem;
}

.view-toggle-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition:
    color var(--t-fast),
    border-color var(--t-fast);
}

.view-toggle-btn:hover {
  color: #d4be98; /* Luxuriöses Gold beim Hovern (Dark Mode) */
}

.view-toggle-btn.active {
  background: transparent;
  color: #d4be98;
  border-bottom: 1px solid #d4be98; /* Zarte goldene Linie für aktiven Status */
  padding-bottom: 7px; /* Ausgleich für Border */
}

body.light-mode .view-toggle-btn:hover {
  color: #a68a5e; /* Satteres Gold im Light Mode */
}

body.light-mode .view-toggle-btn.active {
  background: transparent;
  color: #a68a5e;
  border-bottom: 1px solid #a68a5e;
  padding-bottom: 7px;
}

/* ========================================= */
/* GALLERY GRID                              */
/* ========================================= */
.gallery-grid {
  display: block;
  column-count: auto;
  column-width: 550px;
  column-gap: 2rem;
  transition: max-width 0.5s var(--ease-out);
}

#portfolio-categories .gallery-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

#portfolio-categories .gallery-item {
  width: 100%;
}

/* LISTENANSICHT (List View Modifikator) */
.gallery-grid.list-view {
  column-count: 1 !important;
  max-width: 900px !important;
  margin: 0 auto !important;
}

.gallery-grid.list-view .gallery-item {
  width: 100% !important;
  margin-bottom: 3rem !important;
}

.gallery-grid.slider-view {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  gap: 2rem !important;
  padding: 3rem 0 !important;
  -webkit-overflow-scrolling: auto !important;
  scrollbar-width: none !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  align-items: center !important;
}

/* Fix für horizontales Scrollen auf iPhones */
@media (max-width: 1024px) {
  .gallery-grid.slider-view {
    width: auto !important;
    max-width: 100vw !important;
    margin-left: -3vw !important;
    margin-right: -3vw !important;
  }
}

.gallery-grid.slider-view::-webkit-scrollbar {
  display: none !important;
}

.gallery-grid.slider-view .gallery-item {
  flex: 0 0 auto !important;
  width: auto !important;
  height: auto !important;
  aspect-ratio: auto !important;
  scroll-snap-align: center !important;
  margin: 0 !important;
}

.gallery-grid.slider-view .gallery-item.folder-link {
  aspect-ratio: auto !important;
}

.gallery-grid.slider-view .gallery-item.folder-link .image-container {
  position: relative !important;
}

.gallery-grid.slider-view .gallery-item.folder-link .carousel-img {
  top: 0 !important;
  left: 0 !important;
}

.gallery-grid.slider-view .gallery-item:first-child {
  margin-left: 15vw !important;
}

.gallery-grid.slider-view .gallery-item:last-child {
  margin-right: 15vw !important;
}

@media (min-width: 768px) {
  .gallery-grid.slider-view .gallery-item:first-child {
    margin-left: 25vw !important;
  }
  .gallery-grid.slider-view .gallery-item:last-child {
    margin-right: 25vw !important;
  }
}

@media (min-width: 1200px) {
  .gallery-grid.slider-view .gallery-item:first-child {
    margin-left: 30vw !important;
  }
  .gallery-grid.slider-view .gallery-item:last-child {
    margin-right: 30vw !important;
  }
}

.gallery-grid.slider-view {
  align-items: center !important; /* Center items vertically in the slider */
}

.gallery-grid.slider-view .image-container {
  display: block !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: 85vw !important;
}

.gallery-grid.slider-view .image-container img {
  width: auto !important;
  height: auto !important;
  max-width: 85vw !important;
  max-height: 65vh !important;
  object-fit: contain !important;
  display: block !important;
}

@media (min-width: 768px) {
  .gallery-grid.slider-view .image-container {
    height: auto !important;
    min-width: 0 !important;
    max-width: 75vw !important;
  }
  .gallery-grid.slider-view .image-container img {
    height: auto !important;
    max-width: 75vw !important;
    max-height: 70vh !important;
  }
}

@media (min-width: 1200px) {
  .gallery-grid.slider-view .image-container {
    height: auto !important;
    min-width: 0 !important;
    max-width: 60vw !important;
  }
  .gallery-grid.slider-view .image-container img {
    height: auto !important;
    max-width: 60vw !important;
    max-height: 75vh !important;
  }
}

/* FIX: Album-Stacks in der Slider-Ansicht entfernen und Überschneidungen verhindern */
.gallery-grid.slider-view .gallery-item.folder-link {
  aspect-ratio: auto !important;
}

.gallery-grid.slider-view .gallery-item.folder-link .image-container {
  position: relative !important;
}

.gallery-grid.slider-view .gallery-item.folder-link::before,
.gallery-grid.slider-view .gallery-item.folder-link::after {
  display: none !important;
}

.gallery-grid.slider-view .folder-carousel .carousel-img:not(.active) {
  display: none !important;
}

.gallery-grid.slider-view .folder-carousel .carousel-img.active {
  position: relative !important;
  top: auto !important;
  left: auto !important;
}

.slider-nav-container {
  display: none;
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  justify-content: space-between;
  padding: 0 2vw;
  pointer-events: none;
  z-index: 100;
}

.gallery-grid.slider-view ~ .slider-nav-container {
  display: flex !important;
}

.slider-nav-btn {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background 0.3s,
    transform 0.3s;
}

.slider-nav-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

body.light-mode .slider-nav-btn {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(0, 0, 0, 0.1);
  color: #000;
}

body.light-mode .slider-nav-btn:hover {
  background: rgba(255, 255, 255, 0.9);
}

.gallery-grid .gallery-item {
  scroll-snap-align: center;
  break-inside: avoid;
  margin-bottom: 2rem;
}

.gallery-item {
  position: relative;
  overflow: visible;
  /* changed from hidden for stack effect */
  cursor: pointer;
  height: auto !important;
  aspect-ratio: auto !important;
  border-radius: 8px;
  /* Eckenradius der Bilder */
  width: 100%;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: transform var(--t-slow);
  contain: content;
  transform: translateZ(0);
}

.image-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.12),
    0 25px 50px rgba(0, 0, 0, 0.18) !important;
  transition: box-shadow var(--t-slow);
}

/* ========================================= */
/* FOLDER CAROUSEL PREVIEW                   */
/* ========================================= */
.folder-carousel .carousel-img {
  position: absolute;
  top: -5%;
  left: -5%;
  width: 110% !important;
  height: 110% !important;
  object-fit: cover !important;
  opacity: 0;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.folder-carousel .carousel-img.align-top {
  object-position: center 0% !important;
}

.folder-carousel .carousel-img:first-child {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  top: 0 !important;
  left: 0 !important;
}

.gallery-item img {
  width: 100%;
  height: auto !important;
  aspect-ratio: auto !important;
  display: block;
  filter: none !important;
  -webkit-filter: none !important;
  transition: transform var(--t-slow) var(--ease-out);
  transform-origin: center center;
}

/* FOLDER STACK EFFEKT (Mappen-Look) */
.gallery-item.folder-link {
  aspect-ratio: 16 / 9 !important; /* Wiederhergestellt, damit beide Mappen exakt gleich groß bleiben */
  position: relative;
  z-index: 1;
  /* Hardware acceleration for smooth scrolling */
  transform: translateZ(0);
  contain: none !important; /* CRITICAL: Prevents clipping of the stacked images! */
  overflow: visible !important;
}

.gallery-item.folder-link .image-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4) !important;
  /* Performance optimization */
  transform: translateZ(0);
}

.gallery-item.folder-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: rotate(-2.5deg) scale(1);
  transform-origin: center;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

.gallery-item.folder-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  z-index: 1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transform: rotate(3.5deg) scale(1);
  transform-origin: center;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease;
}

/* Anpassung des Mappen-Looks im Hellmodus */
body.light-mode .gallery-item.folder-link::before {
  background: rgba(0, 0, 0, 0.12); /* Deutlich dunkler für besseren Kontrast */
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}
body.light-mode .gallery-item.folder-link::after {
  background: rgba(0, 0, 0, 0.08); /* Deutlich dunkler für besseren Kontrast */
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Hover-Effekt: Box hebt sich ab */
.gallery-item:hover {
  transform: translateY(-10px);
}

.gallery-item:hover .image-container {
  box-shadow:
    0 20px 30px rgba(0, 0, 0, 0.2),
    0 40px 80px rgba(0, 0, 0, 0.35) !important;
}

.gallery-item.folder-link:hover::before {
  transform: rotate(-4deg) scale(1) translate(-8px, 4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gallery-item.folder-link:hover::after {
  transform: rotate(5deg) scale(1) translate(12px, 6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Hover-Effekt: Bild zoomt leicht */
.gallery-item:hover img {
  transform: scale(1.03);
  filter: none !important;
}

.gallery-item:hover .overlay {
  opacity: 1;
  /* Beim Hover evtl. etwas dunkler oder heller? */
  background: rgba(10, 12, 16, 0.7);
}

.gallery-item:hover .overlay-content {
  transform: translateY(0);
}

/* HOVER-OVERLAY: Hier wird das dunkle Fenster über dem Bild gesteuert */
.overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* Standard-Verlauf */
  background: rgba(10, 12, 16, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  /* Für normale Bilder erst bei Hover sichtbar - deutlich schneller gemacht */
  transition:
    opacity 0.3s ease,
    background 0.3s ease;
  z-index: 10;
  padding: 2.5rem;
}

.overlay-content {
  text-align: center;
  transform: translateY(16px);
  /* Schnelleres Einschieben beim Hover */
  transition: transform 0.35s var(--ease-out);
}

/* SONDEREGELUNG: MAPPEN-LOOK (Kategorien) SIND IMMER SICHTBAR */
.folder-link .overlay {
  opacity: 1 !important;
}

.folder-link .overlay-content {
  transform: translateY(0) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.folder-link:hover .overlay-content {
  transform: translateY(-4px) !important;
}

/* KATEGORIE-BADGE (ALBUM INDIKATOR) - Sehr modern und elegant */
.folder-link .item-category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(194, 163, 115, 0.2);
  border: 1px solid rgba(194, 163, 115, 0.4);
  padding: 8px 22px;
  border-radius: 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--accent-warm);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  margin-bottom: 1.5rem;
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out);
}

/* SVG ALBUM ICON */
.folder-link .item-category::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D8BF96' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='14' height='14' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M21 7v10a2 2 0 0 1-2 2H7'%3E%3C/path%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.folder-link:hover .item-category {
  background: rgba(194, 163, 115, 0.35);
  border-color: rgba(194, 163, 115, 0.6);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

/* KATEGORIE-BADGE HELLMODUS (Erzwingt helle Schrift, da Overlay dunkel bleibt) */
body.light-mode .folder-link .item-category {
  color: #c2a373;
  border-color: rgba(216, 191, 150, 0.35);
}

body.light-mode .folder-link:hover .item-category {
  color: #ffffff;
  border-color: rgba(216, 191, 150, 0.6);
}

/* TEXTE IM OVERLAY */
.item-category {
  display: block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.55em;
  color: #c2a373 !important;
  /* Farbe der Kategorie */
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.item-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: #e8e4dc !important;
  /* Immer helle Schrift, da das Overlay immer dunkel ist */
  font-style: italic;
}

/* ========================================= */
/* ABOUT ME (ÜBER MICH)                      */
/* ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 5rem;
  align-items: center;
  padding: 1rem 0;
}

.about-content {
  order: 2;
}

/* Einleitungs-Text (Lead) */
.about-lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--accent-warm);
  /* Farbe des Lead-Textes */
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 2.5rem;
  letter-spacing: 0.02em;
}

/* Fließtext im About-Bereich */
.about-content p {
  font-family: var(--font-body);
  color: var(--text-secondary);
  /* Textfarbe */
  font-size: 1.05rem;
  line-height: 2.1;
  margin-bottom: 1.8rem;
  letter-spacing: 0.03em;
  text-align: justify;
}

/* Rahmen um das About-Bild */
.about-image-wrapper {
  order: 1;
  position: relative;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--border-soft);
  /* Rahmenfarbe */
  box-shadow: 0 0 20px rgba(194, 163, 115, 0.1);
  /* Schatten */
  border-radius: 22px;
  overflow: hidden;
  line-height: 0;
}

.about-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 0.8s var(--ease-smooth);
}

/* ========================================= */
/* CONTACT FORM                              */
/* ========================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.form-group label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
  /* Farbe der Label-Beschriftung */
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  /* Eingabefeld Hintergrundfarbe */
  border: 1px solid var(--border-soft);
  /* Rahmenfarbe der Eingabefelder */
  padding: 1.2rem;
  color: var(--text-primary);
  /* Textfarbe in den Feldern */
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 12px;
  transition:
    border-color var(--t-fast),
    background var(--t-fast),
    box-shadow var(--t-fast);
}

/* Zustand beim Anklicken des Feldes */
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-warm);
  /* Rahmenfarbe beim Fokus */
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 15px rgba(216, 191, 150, 0.15);
  /* Leuchten beim Fokus */
}

/* SUBMIT BUTTON STYLING */
.submit-btn {
  align-self: center;
  background: transparent;
  color: var(--accent-warm);
  /* Button Textfarbe */
  border: 1px solid var(--accent-warm);
  /* Button Rahmenfarbe */
  padding: 1.2rem 3.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  cursor: pointer;
  border-radius: 40px;
  transition:
    transform var(--t-fast),
    color var(--t-fast),
    background-color var(--t-fast),
    box-shadow var(--t-fast);
  margin-top: 1rem;
}

.submit-btn:hover {
  background: var(--accent-warm);
  /* Farbe beim Hover */
  color: #010308;
  /* Textfarbe beim Hover */
  box-shadow: 0 0 25px rgba(216, 191, 150, 0.4);
  transform: translateY(-3px);
}

/* ANPASSUNGEN FÜR LIGHT MODE */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
  background: rgba(0, 0, 0, 0.03);
  /* Hintergrund im Light Mode */
  border-color: rgba(0, 0, 0, 0.15);
  /* Rahmenfarbe im Light Mode */
  color: var(--text-primary);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
  border-color: var(--text-primary);
  background: rgba(0, 0, 0, 0.06);
}

/* ========================================= */
/* FOOTER & VIEW MANAGEMENT                  */
/* ========================================= */
.view-section {
  display: none;
  opacity: 0;
}

.view-section.active {
  display: block;
  opacity: 1;
}

/* FOOTER STYLING */
.main-footer {
  display: block;
  text-align: center;
  padding: 4rem 2rem 5rem;
  position: relative;
  border-top: 1px solid var(--border-soft);
  /* Oberer Rahmen */
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.1) !important;
  /* Schatten für Tiefe */
  z-index: 10;
}

/* GRADIENT-EFFEKT IM FOOTER */
.main-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* Radiale Gradient-Farbe für den Footer-Hintergrund */
  background: transparent;
  pointer-events: none;
  z-index: -1;
}

/* ANPASSUNG FÜR LIGHT MODE */
body.light-mode .main-footer {
  box-shadow: 0 -15px 30px rgba(21, 20, 19, 0.05) !important;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* DEKORATIVE LINIE IM FOOTER */
.footer-line {
  height: 1px;
  width: 60px;
  background: rgba(194, 163, 115, 0.4);
}

.footer-credits {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-secondary);
  /* Textfarbe Credits */
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.08em;
}

.footer-copyright {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-secondary);
  /* Farbe Copyright */
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 300;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: -0.5rem;
}

.legal-link {
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: color var(--t-fast);
}

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

.legal-dot {
  color: var(--text-muted);
  font-size: 0.65rem;
}

/* ========================================= */
/* LEGAL CONTENT STYLING (IMPRESSUM)         */
/* ========================================= */
.legal-content {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  font-weight: 300;
  text-align: left;
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 400;
}

.legal-content p {
  margin-bottom: 1.5rem;
}

.legal-content small {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2rem;
  border-top: 1px solid var(--border-soft);
  padding-top: 1rem;
}

/* ========================================= */
/* GLÄTTUNGS-BLUR FÜR DEN ANIMIERTEN HINTERGRUND */
/* ========================================= */
.bg-blur-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  /* Stärke des Blur-Effekts */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  pointer-events: none;
}

#faden-canvas {
  z-index: 1;
}

.bg-container {
  position: fixed;
  top: -50px;
  left: -50px;
  width: calc(100% + 100px);
  height: calc(100% + 100px);
  z-index: -2;
  background: inherit;
  filter: blur(40px);
  /* Stärke der Hintergrund-Unschärfe */
}

/* ========================================= */
/* STARTBILDSCHIRM - EXTREM SCHÖNES DESIGN   */
/* ========================================= */
.landing-screen {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  /* HINTERGRUNDVERLAUF BEIM START */
  background: linear-gradient(
    135deg,
    #06070a 0%,
    #080a0d 25%,
    #0a0c10 50%,
    #080a0d 75%,
    #10131a 100%
  );
  background-size: 200% 200%;
  animation: landingGradient 20s ease infinite;
  z-index: 20000 !important;
  /* Muss über dem Header liegen (10000) */
  box-shadow: inset 0 1px 30px rgba(10, 12, 16, 0.1);
  overflow: hidden;
}

@keyframes landingGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* GITTER-ANIMATION AUF DEM STARTBILDSCHIRM */
.landing-screen::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* Farben der Linien im Gitter-Hintergrund */
  background-image:
    linear-gradient(to bottom, rgba(194, 163, 115, 0.03) 1px, transparent 1px),
    linear-gradient(to right, rgba(194, 163, 115, 0.02) 1px, transparent 1px);
  background-size: 100px 100px;
  pointer-events: none;
  opacity: 0.5;
  animation: slideGrid 8s linear infinite;
}

/* ======================================================== */
/* FIX FÜR LANDING PAGE IM LIGHT-MODE                       */
/* ======================================================== */
body.light-mode .landing-screen {
  /* Ändere den Hintergrund auf ein helles Leinen/Weiß, passend zu deiner Seite */
  background: #ebe5d8 !important;
  /* Falls du einen hellen Gradienten willst, nutze diesen hier: */
  /* background: linear-gradient(135deg, #EBE5D8 0%, #EAE6DF 100%) !important; */
}

/* Stelle sicher, dass die Logos und Buttons im Light Mode sichtbar sind */
body.light-mode .landing-logo {
  /* Hier kannst du ggf. einen Schatten hinzufügen, falls das Logo zu dunkel ist */
  filter: drop-shadow(0px 0px 0px rgba(0, 0, 0, 0)) !important;
}

@keyframes slideGrid {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(100px);
  }
}

/* ========================================= */
/* THE EDITORIAL LANDING EXPERIENCE          */
/* ========================================= */
.landing-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100dvh;
  width: 100%;
  padding: 0 5vw;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.landing-logo {
  width: 100%;
  max-width: 780px;
  position: relative;
  /* Schatten-Filter (hier wird das Leuchten gesteuert) */
  filter: drop-shadow(0px 0px 0px rgba(194, 163, 115, 0))
    drop-shadow(0px 0px 0px rgba(194, 163, 115, 0));
  transform: translateZ(0);
}

/* Keyframes für das Logo-Leuchten */
@keyframes logoGlow {
  0%,
  30% {
    /* Unsichtbarer Schatten für Browser-Rendering-Performance */
    filter: drop-shadow(0 0 1px rgba(194, 163, 115, 0.01));
  }

  50% {
    /* Aktives Leuchten */
    filter: drop-shadow(0 0 15px rgba(194, 163, 115, 0.7))
      drop-shadow(0 0 45px rgba(194, 163, 115, 0.3));
  }

  100% {
    filter: drop-shadow(0 0 1px rgba(194, 163, 115, 0.01));
  }
}

/* 1. Die visuelle Anker-Linie unter dem Logo */
.landing-anchor {
  width: 1px;
  height: 70px;
  /* Verlauf der Linie */
  background: linear-gradient(to bottom, rgba(216, 191, 150, 0.6), transparent);
  margin: 2.5rem 0;
  transform-origin: top;
  transform: scaleY(0);
  animation: dropLine 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

@keyframes dropLine {
  to {
    transform: scaleY(1);
  }
}

/* 2. Der Hauptbutton (Editorial-Stil) */
.btn-editorial-main {
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  color: var(--accent-warm);
  /* Textfarbe */
  background: transparent;
  border: none;
  padding: 18px 45px;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.4s ease,
    color 0.4s ease,
    text-shadow 0.4s ease;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.8s forwards;
}

.btn-editorial-main::before {
  display: none;
  /* Hintergrund-Effekt deaktiviert */
}

/* Hover-Effekt: Text-Glow */
.btn-editorial-main:hover {
  color: #fff;
  text-shadow:
    0 0 15px rgba(216, 191, 150, 0.8),
    0 0 30px rgba(216, 191, 150, 0.4);
  transform: translateY(-2px);
}

.btn-editorial-main:hover::before {
  transform: scaleY(1);
}

/* 3. Subtile Secondary Links */
.landing-nav-editorial {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 3.5rem;
  opacity: 0;
  animation: fadeUp 0.8s ease 2.3s forwards;
}

.link-dot {
  width: 3px;
  height: 3px;
  background: var(--accent-bronze);
  /* Punkt-Farbe */
  border-radius: 50%;
  opacity: 0.5;
}

.link-editorial {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  /* Link-Farbe */
  text-decoration: none;
  letter-spacing: 0.3em;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.4s ease;
}

.link-editorial::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--accent-warm);
  /* Unterstreichungs-Farbe */
  transform: translateX(-50%);
  transition: width 0.4s ease;
}

.link-editorial:hover {
  color: var(--accent-warm);
}

.link-editorial:hover::after {
  width: 100%;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================= */
/* RESPONSIVE DESIGN FOR MOBILE DEVICES      */
/* ========================================= */

/* Anpassungen für mobile Geräte & Tablets */
@media (max-width: 1024px) {
  .hero-section-custom,
  .hero-section {
    padding-top: 12rem;
    /* Angepasst: Schiebt den Text unter dem fixierten mobilen Header hervor */
  }

  .mobile-menu-toggle {
    margin: 0;
  }

  .landing-content {
    height: 100dvh;
    justify-content: center;
  }

  .landing-logo {
    max-width: 480px;
    margin-top: 0;
    /* Glow-Effekt wieder aktiviert auf Wunsch des Users */
    filter: drop-shadow(0 0 20px rgba(194, 163, 115, 0.4));
  }

  .landing-anchor {
    height: 40px;
    margin: 1.5rem 0;
  }

  .btn-editorial-main {
    /* ... */
    opacity: 0;
    animation: fadeUp 0.8s ease 1.8s forwards;
    /* Sehr frühes Erscheinen nach 1.8s */
  }

  /* EXTREM-OPTIMIERUNG: Unendliche Hintergrund-Animationen auf Mobile abschalten */
  .landing-screen {
    animation: none !important;
  }
  .landing-screen::before {
    animation: none !important;
  }

  .landing-nav-editorial {
    /* ... */
    opacity: 0;
    animation: fadeUp 0.8s ease 2s forwards;
    /* Folgt direkt nach 2.0s */
  }

  .main-header {
    padding: 3rem 5vw 2rem !important;
    /* Mehr Padding oben, damit es nicht am Rand klebt */
    margin-bottom: 0rem;
    /* Bringt das Bild näher am Header */
    display: flex;
    justify-content: center;
    /* Logo zentriert */
    align-items: center;

    background: rgba(10, 12, 16, 0.5) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  }

  .logo-wrapper {
    max-width: 300px;
  }

  /* Light-Mode Header: gleiche Farben wie Desktop */
  body.light-mode .main-header {
    background: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
    border-top: none !important;
  }

  .main-header.scrolled {
    padding: 1rem 5vw 1rem !important;
  }

  .main-nav {
    width: 50vw !important;
    max-width: 50vw !important;
    /* Blur deaktiviert zur Performance-Optimierung auf Mobile */
  }

  .main-nav.active {
    transform: translateX(0);
  }

  body.light-mode .main-nav {
    background: rgba(235, 229, 216, 0.92);
  }

  .nav-links {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
  }

  .nav-link {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    padding-bottom: 6px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .theme-toggle {
    min-width: 140px;
    height: 42px;
    font-size: 0.65rem;
    padding: 0 20px;
    margin-top: 1rem;
  }

  .portfolio-tabs {
    display: none;
  }

  .portfolio-tab-button {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    padding: 10px 0;
    flex-shrink: 0;
    min-width: max-content;
  }

  .tab-indicator {
    height: 1.5px;
  }

  .portfolio-tab-button.active .tab-indicator {
    width: 60px;
  }

  .hero-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
  }

  .hero-copy {
    font-size: 0.95rem;
    max-width: 90%;
  }

  .hero-label {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
  }

  .hero-image-wrapper {
    width: 85% !important;
    max-width: 400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .content-wrapper {
    padding: 1.5rem 3vw 3rem;
    gap: 1.5rem;
  }

  .gallery-grid {
    display: block;
    column-count: 2;
    column-width: auto;
    column-gap: 1rem;
  }

  /* Die Kategorien-Ordner sollen auf dem Handy immer untereinander (1-spaltig) sein */
  #portfolio-categories .gallery-grid {
    column-count: 1;
    column-gap: 3rem;
  }

  /* Die Listenansicht soll auf dem Handy ebenfalls 1-spaltig bleiben */
  .gallery-grid.list-view {
    column-count: 1 !important;
  }

  .gallery-item:hover {
    transform: translateY(-5px);
  }

  .item-title {
    font-size: 1.1rem;
  }

  .item-category {
    font-size: 0.65rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0;
  }

  .about-content {
    order: 1;
  }

  .about-image-wrapper {
    order: 2;
    max-width: 100%;
    margin: 0 auto;
  }

  .about-lead {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
  }

  .about-content p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: left;
  }

  .contact-form {
    gap: 1.8rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.9rem;
    font-size: 16px;
  }

  .submit-btn {
    padding: 0.9rem 2.5rem;
    font-size: 0.75rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-title {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  }

  .main-footer {
    padding: 2.5rem 1.5rem 3rem;
  }

  .footer-credits {
    font-size: 0.95rem;
  }

  .footer-copyright {
    font-size: 0.65rem;
  }

  .modal-content {
    max-width: 95vw;
    max-height: 90vh;
  }

  .close-modal {
    top: 20px;
    right: 15px;
    font-size: 2rem;
  }
}

/* Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }

  .landing-logo {
    max-width: 340px;
  }

  .main-header {
    padding: 2rem 5vw 1.5rem;
    gap: 1.5rem;
  }

  .logo-wrapper {
    max-width: 200px;
  }

  .nav-links {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .nav-link {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    padding-bottom: 4px;
  }

  .theme-toggle {
    min-width: 120px;
    height: 38px;
    font-size: 0.6rem;
    padding: 0 16px;
  }

  .hero-title {
    font-size: clamp(1.2rem, 6vw, 1.8rem);
  }

  .hero-copy {
    font-size: 0.85rem;
  }

  .content-wrapper {
    padding: 1rem 3vw 2rem;
  }

  .gallery-item:hover img {
    transform: scale(1.02);
  }

  .item-title {
    font-size: 0.95rem;
  }

  .about-content p {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group textarea {
    padding: 0.8rem;
    font-size: 16px;
  }

  #faden-canvas {
    display: none;
  }
}

/* Extra Small Devices (max-width: 360px) */
@media (max-width: 360px) {
  .landing-logo {
    max-width: 260px;
  }

  .main-header {
    padding: 1.5rem 2vw 1rem;
    gap: 1rem;
  }

  .logo-wrapper {
    max-width: 150px;
  }

  .nav-link {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  .hero-title {
    font-size: 1.1rem;
  }

  .gallery-item {
    aspect-ratio: 4 / 5;
    border-radius: 8px;
  }

  .item-title {
    font-size: 0.85rem;
  }
}

/* Editorial Hero Bild-Integration */
.hero-section-custom {
  padding: 20rem 0 2rem;
  /* Extrem weit nach unten gerutscht für das gigantische Desktop-Logo */
  text-align: center;
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  /* Porträt-Größe */
  margin: 0 auto;
  overflow: hidden;
}

.hero-portrait {
  width: 100%;
  display: block;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

/* ======================================================== */
/* BENJAMIN VIULET STYLE - CINEMATIC HERO IMAGE             */
/* ======================================================== */

/* 1. Bild-Container: Erzwingt volle Breite Ã¼ber den Container hinaus */
.hero-image-wrapper {
  position: relative;
  width: 100vw !important;
  /* Volle Bildschirmbreite */
  max-width: 100vw !important;

  /* Trick: Zwingt das Element an den linken Rand, ignoriert Padding des Elternelements */
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;

  /* HÃ¶he: 65% der BildschirmhÃ¶he */
  height: 65vh !important;
  min-height: 450px !important;

  border-radius: 0 !important;
  /* Eckiges Design */
  overflow: hidden;
  box-shadow: none !important;
}

/* Fix für horizontales Scrollen auf iPhones */
@media (max-width: 1024px) {
  .hero-image-wrapper {
    width: auto !important;
    max-width: none !important;
    margin-left: -5vw !important;
    margin-right: -5vw !important;
  }
}

/* 2. Das Bild: FÃ¼llt den Container aus, ohne zu verzerren */
.hero-portrait {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  /* Bild wird zugeschnitten, um Fläche zu füllen */
  object-position: center 35% !important;
  /* Fokuspunkt: Gesicht/Hut */
  border-radius: 0 !important;
  border: none !important;
}

/* 3. Der Kino-Fade: Erzeugt einen weichen Ãœbergang zu Schwarz */
.gradient-overlay {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  /* Übergang von Transparent zu Dunkel (unten) - Im Dunkelmodus weicher Verlauf ohne scharfe Kante */
  background: linear-gradient(
    to bottom,
    rgba(10, 12, 16, 0) 0%,
    rgba(10, 12, 16, 0) 45%,
    rgba(10, 12, 16, 0.1) 65%,
    rgba(10, 12, 16, 0.4) 85%,
    rgba(10, 12, 16, 0.85) 96%,
    rgb(10, 12, 16) 100%
  ) !important;
  pointer-events: none;
}

/* Anpassung: Ãœbergang zu Weiß (für Light-Mode) */
body.light-mode .gradient-overlay {
  background: linear-gradient(
    to bottom,
    rgba(235, 229, 216, 0) 0%,
    rgba(235, 229, 216, 0) 75%,
    rgba(235, 229, 216, 0.4) 90%,
    rgb(235, 229, 216) 100%
  ) !important;
}

/* KONTRAST-FIX: Bildtitel im Light Mode beim Öffnen deutlich dunkler machen */
body.light-mode #view-image-detail .hero-title {
  color: var(--text-primary) !important;
  text-shadow: none !important;
}

body.light-mode #view-image-detail .hero-label {
  color: #6b5532 !important; /* Deutlich dunkleres Gold für besseren Kontrast */
  text-shadow: none !important;
}

/* MODERATERE ANPASSUNG NUR FÃœR DESKTOP */
@media (min-width: 769px) {
  .hero-image-wrapper {
    height: 75vh !important;
    min-height: 500px !important;
  }

  .hero-portrait {
    object-position: center 35% !important;
  }
}

/* ======================================================== */
/* HERO IMAGE LÃœCKE SCHLIEÃŸEN                               */
/* ======================================================== */

.hero-section-custom,
.content-wrapper {
  /* Entfernt das Padding oben, damit das Bild bÃ¼ndig abschlieÃŸt */
  padding-top: 0 !important;
}

.hero-image-wrapper {
  /* Fein-Justierung: Zieht das Bild 1px nach oben */
  margin-top: -1px !important;
}

/* Fix fÃ¼r die Text-Ãœberlagerung im Dunkelmodus auf MobilgerÃ¤ten */

/* ======================================================== */
/* GLOBAL FIXES FOR DESKTOP MENU & THEME TOGGLE             */
/* ======================================================== */
.main-nav.active {
  transform: translateX(0) !important;
}

body.light-mode .main-nav {
  background: rgba(235, 229, 216, 0.92) !important;
}

/* Instagram Footer Icon */
.footer-ig-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem auto 2rem;
  color: var(--text-secondary);
  transition:
    transform 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.footer-ig-icon svg {
  width: 20px;
  height: 20px;
}

.footer-ig-icon:hover {
  color: var(--accent-warm);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(216, 191, 150, 0.15);
  border-color: rgba(216, 191, 150, 0.3);
}

body.light-mode .footer-ig-icon {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light-mode .footer-ig-icon:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

/* ======================================================== */
/* IMAGE PROTECTION                                         */
/* ======================================================== */
img {
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
  /* Allow clicking for lightbox */
}

body.light-mode .nav-footer-links a,
body.light-mode .nav-footer-links span,
body.light-mode .nav-copyright,
body.light-mode .nav-credits {
  color: #151413 !important;
}

body.light-mode .nav-social-link,
body.light-mode .nav-social-link svg {
  color: #151413 !important;
}

/* ======================================================== */
/* GLOBALER BILD-HINTERGRUND (DETAIL-ANSICHT)               */
/* ======================================================== */
#detail-bg-image {
  position: fixed;
  top: -5%;
  left: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  filter: blur(40px) brightness(0.25);
  z-index: -5;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease;
  transform: translateZ(0);
}

#detail-bg-image.active {
  opacity: 1;
  visibility: visible;
}

/* HELLER MODUS FÜR BILD-HINTERGRUND */
body.light-mode #detail-bg-image {
  filter: blur(40px) brightness(0.95);
}

body.light-mode #detail-bg-image.active {
  opacity: 0.35;
  /* Deutlich stärkere Farben im hellen Modus */
}

/* ======================================================== */
/* BILD-POSITIONIERUNG (Karusell & Grid)                    */
/* ======================================================== */
img.align-top {
  object-position: top !important;
}

img.align-bottom {
  object-position: bottom !important;
}

img.align-center {
  object-position: center !important;
}

/* Duplicate rule removed (#4) — already defined above at line ~2580 */

/* ======================================================== */
/* BACK TO GALLERY BUTTON                                   */
/* ======================================================== */
#back-to-gallery {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-bronze);
  cursor: pointer;
  padding: 10px 20px;
  transition:
    transform var(--t-fast),
    color var(--t-fast),
    text-shadow var(--t-fast);
  text-decoration: none;
}

#back-to-gallery:hover {
  color: var(--accent-warm);
  transform: translateY(-2px);
  text-shadow: 0 0 10px var(--accent-bronze-soft);
}

body.light-mode #back-to-gallery:hover {
  color: var(--accent-bronze);
}

/* ======================================================== */
/* REDUCED MOTION: Accessibility & Performance              */
/* ======================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .landing-screen {
    animation: none !important;
  }

  .landing-screen::before {
    animation: none !important;
  }
}

/* Duplicate .art-ripple removed (#4) — consolidated into single definition above */

/* ========================================= */
/* BLUR-UP EFFECT (PROGRESSIVE LOADING)      */
/* ========================================= */
.image-container img {
  filter: blur(20px);
  transition: filter 1s var(--ease-smooth);
}

.image-container img.loaded {
  filter: blur(0px);
}

/* ========================================= */
/* HEADER RIGHT ACTIONS (THEME & LANG)       */
/* ========================================= */
.header-actions-right {
  position: fixed;
  right: 5vw;
  top: 4.6rem;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 10001;
  transition:
    top 0.4s ease,
    transform 0.4s ease;
}

.main-header.scrolled .header-actions-right {
  top: 2rem; /* Matches burger menu exactly */
}

.lang-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  padding: 5px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s ease;
}

.premium-theme-toggle {
  transition:
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.4s ease;
}

.premium-theme-toggle:hover {
  color: #d4be98 !important; /* Luxuriöses Gold beim Hovern im Header */
}

body.light-mode .premium-theme-toggle:hover {
  color: #a68a5e !important; /* Satteres Gold im Light Mode */
}

.lang-toggle:hover {
  transform: scale(1.1);
}

.lang-text {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ========================================= */
/* LANGUAGE TOGGLE MOBILE OPTIMIZATION       */
/* ========================================= */
@media (max-width: 1024px) {
  .header-actions-right {
    top: 4rem; /* Aligns exactly with burger menu center on mobile */
    gap: 0.6rem;
  }

  .main-header.scrolled .header-actions-right {
    top: 2rem; /* Aligns with scrolled burger menu on mobile */
  }

  /* Symmetrie mit dem linken Burger-Menü */
  #lang-toggle-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
  }

  #lang-toggle-btn .lang-icon-svg {
    display: block !important;
    width: 26px !important;
    height: 26px !important;
  }

  #lang-toggle-btn .lang-text {
    position: absolute !important;
    top: 56% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 0.5rem !important; /* Kleinerer Text passend zur kleinen Kamera */
  }
}

.view-folder-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ========================================= */
/* ARABIC LANGUAGE SUPPORT (RTL & FONT)      */
/* ========================================= */

body.lang-ar {
  font-family: "Cairo", sans-serif;
  font-size: 1.15rem; /* Etwas größer als Basis */
  line-height: 1.9;
}

body.lang-ar .nav-link,
body.lang-ar .hero-title,
body.lang-ar .hero-subtitle,
body.lang-ar .section-title,
body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4 {
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  letter-spacing: 0 !important;
}

/* Kleine Labels — vorher 0.82rem (zu klein), jetzt lesbar */
body.lang-ar .item-category,
body.lang-ar .hero-label,
body.lang-ar .link-editorial,
body.lang-ar .footer-copyright,
body.lang-ar .legal-link,
body.lang-ar .lang-text,
body.lang-ar .view-toggle-btn {
  font-size: 0.95rem !important;
  font-weight: 700;
  letter-spacing: 0 !important;
}

body.lang-ar .nav-link {
  font-size: 1rem !important;
  letter-spacing: 0 !important;
}

body.lang-ar .about-content p,
body.lang-ar #detail-description p {
  font-size: 1.2rem;
  line-height: 2;
  text-align: justify;
}

body.lang-ar .hero-copy {
  font-size: 1.15rem;
  line-height: 1.9;
}

/* Extra Abstände für arabische Typografie, da die Buchstaben höher sind */
body.lang-ar .hero-section {
  gap: 1.8rem;
}

body.lang-ar .hero-title {
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

/* Catch-all: kein arabischer Text kleiner als 0.9rem */
body.lang-ar * {
  font-family: "Cairo", sans-serif;
}

/* Faden-Animation ausblenden, wenn das Burgermenü (.mobile-menu-toggle.active) geöffnet ist */
body:has(.mobile-menu-toggle.active) #faden-canvas {
  opacity: 0 !important;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

/* ========================================= */
/* THE SURREALIST WEB EXPERIENCE: SPOTLIGHT  */
/* ========================================= */
.gallery-item .image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  background: radial-gradient(
    400px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(194, 163, 115, 0.7),
    transparent 40%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.gallery-item:hover .image-container::after {
  opacity: 1;
}

.gallery-item .image-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(194, 163, 115, 0.15),
    transparent 40%
  );
  z-index: 9;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  mix-blend-mode: color-dodge;
}

.gallery-item:hover .image-container::before {
  opacity: 1;
}

/* ========================================= */
/* THE SURREALIST WEB EXPERIENCE: GOLD TEXT  */
/* ========================================= */
.hero-title,
.section-title {
  color: #d4be98; /* Ein extrem edles, mattes Champagner-Gold (Modern Luxury) */
}

body.light-mode .hero-title,
body.light-mode .section-title {
  color: #a68a5e; /* Ein satteres, tieferes Mattgold für optimalen Kontrast auf Weiß */
}

/* ========================================= */
/* DESKTOP 90% SCALING (IMAGES STAY 100%)    */
/* ========================================= */
@media (min-width: 1025px) {
  html,
  body {
    font-size: 14.4px; /* Skaliert das UI auf exakt 90% (16px * 0.9) */
  }
}

/* ============================================ */
/* MOBILE SCROLL PERFORMANCE                    */
/* ============================================ */
@media (max-width: 768px) {
  /* 1. Lighter backdrop-filter on mobile — blur is the biggest GPU hog */
  .main-header,
  .main-header.scrolled {
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    /* No will-change here — fixed elements already stay on their own layer */
    will-change: auto !important;
  }

  /* 4. Disable pointer ripple animation on mobile (reduces repaints) */
  .art-ripple {
    display: none !important;
  }

  /* 5. Reduce transition cost on scroll-reveal items */
  .scroll-reveal,
  .scroll-reveal-item {
    transition-duration: 0.5s !important;
  }
}
