/* ==========================================================================
   Portfolio – Stylesheet
   Gestaltung angelehnt an den blackbrush.art-Opener: Nacht statt Weiß,
   Bodoni Moda für Titel, Spectral für Fließtext, DM Mono für Labels,
   Glut/Mond-Licht und Leinwandkorn im Hintergrund.
   Alle Schriften liegen lokal in assets/fonts (SIL Open Font License).
   ========================================================================== */

@font-face { font-family: "Bodoni Moda"; font-weight: 400 900; font-style: normal; font-display: swap;
  src: url("../fonts/BodoniModa-VF.woff2") format("woff2-variations"), url("../fonts/BodoniModa-VF.woff2") format("woff2"); }
@font-face { font-family: "Bodoni Moda"; font-weight: 400 900; font-style: italic; font-display: swap;
  src: url("../fonts/BodoniModa-Italic-VF.woff2") format("woff2-variations"), url("../fonts/BodoniModa-Italic-VF.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 200; font-style: normal; font-display: swap; src: url("../fonts/Spectral-ExtraLight.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/Spectral-Light.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 300; font-style: italic; font-display: swap; src: url("../fonts/Spectral-LightItalic.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Spectral-Regular.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/DMMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/DMMono-Medium.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   Farben – Standard ist die Nacht. Die Glühbirne schaltet auf Papier.
   -------------------------------------------------------------------------- */
:root {
  /* --void, --paper, --accent-dark, --accent-light kommen aus den Einstellungen (inline im <head>) */
  --void: #0a0b12;
  --paper: #f3f0ea;
  --accent-dark: #eda13c;
  --accent-light: #c8202f;
  --night: #141726;
  --crimson: #c8202f;
  --ember: #eda13c;
  --gold: #d9a441;
  --teal: #3fa9ad;
  --moon: #dcdeef;
  --mist: #8a8fa6;

  --bg: var(--void);
  --bg-2: color-mix(in srgb, var(--bg) 86%, #dcdeef);
  --fg: var(--moon);
  --muted: var(--mist);
  --line: rgba(220, 222, 239, .14);
  --tile: var(--bg-2);
  --accent: var(--accent-dark);
  --accent-2: var(--crimson);

  /* eigene Schriften aus den Einstellungen überschreiben diese Variablen inline im <head> */
  --font-display: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4vw, 64px);
  --gap: clamp(14px, 1.6vw, 26px);
  --bar: 66px;
  --landing-foot: 46px;

  --t-label: .7rem;                 /* Mono-Labels: Navigation, Fußzeile */
  --t-body: clamp(1rem, .95rem + .3vw, 1.15rem);
  --t-title: clamp(2rem, 1.6rem + 1.6vw, 3rem);

  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: dark;
}
html.light {
  --bg: var(--paper);
  --bg-2: color-mix(in srgb, var(--bg) 92%, #15171f);
  --fg: #15171f;
  --muted: #6b6f82;
  --line: rgba(21, 23, 31, .14);
  --tile: var(--bg-2);
  --accent: var(--accent-light);
  --accent-2: var(--ember);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); min-height: 100%; }
body {
  margin: 0; position: relative; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-weight: 300; font-size: var(--t-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
/* Lichtstimmung: Feuer unten links, Mond oben rechts, Glut in der Mitte */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(70ch 46ch at 12% 88%, rgba(200, 32, 47, .16), transparent 68%),
    radial-gradient(64ch 44ch at 88% 6%, rgba(63, 169, 173, .13), transparent 66%),
    radial-gradient(80ch 40ch at 46% 52%, rgba(237, 161, 60, .10), transparent 70%);
  transition: opacity .4s;
}
html.light body::before {
  background:
    radial-gradient(70ch 46ch at 12% 88%, rgba(200, 32, 47, .08), transparent 68%),
    radial-gradient(64ch 44ch at 88% 6%, rgba(63, 169, 173, .10), transparent 66%),
    radial-gradient(80ch 40ch at 46% 52%, rgba(237, 161, 60, .09), transparent 70%);
}
/* Leinwandkorn */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E");
}
html.light body::after { opacity: .22; }

.page { flex: 1 0 auto; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 1px; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -.015em; font-variation-settings: "opsz" 60; }
/* kleine Bodoni-Grade brauchen eine kleine optische Größe, sonst brechen die Haarlinien weg */
h2, h3 { font-variation-settings: "opsz" 18; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
em, i { font-style: italic; }

.mono, .label { font-family: var(--font-mono); font-size: var(--t-label); font-weight: 400; letter-spacing: .16em; text-transform: uppercase; }

/* Seiteninhalt hebt sich beim Laden leicht an */
.page > * { animation: rise .7s var(--ease) both; }
.page > *:nth-child(2) { animation-delay: .08s; }
.page > *:nth-child(3) { animation-delay: .16s; }
.foot { animation: rise .7s var(--ease) .25s both; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 6px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.empty { color: var(--muted); padding: 10vh var(--gutter); text-align: center; font-style: italic; }

/* --------------------------------------------------------------------------
   Kopfleiste
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--bar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
  transition: background-color .4s var(--ease);
}
.topbar a { padding: 6px 0; transition: color .25s; border-bottom: 1px solid transparent; }
.topbar a:hover { color: var(--fg); }
.topbar a.is-active { color: var(--fg); font-weight: 500; border-bottom-color: var(--accent); }
.topbar-nav { display: flex; gap: clamp(16px, 2.6vw, 40px); align-items: baseline; }
.topbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 22px; }

/* Sprache */
.lang { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .12em; color: var(--muted); }
.lang a { padding: 6px 0; border-bottom: 1px solid transparent; }
.lang a.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.bulb-floating { display: flex; align-items: center; gap: 18px; }

/* Glühbirne */
.bulb { appearance: none; background: none; border: 0; padding: 4px; cursor: pointer; color: var(--muted); line-height: 0; transition: color .25s; }
.bulb:hover { color: var(--fg); }
.bulb svg { overflow: visible; }
.bulb-glass { fill: transparent; stroke: currentColor; stroke-width: 1.3; transition: fill .4s var(--ease), stroke .4s; }
.bulb-base { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.bulb-rays { stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; opacity: 0; transform: translate(0, 11px) scale(.6); transform-origin: 12px 11px; transition: opacity .4s var(--ease), transform .4s var(--ease); }
html.light .bulb-glass { fill: var(--accent-2); stroke: var(--fg); }
html.light .bulb-rays { opacity: 1; transform: translate(0, 11px) scale(1); }
.bulb-floating { position: fixed; top: 18px; right: var(--gutter); z-index: 30; }

/* Siegel */
.seal { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--gold); border-radius: 2px; transform: rotate(-5deg);
  font-family: var(--font-mono); font-weight: 500; font-size: 13px; letter-spacing: .05em; color: var(--gold); line-height: 1; transition: transform .35s var(--ease); }
.seal:hover { transform: rotate(0) scale(1.06); }
.seal-floating { position: fixed; top: 18px; left: var(--gutter); z-index: 30; }

/* --------------------------------------------------------------------------
   Startseite: Graphic Design | Illustration
   -------------------------------------------------------------------------- */
body.is-landing { height: 100dvh; overflow: hidden; }
.split { display: flex; gap: 2px; height: calc(100dvh - var(--landing-foot)); padding: 0; }
.split-panel {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--bg);
  transition: flex .8s var(--ease), background-color .8s var(--ease);
}
.split-stage { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.split-preview {
  flex: 1; overflow: hidden; padding: var(--gap) var(--gap) 0;
  columns: 2; column-gap: var(--gap);
}
/* Schwarzfläche ohne Hover (ca. 66 %) */
.split-preview::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .66); transition: opacity .7s var(--ease); pointer-events: none; }
.split-tile { break-inside: avoid; margin-bottom: var(--gap); background: var(--tile); overflow: hidden; }
.split-tile img, .split-tile video { width: 100%; height: 100%; object-fit: cover; }
.split-title {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); z-index: 2;
  text-align: center; padding: 0 var(--gap);
  font-family: var(--font-display); font-variation-settings: "opsz" 96; font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 4.4rem); line-height: .95; letter-spacing: -.02em;
  color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .45);
  transition: top .8s var(--ease), transform .8s var(--ease), font-size .8s var(--ease), color .6s var(--ease), text-shadow .6s var(--ease);
  pointer-events: none;
}
.split-title i { font-weight: 400; }

@media (hover: hover) and (min-width: 760px) {
  .split .split-panel:hover { flex-grow: 2; }
  .split .split-panel:hover .split-preview { padding-top: calc(var(--gap) + 84px); }
  .split .split-panel:hover .split-preview::after { opacity: 0; }
  .split .split-panel:hover .split-title { top: 22px; transform: none; color: var(--fg); text-shadow: none; font-size: clamp(2.2rem, 4.8vw, 4.9rem); }
  .split:hover .split-panel:not(:hover) .split-title { font-size: clamp(1.6rem, 3.2vw, 3.3rem); }
  .split-preview { transition: padding .8s var(--ease); }
}
.split-panel.is-open .split-preview::after { opacity: 0; }
.split-panel:focus-visible { outline-offset: -3px; }

/* Fußleiste der Startseite */
.landing-foot {
  position: fixed; left: 0; right: 0; bottom: 0; height: var(--landing-foot); z-index: 15;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 var(--gutter); background: var(--bg); border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.landing-foot b { font-weight: 500; color: var(--fg); }
.landing-foot .foot-links { display: flex; gap: 22px; padding: 0; }
.landing-foot a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Die kleine Seli: sitzt unten auf jeder Seite, winkt beim Darüberfahren
   -------------------------------------------------------------------------- */
.seli {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 26;
  width: clamp(130px, 11vw, 170px); line-height: 0;
}
.seli img { width: 100%; height: auto; display: block; }
body.is-landing .seli { bottom: var(--landing-foot); }
.seli .seli-wave { display: none; }
.seli:hover .seli-still, .seli:focus-visible .seli-still { display: none; }
.seli:hover .seli-wave, .seli:focus-visible .seli-wave { display: block; }
.seli-bubble {
  position: absolute; left: 50%; bottom: calc(100% - 6px); transform: translate(-50%, 6px);
  padding: 6px 12px; white-space: nowrap;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  opacity: 0; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.seli-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; margin-left: -4px; margin-top: -4px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.seli:hover .seli-bubble, .seli:focus-visible .seli-bubble { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Galerie: drei Spalten, Kacheln unterschiedlicher Höhe
   -------------------------------------------------------------------------- */
.masonry { columns: 3; column-gap: var(--gap); padding: calc(var(--gap) * 1.4) var(--gutter) var(--gap); }
.tile {
  position: relative; display: block; break-inside: avoid;
  margin-bottom: var(--gap);
  background: var(--tile); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.tile-frame { display: block; }
.tile-media { width: 100%; height: auto; transition: transform .9s var(--ease); }
.tile-hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease); }
.tile-placeholder { display: block; width: 100%; background: var(--tile); }
.tile-caption {
  display: block; position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 20px 18px;
  font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.45rem; line-height: 1.15; color: var(--fg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(100%);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.tile-caption small { display: block; margin-top: 6px; font-family: var(--font-mono); font-style: normal; font-weight: 400; font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
@media (hover: hover) {
  .tile:hover .tile-hover { opacity: 1; }
  .tile:hover .tile-media { transform: scale(1.02); }
  .tile:hover .tile-caption, .tile:focus-visible .tile-caption { opacity: 1; transform: none; }
}
@media (hover: none) { .tile-caption { opacity: 1; transform: none; padding: 12px 14px 14px; font-size: 1.15rem; } }

/* --------------------------------------------------------------------------
   Fußzeile
   -------------------------------------------------------------------------- */
.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  margin-top: 48px; padding: 0 var(--gutter); min-height: 96px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.foot-brand { display: inline-flex; align-items: center; gap: 14px; padding: 22px 0; }
.foot-brand .seal { width: 28px; height: 28px; font-size: 11px; }
.foot-brand b { font-weight: 500; color: var(--fg); }
.foot-links { display: flex; justify-content: flex-end; gap: 22px; padding: 22px 0; }
.foot a { transition: color .2s; white-space: nowrap; }
.foot a:hover { color: var(--fg); }

/* --------------------------------------------------------------------------
   Projektseite: links Medien, rechts mitscrollender Text
   -------------------------------------------------------------------------- */
.project {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: calc(var(--gap) * 2.2);
  padding: calc(var(--gap) * 1.4) var(--gutter) 0;
  align-items: start;
}
.project-media { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); grid-auto-flow: dense; align-items: start; }
.project-item { margin: 0; background: var(--tile); box-shadow: 0 0 0 1px var(--line); grid-column: span 3; }
.project-item--wide { grid-column: span 4; }
.project-item--full { grid-column: span 6; }
.project-item img { width: 100%; cursor: zoom-in; }
.project-item video { width: 100%; }
.project-text { position: sticky; top: var(--bar); }
.project-text-inner { padding-top: 10px; }
.project-text h1 { font-size: var(--t-title); margin-bottom: 14px; text-shadow: 0 0 50px rgba(220, 222, 239, .12); }
.project-sub { font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 26px; }
.project-desc { max-width: 40ch; color: var(--fg); text-wrap: pretty; }
.project-desc h2 { font-size: 1.35rem; margin: 1.4em 0 .4em; }
.project-desc a, .about a, .legal a { color: var(--fg); border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.project-desc a:hover, .about a:hover, .legal a:hover { color: var(--accent); border-color: var(--accent); }
.project-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.project-nav a:hover { color: var(--accent); }

.project-counter { display: none; }
.compare { display: none; }
.split-preview--torch, .split-hint, .split-scroll { display: none; }
.theme-wave { position: fixed; inset: 0; z-index: 70; pointer-events: none; }

/* Erst bei Klick laden: Vorschau mit Hinweis */
.lazy { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--tile); cursor: pointer; text-align: left; color: inherit; font: inherit; }
.lazy img { width: 100%; filter: blur(1px) brightness(.85); transition: filter .4s; }
.lazy:hover img { filter: blur(0) brightness(1); }
.lazy-empty { aspect-ratio: 16/9; display: block; }
.lazy-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px;
  font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  color: var(--fg); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line);
  transition: border-color .25s, color .25s;
}
.lazy-hint::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.lazy:hover .lazy-hint { border-color: var(--accent); color: var(--accent); }
.lazy.is-loading .lazy-hint { opacity: .5; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); display: grid; place-items: center; padding: 3vmin; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox-close { position: absolute; top: 10px; right: var(--gutter); background: none; border: 0; color: var(--fg); font-family: var(--font-body); font-size: 40px; font-weight: 200; line-height: 1; cursor: pointer; }

/* --------------------------------------------------------------------------
   Signatur: der Farbstrich (SVG in _stroke.php)
   -------------------------------------------------------------------------- */
.stroke { display: block; width: 100%; height: auto; overflow: visible; }
.stroke .reveal { transform: scaleX(0); transform-box: fill-box; transform-origin: left center; animation: swipe 1.2s cubic-bezier(.55, .06, .3, 1) .35s forwards; }
@keyframes swipe { to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   About me + Kontakt
   -------------------------------------------------------------------------- */
.about {
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: calc(var(--gap) * 2.5);
  padding: clamp(32px, 6vh, 80px) var(--gutter) 24px;
  align-items: start;
}
.about-figure { align-self: end; padding-top: 8vh; }
.about-figure img { width: min(100%, 360px); margin: 0 auto; }
.about h1, .about h2 { font-size: var(--t-title); margin-bottom: 8px; }
.about-stroke { margin: -6px 0 22px; max-width: 320px; }
.about-text, .about-contact { max-width: 46ch; text-wrap: pretty; }
.about-text h2 { font-size: 1.35rem; margin: 1.6em 0 .4em; }
.about-contact h2 { margin-bottom: 22px; }

.contact { display: grid; gap: 20px; margin-top: 26px; }
.contact label { display: grid; gap: 8px; font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.contact input, .contact textarea {
  font-family: var(--font-body); font-weight: 300; font-size: var(--t-body); letter-spacing: 0; text-transform: none;
  width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--fg); border-radius: 0; transition: border-color .25s;
}
.contact input:hover, .contact textarea:hover { border-bottom-color: var(--muted); }
.contact input:focus, .contact textarea:focus { outline: none; border-bottom-color: var(--accent); }
.contact textarea { resize: vertical; min-height: 140px; }
.contact .check { grid-template-columns: auto 1fr; gap: 12px; align-items: start; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: .9rem; line-height: 1.5; }
.contact .check input { width: 16px; height: 16px; margin-top: 3px; accent-color: var(--accent); }
.contact .hp { position: absolute; left: -9999px; }
.contact button {
  justify-self: start; display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .11em; text-transform: uppercase;
  padding: 12px 22px; border: 1px solid var(--accent); background: transparent; color: var(--fg); cursor: pointer;
  transition: background-color .25s, color .25s, gap .25s;
}
.contact button::after { content: "→"; transition: transform .25s; }
.contact button:hover { background: var(--accent); color: var(--bg); gap: 1.1rem; }
.notice { padding: 12px 16px; border-left: 2px solid var(--accent); margin-top: 18px; font-style: italic; }
.notice--err { border-color: var(--crimson); }

/* --------------------------------------------------------------------------
   Impressum / Datenschutz / 404
   -------------------------------------------------------------------------- */
.legal { width: min(68ch, 100% - 2 * var(--gutter)); margin-inline: auto; padding: clamp(40px, 8vh, 96px) 0 24px; }
.legal h1 { font-size: var(--t-title); margin-bottom: 8px; }
.legal .about-stroke { max-width: 320px; margin-bottom: 34px; }
.legal h2 { font-size: 1.35rem; margin: 1.9em 0 .5em; }
.legal ul { padding-left: 1.2em; }
.legal a { word-break: break-word; }

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .masonry { columns: 2; }
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .about-figure { grid-column: 1 / -1; align-self: start; padding-top: 0; }
  .about-figure img { width: 200px; margin: 0; }
}
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project-text { position: static; order: -1; }
  .project-desc { max-width: none; }
  .project-item, .project-item--wide, .project-item--full { grid-column: span 6; }
}
@media (max-width: 760px) {
  :root { --bar: 56px; --gap: 10px; }
  .topbar { height: auto; grid-template-columns: 1fr auto; grid-template-areas: "back right" "nav nav"; row-gap: 2px; padding-top: 10px; padding-bottom: 10px; }
  .topbar-back { grid-area: back; }
  .topbar-right { grid-area: right; gap: 16px; }
  .topbar-nav { grid-area: nav; gap: 18px; justify-content: center; flex-wrap: wrap; }

  /* ---- Startseite: eine Seite pro Bereich, Scroll rastet ein, der sichtbare Bereich wird scharf ---- */
  body.is-landing { height: 100dvh; overflow: hidden; }
  .split {
    flex-direction: column; gap: 0; height: calc(100dvh - var(--landing-foot)); padding: 0;
    overflow-y: auto; scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .split::-webkit-scrollbar { display: none; }
  .split-panel {
    flex: none; height: calc(100dvh - var(--landing-foot)); scroll-snap-align: start; scroll-snap-stop: always;
    padding: 0; transition: none;
  }
  .split-title { top: 50%; transform: translateY(-50%); font-size: clamp(2.6rem, 13vw, 3.6rem); }
  .split-preview { padding: 0; columns: 2; column-gap: 0; max-height: none; }
  .split-tile { margin-bottom: 0; }
  /* Schwarzfläche bleibt – das Licht macht der Finger */
  .split-panel.is-open .split-preview::after { opacity: .66; }
  .split-preview--torch {
    display: block; position: absolute; inset: 0; flex: none; z-index: 1;
    filter: none; opacity: 0; pointer-events: none;
    --tx: 50%; --ty: 40%;
    -webkit-mask-image: radial-gradient(circle 150px at var(--tx) var(--ty), #000 35%, rgba(0,0,0,.55) 65%, transparent 100%);
            mask-image: radial-gradient(circle 150px at var(--tx) var(--ty), #000 35%, rgba(0,0,0,.55) 65%, transparent 100%);
    transition: opacity .7s var(--ease);
  }
  .split-preview--torch::after { display: none; }
  .split-preview--torch .split-tile { break-inside: avoid; }
  .split-panel.is-open .split-preview--torch, .split:hover .split-panel .split-preview--torch { filter: none; opacity: 0; }
  .split-panel.is-open.is-lit .split-preview--torch, .split-panel.is-lit .split-preview--torch { opacity: 1; transition: opacity .15s var(--ease); }
  .split-panel { touch-action: pan-y; }

  /* ---- Skizze ↔ Reinzeichnung: Vergleichsregler ---- */
  .compare {
    display: block; position: relative; margin: 0 var(--gutter) 14px; max-height: 70svh; overflow: hidden;
    background: var(--tile); box-shadow: 0 0 0 1px var(--line); touch-action: pan-y; user-select: none; -webkit-user-select: none;
  }
  .compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
  .compare-a { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
  .compare-handle {
    position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
    background: var(--accent); box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 70%, transparent);
  }
  .compare-handle i {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--accent); color: var(--accent);
    font-style: normal; font-family: var(--font-mono); font-size: 11px; letter-spacing: -1px;
  }
  .compare-label, .compare-hint {
    position: absolute; bottom: 10px; padding: 4px 8px;
    font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--fg); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(6px);
  }
  .compare-label--a { left: 10px; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .compare-label--b { right: 10px; max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .compare-hint { top: 10px; bottom: auto; left: 50%; transform: translateX(-50%); color: var(--muted); transition: opacity .6s; white-space: nowrap; }
  .compare.is-used .compare-hint { opacity: 0; }
  .seli { width: 110px; }
  .landing-foot { padding: 0 var(--gutter); justify-content: center; }
  .landing-foot .landing-foot-brand { display: none; }
  .landing-foot .foot-links { gap: 16px; }
  .split-hint {
    display: inline-flex; position: absolute; left: var(--gutter); bottom: 64px; z-index: 3;
    font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
    display: inline-flex; align-items: center; gap: 10px;
    opacity: 0; transition: opacity .8s var(--ease) .3s;
  }
  .split-panel.is-open .split-hint { opacity: 1; }
  .split-hint::after { content: ""; width: 22px; height: 1px; background: var(--accent); }
  .split-scroll { display: block; position: absolute; right: var(--gutter); bottom: 60px; z-index: 3; color: var(--accent); font-size: 1.1rem; opacity: 0; transition: opacity .8s var(--ease) .3s; animation: bob 1.6s ease-in-out infinite; }
  .split-panel.is-open .split-scroll { opacity: 1; }
  .seal-floating { top: 14px; }
  .bulb-floating { top: 14px; }
  
  /* ---- Galerie: zwei Spalten, Titel unter dem Bild, Fokus beim Scrollen ---- */
  .masonry { columns: 2; padding-top: var(--gap); }
  .tile { margin-bottom: 18px; box-shadow: none; background: transparent; }
  .tile-frame { position: relative; overflow: hidden; background: var(--tile); box-shadow: 0 0 0 1px var(--line); }
  .tile-caption {
    position: static; opacity: 1; transform: none; padding: 9px 2px 0;
    background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none;
    font-size: 1.05rem; color: var(--muted); transition: color .6s var(--ease);
  }
  .tile-caption small { margin-top: 3px; font-size: .62rem; letter-spacing: .1em; }
  .tile.is-focus .tile-hover { opacity: 1; }
  .tile.is-focus .tile-media { transform: scale(1.02); }
  .tile.is-focus .tile-caption { color: var(--fg); }
  .tile.is-focus .tile-frame { box-shadow: 0 0 0 1px var(--accent), 0 18px 40px -18px color-mix(in srgb, var(--accent) 60%, transparent); }

  /* ---- Projektseite: Medien als wischbare Reihe, Text darunter ---- */
  .project { grid-template-columns: 1fr; gap: 22px; padding: var(--gap) 0 0; }
  .project-media {
    columns: auto; display: flex; gap: 12px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; padding: 0 var(--gutter) 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .project-media::-webkit-scrollbar { display: none; }
  .project-item { flex: 0 0 84%; margin: 0; scroll-snap-align: center; display: grid; place-items: center; background: var(--tile); }
  .project-item img, .project-item video, .project-item .lazy { width: 100%; height: 62svh; object-fit: contain; }
  .project-item .lazy img { height: 100%; filter: blur(1px) brightness(.85); }
  .project-item .lazy { display: grid; place-items: center; }
  .project-counter {
    display: flex; justify-content: space-between; align-items: center; padding: 0 var(--gutter);
    font-family: var(--font-mono); font-size: var(--t-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  }
  .project-counter b { font-weight: 500; color: var(--fg); }
  .project-counter i { font-style: normal; color: var(--accent); }
  .project-text { position: static; order: 0; padding: 0 var(--gutter); }
  .project-desc { max-width: none; }

  .about { grid-template-columns: 1fr; gap: 28px; }
  .about-figure { padding-top: 0; }
  .about-figure img { width: 180px; margin: 0 auto; }
  .foot { grid-template-columns: 1fr; justify-items: center; margin-top: 36px; min-height: 0; padding-bottom: 54px; }
  .foot-brand, .foot-space { display: none; }
  .foot-links { justify-content: center; flex-wrap: wrap; gap: 8px 20px; padding: 14px 0 10px; }
}
@keyframes flicker { 0% { opacity: 1; } 50% { opacity: .25; } 100% { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .stroke .reveal { transform: none; animation: none; }
}
