/* =============================================================
   Tabea Reifenschweiler – Portfolio
   ============================================================= */
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Neue Haas Grotesk'; src: url('fonts/NeueHaasDisplayRoman.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Neue Haas Grotesk'; src: url('fonts/NeueHaasDisplayMediu.ttf') format('truetype'); font-weight: 500; font-display: swap; }

* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; }
body { -webkit-font-smoothing: antialiased; }

/* ---------- Desktop: SVG-Gerüst + Karussell-Overlays ---------- */
.page { position: relative; width: 100%; margin: 0 auto; background: #fff; }
.chrome { display: block; width: 100%; height: auto; }

.carousel-wrap {
  position: absolute;
  left: calc(var(--l) * 1%); top: calc(var(--t) * 1%);
  width: calc(var(--w) * 1%); height: calc(var(--h) * 1%);
}
.carousel { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.track { display: flex; height: 100%; gap: 1.2%; }
/* Desktop: Transform-Karussell – zuverlässig genau 1 Bild pro Klick */
.carousel-wrap:not(.m-car) .track {
  transition: transform .45s cubic-bezier(.4, 0, .2, 1); will-change: transform;
}
/* Mobil: nativer Finger-Scroll */
.m-car .track {
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.m-car .track::-webkit-scrollbar { display: none; }
.slide { position: relative; height: 100%; flex: 0 0 auto; scroll-snap-align: start; }
.slide img { height: 100%; width: auto; display: block; -webkit-user-drag: none; user-select: none; }

/* Play-Icon (Video-Slide): weißes Dreieck */
.slide.video .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 22px 0 22px 38px;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
  pointer-events: none;
}

/* Kreis-Pfeile: weißer Kreis, halb über dem Bildrand, Pfeil mittig, ganzer Kreis klickbar */
.arrow {
  position: absolute; top: 50%; z-index: 5;
  width: clamp(32px, 2.6vw, 44px); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 0; border-radius: 50%;
  color: #1D1D1B; cursor: pointer; padding: 0;        /* kein Schatten */
}
.arrow svg { width: 52%; height: 52%; display: block; }
.arrow.prev { left: 0;  transform: translate(-50%, -50%); }
.arrow.next { right: 0; transform: translate(50%, -50%); }
.arrow.prev svg { transform: scaleX(-1); }   /* Basispfeil zeigt rechts -> prev spiegeln (zeigt links) */

.hot { position: absolute; display: block; z-index: 6; cursor: pointer; }

/* Video-Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; padding: 4vw; }
body.lb-open { overflow: hidden; }
body.lb-open .lightbox { display: flex; }
.lb-frame { width: min(92vw, 158vh); aspect-ratio: 16 / 9; }
.lb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.lb-close { position: absolute; top: 14px; right: 22px; background: transparent; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }

/* ---- Desktop-Projektblock (HTML statt SVG) – Bachelorarbeit ----
   Alle Maße in vw, damit der Block exakt wie das SVG-Layout mitskaliert. */
.proj-desk { display: block; width: 100%; margin: 0 0 4vw; }
.proj-desk .carousel-wrap {
  position: relative; left: auto; top: auto;
  width: 83.04vw; height: 19.9vw; margin: 0 auto 2.6vw;
}
.pd-title {
  margin: 0 0 1.15vw; padding-left: 15.5vw;
  font-family: 'Neue Haas Grotesk', -apple-system, sans-serif; font-weight: 400;
  text-transform: uppercase; font-size: 1.38vw; letter-spacing: 0.005em; color: #000;
}
.pd-cols { position: relative; padding-left: 15.5vw; }
.pd-desc {
  margin: 0; width: 33.5vw;
  font-family: 'Neue Haas Grotesk', -apple-system, sans-serif; font-size: 0.82vw;
  line-height: 1.14; color: #000;
}
.pd-meta {
  position: absolute; top: 0.1vw; left: 57.6vw; right: 16.5vw; margin: 0;
  display: grid; grid-template-columns: 7.1vw 1fr; row-gap: 0.05vw;
  font-family: 'Neue Haas Grotesk', -apple-system, sans-serif; font-size: 0.82vw; line-height: 1.14;
}
.pd-meta dt {
  font-family: 'IBM Plex Mono', monospace; font-size: 0.68vw; text-transform: uppercase;
  letter-spacing: 0.03em; color: #000; padding-top: 0.04vw;
}
.pd-meta dd { margin: 0; color: #000; }
.pd-meta .pd-gap { margin-top: 0.9vw; }

/* Mobil-Container im Desktop verstecken */
#mobile { display: none; }

/* ===================== MOBIL (<768px) ===================== */
@media (max-width: 767px) {
  body[data-page] .page { display: none; }
  .proj-desk { display: none; }        /* Desktop-HTML-Block aus, Mobil nutzt #mobile-list */
  #mobile { display: block; }

  /* Kopf mit Burger */
  .m-head {
    position: relative; display: flex; align-items: center; justify-content: space-between;
    padding: 20px; font-family: 'IBM Plex Mono', monospace;
  }
  .m-head .brand { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.02em; color: #000; text-decoration: none; }
  .m-burger {
    width: 34px; height: 26px; background: transparent; border: 0; padding: 0; cursor: pointer;
    display: grid; align-content: space-between; z-index: 30;
  }
  .m-burger span { display: block; height: 2px; width: 100%; background: #000; transition: transform .25s, opacity .2s; }
  body.nav-open .m-burger span:nth-child(1) { transform: translateY(12px) rotate(45deg); }
  body.nav-open .m-burger span:nth-child(2) { opacity: 0; }
  body.nav-open .m-burger span:nth-child(3) { transform: translateY(-12px) rotate(-45deg); }

  /* Overlay-Menü */
  #m-nav {
    position: fixed; inset: 0; z-index: 20; background: #fff;
    display: flex; flex-direction: column; justify-content: center; gap: 26px;
    padding: 40px; transform: translateY(-100%); transition: transform .3s var(--ease, ease);
    font-family: 'IBM Plex Mono', monospace;
  }
  body.nav-open #m-nav { transform: translateY(0); }
  #m-nav a { color: #000; text-decoration: none; text-transform: uppercase; font-size: 1.5rem; letter-spacing: 0.02em; }
  #m-nav a[aria-current="page"] { text-decoration: underline; }

  .m-proj { padding: 26px 20px 8px; }
  .carousel-wrap.m-car {
    position: relative; left: auto; top: auto;
    width: 100%; height: 42vw; min-height: 200px; max-height: 280px; margin-bottom: 16px;
  }
  .m-car .arrow { display: none; }   /* mobil: Finger-Scroll, keine Pfeile */

  .m-proj h2 {
    font-family: 'IBM Plex Mono', monospace; font-weight: 400; text-transform: uppercase;
    font-size: 1.35rem; letter-spacing: 0.02em; margin: 0 0 12px;
  }
  .m-desc {
    font-family: 'Neue Haas Grotesk', -apple-system, sans-serif; font-size: 1rem; line-height: 1.45;
    margin: 0 0 18px; color: #000;
  }
  .m-meta {
    display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0 0 8px;
    font-family: 'Neue Haas Grotesk', -apple-system, sans-serif; font-size: 0.92rem; line-height: 1.35;
  }
  .m-meta dt { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #000; padding-top: 2px; }
  .m-meta dd { margin: 0; color: #000; }
}
