:root {
  --black: #000;
  --white: #fff;
  --grey: #cdcdcd;
  --spacer-s: 8px;
  --spacer-m: 48px;
  --spacer-l: 96px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
}

body {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 14px;
  line-height: 1.1;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}

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

/* ── Fixed header ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--spacer-s);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 100;
  letter-spacing: -0.01em;
  font-weight: 900;
  background: var(--white);
  border-bottom: 1px solid var(--black);
}

.home .site-header {
  background: transparent;
  border-bottom: none;
}

.site-header nav {
  order: -1;
  font-size: 12px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.site-header span {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: min(3.2vw, 60px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-header a {
  position: relative;
  z-index: 1;
}

.site-header a:hover {
  opacity: 0.5;
}

/* ── Project list — homepage ── */
main {
  padding: var(--spacer-s);
  padding-top: calc(var(--spacer-m) + var(--spacer-m));
}

.project-list {
  list-style: none;
}

/* Each project row */
.thumb {
  display: block;
}

.thumb .title {
  width: fit-content;
}

.thumb .title a {
  display: block;
  color: var(--black);
  text-decoration: none;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

.thumb .title a.sub {
  margin-top: 0;
}

.thumb .title a:hover {
  opacity: 1;
}

.thumb .title .sub {
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.thumb .title .name {
  display: block;
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Full-screen background image on hover — 2050.plus pattern */
.background-image {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-color: #111;
  z-index: -1;
  pointer-events: none;
}

.thumb .title:hover ~ .background-image {
  display: block;
}

.thumb .title:hover ~ .background-image.bg-alt {
  animation: bg-alt-cycle 6s step-start infinite;
}

@keyframes bg-alt-cycle {
  0%, 49% { opacity: 0; }
  50%, 100% { opacity: 1; }
}

.thumb[hidden] {
  display: none;
}

/* ── Filter + service pages ── */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-bottom: calc(var(--spacer-s) * 3);
  font-weight: 900;
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.filter a {
  color: rgba(0, 0, 0, 0.4);
}

.filter a:hover,
.filter a.active {
  color: var(--black);
}

.service-text {
  max-width: 540px;
  margin-bottom: var(--spacer-m);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* ── Footer ── */
footer {
  padding: var(--spacer-s);
  padding-top: var(--spacer-m);
  font-weight: 900;
  font-size: 12px;
  line-height: 1.1;
  color: rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

footer a {
  color: inherit;
}

footer a:hover {
  color: var(--black);
}

/* ── Impressum / Datenschutz ── */
.about-content h2 {
  margin-top: 2em;
  margin-bottom: 0.5em;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

/* ── Project pages ── */
.page-placeholder {
  padding: var(--spacer-s);
  padding-top: calc(var(--spacer-m) + var(--spacer-m));
}

.page-about {
  padding: var(--spacer-s);
  padding-top: calc(var(--spacer-m) + var(--spacer-m));
  display: grid;
  grid-template-columns: 2fr 3fr;
  grid-template-areas:
    "title title"
    "meta  portrait";
  column-gap: var(--spacer-m);
}

.page-about .project-title { grid-area: title; }
.page-about .project-meta  { grid-area: meta; }
.about-portrait {
  grid-area: portrait;
  width: 100%;
  height: auto;
  display: block;
  align-self: start;
}

.page-project {
  padding: var(--spacer-s);
  padding-top: calc(var(--spacer-m) + var(--spacer-m));
  display: grid;
  grid-template-columns: 2fr 3fr;
  grid-template-areas:
    "title title"
    "meta  gallery";
  column-gap: var(--spacer-m);
}

.project-title {
  grid-area: title;
  margin-bottom: var(--spacer-m);
}

.project-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  gap: var(--spacer-m);
}

.project-description {
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.project-info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 24px;
  font-size: 14px;
  letter-spacing: -0.01em;
  line-height: 1.4;
  align-content: start;
}

.project-info dt {
  color: rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.project-info dd {
  margin: 0;
}

.project-info dd a {
  text-decoration: underline;
}

.project-nav {
  margin-bottom: var(--spacer-m);
  letter-spacing: -0.01em;
}

.project-nav a:hover {
  opacity: 0.5;
}

.project-title h1 {
  font-family: Arial, sans-serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.gallery {
  grid-area: gallery;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacer-s);
  align-content: start;
}

.gallery img:first-child {
  grid-column: 1 / -1;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── About / CV ── */
.about-portrait {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
  margin-bottom: var(--spacer-m);
}

.about-content {
  font-size: 14px;
  line-height: 1.4;
  max-width: 540px;
  letter-spacing: -0.01em;
}

.about-content p {
  margin-bottom: 1em;
}

/* WIP note */
.wip-note {
  margin-top: var(--spacer-s);
  font-size: 12px;
  color: rgba(0, 0, 0, 0.4);
}

/* ── Mobile ── */
@media (min-width: 1000px) {
  .project-title h1 {
    font-size: 4.3vw;
  }
}

@media (max-width: 700px) {
  .page-project {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "meta"
      "gallery";
  }

  .page-about {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "portrait"
      "meta";
  }

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

  .gallery img:first-child {
    grid-column: auto;
  }

  .project-title h1 {
    font-size: 22px;
  }
}
