/* Gestaltung nach DESIGN.md (Framer): dunkle Fläche, weiße Schrift, ein blauer Akzent. */

@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --primary: #ffffff;
  --on-primary: #000000;
  --accent-blue: #0099ff;
  --ink: #ffffff;
  --ink-muted: #999999;
  --canvas: #040404;
  --surface-1: #141414;
  --surface-2: #1c1c1c;
  --hairline: #262626;
  --hairline-soft: #1a1a1a;

  --rounded-xs: 4px;
  --rounded-sm: 6px;
  --rounded-md: 10px;
  --rounded-lg: 15px;
  --rounded-xl: 20px;
  --rounded-xxl: 30px;
  --rounded-pill: 100px;

  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 15px;
  --space-lg: 20px;
  --space-xl: 30px;
  --space-xxl: 40px;
  --space-section: clamp(80px, 10vw, 120px);

  --font-sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Public Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --container: 1200px;
  --measure: 680px;
  --measure-wide: 780px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: var(--rounded-xs);
}

::selection {
  background: var(--accent-blue);
  color: var(--on-primary);
}

/* Nur für Screenreader, zum Beispiel der Hinweis auf einen neuen Tab. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 30px);
}

.skip-link {
  position: absolute;
  left: var(--space-lg);
  top: -100px;
  z-index: 20;
  padding: 10px 15px;
  border-radius: var(--rounded-pill);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* ---------- Typografie ---------- */

/* Größen wie auf framer.com: H1 54/42/36px, H2 44/36/28px (Desktop/Tablet/Mobil).
   Zeilenhöhe der H1 etwas großzügiger als dort, damit Umlaute nicht anstoßen. */
.display-xxl,
.display-xl,
.display-lg {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.display-xxl,
.display-xl {
  font-size: 64px;
  line-height: 1.05;
}

.display-lg {
  font-size: 44px;
  line-height: 1.1;
}

.lead {
  max-width: 34em;
  color: var(--ink-muted);
  font-size: 18px;
  line-height: 1.35;
  text-wrap: pretty;
}

.eyebrow {
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.eyebrow a {
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

.eyebrow a:hover {
  color: var(--ink);
}

/* ---------- Navigation ---------- */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(4, 4, 4, 0.8);
  border-bottom: 1px solid var(--hairline-soft);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  height: 56px;
}

.wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.wordmark-short {
  display: none;
}

.wordmark img {
  display: block;
  width: auto;
  height: 32px;
  max-width: 45vw;
  object-fit: contain;
  object-position: left center;
}

.top-nav nav {
  display: flex;
  gap: var(--space-xxs);
}

.top-nav nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-sm);
  border-radius: var(--rounded-pill);
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}

.top-nav nav a:hover,
.top-nav nav a[aria-current] {
  color: var(--ink);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--rounded-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: transform 0.15s, background-color 0.15s;
}

.button:active {
  transform: scale(0.97);
}

.button--primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button--primary:hover {
  background: #e6e6e6;
}

.button--secondary {
  background: var(--surface-1);
  color: var(--ink);
}

.button--secondary:hover {
  background: var(--surface-2);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ---------- Startseite und Abschnitte ---------- */

/* Hero über die volle Breite, dahinter die Terminal-Animation (src/js/hero-terminal.js). */
.hero {
  position: relative;
  isolation: isolate;
}

/* Blendet nach unten in den Seitenhintergrund aus. */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 100%);
}

/* Einzelseiten: nur am Seitenanfang statt hinter dem ganzen Inhalt. */
.hero-bg--top {
  bottom: auto;
  height: 80vh;
}

.hero-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hält die Terminal-Animation an, oben rechts im Hero. */
.hero-pause {
  position: absolute;
  top: var(--space-xs);
  right: clamp(20px, 4vw, 30px);
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: var(--rounded-pill);
  background: none;
  color: var(--ink-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.hero-pause:hover {
  color: var(--ink);
}

/* Hero zentriert: Profil-Pille oben, darunter Titel, Text und Buttons. */
.hero-split {
  display: grid;
  justify-items: center;
  gap: var(--space-xxl);
  padding-block: clamp(72px, 14vw, 180px);
  text-align: center;
}

.hero-split-text {
  display: grid;
  justify-items: center;
  gap: var(--space-xl);
}

.hero-split-text h1 {
  max-width: 11em;
}

.hero-split-text .lead {
  max-width: 30em;
  text-wrap: balance;
}

.hero-split .actions {
  justify-content: center;
}

/* Profil als Pille: rundes Thumbnail links, daneben Name und Rolle. */
.profile-pill {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  text-align: left;
  padding: var(--space-sm) var(--space-xxl) var(--space-sm) var(--space-sm);
  border-radius: var(--rounded-pill);
  /*background: var(--surface-1);*/
  font-size: 17px;
  line-height: 1.6;
  white-space: nowrap;
  background: linear-gradient(90deg, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0) 100%);
  border: 1px solid #1a1a1a;
  mask: linear-gradient(270deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 24.478%, rgb(0, 0, 0) 54.6942%);
  overflow: clip
}

.profile-avatar {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-role {
  color: var(--ink-muted);
}

.section {
  padding-block: 0 var(--space-section);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-sm) var(--space-lg);
  margin-bottom: var(--space-xxl);
}

.more-link {
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.more-link::after {
  content: " →";
}

.more-link:hover {
  color: var(--ink);
}

.page-head {
  display: grid;
  gap: var(--space-lg);
  padding-block: clamp(56px, 10vw, 120px) clamp(40px, 6vw, 64px);
}

.list-body {
  padding-bottom: var(--space-section);
}

.empty {
  color: var(--ink-muted);
}

/* ---------- Projektkarten ---------- */

.card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-sm);
  height: 100%;
  min-height: 280px;
  padding: var(--space-xl);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-xl);
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Angekündigte Projekte ("comingSoon"): Karte ohne Link, also auch ohne Hover-Effekt. */
.card.is-soon:hover {
  border-color: var(--hairline);
  transform: none;
}

.badge {
  align-self: flex-start;
  padding: var(--space-xxs) var(--space-sm);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.card-meta {
  margin-bottom: auto;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.2px;
  text-wrap: balance;
}

.card p {
  max-width: 32em;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1.4;
}

/* Startseite: große Karte mit Titelbild links, weitere Projekte rechts untereinander. */
.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-lg);
}

.feature-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.feature-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.feature-side li {
  flex: 1;
}

.feature-side .card {
  min-height: 0;
  padding: var(--space-lg);
}

.feature-side .card-title {
  font-size: 18px;
  line-height: 1.35;
}

.feature-side .card p {
  font-size: 15px;
}

.card--lead {
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

/* Festes Seitenverhältnis, damit beim Laden nichts springt. */
.card-cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--hairline);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-xl);
}

.card-cover + .card-body .card-meta {
  margin-bottom: 0;
}

/* Projektübersicht: Zeilen untereinander, links das Titelbild, rechts die Vorschau. */
.project-list {
  display: grid;
  gap: var(--space-lg);
}

.project-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-xl);
  transition: border-color 0.2s;
}

.project-row:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.project-row-media {
  position: relative;
  border-right: 1px solid var(--hairline);
  background: var(--surface-1);
}

.project-row-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-row-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  justify-self: center;
  gap: var(--space-md);
  width: 100%;
  max-width: 440px;
  padding: var(--space-xxl);
}

.project-row-body .card-meta {
  margin-bottom: 0;
}

.project-row-body p {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.4;
}

.project-row-cta {
  margin-top: var(--space-xs);
  font-size: 14px;
  font-weight: 500;
}

.project-row-cta::after {
  content: " →";
}

/* Startseite: Artikelkarten, etwas flacher als die Projektzeilen. */
.project-row--post {
  min-height: 300px;
}

/* Artikel ohne Titelbild: der Text nutzt die ganze Karte. */
.project-row--plain {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.project-row--plain .project-row-body {
  justify-self: start;
  max-width: 720px;
}

/* ---------- Artikel, Projekt, Einzelseite ---------- */

.article {
  max-width: calc(var(--measure) + 2 * 30px);
  padding-block: clamp(56px, 9vw, 104px) var(--space-section);
}

/* Blogartikel und Projektseiten sind breiter als Einzelseiten. */
.article-wide {
  max-width: calc(var(--measure-wide) + 2 * 30px);
}

.article-head {
  display: grid;
  gap: var(--space-lg);
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* Festes Seitenverhältnis, damit beim Laden nichts springt. */
.article-hero {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--rounded-lg);
}

.facts {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--rounded-xl);
  background: var(--surface-1);
}

.facts div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
}

.facts dt {
  color: var(--ink-muted);
}

.facts a {
  color: var(--accent-blue);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

.facts a:hover {
  text-decoration-thickness: 1px;
}

.back {
  margin-top: clamp(48px, 7vw, 72px);
}

/* Fließtext: größer und luftiger als das UI, damit lange Texte gut lesbar sind. */
.prose {
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.prose > * + * {
  margin-top: 1.25em;
}

.prose h2,
.prose h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 400;
  text-wrap: balance;
}

.prose h2 {
  margin-top: 2em;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.prose a {
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 1px;
}

/* Pfeil an Links, die in einem neuen Tab öffnen. Der leere Text nach dem Schrägstrich
   verhindert, dass Screenreader den Pfeil vorlesen, den Hinweis liefert .visually-hidden. */
.prose a[target="_blank"]::after,
.facts a[target="_blank"]::after,
.footer a[target="_blank"]::after {
  display: inline-block;
  margin-left: 0.2em;
  content: "↗";
  content: "↗" / "";
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose ul {
  list-style: disc;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--ink-muted);
}

.prose blockquote {
  margin-inline: 0;
  padding-left: var(--space-lg);
  border-left: 2px solid var(--hairline);
  color: var(--ink-muted);
}

.prose hr {
  margin-block: 2.5em;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.prose img {
  display: block;
  border-radius: var(--rounded-lg);
}

/* Galerie: so viele Bilder pro Reihe, wie der Build in --gallery-columns angibt (2 bis 4).
   Wird ein Bild schmaler als --gallery-min, passt eine Spalte weniger in die Reihe,
   zwei bleiben es immer. Gerechnet wird mit der Breite des Textes, nicht des Fensters. */
.prose .gallery {
  --gallery-gap: var(--space-sm);
  --gallery-min: 150px;
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(
      max(
        min(var(--gallery-min), (100% - var(--gallery-gap)) / 2),
        (100% - (var(--gallery-columns) - 1) * var(--gallery-gap)) / var(--gallery-columns)
      ),
      1fr
    )
  );
  gap: var(--gallery-gap);
}

.prose .gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Lightbox: Bilder im Text, in Galerien und das Titelbild sind Links und öffnen groß.
   Das Titelbild steht außerhalb von .prose, deshalb gelten die Regeln überall. */
.lightbox-link {
  display: block;
  border-radius: var(--rounded-lg);
  text-decoration: none;
  cursor: zoom-in;
}

/* Die Seite dahinter scrollt nicht mit. Der Platz der Bildlaufleiste bleibt frei,
   damit beim Öffnen nichts springt. */
html:has(.lightbox[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: var(--space-xxl) 76px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--ink);
  touch-action: pinch-zoom;
}

.lightbox[open] {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox [hidden] {
  display: none;
}

.lightbox-shade {
  position: absolute;
  inset: 0;
  background: rgb(4 4 4 / 0.94);
  cursor: zoom-out;
}

.lightbox-image {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: var(--rounded-md);
  user-select: none;
}

.lightbox-button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-pill);
  background: rgb(20 20 20 / 0.8);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.lightbox-button:hover {
  border-color: var(--ink-muted);
  background: var(--surface-2);
}

.lightbox-button:focus-visible {
  border-radius: var(--rounded-pill);
}

.lightbox-close {
  top: var(--space-md);
  right: var(--space-md);
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  translate: 0 -50%;
}

.lightbox-prev {
  left: var(--space-md);
}

.lightbox-next {
  right: var(--space-md);
}

.lightbox-counter {
  position: absolute;
  top: var(--space-md);
  left: var(--space-lg);
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 44px;
}

/* Beim Schließen verschwinden die Bedienelemente sofort, nur das Bild schrumpft zurück. */
.lightbox--closing .lightbox-button,
.lightbox--closing .lightbox-counter {
  visibility: hidden;
}

/* Auf schmalen Bildschirmen bekommt das Bild die ganze Breite, die Pfeile liegen darüber. */
@media (max-width: 700px) {
  .lightbox {
    padding: 72px var(--space-sm);
  }

  .lightbox-prev {
    left: var(--space-xs);
  }

  .lightbox-next {
    right: var(--space-xs);
  }
}

/* Videos im Text. Ohne JavaScript gilt die erste Regel, sonst übernimmt Video.js. */
.prose video:not(.vjs-tech) {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--rounded-lg);
  background: var(--surface-1);
}

.prose .video-js {
  overflow: hidden;
  border-radius: var(--rounded-lg);
  background: var(--surface-1);
  font-family: inherit;
}

/* Hochkant-Videos nicht über die ganze Textbreite. */
.prose .video--portrait {
  max-width: 360px;
  margin-inline: auto;
}

.prose .video-js .vjs-big-play-button {
  border-color: var(--primary);
  border-radius: 50%;
  width: 2em;
  height: 2em;
  margin: -1em 0 0 -1em;
  background: rgba(0, 0, 0, 0.6);
  line-height: 2em;
}

.prose .video-js .vjs-play-progress,
.prose .video-js .vjs-volume-level {
  background: var(--accent-blue);
}

/* YouTube-Videos im Text: Vorschaubild mit Abspielknopf, nach dem Klick der Player. */
.prose .youtube {
  display: block;
}

.prose .youtube-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: 0;
  border-radius: var(--rounded-lg);
  background: var(--surface-1);
}

.prose .youtube-frame img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.prose .youtube-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%);
}

.prose .youtube-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-block: 11px solid transparent;
  border-left: 18px solid var(--primary);
  transform: translate(-50%, -50%);
}

.prose .youtube-label {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  padding: var(--space-xxs) var(--space-sm);
  border-radius: var(--rounded-pill);
  background: rgba(0, 0, 0, 0.6);
  color: var(--ink);
  font-size: 0.8em;
}

.prose a.youtube-frame:hover .youtube-play,
.prose a.youtube-frame:focus-visible .youtube-play {
  border-color: var(--accent-blue);
}

.prose .youtube-note {
  display: block;
  margin-top: var(--space-xs);
  color: var(--ink-muted);
  font-size: 0.8em;
}

.prose .youtube--portrait {
  max-width: 360px;
  margin-inline: auto;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  letter-spacing: 0;
}

.prose :not(pre) > code {
  padding: 0.15em 0.4em;
  border-radius: var(--rounded-sm);
  background: var(--surface-2);
}

.prose pre {
  padding: var(--space-lg);
  overflow-x: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  background: var(--surface-1);
  line-height: 1.55;
  tab-size: 2;
}

.prose .table-scroll {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
}

.prose th,
.prose td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
}

.prose th {
  color: var(--ink-muted);
  font-weight: 500;
}

/* ---------- Syntax-Highlighting (highlight.js) ---------- */

.hljs-comment,
.hljs-quote,
.hljs-meta {
  color: var(--ink-muted);
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-built_in,
.hljs-type {
  color: #e38cf5;
}

.hljs-string,
.hljs-regexp,
.hljs-addition {
  color: #ffa477;
}

.hljs-number,
.hljs-attr,
.hljs-attribute,
.hljs-variable,
.hljs-template-variable,
.hljs-symbol {
  color: #4db8ff;
}

.hljs-title,
.hljs-section,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
  color: #a99bff;
}

.hljs-deletion {
  color: #ff8098;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-strong {
  font-weight: 700;
}

/* ---------- 404 ---------- */

/* Schmaler Block mittig im Fenster, der Inhalt darin linksbündig. */
.not-found {
  display: grid;
  place-content: center;
  min-height: 70vh;
  padding-block: var(--space-section);
}

.not-found-inner {
  display: grid;
  justify-items: start;
  gap: var(--space-xl);
  max-width: 420px;
}

.not-found-text {
  display: grid;
  gap: var(--space-sm);
}

/* Raster aus 4 × 4 Punkten, die versetzt aufblinken. */
.spark-grid {
  display: grid;
  grid-template-columns: repeat(4, 4px);
  gap: 4px;
}

.spark-grid span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.3;
  animation: spark 1.2s linear infinite;
}

.spark-grid span:nth-child(4n + 1) { animation-delay: -0.825s; }
.spark-grid span:nth-child(4n + 2) { animation-delay: -0.375s; }
.spark-grid span:nth-child(4n + 3) { animation-delay: -0.975s; }
.spark-grid span:nth-child(4n) { animation-delay: -0.225s; }
.spark-grid span:nth-child(3n) { animation-delay: -0.6s; }
.spark-grid span:nth-child(5n) { animation-delay: -1.05s; }
.spark-grid span:nth-child(7n) { animation-delay: -0.075s; }

@keyframes spark {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }

  20% {
    opacity: 1;
  }
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--hairline-soft);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 500;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-xl);
  padding-block: var(--space-xl);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-lg);
}

.footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.15s;
}

.footer a:hover {
  color: var(--ink);
}

/* ---------- Kleine Bildschirme ---------- */

@media (max-width: 1199px) {
  .project-row {
    min-height: 320px;
  }

  .project-row--post {
    min-height: 260px;
  }

  .project-row--plain {
    min-height: 0;
  }

  .display-xxl,
  .display-xl {
    font-size: 42px;
  }

  .display-lg {
    font-size: 36px;
  }

  .card-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .feature-side .card-title {
    font-size: 18px;
    line-height: 1.35;
  }

  .prose h2 {
    font-size: 26px;
  }
}

@media (max-width: 809px) {
  .display-xxl,
  .display-xl {
    font-size: 36px;
  }

  .display-lg {
    font-size: 28px;
  }

  .prose h2 {
    font-size: 24px;
  }

  .profile-pill {
    max-width: 100%;
    padding-right: var(--space-xl);
    font-size: 15px;
    white-space: normal;
  }

  .profile-avatar {
    width: 52px;
    height: 52px;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .project-row {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .project-row-media {
    aspect-ratio: 16 / 9;
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
  }

  .project-row-body {
    max-width: none;
    padding: var(--space-xl);
  }

  .card {
    min-height: 220px;
    padding: var(--space-lg);
  }

  .card--lead {
    padding: 0;
  }

  .card-body {
    padding: var(--space-lg);
  }
}

@media (max-width: 479px) {
  .wordmark-full {
    display: none;
  }

  .wordmark-short {
    display: inline;
  }

  .wordmark img {
    max-width: 30vw;
  }

  .top-nav nav a {
    padding-inline: var(--space-xs);
  }

  .prose {
    font-size: 17px;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 359px) {
  .top-nav-inner {
    gap: var(--space-xs);
  }

  .top-nav nav {
    gap: 0;
  }

  .top-nav nav a {
    padding-inline: 5px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .spark-grid span {
    animation: none;
  }
}
