body {
  --nav-h: 4.5rem;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: "Syne", sans-serif;
}

a {
  color: #4d7cff;
  font-weight: bold;
  text-decoration: none;
}

header,
footer {
  position: sticky;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: #000;
}

header {
  top: 0;
  height: var(--nav-h);
  box-sizing: border-box;
  border-bottom: 1px solid #222;
}

header a {
  color: #fff;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

footer {
  bottom: 0;
  padding: 1.5rem 2rem;
  border-top: 1px solid #222;
  font-size: 0.9rem;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: #888;
}

.footer-contact a {
  font-weight: normal;
  font-style: italic;
  color: inherit;
}

main {
  position: relative;
  flex: 1;
}

#threads {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* OGL sizes the canvas with inline px styles from clientWidth, which iOS Safari
   can measure short during address-bar layout, leaving a gap. Force full fill. */
#threads canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

main.page {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  box-sizing: border-box;
}

.page-header {
  position: sticky;
  top: var(--nav-h);
  z-index: 5;
  background: #000;
  padding: 3rem 0 1rem;
  border-bottom: 1px solid #222;
}

.page-title {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.filters {
  display: flex;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.filters input {
  display: none;
}

.filters label {
  cursor: pointer;
  padding: 0.4rem 1rem;
  border: 1px solid #222;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #888;
}

.filters input:checked + label {
  color: #000;
  background: #fff;
  border-color: #fff;
}

.page:has(#f-logistik:checked) .project:not(.logistik),
.page:has(#f-ehandel:checked) .project:not(.ehandel) {
  display: none;
}

.project {
  padding: 2rem 0;
  border-top: 1px solid #222;
}

.project h2 {
  margin: 0 0 1rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project p {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: #ccc;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes reveal {
      from { opacity: 0; transform: translateY(1.5rem); }
      to   { opacity: 1; transform: none; }
    }
    .project {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 45%;
    }
  }
}
