/* ===== CSS VARIABLEN ===== */
:root {
  --bg:       #0d0d14;
  --card:     #13131f;
  --border:   #1e1e30;
  --yellow:   #f5c842;
  --blue:     #4fa8ff;
  --green:    #4dffb0;
  --pink:     #ff6b9d;
  --purple:   #b87aff;
  --orange:   #ff9f4a;
  --text:     #e8e8f0;
  --muted:    #7070a0;
  --sidebar-w: 280px;
}

/* ===== RESET ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
section { margin-left: auto; margin-right: auto; }

/* ===== BODY ===== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hintergrund-Grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,168,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,168,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ===== TOP NAV ===== */
nav.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: rgba(13,13,20,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border); padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 15px; color: var(--yellow); text-decoration: none; white-space: nowrap;
}
.nav-logo span { color: var(--muted); }
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 24px; list-style: none; }
.nav-links a {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); text-decoration: none; letter-spacing: 1px; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  padding: 6px; background: none; border: 1px solid var(--border); border-radius: 8px;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--muted); border-radius: 2px; }
@media (max-width: 900px) { .nav-links { display: none; } .hamburger { display: flex; } }

/* ===== PROGRESS BAR ===== */
.progress-bar {
  position: fixed; top: 56px; left: var(--sidebar-w); right: 0; height: 2px;
  transform-origin: left; transform: scaleX(0); z-index: 199;
  transition: transform 0.1s linear;
  /* background wird pro Seite gesetzt */
}
@media (max-width: 900px) { .progress-bar { left: 0; } }

/* ===== HERO ===== */
.hero-badge {
  display: inline-block;
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  padding: 6px 16px; border-radius: 20px; margin-bottom: 22px;
  font-family: 'JetBrains Mono', monospace; animation: fadeDown 0.6s ease both;
}
.hero-sub {
  font-size: 1rem; color: var(--muted); margin-top: 12px;
  font-family: 'JetBrains Mono', monospace; animation: fadeDown 0.6s ease 0.2s both;
}
.hero-code {
  display: inline-block; margin-top: 30px; background: #080810;
  border: 1px solid var(--border); border-radius: 14px; padding: 20px 28px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px; line-height: 2;
  text-align: left; animation: fadeUp 0.6s ease 0.3s both;
}
.hero-buttons {
  display: flex; gap: 12px; justify-content: center;
  margin-top: 28px; flex-wrap: wrap; animation: fadeUp 0.6s ease 0.4s both;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 11px 22px; border-radius: 10px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s; border: none; display: inline-block;
}
.btn:hover { transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* ===== SECTION STYLES ===== */
.section-label {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-bottom: 10px;
}
.section-heading {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; line-height: 1.15; margin-bottom: 12px;
}
.section-desc {
  color: var(--muted); font-size: 14px; line-height: 1.75; max-width: 620px;
}
.section-desc strong { color: var(--text); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 40px;
}
@media (max-width: 600px) { .divider { margin: 0 20px; } }

/* ===== CODE INLINE ===== */
.code-inline {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--accent, var(--yellow));
  background: rgba(255,255,255,0.06);
  padding: 2px 7px; border-radius: 5px;
}

/* ===== CODE BLOCK ===== */
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #0a0a15; border: 1px solid var(--border);
  border-bottom: none; border-radius: 12px 12px 0 0;
  padding: 10px 18px; margin-top: 20px;
}
.code-header + .code-block { margin-top: 0; border-radius: 0 0 12px 12px; }
.code-dots { display: flex; gap: 6px; }
.code-dot  { width: 10px; height: 10px; border-radius: 50%; }
.code-filename { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.code-block {
  background: #080810; border: 1px solid var(--border); border-radius: 12px;
  padding: 20px 24px; font-family: 'JetBrains Mono', monospace;
  font-size: 13px; line-height: 1.9; overflow-x: auto; margin-top: 16px;
}
.code-block .line { display: block; }
.code-line { display: flex; align-items: center; position: relative; }
.indent, .ind { display: inline-block; width: 24px; }

/* ===== SYNTAX FARBEN ===== */
.kw   { color: var(--pink);   font-weight: 700; }
.fn   { color: var(--yellow); font-weight: 700; }
.str  { color: var(--green); }
.var  { color: var(--text); }
.op   { color: var(--muted); }
.param, .prm { color: var(--blue); }
.num  { color: var(--orange); }
.cmt  { color: #404060; font-style: italic; }
.ret  { color: var(--purple); font-weight: 700; }
.paren { color: var(--muted); }
.cls  { color: var(--purple); font-weight: 700; }
.line { display: block; }

/* ===== CTA ===== */
.cta-text { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 22px; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border); padding: 22px 48px;
  text-align: center; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--muted); position: relative; z-index: 1;
}
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--accent, var(--yellow)); }

/* ===== FADE IN ===== */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== ANIMATIONS ===== */
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px);  } to { opacity:1; transform:translateY(0); } }