@font-face {
  font-family: 'Nomo 600';
  src: url('assets/fonts/nomo-600.ttf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --grid-cols: 10;
  --footer-height: calc(9pt * 1.2);
  --imprint-max-height: 480px;
}

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: 'Nomo 600', sans-serif;
  margin: 0;
  font-size: 9pt;
  background: transparent;
  scrollbar-width: none;

}

body::-webkit-scrollbar {
  display: none;
}

body.project {
  overscroll-behavior-x: none;
}

body a {
  color: #000;
  text-decoration: none;
}

p {
  display: block;
  margin-block-start: 0;
  margin-block-end: 0;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  unicode-bidi: isolate;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.header {
  position: fixed;
  top: 30px;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: 20px;
  padding: 0 20px;
  z-index: 100;
  color: white;
  transform: translateZ(0);
}

.header .name {
  text-decoration: none;
  background-color: white;
  color: black;
  grid-column: 1/4;
  transition: background-color 0.6s ease, color 0.6s ease;
}

.header .menu {
  grid-column: 4/11;
}

.header .menu ul {
  /* Breite eines einzelnen main-grid-Tracks innerhalb der 7 lokalen
     "Spalten", die .menu (Hauptspalten 4–10) abdeckt */
  --tw: calc((100% - 6 * 20px) / 7);

  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.menu-item {
  flex-grow: 0;
  flex-shrink: 0;
  transition: flex-basis 0.6s ease;
}

.header--projects .menu-item--projects {
  flex-basis: calc(6 * var(--tw) + 5 * 20px);
}

.header--projects .menu-item--about {
  flex-basis: var(--tw);
}

.header--about .menu-item--projects {
  flex-basis: calc(2 * var(--tw) + 1 * 20px);
}

.header--about .menu-item--about {
  flex-basis: calc(5 * var(--tw) + 4 * 20px);
}

.header .menu ul li a {
  display: block;
  text-decoration: none;
  background-color: white;
  color: black;
  transition: background-color 0.6s ease, color 0.6s ease;
}

body.about .header .name,
body.imprint .header .name {
  background-color: black;
  color: white;
}

body.about .header .menu ul li a,
body.imprint .header .menu ul li a {
  background-color: black;
  color: white;
}

/* ── Main Layout ─────────────────────────────────────────────────────────── */

.main {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: 20px;
  padding: 0 20px;
}

/* ── Random Background ───────────────────────────────────────────────────── */

.random-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.random-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ── About ───────────────────────────────────────────────────────────────── */

.about-text {
  padding: 70px 0 0 0;
  grid-column: 1 / 4;
  grid-row: 1;
}

.about-text p {
  margin-top: 20;
}

.about-text p:first-child {
  margin-top: 0;
}

.about-text a {
  color: inherit;
  text-decoration: none;
}

.about-text a:hover {
  background: black;
  color: white;
}

.about-cv {
  margin: 60px 0 0 0;
  grid-column: 6 / 11;
  display: flex;
  flex-direction: column;
  gap: 20px;
  grid-row: 1;
}

.about-cv {
  height: calc(100vh - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.about-cv::-webkit-scrollbar {
  display: none;
}

.cv-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  column-gap: 20px;
  row-gap: 2px;
}

.cv-category {
  grid-column: 1 / 5;
  background: black;
  color: white;
}

.cv-section--textonly .cv-year {
  background: none;
}

.cv-text {
  grid-column: 1 / 4;
  background: white;
  color: black;
}

.cv-text a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.cv-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  column-gap: 20px;
  grid-column: 1 / 5;
}

.cv-row--linked:hover {
  background: black;
}

.cv-row--linked:hover .cv-year,
.cv-row--linked:hover .cv-text {
  background: transparent;
  color: white;
}

.cv-row--linked:hover .cv-text a {
  color: white;
}

.cv-year {
  grid-column: 4 / 5;
  background: white;
  color: black;
  text-align: right;
}

.cv-clients {
  padding-bottom: 20px;
}

.imprint-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(30px + var(--footer-height) + 20px);
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  grid-template-rows: 100%;
  column-gap: 20px;
  padding: 0 20px;
  height: 1.4em;
  overflow: hidden;
  pointer-events: none;
  transition: height 0.5s ease;
}

.imprint-bar.is-open {
  height: min(60vh, var(--imprint-max-height, 480px));
}

.imprint-col {
  grid-column: 1 / 4;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.imprint-bar.is-open .imprint-col {
  grid-column: 1 / 6;
}

.imprint-toggle {
  all: unset;
  cursor: pointer;
  display: block;
  flex: 0 0 auto;
  color: inherit;
  background: white;
}

.imprint-toggle-close {
  display: none;
}

.imprint-bar.is-open .imprint-toggle-open {
  display: none;
}

.imprint-bar.is-open .imprint-toggle-close {
  display: inline;
}

.imprint-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  margin-top: 20px;
  padding-bottom: 20px;
}

.imprint-content::-webkit-scrollbar {
  display: none;
}


/* ── Projektliste (Index + Projektseite) ─────────────────────────────────── */

.project-list {
  grid-column: 1 / 11;
  list-style-type: none;
  margin: 0;
  padding: 70px 0 0 0;

}

.project-details {
  display: none;
}

body.project .project-list-item.is-current .project-details {
  display: grid;
  grid-column: 1 / 11;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: 20px;
  background: transparent;
  color: black;
  padding: 20px 0 0 0;
  opacity: 0;
  will-change: opacity;
  animation: fadeInDetails 0.4s ease 0.2s forwards;
  align-items: start;
}

@keyframes fadeInDetails {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.project-details .project-nav {
  grid-column: 10;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: transparent;
}

.project-details .project-nav .project-prev,
.project-details .project-nav .project-next {
  background: white;
  flex: 1;
}

.project-details .project-nav .project-next {
  text-align: right;
}

.project-details .project-text-wrap {
  grid-column: 1/3;
}

.project-text-wrap .project-text,
.project-text-wrap .project-meta {
  background: transparent;
}

.project-text p {
  background: white;
  margin: 0;
  padding: 0;
}

.project-text p+p {
  margin-top: 2px;
}

.project-text p:empty,
.project-text p:blank {
  background: white;
  height: 0.8em;
  margin-top: 4px;
  margin-bottom: 4px;
}

.project-text p.is-empty {
  background: white;
  height: 1.2em;
  margin-top: 2px;
  margin-bottom: 2px;
}

.project-meta-block {
  margin-top: 20px;
}

.project-meta-line {
  display: grid;
  grid-template-columns: 1fr 2fr;
  column-gap: 2px;
  min-height: 1.2em;
}

.project-meta-label,
.project-meta-value {
  background: white;
}

.project-meta-block+.project-meta-block {
  margin-top: 2px;
}

.project-meta-divider {
  height: 0;
  margin: 2px 0;
}

.project-list-row {
  all: unset;
  color: white;
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: 20px;
  row-gap: 20px;
  padding: 0 0 20px;
  width: 100%;
  cursor: pointer;
}

.project-list-row:hover {
  mix-blend-mode: normal;
  color: black;
}

.project-list-title {
  grid-column: 1/4;
}

.project-list-client {
  grid-column: 4/7;
}

.project-list-field {
  grid-column: 7/10;
}

.project-list-date {
  grid-column: 10;
  text-align: right;
}

.project-list-title,
.project-list-client,
.project-list-field,
.project-list-date {
  grid-row: 2;
  position: relative;
  z-index: 1;
}

.project-list-item {
  margin-right: 0px;
}

.project-list-title::before,
.project-list-client::before,
.project-list-field::before,
.project-list-date::before {
  content: "";
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  z-index: -1;
}

.project-list-row:hover .project-list-title::before,
.project-list-row:hover .project-list-client::before,
.project-list-row:hover .project-list-field::before,
.project-list-row:hover .project-list-date::before {
  opacity: 1;
}

.project-list-item {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), 1fr);
  column-gap: 20px;
}

.project-list-item .project-list-row {
  grid-column: 1 / 11;
}

.project-list-item .project-details {
  grid-column: 1 / 11;
}

/* ── Hover-Vorschau (Index) ──────────────────────────────────────────────── */

.project-preview-list {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.project-main-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity;
}

.project-main-image--mobile {
  display: none;
}

/* ── Projektseite: Body ──────────────────────────────────────────────────── */

body.project {
  overflow-x: hidden;
  overflow-y: scroll;
}

/* ── Projektliste auf Projektseiten ─────────────────────────────────────── */

body.project .project-list {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  padding: 0 20px;
  list-style: none;
  margin: 0;
  z-index: 10;
  pointer-events: none;
  transform: translateZ(0);
}

body.project .project-list-item {
  opacity: 0;
  pointer-events: none;
}

body.project .project-list-item.is-current {
  opacity: 1;
  pointer-events: auto;
}

body.project .project-list-item.is-current .project-list-row {
  color: black;
  cursor: default;
}

body.project .project-list-item.is-current .project-list-title::before,
body.project .project-list-item.is-current .project-list-client::before,
body.project .project-list-item.is-current .project-list-field::before,
body.project .project-list-item.is-current .project-list-date::before {
  opacity: 1;
  background: white;
}

/* ── Prev/Next (Projektseite) ────────────────────────────────────────────── */

body.project .project-list-item.is-current .project-prev,
body.project .project-list-item.is-current .project-next {
  display: block;
}

.project-prev,
.project-next {
  display: none;
}

.project-prev a,
.project-next a {
  display: block;
  color: black;
  background-color: white;
}

/* ── Horizontale Galerie ─────────────────────────────────────────────────── */

.project-gallery {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  z-index: -1;
}

.project-gallery img.project-gallery-hero,
.project-gallery video.project-gallery-hero {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

.project-gallery img:not(.project-gallery-hero),
.project-gallery video:not(.project-gallery-hero) {
  flex: 0 0 auto;
  height: 100vh;
  width: auto;
  object-fit: contain;
}

.project-gallery-mobile-cover {
  display: none;
}

.project-gallery--mobile {
  display: none;
}

/* ── Footer Ticker ───────────────────────────────────────────────────────── */

.footer-ticker {
  position: fixed;
  bottom: 30px;
  width: 100%;
  font-size: inherit;
}

.footer-ticker-inner {
  width: calc(100% - 40px);
  margin: 0 auto;
  background: black;
  overflow: hidden;
}

.footer-ticker-track {
  display: block;
  white-space: nowrap;
  color: white;
  text-decoration: none;
}

.ticker-text {
  display: inline-block;
  line-height: 1.2;
  padding: 0;
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}


/* ── Impressum ─────────────────────────────────── */

.imprint-text {
  grid-column: 1 / 11;
  padding: 70px 0 0 0;
}

.imprint-text p,
.imprint-content p {
  margin: 0;
}

.imprint-text p+p,
.imprint-content p+p {
  margin-top: 2px;
}

.imprint-text p.is-empty,
.imprint-content p.is-empty {
  height: 1.2em;
  margin-top: 2px;
  margin-bottom: 2px;
}

/* ── MOBILE ──────────────────--------───────────────────────────────────── */

@media (max-width: 768px) {

  /* ── Mobile: Header ─────────────────────────────────────────────────────── */
  .header {
    grid-template-columns: repeat(4, 1fr);
  }

  .header .name {
    grid-column: 1 / 3;
  }

  .header .menu {
    grid-column: 3 / 5;
  }

  .header--projects .menu-item--projects,
  .header--projects .menu-item--about,
  .header--about .menu-item--projects,
  .header--about .menu-item--about {
    flex-basis: calc((100% - 20px) / 2);
    transition: none;
  }

  /* ── Mobile: List ─────────────────────────────────────────────────────── */

  :root {
    --grid-cols: 4;
  }

  .project-list {
    grid-column: 1 / 5;
  }

  .project-list-item .project-list-row {
    grid-column: 1 / 5;
  }

  .project-list-client,
  .project-list-field {
    display: none;
  }

  .project-list-title {
    grid-column: 1 / 4;
  }

  .project-list-date {
    grid-column: 3 / 5;
  }

  .project-list-item.is-preview-active .project-list-row {
    color: black;
  }

  .project-list-item.is-preview-active .project-list-title::before,
  .project-list-item.is-preview-active .project-list-date::before {
    opacity: 1;
  }

  /* ── Mobile: Project ─────────────────────────────────────────────────────── */

  body.project .project-list-client,
  body.project .project-list-field {
    display: block;
    grid-column: 1 / 5;
  }

  .project-list-title {
    grid-column: 1 / 4;
    z-index: 2;
  }

  body.project .project-list-client {
    grid-row: 3;
  }

  body.project .project-list-field {
    grid-row: 4;
  }

  body.project .project-list {
    position: static;
    padding: 0;
    transform: none;
  }

  body.project .project-list-item.is-current .project-details {
    grid-column: 1 / 5;
    padding-top: 0;
    row-gap: 20px;
  }

  .project-details {
    padding-top: 0;
    row-gap: 20px;
  }

  .project-details .project-text-wrap {
    grid-column: 1 / 5;
  }

  .project-details .project-nav {
    grid-column: 1 / 5;
  }

  .project-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    flex-direction: column;
    overflow: hidden;
    z-index: -1;
  }

  .project-gallery img,
  .project-gallery video {
    width: 100% !important;
    height: auto !important;
    height: auto !important;
    flex: 0 0 auto !important;
    object-fit: fill !important;
  }

  .project-gallery--desktop {
    display: none;
  }

  .project-gallery--mobile {
    display: flex;
  }

  .project-main-image--desktop {
    display: none;
  }

  .project-main-image--mobile {
    display: block;
  }

  /* ── Mobile: About ────────────────────────────────────────────────────── */

  .about-text {
    grid-column: 1 / 5;
    grid-row: 1;
  }

  .about-cv {
    grid-column: 1 / 5;
    grid-row: 2;
    padding-top: 20px;
    height: auto;
    overflow-y: visible;
    margin: 0;
  }

  .imprint-col {
    grid-column: 1 / 5;
  }


  .imprint-bar.is-open .imprint-col {
    grid-column: 1 / 5;
  }

  .cv-year {
    grid-column: 1 / 3;
    text-align: left;
  }

  .cv-text {
    grid-column: 3 / 5;
  }

  .imprint-bar {
    position: static;
    grid-column: 1 / 5;
    grid-row: 3;
    height: auto;
    padding: 0;
    padding-bottom: 60px;
    overflow: visible;
  }

  .imprint-bar.is-open {
    height: auto;
  }

  .imprint-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding-bottom 0.5s ease;
    margin-top: 0;
    padding-bottom: 0;
  }

  .imprint-bar.is-open .imprint-content {
    max-height: none;
    overflow: visible;
    margin-top: 20px;
    padding-bottom: calc(var(--footer-height) + 40px);
    -webkit-overflow-scrolling: touch;
  }

}