/* ==========================================================================
   Portfolio: Stylesheet
   Startseite: grosse Bühne mit Foto + Riesenschrift (Anlehnung marcuslorenzet.com)
   Struktur, Light Mode, Projektseiten (Anlehnung product.inc)
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("../assets/fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../assets/fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../assets/fonts/literata.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Literata"; src: url("../assets/fonts/literata-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f3ee;
  --bg-elev: #fbfaf7;
  --card: #ffffff;
  --ink: #15140f;
  --ink-2: #3a3832;
  --muted: #69655b;
  --faint: #bcb7ab;
  --border: #e2ded4;
  --border-strong: #cdc8bc;
  --accent: #ff5a1f;
  --accent-text: #b8430f;
  --on-ink: #f5f3ee;
  --dock-bg: #15140f;
  --dock-fg: #eae0c8;
  --shadow: 0 1px 0 rgba(21, 20, 15, 0.04), 0 30px 60px -30px rgba(21, 20, 15, 0.22);

  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
  --serif: "Literata", Georgia, "Times New Roman", serif;

  --gutter: 16px;
  --max: 1280px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #11100d;
  --bg-elev: #171612;
  --card: #1b1a16;
  --ink: #eae0c8;
  --ink-2: #d0c5ab;
  --muted: #a39b88;
  --faint: #4a463d;
  --border: #2b2923;
  --border-strong: #3d3a32;
  --accent: #ff7a45;
  --accent-text: #ff9466;
  --on-ink: #11100d;
  --dock-bg: #eae0c8;
  --dock-fg: #15140f;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* Projektfarbe: ersetzt das Orange innerhalb eines Projekts (Karte, Projektseite).
   --p-accent kommt aus "accent" in content.js; für Text wird sie abgedunkelt bzw. im Dark Mode aufgehellt. */
.has-accent {
  --accent: var(--p-accent);
  --accent-text: color-mix(in oklab, var(--p-accent) 72%, #000);
}
[data-theme="dark"].has-accent, [data-theme="dark"] .has-accent {
  --accent: color-mix(in oklab, var(--p-accent) 82%, #fff);
  --accent-text: color-mix(in oklab, var(--p-accent) 62%, #fff);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { width: 100%; max-width: calc(720px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.wide { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: var(--on-ink); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.accent { color: var(--accent-text); }
.link { text-decoration: underline; text-decoration-style: dashed; text-decoration-color: var(--border-strong); text-underline-offset: 4px; transition: text-decoration-color 0.2s; }
.link:hover { text-decoration-color: currentColor; }

.label {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
}
.h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--mono); font-size: 12px; padding: 5px 10px; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev); color: var(--ink-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font-size: 15px; font-weight: 500;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn-ghost { border-color: var(--border-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Scroll-Fortschritt ---------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 90; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  max-width: var(--max); margin-inline: auto; padding: 20px var(--gutter);
}
.topbar--solid {
  position: sticky; top: 0; max-width: none;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--border);
}
/* Logo: drei steigende Balken (Software + Daten) und der Name */
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 16px; letter-spacing: -0.015em; }
.logo-mark { width: 18px; height: 18px; flex: none; stroke: none; fill: var(--ink); overflow: visible; }
.logo-mark rect { transform-box: fill-box; transform-origin: 50% 100%; }
.logo-mark .hi { fill: var(--accent); }
.js .logo-mark rect { transform: scaleY(0); }
.is-loaded .logo-mark rect { transform: none; transition: transform 0.8s var(--ease); }
.is-loaded .logo-mark rect:nth-child(2) { transition-delay: 0.08s; }
.is-loaded .logo-mark rect:nth-child(3) { transition-delay: 0.16s; }
.logo:hover .logo-mark rect { animation: bar-bounce 0.7s var(--ease); }
.logo:hover .logo-mark rect:nth-child(2) { animation-delay: 0.07s; }
.logo:hover .logo-mark rect:nth-child(3) { animation-delay: 0.14s; }
@keyframes bar-bounce { 40% { transform: scaleY(0.45); } 100% { transform: none; } }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); min-height: 44px; }
.back-link svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.back-link:hover svg { transform: translateX(-3px); }
.theme-toggle {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--bg) 60%, transparent);
  transition: border-color 0.2s;
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-moon, [data-theme="dark"] .theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* ---------- Dock (Navigation unten) ---------- */
.dock {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 80;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 6px;
  background: var(--dock-bg); color: var(--dock-fg);
  border-radius: 14px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.45);
  border: 1px solid color-mix(in srgb, var(--dock-fg) 12%, transparent);
}
.dock a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  border-radius: 9px; white-space: nowrap; transition: background-color 0.2s, color 0.2s;
}
.dock a:hover, .dock a.is-active { background: color-mix(in srgb, var(--dock-fg) 12%, transparent); }
@media (max-width: 560px) {
  .dock a { padding: 0 11px; font-size: 12px; }
}

/* ==========================================================================
   STARTSEITE
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  --hp: 0;
  --fs: clamp(3.3rem, 11.6vw, 11.6rem); /* Schriftgrösse der Riesenüberschrift, auch fürs Foto gebraucht */
  --pb: clamp(110px, 16vh, 150px);      /* Abstand unten */
  --ptop: clamp(16px, 3vh, 40px);       /* Abstand des Fotos oben */
  position: sticky; top: 0; z-index: 0;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: clamp(110px, 16vh, 150px);
}
.hero::after { /* wird beim Scrollen abgedunkelt */
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: var(--bg); opacity: calc(var(--hp) * 0.75);
}
.hero-photo {
  position: absolute; left: 50%; bottom: 0; z-index: 0;
  height: 96%; aspect-ratio: 4 / 5;
  transform: translateX(-50%) scale(calc(1 + var(--hp) * 0.1));
  transform-origin: 50% 100%;
  -webkit-mask-image: radial-gradient(ellipse 62% 75% at 50% 42%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 75% at 50% 42%, #000 58%, transparent 100%);
}
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%;
  filter: grayscale(1) contrast(1.05) brightness(1.02);
  mix-blend-mode: multiply; /* heller Foto-Hintergrund verschmilzt mit dem Papier */
}
[data-theme="dark"] .hero-photo img { mix-blend-mode: normal; opacity: 0.6; filter: grayscale(1) sepia(0.25) contrast(1.1); }
/* Freigestelltes Porträt: Kopf frei über der Schrift, Schultern laufen nach unten ins Papier aus,
   dahinter ein weicher Kreis in der Akzentfarbe */
.hero-photo:not(.is-placeholder) {
  top: var(--ptop); bottom: auto;
  height: 56%; aspect-ratio: 648 / 722;
  transform-origin: 50% 30%;
  -webkit-mask-image: none; mask-image: none;
}
.hero-photo:not(.is-placeholder)::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 2%;
  width: 92%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 22%, transparent) 0%, color-mix(in srgb, var(--accent) 8%, transparent) 55%, transparent 72%);
}
.hero-photo:not(.is-placeholder) img {
  object-fit: contain; object-position: 50% 0;
  filter: grayscale(1) sepia(0.12) contrast(1.06);
  mix-blend-mode: normal;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 96%);
}
[data-theme="dark"] .hero-photo:not(.is-placeholder) img { opacity: 0.92; filter: grayscale(1) sepia(0.18) contrast(1.08) brightness(0.92); }
@media (min-width: 900px) {
  /* Höhe so wählen, dass das Kinn (bei 54,6 % der Bildhöhe) knapp über der ersten Zeile endet:
     Oberkante Überschrift = 100svh - Abstand unten - 3 Zeilen (je 0.86 × Schriftgrösse) */
  .hero-photo:not(.is-placeholder) {
    height: clamp(300px, calc((100svh - var(--pb) - 2.58 * var(--fs) - var(--ptop) - 10px) / 0.546), 820px);
  }
}
@media (max-width: 640px) {
  .hero-photo:not(.is-placeholder) { height: 56%; top: 64px; }
}
.silhouette { width: 100%; height: 100%; display: grid; align-items: end; justify-items: center; }
.silhouette svg { width: 82%; height: auto; fill: color-mix(in srgb, var(--ink) 6%, transparent); stroke: none; }

.hero-inner {
  position: relative; z-index: 2; width: 100%;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  will-change: transform;
}
.hero-title {
  font-size: var(--fs); font-weight: 600; text-transform: uppercase;
  letter-spacing: -0.045em; line-height: 0.86;
}
.hl { display: flex; align-items: flex-start; gap: 0.1em; }
.hl-2 { justify-content: flex-end; }
.hl-3 { padding-left: 7%; align-items: flex-start; }
.hw { display: block; overflow: hidden; padding-bottom: 0.05em; }
.hw > span { display: inline-block; }
.badge {
  flex: none; width: calc(var(--fs) * 0.8); aspect-ratio: 1; margin-top: 0.05em;
  display: flex; flex-direction: column; gap: 6px; padding: 12px;
  font-family: var(--mono); font-size: 11px; line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--card) 55%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); border-radius: 10px;
}
.badge strong { font-family: var(--sans); font-size: clamp(16px, 1.7vw, 24px); letter-spacing: -0.02em; color: var(--ink); text-transform: none; }
.hero-arrow { display: inline-flex; margin-top: 0.06em; }
.hero-arrow svg { width: 0.78em; height: 0.78em; stroke-width: 3; }
.hero-intro {
  max-width: 34ch; margin-top: 24px;
  font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.5; color: var(--ink-2);
}
.hero-foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 28px;
  display: flex; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}
.hero-scroll::after { content: " ↓"; }
@media (min-width: 900px) {
  .hero-intro { position: absolute; left: calc(var(--gutter) + 12%); top: calc(var(--fs) * 1.02); margin: 0; max-width: 28ch; }
}
@media (max-width: 899px) {
  .hero-foot { display: none; }
  .hero { padding-bottom: 104px; }
}
@media (max-width: 640px) {
  .hero { --fs: 15.2vw; }
  .badge { display: none; }
  .hl-3 { padding-left: 0; }
  .hero-photo { height: 88%; }
}

/* Ladeanimation */
.js .hw > span { transform: translateY(108%); }
.js .badge, .js .hero-intro, .js .hero-arrow, .js .hero-foot, .js .hero-photo > * { opacity: 0; }
.is-loaded .hw > span { transform: none; transition: transform 1.2s var(--ease); transition-delay: calc(var(--d, 0) * 110ms + 150ms); }
.is-loaded .badge, .is-loaded .hero-intro, .is-loaded .hero-arrow, .is-loaded .hero-foot { opacity: 1; transition: opacity 1s ease 0.75s; }
.is-loaded .hero-photo > * { opacity: 1; transition: opacity 1.6s ease; }

/* ---------- "Bühne" über dem Hero ---------- */
.sheet {
  position: relative; z-index: 1; background: var(--bg);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -1px 0 var(--border), 0 -40px 80px -40px rgba(0, 0, 0, 0.25);
}

/* Zweispaltiges Raster: Label links, Inhalt rechts */
.split { display: grid; gap: 20px 40px; }
.split--head { margin-bottom: clamp(36px, 6vh, 64px); align-items: end; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); }
  .split > .label { padding-top: 0.6em; }
  .split--head > .label { padding-top: 0; padding-bottom: 0.5em; }
}

/* ---------- Was ich mache ---------- */
.whatido { padding-block: clamp(96px, 16vh, 180px) clamp(64px, 10vh, 120px); }
.whatido-text {
  font-size: clamp(1.8rem, 4vw, 3.5rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1;
  text-wrap: balance;
}
.pillars {
  display: grid; margin-top: clamp(56px, 9vh, 100px);
  border-top: 1px solid var(--border); border-left: 1px solid var(--border);
}
.pillar {
  display: flex; flex-direction: column; gap: 14px; padding: 28px 24px 32px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transition: background-color 0.3s;
}
.pillar:hover { background: var(--bg-elev); }
.pillar-num { font-size: 12px; color: var(--accent-text); letter-spacing: 0.06em; }
.pillar-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; margin-top: 28px; }
.pillar p { color: var(--ink-2); }
.pillar .tags { margin-top: auto; padding-top: 10px; }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(3, 1fr); } .pillar { padding: 32px 32px 36px; } }

/* ---------- Projekte ---------- */
.projects { padding-block: clamp(32px, 6vh, 80px) 40px; }
.display-wrap { overflow: hidden; padding-block: 0.04em; }
.display {
  font-size: clamp(4.5rem, 17vw, 16.5rem); font-weight: 600; text-transform: uppercase;
  letter-spacing: -0.055em; line-height: 0.8; white-space: nowrap;
  will-change: transform; transform: translate3d(8vw, 0, 0);
}
.projects-head {
  display: flex; justify-content: space-between; gap: 16px;
  margin-block: 28px clamp(36px, 6vh, 64px); padding-top: 16px; border-top: 1px solid var(--ink);
}
.projects-layout { display: grid; gap: 40px; }
.project-index { display: none; }
.stack { display: grid; gap: 20px; }

.card {
  position: relative; display: grid; gap: 20px; padding: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 22px;
  box-shadow: var(--shadow); transform-origin: 50% 0;
}
.card::after { /* Abdunkeln beim Stapeln */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; background: var(--bg);
  opacity: 0; pointer-events: none; z-index: 3;
}
.card-cover { position: relative; min-height: 0; }
.card-cover .cover { aspect-ratio: 16 / 10; }
.card-info { display: flex; flex-direction: column; gap: 14px; padding: 4px 12px 16px; min-width: 0; }
.card-meta { display: flex; justify-content: space-between; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.card-num { font-size: clamp(3.2rem, 6vw, 5.5rem); font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; color: var(--faint); margin-top: 8px; }
.card-title { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.02; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 22px; }
.card-summary { color: var(--ink-2); font-size: 1.02rem; }
.card-more {
  display: inline-flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 12px;
  font-size: 14px; font-weight: 500;
}
.circle {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-strong);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.4s var(--ease);
}
.circle svg { width: 18px; height: 18px; }
.card:hover .circle, .next-card:hover .circle { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateX(4px); }
.card.has-accent:hover .circle, .next-card.has-accent:hover .circle { background: var(--accent); border-color: var(--accent); color: var(--card); }
.card:hover .card-num { color: var(--accent); }
.card-num { transition: color 0.4s; }
.card .cover > *, .next-card .cover > * { transition: transform 1s var(--ease); }
.card:hover .cover:not(.cover--phones) > *, .next-card:hover .cover:not(.cover--phones) > * { transform: scale(1.04); }

@media (min-width: 900px) {
  .card { grid-template-columns: 1.3fr 1fr; gap: 32px; padding: 14px; }
  .card-cover .cover { aspect-ratio: auto; height: 100%; min-height: 380px; }
  .card-info { padding: 14px 14px 14px 0; }
}

@media (min-width: 1100px) and (min-height: 700px) {
  .projects-layout { grid-template-columns: 200px 1fr; gap: 48px; align-items: start; }
  .project-index { display: block; position: sticky; top: 40px; }
  .index-counter { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; margin-bottom: 20px; }
  .index-current { color: var(--ink); }
  .index-list { border-top: 1px solid var(--border); }
  .index-list a {
    position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 6px;
    padding: 14px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--muted);
    transition: color 0.25s;
  }
  .index-list .n { font-family: var(--mono); font-size: 12px; padding-top: 3px; }
  .index-list .meta { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
  .index-list a::after {
    content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 1px;
    background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  }
  .index-list a:hover, .index-list a.is-active { color: var(--ink); }
  .index-list a.is-active .n { color: var(--accent-text); }
  .index-list a.is-active .meta { color: var(--muted); }

  .stack { gap: 0; }
  .card {
    position: sticky;
    top: calc(40px + var(--i) * 14px);
    height: calc(100vh - 80px - 90px - var(--n) * 14px);
    max-height: 680px;
    margin-bottom: 30vh;
    transform: scale(calc(1 - var(--depth, 0) * 0.045));
  }
  .card:last-child { margin-bottom: 0; }
  .card::after { opacity: min(calc(var(--depth, 0) * 0.4), 0.65); }
  .card-cover .cover { min-height: 0; }
}

/* ---------- Archiv ---------- */
.archive { padding-block: clamp(96px, 16vh, 180px) 40px; }
.archive-list { border-top: 1px solid var(--ink); }
.arow {
  display: grid; grid-template-columns: 52px 1fr 40px; gap: 16px; align-items: center;
  padding: 22px 4px; border-bottom: 1px solid var(--border);
  transition: padding 0.4s var(--ease), background-color 0.3s;
}
.arow-year { font-size: 13px; color: var(--muted); }
.arow-title { font-size: 1.2rem; font-weight: 500; letter-spacing: -0.015em; }
.arow-title small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.arow-cat, .arow-tags { display: none; }
.arow-arrow {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong);
  transition: background-color 0.3s, color 0.3s, transform 0.4s var(--ease);
}
.arow-arrow svg { width: 16px; height: 16px; }
.arow:hover { background: var(--bg-elev); }
.arow:hover .arow-arrow { background: var(--ink); color: var(--bg); transform: rotate(45deg); }
.has-accent > .arow:hover .arow-arrow { background: var(--accent); border-color: var(--accent); color: var(--card); }
@media (min-width: 900px) {
  .arow { grid-template-columns: 90px 1.4fr 1fr 1.2fr 40px; gap: 24px; padding-inline: 8px; }
  .arow:hover { padding-left: 20px; }
  .arow-cat { display: block; color: var(--muted); }
  .arow-tags { display: flex; flex-wrap: wrap; gap: 6px; }
}
.peek {
  position: fixed; left: 0; top: 0; z-index: 60; width: 300px; pointer-events: none;
  opacity: 0; scale: 0.85; transition: opacity 0.25s, scale 0.35s var(--ease);
}
.peek.is-visible { opacity: 1; scale: 1; }
.peek .cover { aspect-ratio: 16 / 10; box-shadow: var(--shadow); }

/* ---------- Über mich ---------- */
.about { padding-block: clamp(96px, 16vh, 180px) clamp(64px, 10vh, 120px); }
.about > .split + .split { margin-top: clamp(64px, 10vh, 112px); }
.about > .split--head + .split { margin-top: 0; }
.about-text { display: grid; gap: 22px; max-width: 780px; }
.about-text p { font-size: 1.15rem; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }
.about-text p:first-child {
  font-family: var(--serif); font-size: clamp(1.45rem, 2.5vw, 2rem); line-height: 1.38;
  letter-spacing: -0.01em; color: var(--ink); max-width: none;
}
@media (max-width: 899px) { .about .split > span[aria-hidden] { display: none; } }

.timeline { border-top: 1px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.tl-years { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; padding-top: 4px; }
.tl-what strong { display: block; font-weight: 500; font-size: 1.1rem; letter-spacing: -0.01em; }
.tl-what span { color: var(--muted); font-size: 15px; }
@media (min-width: 700px) { .timeline li { grid-template-columns: 160px 1fr; gap: 24px; } }
.interests { font-size: 1.15rem; line-height: 1.65; color: var(--ink-2); max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding-block: 28px 110px; font-size: 12px; letter-spacing: 0.04em; color: var(--muted);
}
.site-footer a:hover { color: var(--ink); }

/* ==========================================================================
   PROJEKTSEITE
   ========================================================================== */
.pj-head { padding-top: clamp(48px, 9vh, 96px); padding-bottom: 36px; }
.crumbs { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.crumbs a:hover { color: var(--accent-text); }
.pj-title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 5.2vw, 4.3rem);
  line-height: 1.06; letter-spacing: -0.02em; margin-block: 18px 26px; text-wrap: balance;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 15px; padding: 5px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--card); }
.pj-hero .cover--hero { aspect-ratio: 16 / 8; border-radius: 22px; }
@media (max-width: 700px) { .pj-hero .cover--hero { aspect-ratio: 4 / 3; } }

.pj-intro { padding-block: clamp(56px, 10vh, 104px) 24px; }
.pj-lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.3vw, 1.75rem); line-height: 1.45; letter-spacing: -0.005em; }
.pj-meta { display: grid; column-gap: 32px; margin-top: 56px; }
.pj-meta > div { padding: 16px 0 20px; border-top: 1px solid var(--border); }
.pj-meta dt { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pj-meta dd { font-size: 1.02rem; }
@media (min-width: 640px) { .pj-meta { grid-template-columns: 1fr 1fr; } }

.pj-chapter { padding-top: clamp(64px, 10vh, 104px); }
.chapter-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 18px; border-top: 1px solid var(--border); }
.chapter-title { font-family: var(--serif); font-weight: 500; font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.12; letter-spacing: -0.015em; margin-block: 14px 26px; text-wrap: balance; }
.chapter-text { font-size: 1.1rem; line-height: 1.72; color: var(--ink-2); }
.chapter-text + .chapter-text { margin-top: 18px; }
.chapter-bullets { display: grid; gap: 10px; margin-top: 26px; }
.chapter-bullets li { display: grid; grid-template-columns: 18px 1fr; font-size: 1.05rem; color: var(--ink-2); }
.chapter-bullets li::before { content: ""; width: 7px; height: 7px; background: var(--accent); margin-top: 0.62em; border-radius: 1px; }
.pj-figure { margin-top: 48px; }
.pj-figure .cover { aspect-ratio: 16 / 9; border-radius: 20px; }
.pj-gallery { margin-top: 48px; }
.gallery-panel {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px;
  padding: clamp(24px, 4vw, 56px); border-radius: 20px; background: var(--c);
}
[data-theme="dark"] .gallery-panel { background: color-mix(in oklab, var(--c) 15%, var(--bg-elev)); }
.gallery-item figcaption { margin-top: 14px; text-align: center; font-size: 14px; color: var(--ink-2); }
@media (min-width: 900px) { .gallery-panel { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
/* Desktop-Screenshots: ohne Farbfläche, 1 Spalte auf dem Handy, sonst --cols (Standard 2) */
.gallery-panel--screens { background: none !important; padding: 0; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 900px) { .gallery-panel--screens { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 40px 32px; } }
.screen { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.pj-figure figcaption, .pj-gallery > figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.pj-figure figcaption .mono, .pj-gallery > figcaption .mono { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }

.pj-next { padding-block: clamp(96px, 16vh, 160px) 40px; }
.next-card {
  display: grid; gap: 20px; padding: 14px; border: 1px solid var(--border); border-radius: 24px;
  background: var(--card); box-shadow: var(--shadow);
}
.next-text { display: flex; flex-direction: column; gap: 14px; padding: 18px 14px; }
.next-title { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.95; margin-top: 12px; }
.next-sub { color: var(--ink-2); max-width: 40ch; }
.next-card .cover { aspect-ratio: 16 / 10; }
@media (min-width: 900px) { .next-card { grid-template-columns: 1fr 1.2fr; } .next-text { padding: 24px; } }

.chapter-nav { display: none; }
@media (min-width: 1240px) {
  .chapter-nav { display: block; position: fixed; left: 24px; top: 50%; transform: translateY(-50%); z-index: 40; transition: opacity 0.3s; }
  .chapter-nav.is-hidden { opacity: 0; pointer-events: none; }
  .chapter-nav a { display: flex; align-items: center; gap: 12px; height: 30px; }
  .chapter-nav .dash { width: 14px; height: 1px; background: var(--faint); transition: width 0.35s var(--ease), background-color 0.3s; }
  .chapter-nav .chapter-name {
    font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
    opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s var(--ease); white-space: nowrap;
  }
  .chapter-nav a:hover .chapter-name, .chapter-nav a.is-active .chapter-name { opacity: 1; transform: none; }
  .chapter-nav a.is-active .dash { width: 28px; background: var(--accent); }
  .chapter-nav a.is-active .chapter-name { color: var(--ink-2); }
}
.page-project .site-footer { margin-top: 40px; }

/* ==========================================================================
   COVER (Bild oder generierte Grafik)
   ========================================================================== */
.cover {
  position: relative; overflow: hidden; border-radius: 14px; height: 100%;
  background: var(--c, #e9e3d6); color: color-mix(in oklab, var(--ink) 80%, var(--c, #e9e3d6));
  isolation: isolate;
}
[data-theme="dark"] .cover { background: color-mix(in oklab, var(--c, #e9e3d6) 15%, var(--bg-elev)); color: var(--ink-2); }
.cover > img { width: 100%; height: 100%; object-fit: cover; }
/* Echte Bilder auf der Projektseite: eigenes Seitenverhältnis, nichts abschneiden */
.pj-hero .cover.has-img, .pj-figure .cover.has-img { aspect-ratio: auto; height: auto; }
.pj-hero .cover.has-img > img, .pj-figure .cover.has-img > img { height: auto; }
.card-cover .cover.has-img > img { object-position: 0 0; }

/* Videos: dunkler Grund (die Videos sind dunkel), in Karten vollständig sichtbar */
.cover.has-video { background: #0c0c0c; }
.cover > video { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-cover .cover.has-video > video { object-fit: contain; }
.pj-hero .cover.has-video { aspect-ratio: auto; height: auto; }
.pj-hero .cover.has-video > video { height: auto; }

/* Handy-Rahmen für App-Screenshots */
.phone {
  position: relative; aspect-ratio: 1080 / 2120; padding: 5px;
  background: #1b1a16; border-radius: 13% / 6.6%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 28px 50px -24px rgba(21, 20, 15, 0.5);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 11% / 5.6%; }
/* Collage aus drei Handys als Vorschaubild */
.cover--phones .phone { position: absolute; left: 50%; transition: transform 0.8s var(--ease); }
.cover--phones .phone--2 { z-index: 2; height: 90%; bottom: -16%; transform: translateX(-50%); }
.cover--phones .phone--1, .cover--phones .phone--3 { z-index: 1; height: 78%; bottom: -12%; }
.cover--phones .phone--1 { transform: translateX(-122%) rotate(-7deg); }
.cover--phones .phone--3 { transform: translateX(22%) rotate(7deg); }
.card:hover .cover--phones .phone--2, .next-card:hover .cover--phones .phone--2 { transform: translateX(-50%) translateY(-5%); }
.card:hover .cover--phones .phone--1, .next-card:hover .cover--phones .phone--1 { transform: translateX(-128%) rotate(-10deg); }
.card:hover .cover--phones .phone--3, .next-card:hover .cover--phones .phone--3 { transform: translateX(28%) rotate(10deg); }
.cover-art { position: absolute; inset: 0; }
.cover-art svg { width: 100%; height: 100%; display: block; stroke: none; }
.cover-art .g { stroke: currentColor; stroke-opacity: 0.1; stroke-width: 1; }
.cover-art .f { fill: currentColor; fill-opacity: 0.82; }
.cover-art .a { fill: var(--accent); }
.cover-art .b { stroke: currentColor; stroke-opacity: 0.4; stroke-width: 2; }
.cover-art .area { fill: currentColor; fill-opacity: 0.07; }
.cover-art .ln { fill: none; stroke: currentColor; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.cover-art .ring, .cover-art .ring-a { fill: none; stroke: var(--accent); stroke-width: 2; stroke-opacity: 0.55; }
.cover-art .o { fill: none; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 2; }
.cover-art .arc { fill: none; stroke: currentColor; stroke-opacity: 0.22; stroke-width: 2; }
.cover-art .e { stroke: currentColor; stroke-opacity: 0.22; stroke-width: 1.5; }
.cover-art .ea { stroke: var(--accent); stroke-opacity: 0.6; stroke-width: 2; }
.cover-art .box { fill: var(--card); fill-opacity: 0.75; stroke: currentColor; stroke-opacity: 0.3; stroke-width: 1.5; }
.cover-art .box-a { stroke: var(--accent); stroke-opacity: 0.9; stroke-width: 2; }
.cover-art .chip-r { fill: currentColor; fill-opacity: 0.06; }
.cover-art .link { fill: none; stroke: var(--accent); stroke-opacity: 0.7; stroke-width: 2; stroke-dasharray: 6 6; }
.cover-art .t { fill: currentColor; font-family: var(--sans); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.cover-art .tl { font-size: 24px; }
.cover-art .ts { fill: currentColor; fill-opacity: 0.7; font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; }
.cover-label {
  position: absolute; top: 18px; left: 20px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* ---------- Einblenden ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .hw > span, .js [data-reveal], .js .logo-mark rect { transform: none; opacity: 1; }
  .js .badge, .js .hero-intro, .js .hero-arrow, .js .hero-foot, .js .hero-photo > * { opacity: 1; }
  .hero::after { opacity: 0; }
  .hero-photo { transform: translateX(-50%); }
  .display { transform: none !important; }
  .card { transform: none !important; }
  .card::after { opacity: 0 !important; }
}
