/* =======================
   BASE
======================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #111;
  outline-offset: 3px;
}

/* =======================
   TOPBAR (immer klickbar)
======================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  border-bottom: 1px solid #111;
}

.topbar__inner {
  height: 64px;
  padding: 0 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 16px;
  font-weight: 500;
}

/* =======================
   NAV (Desktop)
======================= */
.nav {
  display: flex;
  gap: 34px;
  align-items: center;
}

.navlink {
  font-size: 14px;
  font-weight: 500;
}

/* =======================
   BURGER
======================= */
.burger {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  margin: -8px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 10000;
  pointer-events: auto;
}

.burger span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 2px;
  background: #111;
  transition: transform 200ms ease, opacity 200ms ease;
}

.burger span:nth-child(1) {
  top: 14px;
}

.burger span:nth-child(2) {
  top: 19px;
}

.burger span:nth-child(3) {
  top: 24px;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* =======================
   PAGE
======================= */
.page {
  padding: 0 56px 80px;
  max-width: 100%;
}

#about,
#contact,
#impressum {
  scroll-margin-top: 84px;
}

/* =======================
   PROJECT LIST (Startseite)
======================= */
.projects {
  margin-top: 56px;
  display: grid;
  gap: 64px;
}

/* ✅ Breite passt sich dem Screen an */
.project--row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 48px;
  align-items: center;
  width: 100%;
}

.project__text {
  margin-left: 0;
  padding-left: 40px;
}

.project__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
}

.project__meta {
  margin: 0;
  font-size: 14px;
  color: #9a9a9a;
}

.project__title-link:hover .project__title {
  text-decoration: underline;
}

/* =======================
   MEDIA WRAP + HOVER/TAP SWAP (Startseite)
======================= */
.project__media-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #fff;
}

.project__media {
  position: absolute;
  inset: 0;
}

.project__open-link {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 5;
}

.project--hover .project__media>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: opacity 180ms ease-in-out;
}

.project--hover .img-default {
  opacity: 1;
}

.project--hover .img-hover {
  opacity: 0;
}

@media (hover: hover) {
  .project__open-link {
    display: block;
    pointer-events: auto;
    cursor: pointer;
  }

  .project--hover .project__media-wrap:hover .img-default {
    opacity: 0;
  }

  .project--hover .project__media-wrap:hover .img-hover {
    opacity: 1;
  }
}

@media (hover: none) {
  .project__open-link {
    display: none;
  }

  .project--hover .project__media-wrap:active .img-default {
    opacity: 0;
  }

  .project--hover .project__media-wrap:active .img-hover {
    opacity: 1;
  }
}

/* =======================
   TEXT BLOCKS
======================= */
.block {
  margin-top: 80px;
  margin-left: 40px;
  max-width: 720px;
}

.block__title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.block__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

/* ABOUT */
#about {
  max-width: none;
  display: grid;
  grid-template-columns: 320px 1fr;
  column-gap: 28px;
  row-gap: 10px;
  align-items: start;
  margin-left: 40px;
}

#about .block__title {
  grid-column: 1 / -1;
}

#about img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: top;
  background: #fff;
}

#about .block__text {
  max-width: 54ch;
}


.gallery {
  margin-top: 56px;
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
}


.gallery__img {
  width: 100%;
  max-width: 100%;
  height: auto;

  display: block;
}


.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 16px;
  width: 100%;
  max-width: 100%;
}



@media (max-width: 900px) {

  .topbar__inner,
  .page {
    padding: 0 18px;
  }


  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    padding: 22px 18px 28px;

    transform: translateY(-120%);
    transition: transform 240ms ease;

    z-index: 9998;
    pointer-events: none;
  }

  .nav.is-open {
    transform: translateY(0);
    pointer-events: auto;
    border-bottom: 1px solid #111;

  }

  .navlink {
    font-size: 16px;
    width: 100%;
    text-align: left;
  }


  .project--row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project__text {
    padding-left: 0;
  }

  .project__media-wrap {
    aspect-ratio: 4 / 3;
  }


  #about {
    grid-template-columns: 1fr;
    row-gap: 12px;
    margin-left: 0;
  }

  .block {
    margin-left: 0;
    max-width: 100%;
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }
}


.navlink:hover,
.site-title:hover {
  color: #d40000;
}

.gallery--single .gallery__img {
  width: 100%;
  max-width: 100%;
  height: min(80vh, 720px);
  object-fit: contain;
  object-position: center;
  display: block;
  background: #fff;
}

.gallery--single .single-frame {
  width: 100%;
  aspect-ratio: 16 / 9;

  background: #fff;
  position: relative;
}

.gallery--single .single-frame__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;

  object-position: center;
}

.gallery--single .single-frame {
  width: 100%;
  aspect-ratio: 16 / 9;

  background: #fff;
  position: relative;
}

.gallery--single .single-frame__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;

  object-position: center;
}

@media (max-width: 900px) {
  .gallery--single .single-frame {
    aspect-ratio: 4 / 3;
  }
}