/* ============================================================
   BnB InfoSec Blog – Stylesheet
   Abgeleitet aus dem Hauptdesign (dunkel, Terminal-Grün).
   ============================================================ */

:root {
  --bg: #0a0e14;
  --bg-alt: #0d1320;
  --surface: #111827;
  --surface-2: #151d2e;
  --border: #1f2a3d;
  --border-hover: #2e3f5c;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --accent: #00e676;
  --accent-soft: rgba(0, 230, 118, 0.12);
  --accent-glow: rgba(0, 230, 118, 0.35);
  --accent-2: #00b34a;
  --green: #22c55e;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --transition: 160ms ease;
  --container: 1120px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { padding: 0; }
.mono { font-family: var(--font-mono); }
.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

/* ---------- Header/Footer (wie Hauptseite) ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; font-size: 1.1rem; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-logo { filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.3)); }
.brand-text small { display: block; font-size: 0.62rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-faint); }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav ul { display: flex; align-items: center; gap: 26px; list-style: none; }
.site-nav a:not(.btn) { color: var(--text-muted); font-size: 0.95rem; font-weight: 500; transition: color var(--transition); }
.site-nav a:not(.btn):hover, .site-nav a:not(.btn)[aria-current="page"] { color: var(--accent); text-decoration: none; }

/* Hamburger-Button (nur Mobil sichtbar) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Button 'Anfrage stellen' - identisch zur Hauptseite */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover { text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-hover);
}
.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.btn-nav { padding: 9px 20px; font-size: 0.88rem; white-space: nowrap; }

.site-footer { padding: 44px 0; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-name { font-weight: 700; }
.footer-tag { font-size: 0.82rem; color: var(--text-faint); }
.footer-nav ul { display: flex; gap: 22px; list-style: none; }
.footer-nav a { color: var(--text-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent); }
.footer-copy { width: 100%; margin-top: 26px; padding-top: 22px; font-size: 0.82rem; color: var(--text-faint); border-top: 1px solid var(--border); text-align: center; }

/* ---------- Blog-Übersicht ---------- */
.page-head {
  padding: calc(var(--header-h) + 72px) 0 40px;
}
.kicker { margin-bottom: 12px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.06em; }
.page-head h1 { margin-bottom: 14px; font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.015em; font-weight: 800; max-width: 22ch; }
.page-head .lead { max-width: 62ch; color: var(--text-muted); font-size: 1.05rem; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px 0 96px;
}

.article-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.article-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.article-card time { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); }
.article-card h2 { font-size: 1.2rem; line-height: 1.3; font-weight: 700; color: var(--text); }
.article-card p { color: var(--text-muted); font-size: 0.95rem; flex-grow: 1; }
.article-card .more { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tag {
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ---------- Artikel-Seite ---------- */
.article {
  max-width: 760px;
  margin-inline: auto;
  padding: calc(var(--header-h) + 64px) 24px 96px;
}
.article-back {
  display: inline-block;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-back:hover { color: var(--accent); text-decoration: none; }
.article h1 {
  margin-bottom: 18px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 800;
}
.article .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 40px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
}
.article .meta .led {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}

/* Artikel-Typografie (prose) */
.article .prose h2 {
  margin: 44px 0 14px;
  font-size: 1.45rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.article .prose h3 { margin: 32px 0 10px; font-size: 1.15rem; font-weight: 700; }
.article .prose p { margin-bottom: 18px; color: var(--text-muted); font-size: 1.02rem; }
.article .prose strong { color: var(--text); }
.article .prose ul, .article .prose ol { margin: 0 0 20px; padding-left: 26px; color: var(--text-muted); }
.article .prose li { margin-bottom: 8px; }
.article .prose li::marker { color: var(--accent); }
.article .prose blockquote {
  margin: 26px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}
.article .prose blockquote p { margin-bottom: 0; }
.article .prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent);
}
.article .prose pre {
  margin: 22px 0;
  padding: 20px;
  background: #05070a;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  overflow-x: auto;
}
.article .prose pre code { padding: 0; background: none; border: none; color: var(--text); font-size: 0.85rem; }

/* CTA am Artikelende */
.article-cta {
  margin-top: 52px;
  padding: 28px 30px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
}
.article-cta p { margin-bottom: 14px; color: var(--text-muted); }
.article-cta a {
  display: inline-block;
  padding: 11px 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #001a0d;
  font-weight: 600;
  border-radius: var(--radius);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.article-cta a:hover { text-decoration: none; transform: translateY(-2px); }

/* ---------- Responsive ---------- */
/* Mobil: Hamburger-Menü wie auf der Hauptseite (alle Punkte im Overlay) */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: rgba(10, 14, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav ul a:not(.btn) {
    display: block;
    padding: 15px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .site-nav ul a:not(.btn):hover { border-bottom-color: var(--border); }
  .btn-nav {
    display: block;
    margin-top: 18px;
    padding: 14px 20px;
    font-size: 1rem;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}