/* =====================================================
   1. LOKALE VARIABLEN (Farb-Definitionen für Home)
   ===================================================== */
:root {
  --c-black: #000000;
  --c-white: #ffffff;
  --c-white-muted: rgba(255, 255, 255, 0.7);
  --c-white-border: rgba(255, 255, 255, 0.3);
  --c-black-overlay: rgba(0, 0, 0, 0.8);
  --c-btn-dark: rgba(27, 27, 27, 0.85);
}

/* =====================================================
   2. HERO — Video Background
   ===================================================== */
.hero {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  overflow: hidden;
  z-index: 1;
}

.hero__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero__word {
  position: relative;
  z-index: 1;
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(96px, 22vw, 360px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--c-white);
  mix-blend-mode: difference;
}

/* =====================================================
   3. CONTENT OVERLAP (Startseite)
   ===================================================== */
.content-overlap {
  position: relative;
  z-index: 10;
  margin-top: -40vh;
  padding: 30vh 0 80px 0;
  background: linear-gradient(
    to bottom,
    rgba(27, 27, 27, 0) 0%,
    var(--c-bg) 40vh,
    var(--c-bg) 100%
  );
}

/* =====================================================
   4. PROJEKTE SLIDER
   ===================================================== */
.projects {
  margin-top: -40vh;
  padding: 80px 0;
  position: relative;
  z-index: 10;
  background: linear-gradient(to top, var(--c-black) 20%, transparent 100%);
}

.projects__header {
  padding: 0 4vw;
  margin-bottom: 24px;
}

.projects__title {
  font-family: var(--ff-display);
  font-size: clamp(24px, 3vw, 40px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--c-white);
}

.projects__slider-wrapper {
  position: relative;
}

.projects__track {
  display: flex;
  gap: 16px;
  padding: 0 4vw 20px 4vw;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 4vw;
  scrollbar-width: none;
}

.projects__track::-webkit-scrollbar {
  display: none;
}

.projects__track::after {
  content: "";
  flex: 0 0 1vw;
}

.project-card {
  position: relative;
  flex: 0 0 clamp(280px, 35vw, 550px);
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--c-fg);
  display: block;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.project-card:hover img {
  transform: scale(1.05);
}

.project-card__title {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 20px 20px;
  background: linear-gradient(to top, var(--c-black-overlay), transparent);
  color: var(--c-white);
  font-family: var(--ff-display);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1;
}

.projects__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--c-btn-dark);
  color: var(--c-white);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.25s var(--ease);
  z-index: 10;
}

.projects__btn:hover {
  background: var(--c-accent);
}

.projects__btn--prev {
  left: 1vw;
}
.projects__btn--next {
  right: 1vw;
}

/* Progress Bar unter dem Slider */
.projects__progress {
  width: calc(
    100% - 8vw
  ); /* Exakt so breit wie die Karten abzüglich Seitenabstand */
  margin: 32px auto 0; /* Abstand nach oben zum Slider, mittig zentriert */
  height: 3px; /* Sehr feine, edle Linie */
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.projects__progress-bar {
  height: 100%;
  width: 0%; /* Wird über JS gesteuert */
  background: var(--c-white);
  border-radius: 2px;
  will-change: width;
}
/* =====================================================
   5. ÜBER MICH / STUDIO TEASER
   ===================================================== */
.about {
  background: var(--c-black);
  color: var(--c-white);
  padding: 10vh 4vw;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.about__title {
  font-family: var(--ff-display);
  font-size: clamp(32px, 5vw, 64px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
}

.about__columns {
  display: grid;
  grid-template-columns: 3.5fr 6.5fr;
  gap: 60px;
  align-items: end;
}

.about__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  overflow: hidden;
  background: var(--c-fg);
}

.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    filter 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.about__portrait:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.about__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

.about__text {
  font-size: clamp(16px, 1.5vw, 24px);
  line-height: 1.5;
  color: var(--c-white-muted);
  margin: 0;
  max-width: 600px;
}

.about__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 1px solid var(--c-white-border);
  border-radius: 40px;
  color: var(--c-white);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.05em;
  transition: all 0.3s var(--ease);
}

.about__btn:hover {
  background: var(--c-accent);
  color: var(--c-black);
  border-color: transparent;
}

/* =====================================================
   6. PORTRAIT / BILD (Optionales Standalone-Bild)
   ===================================================== */
.portrait {
  background: var(--c-black);
  padding: 0 4vw 10vh 4vw;
}

.portrait__wrapper {
  width: 100%;
  aspect-ratio: 21 / 9;
  border-radius: 4px;
  overflow: hidden;
  background: var(--c-fg);
}

.portrait__wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition:
    filter 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}

.portrait__wrapper:hover img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

/* =====================================================
   7. SCHREIB MIR SEKTION
   ===================================================== */
.contact {
  background: var(--c-black);
  padding: 15vh 4vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact__sub {
  color: var(--c-accent);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.contact__huge-link {
  font-family: var(--ff-display);
  font-size: clamp(50px, 11vw, 200px);
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--c-white);
  display: inline-block;
  transition:
    color 0.4s var(--ease-out),
    transform 0.4s var(--ease-out);
}

.contact__huge-link:hover {
  color: var(--c-white-muted);
  transform: scale(1.02);
}

/* =====================================================
   8. FOOTER
   ===================================================== */
.footer {
  background: var(--c-black);
  padding: 40px 4vw 60px 4vw;
  border-top: 1px solid var(--c-white-border);
  display: flex;
  justify-content: center;
}

.footer__content {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__link {
  color: var(--c-white-muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s var(--ease);
}

.footer__link:hover {
  color: var(--c-white);
}

/* =====================================================
   FARBBALKEN TRENNER (Scroll-gekoppelt)
   ===================================================== */
.color-bars {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  background: var(--c-black);
}

.color-bars span {
  display: block;
  width: 100%;
  height: 4vh;
  min-height: 20px;
  /* Start-Position: Links draußen */
  transform: translateX(-100%);

  /* Nur eine winzige Glättung, damit es am Mausrad hängt, ohne zu stottern */
  transition: transform 0.1s ease-out;
}

/* Der mittlere Balken startet rechts draußen */
.color-bars span:nth-child(2) {
  transform: translateX(100%);
}

/* =====================================================
   9. MEDIA QUERIES (Gebündelt für Mobile)
   ===================================================== */
@media (max-width: 900px) {
  .projects__btn {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Hero Padding anpassen, damit es auf kleinen Screens nicht zu eng wird */
  .hero {
    padding: 20px;
    height: 80vh;
  }

  /* Über mich: Stapelt Bild und Text untereinander (aus deinem Code) */
  .about {
    gap: 32px;
    padding: 10vh 4vw;
  }

  .about__columns {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about__portrait {
    aspect-ratio: 4 / 5;
  }

  /* Portrait Wrapper (aus deinem Code) */
  .portrait__wrapper {
    aspect-ratio: 4 / 5;
  }

  /* Schreib mir und Footer Abstände für Mobile leicht reduzieren */
  .contact {
    padding: 10vh 4vw;
  }

  .footer {
    padding: 30px 4vw 40px 4vw;
  }

  .projects__header {
    margin-bottom: 12px;
  }
  .projects__progress {
    margin: 0px auto 0;
  }

  /* Die starr bleibende Gradienten-Maske für den Reveal-Effekt */
  .about__content {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0) 100%);
  }
}
