@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,300&display=swap');

:root {
  --bg: #0a0c10;
  --bg-card: #111318;
  --bg-hover: #161a22;
  --border: #1f2430;
  --border-bright: #2d3548;
  --text: #c8d0e0;
  --text-muted: #8893a8;       /* war #5a6479 – aufgehellt für bessere Lesbarkeit */
  --text-bright: #eef1f8;
  --accent: #4f8ef7;
  --accent-glow: rgba(79, 142, 247, 0.15);
  --accent-2: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --mono: 'Space Mono', monospace;
  --sans: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  /* Dezentes Dot-Grid-Pattern */
  background-image: radial-gradient(circle, rgba(45, 53, 72, 0.6) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-logo img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-logo span { color: var(--text-muted); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  font-family: var(--sans);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-bright);
  background: var(--bg-hover);
}

/* Animierte Highlight-Linie unter Nav-Links */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0.8rem;
  right: 0.8rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-links a:hover::after {
  transform: scaleX(0.5);
  opacity: 0.5;
}
.nav-links a.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 1.25rem;
}

/* LAYOUT */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

main.narrow { max-width: 800px; }

/* HERO */
.hero {
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}

/* Subtiler Radial-Glow hinter dem Hero-Text */
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -80px;
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse at 30% 40%, rgba(79,142,247,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: var(--accent-glow);
  border: 1px solid rgba(79, 142, 247, 0.3);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

h1 {
  font-family: var(--sans);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

h1 em { font-style: normal; color: var(--accent); }

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #3a7de8;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(79, 142, 247, 0.35);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-bright);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--text-bright);
}

/* CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  /* Dezente farbige linke Border */
  border-left: 3px solid var(--border-bright);
}

.card:hover {
  border-color: var(--border-bright);
  border-left-color: var(--accent);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transform: translateY(-2px);
}

.card-link { text-decoration: none; display: block; }

.card-link:hover .card {
  border-color: var(--accent);
  border-left-color: var(--accent);
  box-shadow: 0 6px 28px rgba(79,142,247,0.12);
}

/* Farbvarianten für Cards nach Kategorie */
.card.card-purple { border-left-color: var(--accent-2); }
.card.card-green  { border-left-color: var(--green); }
.card.card-amber  { border-left-color: var(--amber); }

/* GRID */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }

/* SECTION */
section { margin-bottom: 4rem; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

/* Dezenter Gradient-Trennstrich */
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(to right, var(--accent), rgba(167,139,250,0.4), transparent);
  margin: 3rem 0;
  opacity: 0.5;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 0.4rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* TAGS */
.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-blue   { background: rgba(79, 142, 247, 0.12); color: var(--accent);   border: 1px solid rgba(79, 142, 247, 0.25); }
.tag-purple { background: rgba(167,139,250, 0.12);  color: var(--accent-2); border: 1px solid rgba(167,139,250, 0.25); }
.tag-green  { background: rgba(52, 211,153, 0.12);  color: var(--green);    border: 1px solid rgba(52, 211,153, 0.25); }
.tag-amber  { background: rgba(251,191, 36, 0.12);  color: var(--amber);    border: 1px solid rgba(251,191, 36, 0.25); }

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.stat-item {
  background: var(--bg-card);
  padding: 1.5rem;
  transition: background 0.2s;
}

.stat-item:hover { background: var(--bg-hover); }

.stat-value {
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* BLOG CARD */
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.blog-card-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.blog-card-title {
  color: var(--text-bright);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.blog-card-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.blog-card-read {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 500;
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* CODE */
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-hover);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--accent);
}

pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}

/* ARTICLE CONTENT */
.article-body h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.article-body h3 { margin-top: 1.75rem; margin-bottom: 0.75rem; }

.article-body ul, .article-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.article-body li { margin-bottom: 0.35rem; }

.article-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(79, 142, 247, 0.3);
}

.article-body a:hover { border-color: var(--accent); }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  background: var(--accent-glow);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.article-body th {
  background: var(--bg-hover);
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-bright);
}

.article-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.article-body tr:last-child td { border-bottom: none; }

/* TABLE (ausserhalb article-body, z.B. in Inline-Inhalten) */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

th {
  background: var(--bg-hover);
  color: var(--text-bright);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-bright);
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

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

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

footer .footer-sep {
  display: inline-block;
  margin: 0 0.75rem;
  opacity: 0.3;
}

/* SEARCH */
.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  color: var(--text-bright);
  font-family: var(--sans);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder { color: var(--text-muted); }

.search-wrapper { position: relative; margin-bottom: 1.5rem; }

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* ACCORDION (FAQ) */
.accordion-item { border-bottom: 1px solid var(--border); }

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text-bright);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: color 0.15s;
}

.accordion-trigger:hover { color: var(--accent); }

.accordion-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: transform 0.2s, background 0.2s;
}

.accordion-icon.open {
  transform: rotate(45deg);
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.accordion-content {
  padding-bottom: 1.25rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* WIKI / GLOSSAR */
.alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 2rem;
}

.alpha-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}

.alpha-btn:hover, .alpha-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}

.glossar-letter {
  font-family: var(--mono);
  font-size: 2rem;
  color: var(--border-bright);
  font-weight: 700;
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.glossar-entry {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.glossar-entry:last-child { border-bottom: none; }

.glossar-abbr {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.glossar-full {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.glossar-desc {
  font-size: 0.9rem;
  color: var(--text);
}

/* DOWNLOADS */
.download-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-bright);
  border-radius: 10px;
  transition: border-color 0.15s, transform 0.15s;
  text-decoration: none;
  color: inherit;
}

.download-item:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  background: var(--bg-hover);
  transform: translateX(3px);
}

.download-icon {
  width: 44px; height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.download-icon.pdf   { background: rgba(239, 68,  68,  0.12); }
.download-icon.img   { background: rgba(52,  211, 153, 0.12); }
.download-icon.audio { background: rgba(167, 139, 250, 0.12); }
.download-icon.video { background: rgba(251, 191,  36, 0.12); }
.download-icon.md    { background: rgba(79,  142, 247, 0.12); }

.download-info { flex: 1; min-width: 0; }
.download-name { font-weight: 600; color: var(--text-bright); font-size: 0.95rem; }
.download-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; font-family: var(--mono); }
.download-arrow { color: var(--text-muted); font-size: 1.1rem; flex-shrink: 0; }

/* MARKDOWN PREVIEW */
.md-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text);
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}

.md-preview h1, .md-preview h2, .md-preview h3 {
  color: var(--text-bright);
  margin: 1.25rem 0 0.5rem;
}

.md-preview h1 { font-size: 1.4rem; }
.md-preview h2 { font-size: 1.15rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
.md-preview h3 { font-size: 1rem; }

.md-preview p { margin-bottom: 0.75rem; }
.md-preview code { font-family: var(--mono); background: var(--bg-hover); color: var(--accent); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.85em; }
.md-preview pre { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 6px; padding: 1rem; overflow-x: auto; margin: 0.75rem 0; }
.md-preview pre code { background: none; color: var(--text); }
.md-preview ul, .md-preview ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.md-preview li { margin-bottom: 0.25rem; }
.md-preview table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin: 1rem 0; }
.md-preview th { background: var(--bg-hover); color: var(--text-bright); padding: 0.5rem 0.75rem; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; }
.md-preview td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); }
.md-preview blockquote { border-left: 3px solid var(--accent); padding: 0.5rem 1rem; background: var(--accent-glow); border-radius: 0 6px 6px 0; margin: 0.75rem 0; font-style: italic; }
.md-preview a { color: var(--accent); }

.md-preview-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--mono);
  padding: 0;
  margin-top: 0.5rem;
}

.md-preview-toggle:hover { text-decoration: underline; }

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-family: var(--mono);
}

.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border-bright); }

/* NOTICE BOX */
.notice {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.notice-blue  { background: rgba(79, 142,247, 0.08); border: 1px solid rgba(79, 142,247, 0.2); color: var(--text); }
.notice-amber { background: rgba(251,191, 36, 0.08); border: 1px solid rgba(251,191, 36, 0.2); color: var(--text); }
.notice-green { background: rgba(52, 211,153, 0.08); border: 1px solid rgba(52, 211,153, 0.2); color: var(--text); }

/* BACK TO TOP */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
}

.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { border-color: var(--accent); color: var(--accent); }

/* HIGHLIGHT */
mark {
  background: rgba(79, 142, 247, 0.2);
  color: var(--accent);
  border-radius: 3px;
  padding: 0 0.2em;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0;
  }
  .nav-mobile-toggle { display: block; }
  main { padding: 4rem 1.25rem 3rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 1.75rem; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}
