@font-face {
  font-family: "DM Sans";
  src: url("../fonts/DMSans-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --color-bg: #fff;
  --color-bg-content: #f0f1f4;
  --color-bg-section: #f7f7f9;
  --color-bg-footer: #edeef1;
  --color-text: #222;
  --color-text-muted: #444;
  --color-text-secondary: #555;
  --color-text-faint: #888;
  --theme-transition-duration: 0.25s;
}

body.dark {
  --color-bg: #1a1a1a;
  --color-bg-content: #222;
  --color-bg-section: #2a2a2a;
  --color-bg-footer: #222;
  --color-text: #e0e0e0;
  --color-text-muted: #b0b0b0;
  --color-text-secondary: #999;
  --color-text-faint: #666;
}

/* Cyberpunk Easter Egg (6× Theme-Toggle klicken, nicht gespeichert) */
body.cyberpunk [data-theme-toggle] {
  display: none;
}

body.cyberpunk {
  --color-bg: #0d0d14;
  --color-bg-content: #12121a;
  --color-bg-section: #181824;
  --color-bg-footer: #0f0f18;
  --color-text: #ddd;
  --color-text-muted: #aaa;
  --color-text-secondary: #999;
  --color-text-faint: #777;
}

/* Überschriften, Links, Buttons – alles rot */
body.cyberpunk h1,
body.cyberpunk h2,
body.cyberpunk h3,
body.cyberpunk p,
body.cyberpunk a,
body.cyberpunk button,
body.cyberpunk .nav-section-btn,
body.cyberpunk .bereichsauswahl button,
body.cyberpunk .lang-switch button,
body.cyberpunk .scroll-nav-btn,
body.cyberpunk .flow-step span,
body.cyberpunk .diagram-panel-title,
body.cyberpunk .diagram-panel-desc,
body.cyberpunk .flow-step-ai-label,
body.cyberpunk .flow-note,
body.cyberpunk .platonic-solid-label,
body.cyberpunk .platonic-solid-text h3,
body.cyberpunk .platonic-solid-text p,
body.cyberpunk .practice-copyright,
body.cyberpunk .tech-badge,
body.cyberpunk .flow-cycle-bracket,
body.cyberpunk footer a {
  color: var(--color-text) !important;
}
body.cyberpunk .nav-section-btn,
body.cyberpunk .bereichsauswahl button {
  color: var(--color-text-muted) !important;
}
body.cyberpunk .nav-section-btn:hover,
body.cyberpunk .bereichsauswahl button:hover,
body.cyberpunk .lang-switch button:hover {
  color: var(--color-text) !important;
}

body.cyberpunk .theme-icon.theme-moon { display: inline; color: var(--color-text-muted); }
body.cyberpunk .theme-icon.theme-sun { display: none; }

body.cyberpunk .hero-diagram { color: var(--color-text-faint); opacity: 0.5; }
body.cyberpunk .hero-diagram .sh-0 { color: #333; }
body.cyberpunk .hero-diagram .sh-1 { color: #555; }
body.cyberpunk .hero-diagram .sh-2 { color: #777; }
body.cyberpunk .hero-diagram .sh-3 { color: #aaa; }
body.cyberpunk .hero-diagram .sh-4 { color: #ddd; }

@keyframes cyberpunk-triangle-flash {
  0% { color: #555; }
  50% { color: #aaa; }
  100% { color: #555; }
}
body.cyberpunk .hero-diagram,
body.cyberpunk .hero-diagram * {
  animation: cyberpunk-triangle-flash 3s linear infinite;
}

body.cyberpunk .platonic-solid-ascii { color: var(--color-text-faint); }
body.cyberpunk .platonic-solid-ascii .sh-0 { color: #333; }
body.cyberpunk .platonic-solid-ascii .sh-1 { color: #555; }
body.cyberpunk .platonic-solid-ascii .sh-2 { color: #777; }
body.cyberpunk .platonic-solid-ascii .sh-3 { color: #aaa; }
body.cyberpunk .platonic-solid-ascii .sh-4 { color: #ddd; }

body.cyberpunk .octahedron-ascii { color: var(--color-text-faint); }
body.cyberpunk .octahedron-controlled .sh-0 { color: #333; }
body.cyberpunk .octahedron-controlled .sh-1 { color: #555; }
body.cyberpunk .octahedron-controlled .sh-2 { color: #777; }
body.cyberpunk .octahedron-controlled .sh-3 { color: #aaa; }
body.cyberpunk .octahedron-controlled .sh-4 { color: #ddd; }
body.cyberpunk .octahedron-chaotic .sh-0 { color: #4a2020; }
body.cyberpunk .octahedron-chaotic .sh-1 { color: #7a3333; }
body.cyberpunk .octahedron-chaotic .sh-2 { color: #b04a4a; }
body.cyberpunk .octahedron-chaotic .sh-3 { color: #d46060; }
body.cyberpunk .octahedron-chaotic .sh-4 { color: #ee8888; }

body.cyberpunk .theme-icon.theme-moon { display: inline; color: var(--color-text-muted); }
body.cyberpunk .theme-icon.theme-sun { display: none; }

body.cyberpunk h1, body.cyberpunk h2, body.cyberpunk h3 { color: var(--color-text); }
body.cyberpunk p, body.cyberpunk a, body.cyberpunk span { color: inherit; }
body.cyberpunk .nav-section-btn, body.cyberpunk .lang-switch button,
body.cyberpunk .scroll-nav-btn, body.cyberpunk footer a { color: var(--color-text-muted); }
body.cyberpunk .nav-section-btn:hover, body.cyberpunk .lang-switch button:hover,
body.cyberpunk .scroll-nav-btn:hover, body.cyberpunk footer a:hover { color: var(--color-text); }

body.cyberpunk .hero-diagram { color: var(--color-text-faint); opacity: 0.5; }
body.cyberpunk .hero-diagram .sh-0 { color: #0a3d3d; }
body.cyberpunk .hero-diagram .sh-1 { color: #0d6060; }
body.cyberpunk .hero-diagram .sh-2 { color: #00a0a0; }
body.cyberpunk .hero-diagram .sh-3 { color: #00fff7; }
body.cyberpunk .hero-diagram .sh-4 { color: #7fffff; }

body.cyberpunk .platonic-solid-ascii { color: var(--color-text-faint); }
body.cyberpunk .platonic-solid-ascii .sh-0 { color: #0a3d3d; }
body.cyberpunk .platonic-solid-ascii .sh-1 { color: #0d6060; }
body.cyberpunk .platonic-solid-ascii .sh-2 { color: #00a0a0; }
body.cyberpunk .platonic-solid-ascii .sh-3 { color: #00fff7; }
body.cyberpunk .platonic-solid-ascii .sh-4 { color: #7fffff; }

body.cyberpunk .octahedron-ascii { color: var(--color-text-faint); }
body.cyberpunk .octahedron-controlled .sh-0 { color: #0a3d3d; }
body.cyberpunk .octahedron-controlled .sh-1 { color: #0d6060; }
body.cyberpunk .octahedron-controlled .sh-2 { color: #00a0a0; }
body.cyberpunk .octahedron-controlled .sh-3 { color: #00fff7; }
body.cyberpunk .octahedron-controlled .sh-4 { color: #7fffff; }
body.cyberpunk .octahedron-chaotic .sh-0 { color: #3d0a2d; }
body.cyberpunk .octahedron-chaotic .sh-1 { color: #6b0d4a; }
body.cyberpunk .octahedron-chaotic .sh-2 { color: #a00d6b; }
body.cyberpunk .octahedron-chaotic .sh-3 { color: #ff00aa; }
body.cyberpunk .octahedron-chaotic .sh-4 { color: #ff77dd; }

body.cyberpunk .theme-icon.theme-moon { display: inline; }
body.cyberpunk .theme-icon.theme-sun { display: none; }

body.cyberpunk .hero-diagram { color: var(--color-text-faint); opacity: 0.45; }
body.cyberpunk .hero-diagram .sh-0 { color: #0d3d3d; }
body.cyberpunk .hero-diagram .sh-1 { color: #0a5a5a; }
body.cyberpunk .hero-diagram .sh-2 { color: #008a8a; }
body.cyberpunk .hero-diagram .sh-3 { color: #00d4d4; }
body.cyberpunk .hero-diagram .sh-4 { color: #7fffff; }

body.cyberpunk .platonic-solid-ascii { color: var(--color-text-faint); }
body.cyberpunk .platonic-solid-ascii .sh-0 { color: #0d3d3d; }
body.cyberpunk .platonic-solid-ascii .sh-1 { color: #0a5a5a; }
body.cyberpunk .platonic-solid-ascii .sh-2 { color: #008a8a; }
body.cyberpunk .platonic-solid-ascii .sh-3 { color: #00d4d4; }
body.cyberpunk .platonic-solid-ascii .sh-4 { color: #7fffff; }

body.cyberpunk .octahedron-ascii { color: var(--color-text-faint); }
body.cyberpunk .octahedron-controlled .sh-0 { color: #0d3d3d; }
body.cyberpunk .octahedron-controlled .sh-1 { color: #0a5a5a; }
body.cyberpunk .octahedron-controlled .sh-2 { color: #008a8a; }
body.cyberpunk .octahedron-controlled .sh-3 { color: #00d4d4; }
body.cyberpunk .octahedron-controlled .sh-4 { color: #7fffff; }
body.cyberpunk .octahedron-chaotic .sh-0 { color: #4a1a3d; }
body.cyberpunk .octahedron-chaotic .sh-1 { color: #7a2a6a; }
body.cyberpunk .octahedron-chaotic .sh-2 { color: #b04a9a; }
body.cyberpunk .octahedron-chaotic .sh-3 { color: #d460b0; }
body.cyberpunk .octahedron-chaotic .sh-4 { color: #ff88dd; }

body.cyberpunk .theme-icon.theme-moon {
  display: inline;
  color: #00fff7;
}

body.cyberpunk .theme-icon.theme-sun {
  display: none;
}

body.cyberpunk .hero-diagram {
  color: var(--color-text-faint);
  opacity: 0.45;
}

body.cyberpunk .hero-diagram .sh-0 { color: #0a2d2d; }
body.cyberpunk .hero-diagram .sh-1 { color: #0a4a4a; }
body.cyberpunk .hero-diagram .sh-2 { color: #008a8a; }
body.cyberpunk .hero-diagram .sh-3 { color: #00d4d4; }
body.cyberpunk .hero-diagram .sh-4 { color: #00fff7; }

body.cyberpunk .platonic-solid-ascii { color: var(--color-text-faint); }

body.cyberpunk .platonic-solid-ascii .sh-0 { color: #0a2d2d; }
body.cyberpunk .platonic-solid-ascii .sh-1 { color: #0a4a4a; }
body.cyberpunk .platonic-solid-ascii .sh-2 { color: #008a8a; }
body.cyberpunk .platonic-solid-ascii .sh-3 { color: #00d4d4; }
body.cyberpunk .platonic-solid-ascii .sh-4 { color: #00fff7; }

body.cyberpunk .octahedron-ascii { color: var(--color-text-faint); }

body.cyberpunk .octahedron-controlled .sh-0 { color: #0a2d2d; }
body.cyberpunk .octahedron-controlled .sh-1 { color: #0a4a4a; }
body.cyberpunk .octahedron-controlled .sh-2 { color: #008a8a; }
body.cyberpunk .octahedron-controlled .sh-3 { color: #00d4d4; }
body.cyberpunk .octahedron-controlled .sh-4 { color: #00fff7; }

body.cyberpunk .octahedron-chaotic .sh-0 { color: #2d0a2d; }
body.cyberpunk .octahedron-chaotic .sh-1 { color: #4a0a4a; }
body.cyberpunk .octahedron-chaotic .sh-2 { color: #8a008a; }
body.cyberpunk .octahedron-chaotic .sh-3 { color: #d400d4; }
body.cyberpunk .octahedron-chaotic .sh-4 { color: #ff00ff; }

body.cyberpunk .theme-icon.theme-moon {
  display: inline;
  color: var(--color-text-muted);
}
body.cyberpunk .theme-icon.theme-sun {
  display: none;
}

body.cyberpunk .hero-diagram {
  color: var(--color-text-faint);
  opacity: 0.5;
}
body.cyberpunk .hero-diagram .sh-0 { color: #0a3030; }
body.cyberpunk .hero-diagram .sh-1 { color: #0d5555; }
body.cyberpunk .hero-diagram .sh-2 { color: #008888; }
body.cyberpunk .hero-diagram .sh-3 { color: #00cccc; }
body.cyberpunk .hero-diagram .sh-4 { color: #00fff7; }

body.cyberpunk .platonic-solid-ascii {
  color: var(--color-text-faint);
}
body.cyberpunk .platonic-solid-ascii .sh-0 { color: #0a3030; }
body.cyberpunk .platonic-solid-ascii .sh-1 { color: #0d5555; }
body.cyberpunk .platonic-solid-ascii .sh-2 { color: #008888; }
body.cyberpunk .platonic-solid-ascii .sh-3 { color: #00cccc; }
body.cyberpunk .platonic-solid-ascii .sh-4 { color: #00fff7; }

body.cyberpunk .octahedron-ascii { color: var(--color-text-faint); }
body.cyberpunk .octahedron-controlled .sh-0 { color: #0a3030; }
body.cyberpunk .octahedron-controlled .sh-1 { color: #0d5555; }
body.cyberpunk .octahedron-controlled .sh-2 { color: #008888; }
body.cyberpunk .octahedron-controlled .sh-3 { color: #00cccc; }
body.cyberpunk .octahedron-controlled .sh-4 { color: #00fff7; }
body.cyberpunk .octahedron-chaotic .sh-0 { color: #301030; }
body.cyberpunk .octahedron-chaotic .sh-1 { color: #553055; }
body.cyberpunk .octahedron-chaotic .sh-2 { color: #884088; }
body.cyberpunk .octahedron-chaotic .sh-3 { color: #cc60cc; }
body.cyberpunk .octahedron-chaotic .sh-4 { color: #ff88ff; }

body.cyberpunk .theme-icon.theme-moon {
  display: inline;
  color: #00fff7;
}
body.cyberpunk .theme-icon.theme-sun {
  display: none;
}

body.cyberpunk .hero-diagram {
  color: var(--color-text-faint);
  opacity: 0.5;
}
body.cyberpunk .hero-diagram .sh-0 { color: #0a2a2a; }
body.cyberpunk .hero-diagram .sh-1 { color: #0d5050; }
body.cyberpunk .hero-diagram .sh-2 { color: #00a0a0; }
body.cyberpunk .hero-diagram .sh-3 { color: #00fff7; }
body.cyberpunk .hero-diagram .sh-4 { color: #7fffff; }

body.cyberpunk .platonic-solid-ascii {
  color: var(--color-text-faint);
}
body.cyberpunk .platonic-solid-ascii .sh-0 { color: #0a2a2a; }
body.cyberpunk .platonic-solid-ascii .sh-1 { color: #0d5050; }
body.cyberpunk .platonic-solid-ascii .sh-2 { color: #00a0a0; }
body.cyberpunk .platonic-solid-ascii .sh-3 { color: #00fff7; }
body.cyberpunk .platonic-solid-ascii .sh-4 { color: #7fffff; }

body.cyberpunk .octahedron-ascii { color: var(--color-text-faint); }
body.cyberpunk .octahedron-controlled .sh-0 { color: #0a2a2a; }
body.cyberpunk .octahedron-controlled .sh-1 { color: #0d5050; }
body.cyberpunk .octahedron-controlled .sh-2 { color: #00a0a0; }
body.cyberpunk .octahedron-controlled .sh-3 { color: #00fff7; }
body.cyberpunk .octahedron-controlled .sh-4 { color: #7fffff; }
body.cyberpunk .octahedron-chaotic .sh-0 { color: #2a0a2a; }
body.cyberpunk .octahedron-chaotic .sh-1 { color: #500d50; }
body.cyberpunk .octahedron-chaotic .sh-2 { color: #a000a0; }
body.cyberpunk .octahedron-chaotic .sh-3 { color: #ff00ff; }
body.cyberpunk .octahedron-chaotic .sh-4 { color: #ff7fff; }

/* Alle ASCII-Diagramme wie Platonische Körper – Graustufen */
body.cyberpunk .hero-diagram .sh-0,
body.cyberpunk .platonic-solid-ascii .sh-0,
body.cyberpunk .octahedron-controlled .sh-0 { color: #333 !important; }
body.cyberpunk .platonic-solid-ascii .sh-1,
body.cyberpunk .octahedron-controlled .sh-1 { color: #555 !important; }
body.cyberpunk .platonic-solid-ascii .sh-2,
body.cyberpunk .octahedron-controlled .sh-2 { color: #777 !important; }
body.cyberpunk .platonic-solid-ascii .sh-3,
body.cyberpunk .octahedron-controlled .sh-3 { color: #aaa !important; }
body.cyberpunk .platonic-solid-ascii .sh-4,
body.cyberpunk .octahedron-controlled .sh-4 { color: #ddd !important; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  position: relative;
  z-index: 100;
}

main,
footer {
  position: relative;
  z-index: 1;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg);
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  transition: background-color var(--theme-transition-duration) ease,
    color var(--theme-transition-duration) ease;
}

.page-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  width: 100%;
}

.page-wrapper main {
  flex: 1;
}

main {
  text-align: center;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  flex: 1 0 auto;
  padding: 3.5rem 1rem 0;
  overflow: visible;
}

.hero {
  min-height: 100svh;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  background: transparent;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 6rem;
  padding: 1.5rem 2.5rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--color-bg) 40%, transparent);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  min-width: min(90vw, 28rem);
  z-index: 1;
}

.hero .bereichsauswahl {
  margin-top: 1rem;
}

.hero-controls-row {
  display: flex;
  width: 100%;
  align-self: stretch;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.hero-controls-row .bereichsauswahl {
  margin-top: 0;
}

.header-controls-hero {
  position: fixed;
  top: 0.75rem;
  right: 1rem;
  z-index: 998;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: transparent;
  transition: opacity 0.35s ease-out;
}

.sticky-nav.visible ~ .header-controls-hero {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease-out, visibility 0s linear 0.35s;
}

.scroll-nav {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
}

.scroll-nav-above {
  padding-bottom: 0.5rem;
}

.scroll-nav-below {
  padding-top: 0.5rem;
}

.scroll-nav-btn {
  color: var(--color-text-faint);
  font-size: 0.75rem;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.scroll-nav-btn:hover {
  color: var(--color-text-muted);
  transform: translateY(-2px);
}

.scroll-nav-btn.scroll-down:hover {
  transform: translateY(2px);
}

.scroll-nav-btn:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
  border-radius: 4px;
}

.hero-minimal {
  min-height: auto;
  padding: 3rem 1.5rem 1.5rem;
  justify-content: flex-start;
}

.hero-diagram {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: -2;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: clamp(0.5rem, 2.5vw, 1rem);
  line-height: 1.15;
  white-space: pre;
  color: #777;
  margin: 0;
  pointer-events: none;
  opacity: 0.45;
  overflow: visible;
}

body.dark .hero-diagram {
  color: var(--color-text-faint);
  opacity: 0.4;
}

.hero-diagram .sh-0 { color: #aaa; }
.hero-diagram .sh-1 { color: #888; }
.hero-diagram .sh-2 { color: #666; }
.hero-diagram .sh-3 { color: #444; }
.hero-diagram .sh-4 { color: #222; }

body.dark .hero-diagram .sh-0 { color: #333; }
body.dark .hero-diagram .sh-1 { color: #555; }
body.dark .hero-diagram .sh-2 { color: #777; }
body.dark .hero-diagram .sh-3 { color: #aaa; }
body.dark .hero-diagram .sh-4 { color: #ddd; }

.bg-diagrams {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.bg-diagram-pos {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 56rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-diagram-pos.theorie-pos {
  top: 55vh;
}


.content {
  position: relative;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(64rem, 100%);
  margin-inline: auto;
}

.bereichsauswahl {
  margin-top: 1.5rem;
}

.hero .bereichsauswahl {
  margin-top: 1rem;
}

.hero .bereichsauswahl {
  margin-top: 1rem;
}

.bereichsauswahl a,
.bereichsauswahl .nav-section-btn {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.bereichsauswahl a:hover,
.bereichsauswahl .nav-section-btn:hover {
  color: var(--color-text);
}

.bereichsauswahl a:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
  border-radius: 2px;
}

[data-theme-toggle]:focus-visible {
  outline-offset: 4px;
}

.bereichsauswahl .separator {
  margin: 0 0.75rem;
  color: var(--color-text-faint);
  font-weight: 400;
}

section {
  scroll-margin-top: 2rem;
  margin-bottom: 3rem;
  text-align: left;
  position: relative;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--color-bg-section);
  transition: background-color var(--theme-transition-duration) ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

section h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1rem;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

section h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
  position: relative;
  z-index: 1;
}

section h3:first-of-type {
  margin-top: 0;
}

section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  position: relative;
  z-index: 1;
}

section a.contact-email {
  font-size: 1.1rem;
  color: var(--color-text);
  text-decoration: none;
  word-break: break-all;
}

section a.contact-email:hover {
  text-decoration: underline;
}

section a.contact-link {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

section a.contact-link:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.praxis-container,
.ueber-mich-container {
  position: relative;
  width: 100%;
  max-width: 56rem;
  overflow: visible;
  margin: 0 auto 2rem;
  align-self: center;
}

.praxis-container #praxis,
.ueber-mich-container #ueber-mich {
  opacity: 0;
  transition: opacity 0.2s ease-out;
  will-change: opacity;
}

#praxis {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
  background: var(--color-bg-content);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
  transition: background-color var(--theme-transition-duration) ease;
}

body.dark #praxis,
body.dark #ueber-mich {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

#ueber-mich {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
  background: var(--color-bg-content);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
  transition: background-color var(--theme-transition-duration) ease;
}

#ueber-mich h2,
#praxis h2 {
  margin-bottom: 2rem;
  color: var(--color-text);
}

#ueber-mich p,
#praxis p {
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.8;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

#ueber-mich p:last-of-type {
  margin-bottom: 0;
}

#praxis p,
#ueber-mich p {
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.8;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

#praxis .practice-subheading {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin: 2rem 0 0.5rem 0;
}

#praxis p:last-of-type {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--color-text);
}

#praxis .diagram-intro {
  margin-bottom: 1.5rem;
  font-weight: 500;
  color: var(--color-text);
}

#praxis p.practice-copyright {
  font-weight: 400;
  color: var(--color-text-muted);
}


.theorie-container {
  position: relative;
  width: 100%;
  max-width: 56rem;
  overflow: visible;
  margin: 0 auto 2rem;
  align-self: center;
}

.theorie-container #theorie {
  opacity: 0;
  transition: opacity 0.2s ease-out;
  will-change: opacity;
}

#theorie {
  text-align: center;
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 3rem;
  margin-bottom: 2rem;
  background: color-mix(in srgb, var(--color-bg-content) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.05);
  transition: background-color var(--theme-transition-duration) ease;
}

@media (max-width: 768px) {
  #theorie {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

body.dark #theorie {
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

#theorie h2 {
  margin-bottom: 1.5rem;
}

#theorie p {
  margin-bottom: 1.25rem;
  text-align: center;
  line-height: 1.75;
}

#theorie p:last-child {
  margin-bottom: 0;
  font-weight: 500;
  color: var(--color-text);
}

.platonic-intro {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

/* ── Platonic solids gallery ── */

.platonic-solids-gallery {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-top: 2.5rem;
  width: 100%;
}

.platonic-solid-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.platonic-solid-item:nth-child(even) {
  flex-direction: row-reverse;
}

.platonic-solid-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.platonic-solid-text {
  flex: 1;
  min-width: 0;
}

.platonic-solid-text h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--color-text);
}

.platonic-solid-text p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

.platonic-solid-item:nth-child(odd) .platonic-solid-text {
  text-align: left;
}

.platonic-solid-item:nth-child(even) .platonic-solid-text {
  text-align: right;
}

@media (max-width: 480px) {
  .platonic-solid-item,
  .platonic-solid-item:nth-child(even) {
    flex-direction: column;
  }

  .platonic-solid-item:nth-child(odd) .platonic-solid-text,
  .platonic-solid-item:nth-child(even) .platonic-solid-text {
    text-align: center;
  }
}

.platonic-solid-ascii {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: clamp(0.45rem, 2vw, 0.75rem);
  line-height: 1.15;
  white-space: pre;
  margin: 0;
  padding: 0;
  text-align: center;
  color: #777;
  pointer-events: none;
  user-select: none;
}

body.dark .platonic-solid-ascii {
  color: var(--color-text-faint);
}

.platonic-solid-ascii .sh-0 { color: #aaa; }
.platonic-solid-ascii .sh-1 { color: #888; }
.platonic-solid-ascii .sh-2 { color: #666; }
.platonic-solid-ascii .sh-3 { color: #444; }
.platonic-solid-ascii .sh-4 { color: #222; }

body.dark .platonic-solid-ascii .sh-0 { color: #333; }
body.dark .platonic-solid-ascii .sh-1 { color: #555; }
body.dark .platonic-solid-ascii .sh-2 { color: #777; }
body.dark .platonic-solid-ascii .sh-3 { color: #aaa; }
body.dark .platonic-solid-ascii .sh-4 { color: #ddd; }

.platonic-solid-label {
  font-size: 0.75rem;
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.typing-cursor {
  animation: blink 1s step-end infinite;
  color: var(--color-text);
}

@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .typing-cursor {
    animation: none;
    opacity: 1;
  }
}

footer {
  width: 100%;
  background: var(--color-bg-footer);
  transition: background-color var(--theme-transition-duration) ease;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: left;
  scroll-margin-top: 2rem;
  margin-top: auto;
}

footer h3 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--color-text-muted);
}

footer p {
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

footer p:last-child {
  margin-bottom: 0;
}

footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

footer a:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-links {
  text-align: center;
}

.footer-links nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.footer-links .separator {
  margin: 0 0.75rem;
  color: var(--color-text-faint);
}

.sticky-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
  transition: background-color var(--theme-transition-duration) ease,
    transform 0.25s ease, opacity 0.25s ease;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  width: 100%;
  overflow-x: hidden;
}

.sticky-nav.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-nav::before {
  content: "";
  flex: 1;
}

.sticky-nav .bereichsauswahl {
  margin-top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 0;
  flex-shrink: 1;
}

.sticky-nav-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.sticky-nav .header-controls-in-nav {
  position: static;
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
  padding: 0.25rem 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

@media (max-width: 540px) {
  .sticky-nav {
    padding: 0.5rem 0.75rem;
  }

  .sticky-nav .bereichsauswahl .nav-section-btn {
    font-size: 0.85rem;
  }

  .sticky-nav .separator {
    margin: 0 0.4rem;
  }

  .sticky-nav .header-controls-in-nav [data-theme-toggle] {
    padding: 0.4rem 0.5rem;
  }

  .sticky-nav .lang-switch button {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
  }
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color var(--theme-transition-duration) ease;
}

.header-controls .lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  font-size: 0.85rem;
  background: color-mix(in srgb, var(--color-text-faint) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-text-faint) 35%, transparent);
  border-radius: 8px;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.25s ease, background 0.25s ease;
  overflow: hidden;
}

.header-controls .lang-switch:hover {
  border-color: color-mix(in srgb, var(--color-text-faint) 55%, transparent);
}

.header-controls .lang-switch button:hover {
  color: var(--color-text);
}

/* ── Sun/Moon theme toggle ── */
[data-theme-toggle] {
  background: none;
  border: none;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: color var(--theme-transition-duration) ease;
}

[data-theme-toggle]:hover .theme-icon {
  color: var(--color-text);
}

.theme-icon {
  display: none;
  transition: color var(--theme-transition-duration) ease;
}

.theme-icon.theme-moon {
  display: inline;
}

body.dark .theme-icon.theme-moon {
  display: none;
}

body.dark .theme-icon.theme-sun {
  display: inline;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--color-text-faint);
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
}

.lang-switch a {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.lang-switch a.active,
.lang-switch button.active {
  color: var(--color-text);
  font-weight: 500;
  background: var(--color-bg-section);
}

.lang-switch button {
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, background 0.2s;
}

.lang-switch button:hover {
  color: var(--color-text);
}

/* ── Diagram tabs (mobile only) ── */

.diagram-tabs {
  display: none;
}

/* ── Diagram pair (side by side) ── */

.diagram-pair {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  width: 100%;
  justify-content: center;
  align-items: stretch;
}

.diagram-pair + p {
  margin-top: 2.5rem;
}

.diagram-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--color-text-faint) 40%, transparent);
  border-radius: 8px;
  overflow: hidden;
}

.diagram-panel .flow-diagram {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.diagram-panel-title {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-align: center;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text-faint) 25%, transparent);
  margin: 0;
}

.diagram-panel-desc {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--color-text-faint) 25%, transparent);
}

@media (max-width: 540px) {
  .diagram-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-top: 2rem;
    border: 1px solid color-mix(in srgb, var(--color-text-faint) 35%, transparent);
    border-radius: 8px;
    overflow: hidden;
    background: color-mix(in srgb, var(--color-text-faint) 8%, transparent);
  }

  .diagram-tabs button {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
  }

  .diagram-tabs button[aria-selected="true"] {
    color: var(--color-text);
    background: var(--color-bg-section);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  }

  .diagram-tabs button:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: -2px;
    border-radius: 2px;
  }

  .diagram-pair {
    margin-top: 0.5rem;
  }

  .diagram-panel {
    display: none;
  }

  .diagram-panel.active {
    display: flex;
  }
}

/* ── Flow diagram ── */

.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 1.5rem;
}

.flow-step {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
  width: 100%;
  max-width: 15rem;
  color: var(--color-text-muted);
}

.flow-step--start {
  background: color-mix(in srgb, var(--color-text-faint) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-text-faint) 30%, transparent);
  font-weight: 500;
}

.flow-step--human {
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--color-text) 25%, transparent);
  font-weight: 500;
  color: var(--color-text);
}

.flow-step--ai {
  background: transparent;
  border: 1px dashed color-mix(in srgb, var(--color-text-faint) 50%, transparent);
}

.flow-step--ai-only {
  border-style: solid;
}

.flow-step--result {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--color-text) 20%, transparent);
  font-weight: 500;
  color: var(--color-text);
}

.flow-step--test {
  background: color-mix(in srgb, var(--color-text-faint) 6%, transparent);
  border: 1.5px dashed color-mix(in srgb, var(--color-text) 25%, transparent);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.flow-step--warn {
  background: color-mix(in srgb, #c44 8%, transparent);
  border: 1.5px dashed color-mix(in srgb, #c44 40%, transparent);
  font-weight: 500;
  color: var(--color-text-muted);
}

.flow-step--tdp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: color-mix(in srgb, var(--color-text) 5%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--color-text) 35%, transparent);
  font-weight: 500;
  color: var(--color-text);
  position: relative;
}

.flow-step-tdp-badge {
  display: inline-block;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-text) 15%, transparent);
  color: var(--color-text);
  line-height: 1.2;
  flex-shrink: 0;
}

.flow-arrow {
  color: var(--color-text-faint);
  font-size: 0.75rem;
  line-height: 1;
  padding: 0.15rem 0;
  user-select: none;
}

/* ── Feedback cycle bracket ── */

.flow-cycle {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.flow-cycle-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 15rem;
}

/* ── TDP inner refinement loop ── */

.flow-tdp-cycle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-left: 1.8rem;
  padding: 0.6rem 0.75rem;
  border: 1.5px dashed color-mix(in srgb, var(--color-text-faint) 30%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-text-faint) 3%, transparent);
}

.flow-tdp-cycle::before {
  content: "";
  position: absolute;
  left: -1.3rem;
  top: 0;
  bottom: 0;
  width: 0.7rem;
  border: 1.5px solid color-mix(in srgb, var(--color-text-faint) 50%, transparent);
  border-right: none;
  border-radius: 6px 0 0 6px;
}


.flow-cycle-bracket {
  position: absolute;
  left: 100%;
  top: 0.25rem;
  bottom: 0.25rem;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  font-size: 0.65rem;
  color: var(--color-text-faint);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.04em;
}

.flow-cycle-bracket::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border: 1.5px solid var(--color-text-faint);
  border-left: none;
  border-radius: 0 5px 5px 0;
}

.flow-note {
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: var(--color-text-faint);
  font-style: italic;
  text-align: center;
}

/* ── Octahedron ASCII diagrams ── */

.flow-step-ai-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
}

.flow-step-ai-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.octahedron-ascii {
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
  font-size: clamp(0.3rem, 1.3vw, 0.5rem);
  line-height: 1.15;
  white-space: pre;
  margin: 0;
  padding: 0;
  text-align: center;
  color: #777;
  pointer-events: none;
  user-select: none;
}

body.dark .octahedron-ascii { color: var(--color-text-faint); }

.octahedron-controlled .sh-0 { color: #aaa; }
.octahedron-controlled .sh-1 { color: #888; }
.octahedron-controlled .sh-2 { color: #666; }
.octahedron-controlled .sh-3 { color: #444; }
.octahedron-controlled .sh-4 { color: #222; }

body.dark .octahedron-controlled .sh-0 { color: #333; }
body.dark .octahedron-controlled .sh-1 { color: #555; }
body.dark .octahedron-controlled .sh-2 { color: #777; }
body.dark .octahedron-controlled .sh-3 { color: #aaa; }
body.dark .octahedron-controlled .sh-4 { color: #ddd; }

.octahedron-chaotic .sh-0 { color: #d4a0a0; }
.octahedron-chaotic .sh-1 { color: #c47070; }
.octahedron-chaotic .sh-2 { color: #b04a4a; }
.octahedron-chaotic .sh-3 { color: #993333; }
.octahedron-chaotic .sh-4 { color: #802020; }

body.dark .octahedron-chaotic .sh-0 { color: #4a2020; }
body.dark .octahedron-chaotic .sh-1 { color: #7a3333; }
body.dark .octahedron-chaotic .sh-2 { color: #b04a4a; }
body.dark .octahedron-chaotic .sh-3 { color: #d46060; }
body.dark .octahedron-chaotic .sh-4 { color: #ee8888; }

/* ── Diagram entrance animation ── */

.diagram-panel .flow-diagram {
  animation: diagram-enter 0.6s ease-out;
}

@keyframes diagram-enter {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Animated flow arrows ── */

.flow-diagram--vibecoding .flow-arrow {
  animation: arrow-flow-calm 2.5s ease-in-out infinite;
}

.flow-diagram--blindcoding .flow-arrow {
  animation: arrow-flow-fast 0.7s ease-in-out infinite;
}

@keyframes arrow-flow-calm {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

@keyframes arrow-flow-fast {
  0%, 100% { opacity: 0.25; }
  50%      { opacity: 1; }
}

/* ── Formenlehre example diagram ── */

.formenlehre-intro {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.flow-diagram--formenlehre {
  margin-top: 1.25rem;
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.flow-step-element-badge {
  display: inline-block;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: color-mix(in srgb, var(--color-text-faint) 18%, transparent);
  color: var(--color-text-muted);
  line-height: 1.2;
  flex-shrink: 0;
}

.flow-diagram--formenlehre .flow-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.flow-annotation {
  font-size: 0.65rem;
  color: var(--color-text-faint);
  line-height: 1.35;
  font-style: italic;
  max-width: 12rem;
}

.flow-annotation--left {
  text-align: right;
  justify-self: end;
}

.flow-annotation--right {
  text-align: left;
  justify-self: start;
}

.flow-diagram--formenlehre .flow-cycle {
  width: 100%;
}

.flow-diagram--formenlehre .flow-cycle-steps {
  max-width: 100%;
}

.flow-diagram--formenlehre > *,
.flow-diagram--formenlehre .flow-cycle-steps > * {
  opacity: 0;
  transform: translateY(6px);
}

.flow-diagram--formenlehre.formenlehre-visible > *,
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > * {
  animation: formenlehre-step-enter 0.45s ease-out forwards;
}

.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(1)  { animation-delay: 0ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(2)  { animation-delay: 150ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(3)  { animation-delay: 300ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(4)  { animation-delay: 420ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(5)  { animation-delay: 540ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(6)  { animation-delay: 1050ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(7)  { animation-delay: 1200ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(8)  { animation-delay: 1350ms; }
.flow-diagram--formenlehre.formenlehre-visible > *:nth-child(9)  { animation-delay: 1500ms; }

.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(1) { animation-delay: 580ms; }
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(2) { animation-delay: 680ms; }
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(3) { animation-delay: 780ms; }
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(4) { animation-delay: 860ms; }
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(5) { animation-delay: 940ms; }
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(6) { animation-delay: 1000ms; }
.flow-diagram--formenlehre.formenlehre-visible .flow-cycle-steps > *:nth-child(7) { animation-delay: 1020ms; }

@keyframes formenlehre-step-enter {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flow-diagram--formenlehre.formenlehre-visible .flow-arrow {
  animation: formenlehre-step-enter 0.45s ease-out forwards,
             arrow-flow-calm 2.5s ease-in-out infinite;
}

@media (max-width: 540px) {
  .flow-row {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.3rem;
  }
  .flow-annotation--left,
  .flow-annotation--right {
    text-align: center;
    justify-self: center;
    max-width: 100%;
  }
  .flow-annotation--left { order: -1; }
  .flow-annotation--right { order: 1; }
  .flow-diagram--formenlehre {
    max-width: 100%;
  }
  .flow-tdp-cycle {
    margin-left: 1rem;
  }
  .flow-tdp-cycle::before {
    left: -0.75rem;
    width: 0.4rem;
  }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .flow-diagram--vibecoding .flow-arrow,
  .flow-diagram--blindcoding .flow-arrow {
    animation: none;
    opacity: 1;
  }
  .diagram-panel .flow-diagram {
    animation: none;
  }
  .flow-diagram--formenlehre > *,
  .flow-diagram--formenlehre .flow-cycle-steps > * {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

/* ── Skillset (Unterpunkt Praxis) ── */

#praxis > .tech-marquee:first-of-type {
  margin-top: 0.75rem;
  margin-bottom: 2.5rem;
}

#praxis .tech-marquee {
  overflow: hidden;
  width: calc(100% + 2rem);
  margin-left: -1rem;
  margin-top: 1.5rem;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.tech-marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: tech-marquee-scroll 30s linear infinite;
}

.tech-marquee:hover .tech-marquee-track {
  animation-play-state: paused;
}

@keyframes tech-marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .tech-marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
  }
  .tech-marquee {
    mask-image: none;
    -webkit-mask-image: none;
    width: 100%;
    margin-left: 0;
  }
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-text-faint) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-text-faint) 30%, transparent);
  border-radius: 6px;
  transition: color var(--theme-transition-duration) ease,
    background-color var(--theme-transition-duration) ease,
    border-color var(--theme-transition-duration) ease;
}

.tech-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  filter: brightness(0) invert(0.4);
  transition: filter var(--theme-transition-duration) ease;
}

body.dark .tech-icon {
  filter: brightness(0) invert(0.7);
}

.tech-icon-multi {
  filter: none;
}

body.dark .tech-icon-multi {
  filter: invert(1);
}

.tech-badge:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-text-faint) 18%, transparent);
  border-color: color-mix(in srgb, var(--color-text-faint) 45%, transparent);
}

@media (max-width: 480px) {
  .tech-badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
  }
}

