:root {
  /* Background colors */
  --bg-primary: #0c0b18;
  --bg-secondary: #131228;
  --bg-card: #1a1838;
  --bg-darker: #1a1a2e;
  --bg-overlay: rgba(12, 11, 24, 0.85);
  --bg-overlay-light: rgba(6, 5, 14, 0.75);
  --bg-overlay-darker: rgba(12, 11, 24, 0.75);
  
  /* Accent colors */
  --accent-purple: #7855c0;
  --accent-purple-light: #9d4ed9;
  --accent-purple-dim: rgba(120, 85, 192, 0.14);
  --accent-purple-dim-light: rgba(157, 78, 221, 0.1);

  /* Text colors */
  --text-primary: #dce8f4;
  --text-secondary: #8fa4c0;
  --text-muted: #7487ab;
  
  /* Border and shadow colors */
  --border: rgba(120, 85, 192, 0.25);
  --shadow-sm: rgba(0, 0, 0, 0.35);
  --shadow-md: rgba(0, 0, 0, 0.4);
  --shadow-lg: rgba(0, 0, 0, 0.45);
  --shadow-xl: rgba(0, 0, 0, 0.5);
  --shadow-purple: rgba(157, 78, 221, 0.4);
  
  /* Other */
  --header-height: 64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 48px;
  width: auto;
}

.header-right { display: flex; align-items: center; gap: 8px; }

.site-nav {
  position: relative;
  display: flex;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px;
}

.site-nav a {
  position: relative;
  z-index: 2;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a.active {
  color: #fff;
}

.nav-pill {
  position: absolute;
  top: 5px;
  left: 0px;
  height: calc(100% - 10px);
  width: 0;
  border-radius: 999px;
  background: var(--accent-purple);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Dropdown ── */
.nav-dropdown {
  position: relative;
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 340px;
  height: 12px;
}

.nav-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown > a::after {
  content: '▾';
  font-size: 19px;
  line-height: 1;
  opacity: 0.9;
  transition: transform 0.2s;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 340px;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  list-style: none;
  z-index: 200;
  box-shadow: 0 16px 34px var(--shadow-lg);
}

.nav-dropdown:hover .dropdown-menu {
  display: grid;
}

.dropdown-menu li a {
  display: block;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: all 0.15s;
}

.dropdown-menu li a:hover {
  color: #fff;
  background: var(--accent-purple);
}

/* ── Nav toggle (hamburger) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Search ── */
.search-toggle-wrap { position: relative; }

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.search-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.search-toggle:hover,
.search-toggle-wrap.search-open .search-toggle {
  color: var(--accent-purple);
  border-color: var(--accent-purple);
  background: var(--accent-purple-dim);
}

.search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 12px 28px var(--shadow-lg);
  z-index: 300;
}

.search-toggle-wrap.search-open .search-panel { display: block; }

.search-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent-purple); }

.search-results {
  list-style: none;
  margin-top: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.search-result-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-secondary);
}

.search-result-link:hover,
.search-result-link.search-result-active {
  background: var(--accent-purple-dim);
  color: var(--text-primary);
}

.search-result-thumb {
  width: 56px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.search-result-icon {
  width: 56px;
  height: 32px;
  border-radius: 4px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
}

.search-result-icon svg { width: 16px; height: 16px; fill: currentColor; }

.search-result-meta { min-width: 0; }

.search-result-meta .title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-result-meta .cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-empty,
.search-hint {
  padding: 14px 8px 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Layout ── */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 24px 0; }

.section-lg { padding: 64px 0; }

.section-alt {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 16px;
}

/* ── Hero ── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 48px;
  text-align: left;
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, var(--accent-purple-dim-light) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content { flex: 1 1 420px; max-width: 520px; }

.hero-avatar { flex: 0 0 auto; }

.hero-avatar img {
  display: block;
  height: min(320px, 40vh);
  width: auto;
}

.hero-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-purple-dim);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--accent-purple);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 28px;
}

@media (max-width: 860px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 24px;
    padding: 40px 24px;
  }

  .hero-content { max-width: 100%; }
  .hero p { margin-left: auto; margin-right: auto; }
}

/* ── Buttons ── */
.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent-purple);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent-purple-dim);
  border-color: var(--accent-purple);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card-span-2 { grid-column: span 2; }

@media (max-width: 640px) {
  .card-span-2 { grid-column: span 1; }
}

/* ── Info Cards (Home) ── */
.info-card { display: flex; flex-direction: column; gap: 6px; }

.info-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-purple);
  font-weight: 600;
}

.info-card .value { font-size: 20px; font-weight: 700; }

.info-card .desc { font-size: 14px; color: var(--text-secondary); }

/* ── Video Cards (Knowledgebase) ── */
.video-card { position: relative; }

.video-card-link { display: flex; flex-direction: column; gap: 12px; color: inherit; }

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.2s;
}

.video-card:hover .play-icon { opacity: 1; }

.play-icon svg { width: 48px; height: 48px; fill: white; }

.video-meta .title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}

.video-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.video-meta .category-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
  border-radius: 12px;
  font-size: 12px;
}

.video-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Video info tooltip ── */
.video-info-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-overlay-darker);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  backdrop-filter: blur(4px);
  transition: color 0.15s, border-color 0.15s;
}

.video-info-btn svg { width: 14px; height: 14px; fill: currentColor; }

.video-info-btn:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.video-tooltip { display: none; }

/* ── Video info modal ── */
.video-desc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay-light);
  backdrop-filter: blur(4px);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.video-desc-overlay.overlay-open { display: flex; }

.video-desc-modal {
  position: relative;
  width: min(480px, 100%);
  max-height: min(70vh, 520px);
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 50px var(--shadow-xl);
}

.video-desc-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 48px;
  margin-bottom: 12px;
}

.video-desc-modal-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-line;
}

.video-desc-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.video-desc-modal-close:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

.video-desc-modal-close svg { width: 14px; height: 14px; fill: currentColor; }

/* ── Knowledgebase Categories ── */
.kb-category { margin-bottom: 60px; }

.kb-category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.kb-category-header h2 { font-size: 20px; font-weight: 700; }

.kb-count {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 2px 10px;
  border-radius: 12px;
}

.video-card.kb-collapse-hidden { display: none; }

.kb-collapse-toggle {
  display: block;
  margin: 20px auto 0;
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.kb-collapse-toggle:hover {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

/* ── Video filter (per-page search) ── */
.video-filter {
  position: relative;
  max-width: 420px;
  margin: 28px 0 8px;
}

.video-filter svg {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

.video-filter-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.video-filter-input::placeholder { color: var(--text-muted); }
.video-filter-input:focus { border-color: var(--accent-purple); }

.video-card.filter-hidden,
.kb-category.filter-hidden { display: none; }

.video-filter-empty {
  display: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 24px 0;
}

.video-filter-empty.filter-visible { display: block; }

.tag-chip-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.tag-chip {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.tag-chip:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.tag-chip[aria-pressed="true"] {
  border-color: var(--accent-purple);
  background: var(--accent-purple);
  color: #fff;
}

/* ── Code / Syntax (Wissensartikel) ── */
code {
  font-family: Consolas, "SF Mono", monospace;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
  color: var(--accent-purple);
}

.syntax-block {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: Consolas, "SF Mono", monospace;
  font-size: 13px;
  color: var(--text-primary);
  overflow-x: auto;
  margin: 10px 0 4px;
}

.syntax-block code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.feature-card .req {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-purple);
  background: var(--accent-purple-dim);
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* ── Resource Tags (Asset Quellen) ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 10px; }

.tag {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.tag.tag-link:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

/* ── About Page ── */
.about-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.avatar-card { text-align: center; }

.avatar-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-darker);
  border: 3px solid var(--accent-purple);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  overflow: hidden;
}

.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-card h2 { font-size: 18px; }
.avatar-card .role { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.social-links { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }

.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: all 0.2s;
}

.social-link:hover {
  border-color: var(--accent-purple);
  color: var(--text-primary);
}

.about-content h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.about-content h2:first-child { margin-top: 0; }

.about-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 10px;
}

/* ── Side Navigation ── */
.sidenav {
  position: fixed;
  top: calc(var(--header-height) + 32px);
  right: 32px;
  width: 220px;
  max-height: calc(100vh - var(--header-height) - 64px);
  overflow-y: auto;
  display: none;
  padding: 4px 0;
}

@media (min-width: 1720px) {
  .sidenav { display: block; }
}

.sidenav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent-purple-light);
  margin-bottom: 14px;
}

.sidenav-rail {
  position: relative;
  padding-left: 16px;
}

.sidenav-rail::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: var(--border);
}

.sidenav-indicator {
  position: absolute;
  left: -1px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-purple-light);
  transition: top 0.25s ease, height 0.2s ease;
}

.sidenav-link {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
  line-height: 1.4;
}

.sidenav-link.sidenav-sub {
  padding-left: 20px;
  font-size: 12px;
}

.sidenav-link:hover {
  color: var(--text-secondary);
}

.sidenav-link.sidenav-active {
  color: var(--accent-purple-light);
  font-weight: 700;
}

/* ── Floating action buttons (back-to-top / mobile TOC) ── */
.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  z-index: 150;
}

.fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--shadow-md);
  transition: opacity 0.2s, transform 0.2s, border-color 0.2s, background 0.2s;
}

.fab:hover {
  border-color: var(--accent-purple);
  background: var(--accent-purple-dim);
}

.fab svg { width: 20px; height: 20px; fill: currentColor; }

.back-to-top-fab {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.back-to-top-fab.fab-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toc-fab-wrap { position: relative; }

@media (min-width: 1720px) {
  .toc-fab-wrap { display: none; }
}

.toc-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 240px;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 12px 28px var(--shadow-lg);
}

.toc-fab-wrap.toc-open .toc-popup { display: block; }

.toc-fab-wrap.toc-open .toc-fab-btn {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
}

@media (max-width: 540px) {
  .fab-stack { right: 16px; bottom: 16px; }
  .toc-popup { width: calc(100vw - 32px); }
}

/* ── News ── */
.news-card,
.news-archive-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
}

.news-card-thumb {
  margin: -24px -24px 0;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--bg-secondary);
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-date {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-purple);
  font-weight: 600;
}

.news-card-title { font-size: 17px; font-weight: 700; }

.news-card-teaser {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.news-slider-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.news-slider-btn,
.news-slider-dots { display: none; }

.news-meta-date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.news-article { color: var(--text-secondary); }
.news-article p { margin-bottom: 16px; line-height: 1.7; }
.news-article a { color: var(--accent-purple-light); text-decoration: underline; }
.news-article ul, .news-article ol { margin: 0 0 16px 24px; }
.news-article li { margin-bottom: 8px; line-height: 1.6; }
.news-article code { background: var(--bg-secondary); padding: 1px 6px; border-radius: 4px; }
.news-article h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}
.news-article h2:first-child { margin-top: 0; }

.news-article-video { margin-top: 24px; max-width: 360px; }

.news-article-header-image {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 480px;
}

.news-article-header-image img { width: 100%; display: block; }

@media (max-width: 860px) {
  .news-slider-track {
    display: flex;
    gap: 0;
    transition: transform 0.3s ease;
  }

  .news-slider-track > * {
    flex: 0 0 100%;
    width: 100%;
  }

  .news-slider {
    position: relative;
  }

  .news-slider-viewport {
    overflow: hidden;
    margin: 0 52px;
  }

  .news-slider-btn {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s;
  }

  .news-slider-btn:hover { border-color: var(--accent-purple); color: var(--accent-purple); }
  .news-slider-prev { left: 0; }
  .news-slider-next { right: 0; }

  .news-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
  }

  .news-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    padding: 0;
  }

  .news-slider-dot.active { background: var(--accent-purple); }
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-muted); font-size: 13px; transition: color 0.15s; }
.footer-links a:hover { color: var(--text-secondary); }

.footer-ai-note { font-size: 12px; color: var(--text-muted); }

/* ── Cookie banner ── */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 12px 28px var(--shadow-lg);
  z-index: 500;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

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

.cookie-banner p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
}

.cookie-banner a { color: var(--accent-purple-light); text-decoration: underline; }
.cookie-banner .btn-group { justify-content: flex-start; }
.cookie-banner .btn { padding: 9px 20px; font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
}

@media (max-width: 540px) {
  .header-inner, .page { padding: 0 16px; }
  .hero p { font-size: 16px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--bg-secondary);
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: 10px;
    box-shadow: 0 12px 24px var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }

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

  .site-nav a { padding: 12px 14px; font-size: 15px; border-radius: 8px; }

  .site-nav a.active {
    color: var(--accent-purple);
    background: var(--accent-purple-dim);
  }

  .nav-pill { display: none; }

  .nav-dropdown > a::after { margin-left: auto; font-size: 21px; }

  .nav-dropdown.dropdown-open > a::after { transform: rotate(180deg); }

  .dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 4px 0 4px 14px;
  }

  .nav-dropdown:hover .dropdown-menu { display: none; }

  .nav-dropdown.dropdown-open .dropdown-menu { display: block; }

  .dropdown-menu li a {
    text-align: left;
    border-radius: 7px;
  }

  .dropdown-menu li a:hover {
    background: var(--accent-purple-dim);
    color: var(--text-primary);
  }
}

/* ── Scroll reveal ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.grid-3 > [data-reveal]:nth-child(1) { transition-delay: 0s; }
.grid-3 > [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.grid-3 > [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.grid-3 > [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.grid-3 > [data-reveal]:nth-child(5) { transition-delay: 0.32s; }
.grid-3 > [data-reveal]:nth-child(6) { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
