/* Grundfarben & Variablen */
:root {
  --bg:#0f1111;
  --nav:#131614;
  --ink:#e9ecef;
  --yellow:#ffe500;

  --gap: clamp(16px, 3vw, 28px);
  --header-h: 84px; /* Höhe der fixen Header-Navi */
  --proj-offset: 28px; /* <- NEU: zusätzlicher Abstand unter dem Header */
  --proj-top-space: 120px; /* NEU: Abstand zur vorherigen Section */
  --proj-nav-h: 40px; 
}

/* Basis */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Bitcount Grid Single", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.35;
  overflow-x: hidden;
}




/* Loader (vollständig, inkl. Fade-Out) */
.loader{
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--bg);
  z-index: 9999;
  opacity: 1;
  transition: opacity 420ms ease, visibility 420ms ease;
}
.loader.is-hidden{
  opacity: 0;
  visibility: hidden;
}
.loader-box { text-align: center; }
.loader-title{
  font-weight: 400;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.loader-dots{
  font-weight: 300;
  font-size: clamp(18px, 2.4vw, 22px);
  min-height: 1.2em;
}

/* Hintergrundformen */
.bg-scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.yellow-ellipse, .yellow-rect {
  position: absolute; background: var(--yellow); filter: blur(60px); opacity: 0.85;
}

.yellow-ellipse,
.yellow-rect { will-change: transform; }


.yellow-ellipse {
  width: 58vw; height: 58vw; max-width: 900px; max-height: 900px;
  border-radius: 50% 45% 50% 55% / 55% 45% 60% 40%;
  right: 6vw; top: 12vh;
}
.yellow-rect {
  width: 38vw; height: 22vw; max-width: 700px; max-height: 420px;
  left: -8vw; bottom: 12vh; border-radius: 24px;
}
.blur-layer {
  position: absolute; inset: 0;
  background: rgba(19,22,20,0.35);
  -webkit-backdrop-filter: blur(80px);
  backdrop-filter: blur(80px);
}

/* Fixe Header-Navigation */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px;
  background: rgba(19,22,20,0.8); /* #131614 @ 80% */
  z-index: 10;
}
.brand { font-weight: 300; letter-spacing: 0.5px; white-space: nowrap; }
.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 300; }
.main-nav a:hover { text-decoration: underline; }

/* Hero */
.hero { padding-top: var(--header-h); }
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: end;
}
.portrait { margin: 0; align-self: end; position: relative; }
.portrait img { width: 100%; height: auto; border-radius: 6px; display: block; }

.hero-copy {
  position: relative; display: flex; flex-direction: column;
  justify-content: space-between; height: 100%;
}
.tag-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px; font-weight: 300;
  align-self: flex-start;
}
.name-block { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; margin-top: auto; }
.name { margin: 0 0 6px 0; font-size: clamp(42px, 7vw, 72px); line-height: 0.95; font-weight: 500; }
.about-link { display: inline-block; color: var(--ink); text-decoration: none; font-weight: 400; margin-top: 6px; }
.about-link:hover { text-decoration: underline; }

/* Platzhalter-Abschnitte */
.content-spacer { height: 110vh; }

/* Projects Section (reines Damping H-Scroll, 3 Cards sichtbar) */
.projects-section{
  position: relative; z-index: 1; width: 100vw;
  padding-top: var(--proj-top-space);
  min-height: calc(100vh + var(--hscroll-extra, 0px));
  
  
}

/* Tabs transparent, sticky direkt unter Header */
.proj-nav{
  position: sticky; top: calc(var(--header-h) + var(--proj-offset));
  z-index: 6;
  margin: 0; padding: 10px 16px 6px 16px;
  display: flex; gap: 18px 22px; align-items: center;
  background: transparent; backdrop-filter: none;
  pointer-events: auto;
}
.proj-tab{
  appearance: none; background: none; border: 0; padding: 6px 0;
  font: inherit; color: var(--ink); cursor: pointer; font-weight: 300; white-space: nowrap; position: relative;
}
.proj-underline{
  position: absolute; left: 16px; bottom: 0;
  height: 3px; background: var(--ink); border-radius: 2px;
  width: 0; transform: translateX(0);
  transition: transform 220ms cubic-bezier(.22,.61,.36,1), width 220ms cubic-bezier(.22,.61,.36,1);
  will-change: transform, width;
}

/* Pin-Container bleibt im Viewport */
.projects-pin{
  position: sticky; top: calc(var(--header-h) + var(--proj-offset));
  height: calc(100vh - var(--header-h) - var(--proj-offset));
  display: grid; z-index: 2;
}

/* Scroller: volle Breite, 3 Cards, KEIN Snap */
.card-scroller{
  width: 100vw; height: 100%;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100vw - (2 * var(--gap))) / 3);
  gap: var(--gap);
  overflow: hidden;          /* horizontale Bewegung rein per JS */
  padding: 0 var(--gap);
  align-items: center;
  /* Snap explizit deaktiviert */
  scroll-snap-type: none;
  position: relative;
  z-index: 2;
}

/* Cards: schlankes Seitenverhältnis, Hover-Overlay für alle */
.card{
  position: relative; aspect-ratio: 16 / 10;
  border-radius: 28px; overflow: hidden;
  background: rgba(19,22,20,0.75);
  box-shadow: 0 24px 40px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.06);
  /* Snap explizit aus */
  scroll-snap-align: none;
}
.card img{ width:100%; height:100%; object-fit:cover; display:block; }

.card .card-overlay{
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between;
  padding: clamp(16px,3vw,24px); color: var(--ink);
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 70%);
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity 200ms ease;
}
.card:hover .card-overlay{ opacity: 1; }

/* Responsiv */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 900px){
  .card-scroller{ grid-auto-columns: calc((100vw - var(--gap)) / 2); }
}
@media (max-width: 560px){
  .site-header { padding: 12px 16px; }
  .brand { font-size: 14px; }
  .main-nav a { font-size: 14px; }
  .card-scroller{ grid-auto-columns: calc(100vw - (2 * var(--gap))); }
}


/* Projektseite Ergänzung */
.project-page {
  position: relative;
    font-family: "Bitcount Grid Single", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  z-index: 1;
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 120px;
  max-width: 1100px;
  margin: 0 auto;
  color: var(--ink);
}

.project-hero {
  display: grid;

  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  margin-bottom: 60px;
}

.project-image img {
  width: 100%;
  border-radius: 22px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.project-title h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin: 0 0 12px;
  font-weight: 500;
}

.project-subtitle {
  font-size: clamp(18px, 2vw, 22px);
  opacity: 0.8;
}

.project-body {
  display: grid;
  gap: clamp(28px, 4vw, 48px);
}

.project-text h2 {
  margin-top: 0;
  font-weight: 400;
}

.project-text p {
  max-width: 700px;
  font-weight: 300;
  line-height: 1.6;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.project-gallery img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.4s ease;
}
.project-gallery img:hover {
  transform: scale(1.04);
}

.project-meta {
  font-size: 15px;
  opacity: 0.85;
  line-height: 1.6;
}

.project-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
}
.project-navigation a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 300;
  transition: color 0.25s ease;
}
.project-navigation a:hover {
  color: var(--yellow);
}

/* Responsiv */
@media (max-width: 800px) {
  .project-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .project-title h1 {
    font-size: clamp(32px, 8vw, 56px);
  }
}


