@font-face {
  font-family: "ABCRepro";
  src: url("../fonts/ABCRepro-Regular-Trial.otf") format("woff");
  font-weight: normal;
  font-style: normal;
}
html,
body {
  background: #fff;
  color: #121212;
  z-index: 1;
  font-family: "ABCRepro", sans-serif;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: -0.02em;
  line-height: 1.25;
  padding: 0;
  margin: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


a,
button,
input,
label {
  cursor: pointer;
}

*,
*:after,
*:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}

ul,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* --- Layout & Header --- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 100;
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.logo img {
  width: 100px;
  filter: invert(1);
}

.site-title {
  font-family: "ABCRepro", sans-serif;
  font-size: 22px;
  font-weight: normal;
  text-decoration: none;
  color: #121212;
  line-height: 0.8; /* Richtet den Text direkt bündig an der oberen Kante des a-Tags aus */
  display: inline-block;
  vertical-align: top;
  transition: opacity 0.3s ease;
}

.site-title:hover {
  opacity: 0.5;
}

.plus-icon {
  font-family: sans-serif;
  font-size: 40px; /* Altes großes Kreuz */
  font-weight: 300;
  line-height: 0.5; /* Zieht das Kreuz ganz nach oben an die Kante des a-Tags */
  text-decoration: none;
  color: #121212;
  display: inline-block;
  vertical-align: top;
  transition: opacity 0.3s ease;
}

.plus-icon:hover {
  opacity: 0.5;
}

/* --- Home Portfolio Feed --- */
body.template-home {
  overflow: hidden; /* Swiper handles the scrolling, disable default vertical scroll */
  background: #f4f4f4;
}

.portfolio-feed-swiper {
  width: 100vw;
  height: 100vh;
}


.portfolio-feed-swiper .swiper-wrapper {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.portfolio-item {
  width: 100%;
  height: 100%; 
  position: relative;
  overflow: hidden;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.portfolio-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.portfolio-project-title {
  position: absolute;
  top: 20px;
  left: 20px;
  margin: 0;
  font-size: 1.5rem;
  font-weight: normal;
  color: #fff;
  z-index: 10;
  mix-blend-mode: difference;
  pointer-events: none;
}

.portfolio-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* --- Project Detail Page --- */
body.template-project {
  overflow: hidden;
  background: #fff;
  color: #121212;
}

.project-gallery-swiper {
  width: 100vw;
  height: 100vh;
}

.project-slide {
  margin: 0;
  width: 100%;
  height: 100%;
  padding: 5%; /* Symmetrisches Padding für perfekte Zentrierung */
  background: #fff; /* Wichtig für sauberes Fading */
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.project-slide-content {
  position: relative; /* Für absolute Positionierung des Indicators */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0; /* Erlaubt dem Bild, kleiner zu schrumpfen als sein intrinsic size */
}

.project-slide img {
  max-width: 100%;
  max-height: 100%; /* Verhindert, dass das Bild zu hoch wird */
  min-height: 0;
  flex: 0 1 auto;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

.project-slide-indicator {
  margin-top: 6px; /* Abstand zwischen Bild und Text */
  flex: 0 0 auto; /* Behält feste Höhe */
  font-family: "ABCRepro", sans-serif;
  font-size: 16px;
  color: #121212; /* Schwarz */
  text-align: center;
  pointer-events: none; /* Blockiert keine Klicks */
}

.project-text-slide {
  background: #fff;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100vh !important;
  width: 100% !important;
  padding: 0 !important;
}

.project-info {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left; /* Mittelachsial zentriert */
  font-family: "TimesKMKHA";
  font-variant-alternates: "ss01" 2;
}

.project-info p {
  font-size: 19pt;
  margin: 0 0 15px 0;
}

.project-text {
  font-size: 14pt;
  color: #121212;
}

.project-text p {
  margin-bottom: 1.5rem;
}

/* Entfernt überschüssigen Rand unten, der das vertikale Zentrieren verfälscht */
.project-info > :last-child,
.project-text > *:last-child {
  margin-bottom: 0;
}

/* --- Index Page Table --- */
.template-index {
  background: #fff;
  color: #121212;
  overflow-y: auto; /* Erlaube Scrollen auf der Indexseite */
}

.index-page-container {
  padding: 96px 16px 60px 16px; /* Platz für den fixierten Header oben lassen */
  width: 100%;
  min-height: 100vh;
}

.index-content {
  max-width: 100%;
  margin: 0 auto;
}

.index-intro {
  font-family: "ABCRepro", sans-serif;
  font-size: 14pt;
  margin-bottom: 50px;
}

.index-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 Spalten auf dem Desktop */
  gap: 96px;
  align-items: center; /* Zentriert unterschiedlich hohe Bilder vertikal in der Reihe */
}

.index-tile {
  position: relative;
  display: block;
  text-decoration: none;
  color: #121212;
}

.index-tile-image {
  width: 100%;
  height: auto; /* Originales Seitenverhältnis */
  display: block;
  background: #f0f0f0;
  transition: opacity 0.3s ease; /* Weicher Übergang für den Hover */
}

.index-tile-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
}

.index-tile-info {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  opacity: 0; /* Unsichtbar im Normalzustand */
  font-family: "ABCRepro", sans-serif;
  font-size: 16px;
  text-align: center;
  color: #121212;
  pointer-events: none; /* Klicks gehen durch zum Bild/Link */
  transition: opacity 0.3s ease;
}

/* Hover Effekte */
.index-tile:hover .index-tile-image {
  opacity: 0.2; /* Bild verblasst, damit man den Text gut lesen kann */
}

.index-tile:hover .index-tile-info {
  opacity: 1; /* Text blendet ein */
}

@media (max-width: 1024px) {
  .index-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 Spalten auf Tablets */
    gap: 8vw;
  }
}

@media (max-width: 768px) {
  .index-grid {
    grid-template-columns: 1fr; /* 1 Spalte auf Handys */
    gap: 28vw;
  }
}

/* --- About Page --- */
.template-about {
  color: #121212;
  overflow-y: auto;
}

.about-container {
  padding: 224px 16px 0px 16px; /* Platz für Header oben */
  min-height: 100vh;
  box-sizing: border-box;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.about-tabs-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 0px;
  padding-bottom: 36px;
}

.about-tabs-nav .tab-btn {
  background: none;
  border: none;
  font-family: "ABCRepro", sans-serif;
  font-size: 36px;
  letter-spacing: -0.02em;
  color: #121212;
  cursor: pointer;
  padding: 0;
  opacity: 0.3;
  transition: opacity 0.3s ease, color 0.3s ease;
}

.about-tabs-nav .tab-btn.active {
  opacity: 1;
}

.about-tabs-nav .tab-btn:hover {
  color: #121212;
  opacity: 1;
}

.tab-pane {
  display: none;
  font-family: "ABCRepro", sans-serif;
  font-size: 36px;
  color: #121212;
}

.tab-pane p {
  margin-bottom: 1.25em; /* Genau eine leere Zeile Abstand */
  margin-top: 0;
}

.tab-pane.active {
  display: block;
}

.about-bio {
  font-family: "ABCRepro", sans-serif;
  font-size: 22px;
  color: #121212;
  margin-top: 88px; /* 45px Höhe der Tab-Navigation + 36px padding-bottom = 81px */
}

.about-bio p {
  margin-bottom: 1.25em; /* Genau eine leere Zeile Abstand */
  margin-top: 0;
}

/* Responsivität für About Page */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .about-tabs-nav .tab-btn {
    font-size: 35px;
  }

  .about-bio {
    font-size: 20px;
  }

  .tab-pane {
    font-size: 35px;
  }
}

/* --- Progressive Image Lazy Loading (Blur-up Effect) --- */
.progressive-wrapper {
  position: relative;
  overflow: hidden;
  display: block;
  background: #f4f4f4; /* Subtle loading background */
}

.progressive-wrapper .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(15px);
  transform: scale(1.1); /* Prevents blurred edges from leaking */
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.8s ease-in-out;
  display: block;
}

.progressive-wrapper .full-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: block;
}

.progressive-wrapper .full-img.loaded {
  opacity: 1;
}

/* Specific adjustment for index grid items (using original aspect ratio) */
.index-tile-image.progressive-wrapper {
  width: 100%;
  height: auto;
  display: block;
  background: #f0f0f0;
  transition: opacity 0.3s ease;
}

/* Specific adjustment for project detail slider items */
.project-slide-image-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  max-height: calc(100% - 25px); /* Leave room for indicator text */
  flex: 0 1 auto;
  margin: 0 auto;
}

/* Ensure absolute containment layout for project slider image wrapper children */
.project-slide-image-wrapper img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  object-fit: contain !important;
}

/* Responsivität für mobile Kacheln und Slides (max-width: 768px) */
@media (max-width: 768px) {
  /* Index Page: Paddings nach Format */
  .index-tile {
    box-sizing: border-box;
  }
  .index-tile.is-portrait {
    padding: 0 12vw;
  }
  .index-tile.is-square {
    padding: 0 8vw;
  }
  .index-tile.is-landscape {
    padding: 0 4vw;
  }
  .index-tile.is-landscape.is-full-bleed {
    padding: 0;
  }

  /* Projekt-Detailseite: Paddings nach Format */
  .project-slide {
    box-sizing: border-box;
  }
  .project-slide.is-portrait {
    padding-left: 12vw !important;
    padding-right: 12vw !important;
  }
  .project-slide.is-square {
    padding-left: 8vw !important;
    padding-right: 8vw !important;
  }
  .project-slide.is-landscape {
    padding-left: 4vw !important;
    padding-right: 4vw !important;
  }
  .project-slide.is-landscape.is-full-bleed {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Ensure the indicator doesn't touch the screen edge on full bleed */
  .project-slide-indicator {
    padding: 0 4vw;
    box-sizing: border-box;
  }
}