:root {
  --bg-void: #050508;
  --bg-deep: #08090f;
  --bg-surface: rgba(255,255,255,0.03);
  --bg-glass: rgba(255,255,255,0.055);
  --bg-glass-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.18);
  --accent: #5b8af0;
  --accent-dim: rgba(91,138,240,0.15);
  --accent-glow: rgba(91,138,240,0.4);
  --accent2: #a78bfa;
  --accent3: #34d399;
  --text-primary: rgba(255,255,255,0.92);
  --text-secondary: rgba(255,255,255,0.5);
  --text-muted: rgba(255,255,255,0.28);
  --nav-width: 280px;
  --radius: 14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-void);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.7;
}

/* ─── PARALLAX BACKGROUND ─── */
.parallax-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.18;
  animation: drift 20s ease-in-out infinite alternate;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #3b5fef, transparent 70%);
  top: -100px; left: -100px;
  animation-duration: 25s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7c3aed, transparent 70%);
  bottom: 100px; right: -150px;
  animation-duration: 30s;
  animation-delay: -10s;
}
.orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #0ea5e9, transparent 70%);
  top: 50%; left: 40%;
  animation-duration: 18s;
  animation-delay: -5s;
  opacity: 0.1;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.05); }
  100% { transform: translate(-20px, 50px) scale(0.97); }
}

/* Grid noise texture */
.parallax-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.025) 1px, transparent 0);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* ─── LAYOUT ─── */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--nav-width);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  background: rgba(8, 9, 15, 0.6);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-right: 1px solid var(--border);
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: white;
  letter-spacing: -0.5px;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Search */
.sidebar-search {
  padding: 16px 16px 8px;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 34px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--accent);
  background: var(--bg-glass-hover);
}

/* Style options matching the dark theme */
select.search-input option {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  padding: 12px;
}

/* Nav sections */
.nav-section {
  padding: 16px 16px 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 8px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 400;
  position: relative;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
  border-color: var(--border);
}

.nav-item.active {
  background: var(--accent-dim);
  color: #93b4f8;
  border-color: rgba(91,138,240,0.25);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 10px var(--accent-glow);
}

.nav-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 10px;
  color: var(--text-muted);
}

.nav-item.active .nav-badge {
  background: rgba(91,138,240,0.2);
  border-color: rgba(91,138,240,0.3);
  color: #93b4f8;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b8af0, #a78bfa);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.footer-info { flex: 1; min-width: 0; }
.footer-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.footer-role { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.footer-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  transition: all 0.18s;
  flex-shrink: 0;
}
.footer-btn:hover { background: var(--bg-glass); color: var(--text-primary); }

/* ─── MAIN CONTENT ─── */
.main {
  margin-left: var(--nav-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 16px;
  background: rgba(5,5,8,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb span { color: var(--text-secondary); }
.breadcrumb .sep { opacity: 0.4; }
.breadcrumb .current { color: var(--text-primary); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; align-items: center; gap: 7px;
  backdrop-filter: blur(10px);
}

.topbar-btn:hover { background: var(--bg-glass-hover); color: var(--text-primary); border-color: var(--border-bright); }

.topbar-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.topbar-btn.primary:hover { background: #6b97f5; filter: brightness(1.1); }

/* Content area — volle Breite, kein max-width Limit */
.content {
  flex: 1;
  padding: 40px 48px 80px;
  width: 100%;
  box-sizing: border-box;
}

/* Hero section */
.hero {
  margin-bottom: 56px;
  animation: fadeUp 0.6s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #93b4f8;
  background: var(--accent-dim);
  border: 1px solid rgba(91,138,240,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.hero-label::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── CARDS GRID ─── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.1s;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 8px;
}

.section-link {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.section-link:hover { opacity: 1; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.15s;
}

.card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-bright);
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(91,138,240,0.08);
}

.card-accent {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 16px;
}

.card-accent.blue  { background: rgba(91,138,240,0.15); }
.card-accent.violet{ background: rgba(167,139,250,0.15); }
.card-accent.green { background: rgba(52,211,153,0.15); }
.card-accent.amber { background: rgba(251,191,36,0.13); }
.card-accent.rose  { background: rgba(251,113,133,0.13); }
.card-accent.cyan  { background: rgba(34,211,238,0.13); }

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.card-tag {
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 11px;
}

.card-arrow {
  margin-left: auto;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.18s;
}
.card:hover .card-arrow { opacity: 1; transform: translateX(0); }

/* ─── FEATURED ARTICLE ─── */
.featured {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.22s;
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.2s;
}

.featured:hover {
  border-color: rgba(91,138,240,0.3);
  box-shadow: 0 0 60px rgba(91,138,240,0.06);
  transform: translateY(-2px);
}

.featured-glow {
  position: absolute;
  top: -60px; right: -60px;
  width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(91,138,240,0.12), transparent 70%);
  pointer-events: none;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fbbf24;
  background: rgba(251,191,36,0.1);
  border: 1px solid rgba(251,191,36,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.featured h2 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.featured-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 580px;
}

.featured-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tag-pill {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.tag-pill.accent {
  border-color: rgba(91,138,240,0.3);
  background: var(--accent-dim);
  color: #93b4f8;
}

/* ─── RECENT LIST ─── */
.list-section {
  animation: fadeUp 0.6s ease both;
  animation-delay: 0.25s;
  margin-bottom: 48px;
}

.list-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
  margin-bottom: 4px;
  text-decoration: none;
  color: inherit;
}

.list-item:hover {
  background: var(--bg-glass);
  border-color: var(--border);
  backdrop-filter: blur(10px);
}

.list-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.dot-blue   { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.dot-violet { background: var(--accent2); box-shadow: 0 0 8px rgba(167,139,250,0.5); }
.dot-green  { background: var(--accent3); box-shadow: 0 0 8px rgba(52,211,153,0.4); }

.list-content { flex: 1; }

.list-title {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.list-sub {
  font-size: 12.5px;
  color: var(--text-muted);
}

.list-date {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 3px;
}

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

/* ─── PARALLAX DATA ATTRS ─── */
[data-parallax] {
  will-change: transform;
  transition: transform 0.05s linear;
}

/* ─── RESPONSIVE ─── */
/* ─── MOBILE HAMBURGER BUTTON ─── */
.hamburger {
  display: none;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 38px; height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: all 0.18s;
}
.hamburger:hover { background: var(--bg-glass-hover); color: var(--text-primary); }

/* Overlay für Mobile-Sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s;
}
.sidebar-overlay.active { opacity: 1; }

@media (max-width: 900px) {
  :root { --nav-width: 0px; }

  .hamburger { display: flex; }
  .sidebar-overlay { display: block; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 200;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.6);
  }

  .main { margin-left: 0; }

  .content { padding: 24px 20px 60px; }

  .topbar { padding: 0 16px; gap: 10px; }

  /* Cards Grid auf Mobile: 1 Spalte */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Tabellen horizontal scrollbar */
  .card > table,
  .card > div > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* ==========================================================================
   MARKDOWN & CODE COPY (NEW)
   ========================================================================== */

.markdown-body {
  font-family: var(--font-body);
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-top: 2em;
  margin-bottom: 0.8em;
  font-weight: 700;
}

.markdown-body h1 { font-size: 2em; }
.markdown-body h2 { font-size: 1.5em; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.markdown-body h3 { font-size: 1.25em; }

.markdown-body > *:first-child { margin-top: 0; }

.markdown-body p { margin-bottom: 1.2em; }
.markdown-body ul, .markdown-body ol { margin-bottom: 1.2em; padding-left: 2em; }
.markdown-body li { margin-bottom: 0.4em; }

/* Inline Code */
.markdown-body code {
  font-family: 'Fira Code', Consolas, Monaco, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Code Blocks */
.markdown-body pre {
  margin: 1.5em 0;
  border-radius: 8px;
  background: #111 !important; /* Overrides highlight.js bg */
  border: 1px solid var(--border);
  overflow: auto;
}

.markdown-body pre code {
  background: transparent;
  padding: 1.5em;
  display: block;
  font-size: 0.9em;
  line-height: 1.5;
}

/* Wrapper and Copy Button */
.code-wrapper {
  position: relative;
  margin: 1.5em 0;
}

.code-wrapper pre {
  margin: 0;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  z-index: 10;
}

.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.2); color: var(--text-primary); }
.copy-btn.copied {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.4);
}
