/* =========================================================================
   Dominic Euringer – Medienproduktion
   Editorial-minimal. Paper-Grund, viel Weißraum, ein matter Türkis-Akzent,
   sehr dezent eingesetzt. Fonts: Space Grotesk + IBM Plex Mono.
   ========================================================================= */

/* ---- Schriften (lokal gehostet, kein Google-Fonts-Aufruf) ----
   Bezugsquelle: fonts.google.com, SIL Open Font License 1.1.
   Nur die Subsets latin + latin-ext, nur die tatsaechlich benutzten Schnitte.
   Neu erzeugen: siehe README.md, Abschnitt "Schriften".
   ------------------------------------------------------------ */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Design Tokens ---- */
:root {
  --ink:       #17171A;   /* Text, dunkle Flächen */
  --ink-2:     #202024;   /* Formularfelder auf Dunkel */
  --paper:     #FAFAF8;   /* Grundfläche */
  --graphite:  #6E6E73;   /* Sekundärtext, Labels */
  --line:      #E5E5DF;   /* Hairlines auf Hell */
  --line-2:    #2C2C31;   /* Hairlines auf Dunkel */
  --grey-dark: #25252A;   /* dunkelgraue Sektionen im Wechsel */
  --line-dk:   #34343B;   /* Hairlines auf Dunkelgrau */
  --accent:    #2C766A;   /* mattes Türkis, NUR sehr dezent */

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);

  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-display);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Sticky Footer: bei kurzen Seiten (Impressum, Datenschutz) sitzt der
     Footer am unteren Fensterrand statt mitten auf der Seite. */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ol, ul { list-style: none; padding: 0; }

/* ---- Layout ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

/* Dunkelgraue Sektion im Wechsel */
.section--dark { background: var(--grey-dark); color: #E7E7E9; }
.section--dark .eyebrow { color: #A9A9AE; }
.section--dark .section-head h2 { color: #FAFAF8; }
.section--dark .section-head p { color: #A9A9AE; }

/* ---- Typography ---- */
h1, h2, h3 { font-weight: 700; line-height: 1.05; letter-spacing: -0.03em; }
p { max-width: 64ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--graphite);
}
.eyebrow::before { content: "// "; color: var(--accent); }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head .eyebrow { display: block; margin-bottom: 1rem; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.section-head p { margin-top: 1.1rem; color: var(--graphite); font-size: 1.05rem; }

/* Focus + link */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.link {
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px; background-repeat: no-repeat; background-position: left 100%;
  transition: background-size 0.3s var(--ease); padding-bottom: 1px;
}
.link:hover, .link:focus-visible { background-size: 100% 1.5px; }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,250,248,0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: baseline; gap: 0.6rem; }
.brand__name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.02em; color: var(--ink); }
.brand__desc { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--graphite); }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--graphite); transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__toggle { display: none; background: none; border: 0; color: var(--ink); padding: 0.5rem; }
.nav__toggle svg { width: 26px; height: 26px; }

/* =========================================================================
   Hero: randloses Bild, dunkler Verlauf, heller Text rechts
   ========================================================================= */
/* Höhe: normale Screens bleiben bei 760px (Floor), breite Monitore wachsen kontrolliert höher (bis 980px),
   damit oben/unten weniger beschnitten wird und mehr von der Kamera sichtbar ist. Handy kleiner via Media Query unten. */
.hero { position: relative; width: 100%; height: clamp(760px, 50vw, 980px); overflow: hidden; background: var(--ink); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
/* Dunkler Schleier – rechts (wo der Text sitzt) und unten kräftiger, damit heller Text sicher lesbar ist */
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0%, transparent 32%, rgba(15,15,17,0.68) 76%, rgba(15,15,17,0.82) 100%),
    linear-gradient(0deg, rgba(15,15,17,0.55) 0%, transparent 42%);
}
/* Breiteres Band als der übrige Inhalt, damit der rechtsbündige Text weiter nach rechts rückt; vertikal mittig */
.hero__inner { position: relative; height: 100%; max-width: 1560px; display: flex; align-items: center; }
.hero__id { margin-left: auto; text-align: right; }
.hero__name {
  font-size: clamp(2.2rem, 6vw, 5rem); white-space: nowrap;
  font-weight: 700; letter-spacing: -0.04em; line-height: 0.98; color: #FAFAF8;
}
.hero__role {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1.5vw, 1.05rem);
  letter-spacing: 0.22em; text-transform: uppercase; color: #D8D8DA;
  margin-top: 0.9rem;
}
.hero__summary {
  color: #E7E7E9; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.55;
  margin-top: 2.2rem; margin-left: auto; max-width: 38rem;
}

/* =========================================================================
   Ausgewählte Projekte (Karten-Raster)
   ========================================================================= */
/* Etwas breiteres Band als der übrige Inhalt, damit die vier Karten mehr Platz bekommen */
#projekte .wrap { max-width: 1340px; }
.projects { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(2rem, 3.5vw, 3.5rem); }
.project-card { display: flex; flex-direction: column; }
.project-card__media {
  aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 1rem;
  border-radius: 8px; border: 1px solid var(--line-dk); background: #1C1C20;
}
.project-card__media img { width: 100%; height: 100%; object-fit: cover; }

/* Karten mit Videoseite: Schleier + Play-Button.
   Nur die Karten, die auch eine Unterseite haben, bekommen den Link. */
/* Als <a> (Projekt 1 → Unterseite) und als <button> (Einzelvideo direkt) genutzt;
   der Reset macht den Button flächenfüllend und randlos wie den Link. */
.project-card__link {
  position: relative; display: block; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; color: inherit; text-align: inherit;
}
.project-card__link::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.48);
  transition: background 0.3s var(--ease);
}
.project-card__link:hover::after,
.project-card__link:focus-visible::after { background: rgba(0, 0, 0, 0.62); }

.project-card__play {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  color: #FAFAF8;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.project-card__play svg { width: clamp(62px, 6vw, 78px); height: auto; }
.project-card__link:hover .project-card__play,
.project-card__link:focus-visible .project-card__play {
  color: var(--accent); transform: scale(1.07);
}
/* Der Fokusring gehört um die ganze Kachel, nicht um das Bild darin */
.project-card__link:focus-visible { outline-offset: -2px; }

.project-card__title { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: #FAFAF8; }
.project-card__desc { margin-top: 0.5rem; font-size: 0.96rem; line-height: 1.5; color: #C7C7CC; }
.project-card__role {
  margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: #8A8A90;
}

/* Ohne Trennlinie zu den Projekten; der Abstand allein setzt den Block ab. */
.clients {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
/* Deutlich kleiner als die Firmennamen – die Zeile ist Beschriftung, nicht Inhalt */
.clients__label {
  display: block; margin-bottom: 0.5rem; font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: #8A8A90;
}
.clients__list { font-size: 0.92rem; line-height: 1.6; color: #C7C7CC; }

/* =========================================================================
   KI-Generierung
   ========================================================================= */
/* Trennlinie zwischen den beiden dunklen Blöcken (Projekte / KI) */
.section--ki { border-top: 1px solid var(--line-dk); }
/* Linksbündig wie Überschrift und Fließtext der Sektion. Zentriert stand die
   Bildunterschrift nicht unter dem Video, weil die Breitenbegrenzung für
   Fließtext sie nach links zieht. */
.ki-video { margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.ki-video .eyebrow { display: block; margin-bottom: 1rem; }
/* Breite wie beim früheren festen Rahmen, damit das Video nicht die ganze
   Sektion einnimmt */
.ki-video .vgal { max-width: 820px; }
.ki-video__caption {
  margin-top: 0.85rem; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: #8A8A90;
}

/* =========================================================================
   Über mich
   ========================================================================= */
.about__lead { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); max-width: 40ch; }
.about__grid { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.about__text p { color: #3A3A3E; max-width: 60ch; }
.about__text p + p { margin-top: 1rem; }

/* Über-mich-Bild (3:2, natives Kameraformat) – Figur als Seitenverhältnis-Box, Bild füllt sie */
.about__media {
  margin: 0; aspect-ratio: 3 / 2; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--line);
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================================
   Kontakt
   ========================================================================= */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.contact__direct { display: grid; gap: 1.1rem; }
.contact__direct a { display: grid; gap: 0.2rem; }
.contact__direct .lbl { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--graphite); }
.contact__direct .val { font-size: 1.2rem; color: var(--ink); }
.contact__direct a:hover .val { color: var(--accent); }

.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--graphite); }
.field input, .field textarea {
  font-family: var(--font-display); font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.85rem 1rem; width: 100%;
  transition: border-color 0.2s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 150px; resize: vertical; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.25rem; }

.btn-submit {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--ink); color: var(--paper);
  padding: 0.95em 1.6em; border: 1px solid var(--ink); border-radius: 999px;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-submit:hover { background: transparent; color: var(--ink); }
.btn-submit:disabled { opacity: 0.5; cursor: default; }
.btn-submit .arrow { transition: transform 0.25s var(--ease); }
.btn-submit:hover .arrow { transform: translateX(3px); }
.form__note { font-family: var(--font-mono); font-size: 0.7rem; color: var(--graphite); max-width: 32ch; }
.form__status { font-family: var(--font-mono); font-size: 0.82rem; min-height: 1.2em; }
.form__status.ok { color: var(--accent); }
.form__status.err { color: #C0392B; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: var(--paper); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer__brand .brand__name { color: var(--paper); font-size: 1.35rem; }
.footer__brand p { color: var(--graphite); font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 0.4rem; }
.footer__links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.footer__links a { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: #C7C7CC; }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer__bottom span, .footer__bottom a { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--graphite); }
.footer__bottom a:hover { color: var(--accent); }

/* =========================================================================
   Legal (Impressum / Datenschutz)
   ========================================================================= */
.legal { padding-block: clamp(3rem, 7vw, 6rem); }
.legal h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.35rem; margin: 2.5rem 0 0.75rem; letter-spacing: -0.02em; }
.legal h3 { font-size: 1rem; font-weight: 500; margin: 1.75rem 0 0.5rem; letter-spacing: -0.01em; }
.legal p, .legal li { color: #3A3A3E; max-width: 72ch; }
.legal p + p { margin-top: 0.85rem; }
.legal ul { margin: 0.85rem 0 0; padding-left: 1.1rem; list-style: none; }
.legal li { position: relative; margin-top: 0.3rem; }
.legal li::before { content: "–"; position: absolute; left: -1.1rem; color: var(--graphite); }
/* Widerspruchsrecht nach Art. 21 DSGVO: Versalien sind rechtlich gewollt
   (deutliche Hervorhebung), optisch aber zurueckgenommen. */
.legal__caps { font-size: 0.83rem; line-height: 1.65; letter-spacing: 0.01em; }
.legal__source { margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--graphite); }
.legal a { color: var(--ink); }
.legal a:hover { color: var(--accent); }
.legal .todo { display: inline-block; font-family: var(--font-mono); font-size: 0.82rem; background: #FFF3B0; color: #6b5b00; padding: 0.1rem 0.45rem; border-radius: 4px; }
.legal__back { display: inline-flex; margin-bottom: 2rem; font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--graphite); }
.legal__back:hover { color: var(--ink); }

/* =========================================================================
   Scroll-Reveal
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* =========================================================================
   Video-Kacheln und Video-Modal
   Gilt seitenübergreifend: jedes Video der Website läuft im Modal, nie direkt
   in der Seite. Steuerung über js/video.js.
   ========================================================================= */
.vgal {
  /* Seitenverhältnis der Kacheln. Voreinstellung 9:16 (Social-Media-Hochformat);
     abweichende Formate setzen --arw/--arh im HTML, weil das eine Eigenschaft
     der Datei ist und keine Design-Entscheidung. */
  --arw: 9; --arh: 16;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.vgal__item {
  position: relative; display: block;
  width: 100%; aspect-ratio: var(--arw) / var(--arh); overflow: hidden;
  padding: 0; border: 1px solid var(--line); border-radius: 8px;
  background: var(--ink);
}
.vgal__item img { width: 100%; height: 100%; object-fit: cover; }
/* In dunklen Sektionen würde die helle Hairline als Rahmen aufblitzen */
.section--dark .vgal__item { border-color: var(--line-dk); }
.vgal__item::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.48);
  transition: background 0.3s var(--ease);
}
.vgal__item:hover::after,
.vgal__item:focus-visible::after { background: rgba(0, 0, 0, 0.62); }

.vgal__play {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  color: #FAFAF8;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.vgal__play svg { width: clamp(64px, 6.5vw, 84px); height: auto; }
.vgal__item:hover .vgal__play,
.vgal__item:focus-visible .vgal__play { color: var(--accent); transform: scale(1.07); }

/* Einzelnes Video statt Dreierraster */
.vgal--einzeln { grid-template-columns: 1fr; }
/* Querformat darf die volle Breite nehmen … */
.vgal--quer { --arw: 16; --arh: 9; }
/* … Hochformat nicht: sonst wird die Kachel über 1600 px hoch. */
.vgal--einzeln:not(.vgal--quer) .vgal__item { max-width: 26rem; }

/* Bewusst ein normales Overlay und kein <dialog>: ein modales <dialog> liegt in
   der Top-Layer-Ebene des Browsers, und daraus heraus verweigert Chrome den
   Vollbild-Knopf des Players. Escape, Fokus und Scroll-Sperre macht deshalb
   js/video.js selbst. */
.vmodal {
  --arw: 9; --arh: 16;
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(10, 10, 12, 0.86);
  color: var(--paper);
}
/* Muss explizit sein: display: grid würde das hidden-Attribut sonst aushebeln */
.vmodal[hidden] { display: none; }

/* Trägt den Schließen-Knopf; ohne ihn säße der in der Fensterecke statt am Video */
.vmodal__inner { position: relative; }

/* Hochformat: die Höhe führt, die Breite folgt aus dem Verhältnis. Der zweite
   Term deckelt sie so, dass das Video auch auf schmalen Viewports quer
   hineinpasst – sonst entstehen bei object-fit: contain nur schwarze Balken. */
.vmodal__video {
  display: block;
  height: min(88dvh, calc(92vw * var(--arh) / var(--arw)));
  width: auto;
  aspect-ratio: var(--arw) / var(--arh);
  object-fit: contain;
  background: #000;
  border-radius: 10px;
}

/* Querformat: hier führt die Breite und die Höhe deckelt, genau andersherum –
   sonst ragt das Video unten aus dem Fenster. */
.vmodal--quer { --arw: 16; --arh: 9; }
.vmodal--quer .vmodal__video {
  width: min(92vw, calc(88dvh * var(--arw) / var(--arh)));
  height: auto;
}

.vmodal__close {
  position: absolute; top: 0.6rem; right: 0.6rem;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0; border: 1px solid rgba(250, 250, 248, 0.35); border-radius: 999px;
  background: rgba(0, 0, 0, 0.5); color: #FAFAF8;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.vmodal__close svg { width: 20px; height: 20px; }
.vmodal__close:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 820px) {
  .contact { grid-template-columns: 1fr; }
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .nav__links {
    position: fixed; inset: 66px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 1.5rem;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 1.75rem var(--gutter) 2.25rem;
    transform: translateY(-130%); transition: transform 0.35s var(--ease);
  }
  .nav__links.open { transform: translateY(0); }
  .nav__toggle { display: inline-flex; }
  .form__row { grid-template-columns: 1fr; }
  /* Projektbeschreibung über dem Bild anzeigen */
  .project-card__media { order: 4; margin-top: 1.5rem; margin-bottom: 0; }
  /* Hero: Text volle Breite, Verlauf kräftiger, damit heller Text überall lesbar bleibt */
  .hero { height: 520px; }
  .hero__scrim {
    background:
      linear-gradient(90deg, rgba(15,15,17,0.35) 0%, rgba(15,15,17,0.72) 100%),
      linear-gradient(0deg, rgba(15,15,17,0.68) 0%, transparent 55%);
  }
  .hero__id { max-width: none; }
  .hero__summary { max-width: none; }
  .hero__name { white-space: normal; }
  /* Video-Kacheln untereinander */
  .vgal { grid-template-columns: 1fr; gap: 1.5rem; }
  .vgal__item { max-width: 24rem; margin-inline: auto; }
  /* Querformat füllt die Breite aus, die Deckelung auf 24rem gilt dort nicht */
  .vgal--quer .vgal__item { max-width: none; }
}
@media (max-width: 520px) {
  .projects { grid-template-columns: 1fr; gap: 2.5rem; }
  .project-card:not(:last-child) { padding-bottom: 2.5rem; border-bottom: 1px solid rgba(52, 52, 59, 0.4); }
}
