@font-face {
  font-family: "Special Elite";
  src: url("fonts/SpecialElite-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: url("fonts/CourierPrime-Italic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #111;
  --text: #ddd;
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Special Elite", "Courier New", monospace;
}

.landing {
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: start;
  padding: 0 5vw;
}

.seite {
  max-width: 60rem;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.seite h1 {
  font-size: clamp(2rem, 8vw, 4rem);
  margin-bottom: 2rem;
}

/* Projektübersicht Styles */
.karten {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: 2.5rem 2rem;
}

.karte a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.karte img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.karte img,
.karte video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.karte h2 {
  font-size: 1.5rem;
  margin: 0.75rem 0 0.25rem;
}

.karte p {
  line-height: 1.5;
  opacity: 0.8;
}

.karte a:hover h2 {
  text-decoration: underline;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.tags li {
  font-size: 0.8rem;
  border: 1px solid currentColor;
  padding: 0.1rem 0.5rem;
  opacity: 0.6;
}

/* Text Styles */
.lesetext {
  max-width: 65ch;
  font-family: "Courier Prime", "Courier New", monospace;
  font-size: 1.125rem;
  line-height: 1.7;
  hyphens: auto;
}

.lesetext .projekt-kopf {
  font-family: "Special Elite", "Courier New", monospace;
  margin-bottom: 2.5rem;
}

.lesetext p + p {
  margin-top: 1em;
}

.lesetext h2 {
  font-family: "Special Elite", "Courier New", monospace;
  font-size: 1.4rem;
  margin: 2.5rem 0 1rem;
}

.lesetext blockquote {
  margin: 1.5rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid currentColor;
  opacity: 0.85;
}

.lesetext blockquote footer {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

.gedicht {
  white-space: pre-line;
}

.gedicht p + p {
  margin-top: 1.75em;
}

.zurueck {
  display: inline-block;
  margin-bottom: 2rem;
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
}

.zurueck:hover {
  opacity: 1;
}

.projekt-kopf .meta {
  opacity: 0.6;
  margin-top: 0.25rem;
}

.text {
  max-width: 65ch;
  line-height: 1.6;
  margin: 2rem 0 3rem;
}

.text p + p {
  margin-top: 1em;
}

/* Foto Styles */
/* Galerie Styles */
.galerie {
  display: grid;
  gap: 1.5rem;
}

.galerie img {
  display: block;
  width: 100%;
  height: auto;
}

.galerie figcaption {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 0.5rem;
}

/* Mosaik Styles */
.mosaik {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
  grid-auto-rows: 9rem;
  grid-auto-flow: dense;
  gap: 0.5rem;
}

.mosaik a {
  display: block;
  height: 100%;
}

.mosaik img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--fokus, center);
}

.mosaik .breit { grid-column: span 2; }
.mosaik .hoch  { grid-row: span 2; }
.mosaik .gross { grid-column: span 2; grid-row: span 2; }

/* Pinnwand Styles */
.pinnwand {
  columns: 3 9rem;
  column-gap: 0.75rem;
}

.pinnwand figure {
  break-inside: avoid;
  margin-bottom: 0.75rem;
}

.pinnwand img {
  display: block;
  width: 100%;
  height: auto;
}

.pinnwand figcaption {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 0.35rem;
}

/* Cover Styles */
.cover {
  max-width: 24rem;
  margin-bottom: 1.5rem;
}

.cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* Audio Player Styles */
.player {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.play {
  width: 3rem;
  height: 3rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: none;
  color: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.play:hover,
.play:focus-visible {
  background: var(--text);
  color: var(--bg);
}

.zeit {
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.zeitleiste {
  flex: 1;
  accent-color: var(--text);
  cursor: pointer;
}

/* Simulation Styles */
canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  touch-action: none;
  cursor: crosshair;
}

.steuerung,
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.presets {
  margin-top: 1.5rem;
}

.steuerung button,
.presets button {
  font: inherit;
  color: inherit;
  background: none;
  border: 1px solid currentColor;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
}

.steuerung button:hover,
.steuerung button:focus-visible,
.presets button:hover,
.presets button:focus-visible,
.presets button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.preset-info {
  margin-top: 1rem;
  max-width: 65ch;
}

.preset-info summary {
  cursor: pointer;
}

.preset-info p {
  margin-top: 0.5rem;
  line-height: 1.6;
  opacity: 0.8;
}

.doku {
  margin-top: 4rem;
}

.doku ul {
  padding-left: 1.25rem;
  margin-top: 1rem;
}

.doku li + li {
  margin-top: 0.4rem;
}

.code {
  margin-top: 2.5rem;
}

.code summary {
  font-family: "Special Elite", "Courier New", monospace;
  cursor: pointer;
}

pre {
  margin-top: 1rem;
  padding: 1rem;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  line-height: 1.5;
  tab-size: 2;
}

.attraktor-feld {
  aspect-ratio: 1 / 1;
  image-rendering: auto;
}

/* Landing Styles */
#name {
  white-space: pre-line;
  text-align: left;
  font-size: clamp(5rem, 15vw, 20rem);
  line-height: 1.1;
}

#name::after {
  content: "_";
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Menu Styles */
.menu-btn {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 4rem 1.5rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.menu.offen {
  opacity: 1;
  visibility: visible;
}

.menu ul {
  list-style: none;
  text-align: center;
}

.menu a {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(1.25rem, 6vw, 2.5rem);
}

@media (max-width: 600px) {
  #name {
    font-size: clamp(2.5rem, 12vw, 6rem);
  }
}