* {
  box-sizing: border-box;
}

html, body {
  overscroll-behavior-x: none !important;
}

a,
a:visited,
a:hover,
a:active {
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
}

img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

/* 1. STANDARDFARBEN (HELL / LIGHT MODE) */
body {
  --bg-color: #ffffff;
  --text-color: #111111;
  --header-bg: rgba(255, 255, 255, 0.96);
  --header-text: #111111;
  --nav-inactive: #777777;
  --nav-active: #000000;
  --text-sub: #333333;
  --controls-color: #888888;

  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

body.dark-mode {
  --bg-color: #0d0d0d;
  --text-color: #ffffff;
  --header-bg: rgba(13, 13, 13, 0.96);
  --header-text: #ffffff;
  --nav-inactive: #666666;
  --nav-active: #ffffff;
  --text-sub: #cccccc;
  --controls-color: #777777;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 60px;
  scroll-padding-bottom: 45px;
}

/* 3. FIXIERTER HEADER */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  border-bottom: 1px solid rgba(125, 125, 125, 0.15);
}

.header-left h1 {
  margin: 0;
  font-size: clamp(0.85rem, 1.2vw, 0.95rem);
  letter-spacing: clamp(1.5px, 0.4vw, 3px);
  text-transform: uppercase;
  font-weight: 400;
  color: var(--header-text);
  white-space: nowrap;
}

.brand-link {
  color: inherit;
  text-decoration: none !important;
}

/* HAUPTMENÜ (DESKTOP) */
.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  margin: 0 15px;
}

.nav-link {
  color: var(--nav-inactive);
  text-decoration: none !important;
  font-family: inherit;
  font-size: clamp(0.78rem, 1.15vw, 0.88rem);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 300;
  opacity: 0.45;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              color 0.3s ease, 
              opacity 0.3s ease, 
              font-weight 0.3s ease;
  padding: 4px 0;
  display: inline-block;
  transform-origin: center center;
}

.nav-link:hover {
  color: var(--nav-active);
  opacity: 0.8;
}

.nav-link.active {
  color: var(--nav-active);
  font-weight: 700;
  opacity: 1;
  transform: scale(1.15);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--nav-active);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 10px;
  font-weight: 600;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--controls-color);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 6px 8px;
  transition: color 0.3s ease;
}

.control-btn:hover {
  color: var(--nav-active);
}

.control-divider {
  color: var(--controls-color);
  opacity: 0.3;
}

/* 4. FIXIERTER FOOTER */
footer.fixed-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 45px;
  background-color: var(--bg-color) !important;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000 !important;
  font-size: 0.72rem;
  opacity: 0.95;
  letter-spacing: 1px;
  border-top: 1px solid rgba(125, 125, 125, 0.2);
  color: var(--text-color);
}

footer.fixed-footer p {
  margin: 0;
}

/* 5. HAUPT-CONTAINER & SEKTIONEN */
.slot-container {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding-top: 60px;
  padding-bottom: 45px;
}

.slot-item {
  width: 100%;
  height: calc(100vh - 105px);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 25px 20px 15px 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.slot-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* 6. FIXIERTE SUB-TAB MENÜLEISTE */
.sub-tab-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  height: 35px;
  margin-bottom: 20px;
  flex-shrink: 0;
  flex-wrap: wrap;
  position: relative;
  z-index: 100;
}

.sub-tab-btn {
  background: none;
  border: none;
  color: var(--controls-color);
  font-family: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
  text-transform: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: all 0.3s ease;
  opacity: 0.65;
  position: relative;
  z-index: 101;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.sub-tab-btn:hover {
  opacity: 1;
  color: var(--nav-active);
}

.sub-tab-btn.active {
  color: var(--nav-active);
  opacity: 1;
  font-weight: 600;
  border-bottom: 1px solid var(--nav-active);
}

.tab-divider {
  color: var(--controls-color);
  opacity: 0.3;
  font-size: 0.6rem;
}

.tab-panel {
  display: none;
  width: 100%;
  flex: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  overflow-y: auto;
  scrollbar-width: none;
}

.tab-panel::-webkit-scrollbar {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 5px;
  opacity: 1;
}

/* 7. HORIZONTALE BILDERGALERIE */
.horizontal-gallery {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 40px;
  scroll-behavior: smooth;
  touch-action: pan-x pan-y;
  width: 100%;
  max-width: 1300px;
  min-height: 400px;
  align-items: center;

  overscroll-behavior-x: none !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.horizontal-gallery::-webkit-scrollbar {
  display: none;
}

.horizontal-gallery img {
  height: 395px;
  max-height: 55vh;
  width: auto;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: border-color 0.4s ease;
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="%23ffffff" stroke-width="8"/></svg>') 10 10, pointer;
}

body.dark-mode .horizontal-gallery img {
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 8. STANDARD TEXT-WRAPPER */
.text-wrapper {
  max-width: 850px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 20px;
  color: var(--text-sub);
  line-height: 1.7;
  font-size: 0.93rem;
  font-weight: 300;
  max-height: 60vh;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: none;
}

.text-wrapper::-webkit-scrollbar {
  display: none;
}

/* EXKLUSIVER CV- & WERDEGANG-WRAPPER */
.text-wrapper.cv-wrapper {
  max-width: 800px;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* MEHRSPALTEN-TEXT (EXKLUSIV FÜR SEKTION "TEXT" - FESTE HOEHE AUF DESKTOP) */
.text-wrapper.text-multi-column {
  max-width: 1150px;
  width: 100%;
  height: 52vh !important;
  column-count: 3 !important;
  column-gap: 40px;
  column-rule: 1px solid rgba(125, 125, 125, 0.15);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.text-wrapper p {
  margin-top: 0;
  margin-bottom: 1.1rem;
}

#kontakt .text-wrapper {
  overflow-x: hidden !important;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.lang-en-active .lang-de {
  display: none !important;
}

body:not(.lang-en-active) .lang-en {
  display: none !important;
}

.text-italic {
  font-style: italic;
}

/* 9. PERSON & LEGAL */
.person-profile-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 650px;
  margin: 10px auto 0 auto;
  text-align: left;
  padding: 0 15px;
}

.person-profile-card img {
  width: auto !important;
  max-width: 240px !important;
  height: 310px !important;
  object-fit: cover !important;
  border-radius: 2px;
  border: 1px solid var(--controls-color);
  flex-shrink: 0;
}

.person-facts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.6;
  font-weight: 300;
}

.person-facts h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--nav-active);
}

.person-subtitle,
.person-info-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 300;
}

.person-subtitle {
  color: var(--controls-color);
}

.person-info-text {
  color: var(--text-sub);
  opacity: 0.85;
}

/* 11. CV LIST (WERDEGANG & NETZWERK) */
.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.cv-list li {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 25px;
  line-height: 1.65;
  font-size: 0.88rem;
  align-items: baseline;
  margin-bottom: 14px;
  width: 100%;
}

.cv-year {
  font-weight: 600;
  color: var(--nav-active);
  text-align: right;
}

.cv-text {
  color: var(--text-sub);
}

/* 12. AUSSTELLUNGEN (3-SPALTEN-GRID) */
.exhibition-list {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.exhibition-list li {
  display: grid;
  grid-template-columns: 90px 1fr 110px;
  gap: 20px;
  line-height: 1.8;
  font-size: 0.88rem;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(125, 125, 125, 0.12);
}

.exhibition-year {
  font-weight: 600;
  color: var(--nav-active);
  text-align: right;
}

.exhibition-title {
  color: var(--text-sub);
}

.exhibition-location {
  text-align: right;
  opacity: 0.65;
  font-size: 0.82rem;
}

/* 13. KONTAKT BUTTON */
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  border: 1px solid var(--controls-color);
  color: var(--text-sub);
  text-decoration: none !important;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  background: transparent;
}

.contact-button:hover {
  border-color: var(--nav-active);
  color: var(--nav-active);
  background: rgba(125, 125, 125, 0.1);
}

.contact-icon {
  width: 17px !important;
  height: 17px !important;
  stroke: currentColor;
  flex-shrink: 0;
}

/* 14. LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  z-index: 3000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

body.dark-mode .lightbox {
  background-color: rgba(13, 13, 13, 0.95);
}

.lightbox-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-content {
  max-width: 100%;
  max-height: calc(90vh - 40px);
  object-fit: contain;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
  cursor: default;
  border: 1px solid transparent;
}

body.dark-mode .lightbox-content {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7);
}

.lightbox-caption {
  margin-top: 12px;
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text-color);
  opacity: 0.6;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 35px;
  color: var(--text-color);
  font-size: 36px;
  font-weight: 300;
  cursor: pointer;
  z-index: 3002;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 48px;
  font-weight: 200;
  cursor: pointer;
  padding: 20px;
  z-index: 3001;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.lightbox-nav:hover { opacity: 1; }
.lightbox-nav.prev { left: 15px; }
.lightbox-nav.next { right: 15px; }

/* GALERIE HOVER PFEILE (DESKTOP) */
.gallery-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.gallery-nav svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  stroke-width: 2.2;
  fill: none;
}

.gallery-wrapper:hover .gallery-nav {
  opacity: 1;
  pointer-events: auto;
}

.gallery-nav.prev { left: 15px; }
.gallery-nav.next { right: 15px; }

/* BACK TO TOP BUTTON */
#back-to-top {
  position: fixed;
  bottom: 60px;
  right: 25px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 1px solid var(--controls-color);
  color: var(--controls-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1900;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

#back-to-top.visible {
  opacity: 0.85;
  visibility: visible;
}

#back-to-top:hover {
  opacity: 1;
  color: var(--nav-active);
  border-color: var(--nav-active);
}

.top-icon {
  width: 18px;
  height: 18px;
}

/* ==========================================
   MOBILE OPTIMIERUNG (SMARTPHONES)
   ========================================== */
@media (max-width: 850px) {
  html {
    scroll-snap-type: none !important;
  }

  .fixed-header {
    padding: 0 15px;
  }

  .main-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: inline-block;
  }

  .main-nav.mobile-open {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2500;
    gap: 22px;
    margin: 0;
    padding: 30px;
  }

  .main-nav.mobile-open .nav-link {
    font-size: 1.1rem;
    letter-spacing: 2px;
    opacity: 0.7;
  }

  .main-nav.mobile-open .nav-link.active {
    opacity: 1;
    transform: scale(1.1);
  }

  .slot-container {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .slot-item {
    height: auto !important;
    min-height: auto !important;
    padding: 35px 12px 50px 12px;
    border-bottom: 1px solid rgba(125, 125, 125, 0.12);
  }

  .slot-content {
    height: auto !important;
  }

  .sub-tab-bar {
    height: auto;
    margin-bottom: 15px;
    gap: 8px;
  }

  .sub-tab-btn {
    font-size: 0.82rem;
    padding: 3px 6px;
  }

  .horizontal-gallery {
    padding: 5px 10px;
    gap: 12px;
    min-height: auto;
  }

  .horizontal-gallery img {
    height: 260px;
    max-height: 45vh;
  }

  .gallery-nav { display: none !important; }

  .person-profile-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .person-profile-card img {
    max-width: 180px !important;
    height: 230px !important;
  }

  /* Mobil IMMER flexibel untereinander! */
  .text-wrapper,
  .text-wrapper.text-multi-column,
  .text-wrapper.cv-wrapper {
    column-count: 1 !important;
    column-rule: none !important;
    height: auto !important;
    max-height: none !important;
    padding: 5px 12px;
    text-align: left;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .cv-list li {
    grid-template-columns: 1fr;
    gap: 2px;
    margin-bottom: 16px;
  }

  .cv-year {
    text-align: left;
    font-size: 0.85rem;
    opacity: 0.9;
  }

  .exhibition-list li {
    grid-template-columns: 70px 1fr auto;
    gap: 10px;
  }

  .exhibition-year {
    text-align: left;
  }

  /* KORREKTE MOBIL-ZENTRIERUNG DES FOOTERS */
  footer.fixed-footer {
    padding: 0 15px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  footer.fixed-footer p {
    text-align: center !important;
    font-size: 0.65rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    width: 100% !important;
  }
}