/* ═══════════════════════════════════════════════════
   TOKENS & RESET
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;600;700&family=Syne:wght@400;600;800&display=swap');

:root {
  --bg:      #0b0f17;
  --surface: #111827;
  --card:    #161d2e;
  --border:  #1e2d47;
  --accent:  #00d4ff;
  --accent2: #7c3aed;
  --accent3: #10b981;
  --warn:    #f59e0b;
  --text:    #e2e8f0;
  --muted:   #64748b;
  --grid:    rgba(0, 212, 255, 0.035);
  --sidebar-w: 280px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Grid dot texture */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ═══════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════ */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

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

@keyframes sidebarReveal {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 3rem;
  height: 64px;
  background: rgba(11, 15, 23, .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-left {
  display: flex; align-items: center; gap: 1.2rem;
}

.logo-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: blink 2s infinite;
}

.logo-text {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: 1rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

.topbar-meta {
  font-size: .8rem; color: var(--muted); letter-spacing: .05em;
}

.topbar-right {
  display: flex; align-items: center; gap: 1.4rem;
}

.status-pill {
  display: flex; align-items: center; gap: .5rem;
  font-size: .78rem; color: var(--accent3);
  background: rgba(16, 185, 129, .08);
  border: 1px solid rgba(16, 185, 129, .25);
  padding: .3rem .9rem; border-radius: 999px;
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent3);
  animation: blink 1.5s infinite;
}

/* Nav links */
.topbar-nav { display: flex; gap: .35rem; }

.topbar-nav a {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--muted);
  text-decoration: none; padding: .45rem 1rem;
  border-radius: 6px; border: 1px solid transparent;
  transition: all .18s; letter-spacing: .06em;
}

.topbar-nav a:hover,
.topbar-nav a.active {
  color: var(--accent);
  border-color: rgba(0, 212, 255, .2);
  background: rgba(0, 212, 255, .05);
}

.topbar-nav ion-icon { font-size: 1.1rem; }

/* ═══════════════════════════════════════════════════
   BLOG LAYOUT  (sidebar + article)
═══════════════════════════════════════════════════ */
.blog-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 64px; /* topbar height */
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ── */
.blog-sidebar {
  position: fixed;
  top: 64px; left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - 64px);
  overflow-y: auto;
  background: rgba(17, 24, 39, .8);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  padding: 2rem 0;
  animation: sidebarReveal .4s ease both;
}

.blog-sidebar::-webkit-scrollbar { width: 4px; }
.blog-sidebar::-webkit-scrollbar-track { background: transparent; }
.blog-sidebar::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 2px;
}

.sidebar-header {
  padding: 0 1.5rem 1.2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-label {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  display: flex; align-items: center; gap: .5rem;
}

.sidebar-label::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
  opacity: .6;
}

.sidebar-count {
  margin-top: .35rem;
  font-size: .72rem; color: var(--muted);
}

/* Post list */
.post-list {
  list-style: none;
  padding: 0;
}

.post-list-item a {
  display: block;
  padding: .85rem 1.5rem;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all .18s;
  position: relative;
}

.post-list-item a:hover,
.post-list-item a.active {
  background: rgba(0, 212, 255, .04);
  border-left-color: var(--accent);
}

.post-list-item a.active .post-item-title {
  color: var(--accent);
}

.post-item-date {
  font-size: .65rem; color: var(--muted);
  letter-spacing: .08em; margin-bottom: .25rem;
}

.post-item-title {
  font-size: .78rem; color: var(--text);
  font-family: 'Syne', sans-serif; font-weight: 600;
  line-height: 1.35;
  transition: color .18s;
}

.post-item-tag {
  display: inline-block;
  margin-top: .4rem;
  font-size: .6rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 4px;
  background: rgba(124, 58, 237, .12);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, .2);
}

/* divider between posts */
.post-list-item + .post-list-item {
  border-top: 1px solid rgba(30, 45, 71, .5);
}

/* ── MAIN ARTICLE AREA ── */
.blog-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  width: 100%;       /* Nimmt sich den kompletten restlichen Platz */
  max-width: 1440px;  /* Erlaubt dem Inhalt, auf großen Monitoren sehr breit zu werden */
  padding: 3.5rem 4rem 5rem;
  animation: fadeSlideIn .45s ease .1s both;
}
/* Article header */
.article-eyebrow {
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .8rem;
  display: flex; align-items: center; gap: .6rem;
}

.article-eyebrow::after {
  content: '';
  flex: 1; max-width: 60px; height: 1px;
  background: var(--accent); opacity: .4;
}

.article-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.article-title span { color: var(--accent); }

.article-meta {
  display: flex; align-items: center; gap: 1.2rem;
  font-size: .72rem; color: var(--muted);
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-meta-item {
  display: flex; align-items: center; gap: .4rem;
}

/* Article body */
.article-body {
  font-size: .9rem;
  line-height: 1.9;
  color: #cbd5e1;
}

.article-body h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text);
  margin: 2.5rem 0 .8rem;
  padding-left: .9rem;
  border-left: 2px solid var(--accent);
}

.article-body h3, .article-body h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent3);
  margin: 2rem 0 .6rem;
}

.article-body p {
  margin-bottom: 1.4rem;
}

.article-body strong {
  color: var(--text);
  font-weight: 700;
}

.article-body em {
  color: var(--muted);
  font-style: italic;
}

/* Pull quote */
.article-body blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.6rem;
  background: rgba(0, 212, 255, .04);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  color: var(--text);
  font-size: 1rem;
  font-style: italic;
}

/* ── MOBILE SIDEBAR TOGGLE ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 300;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  border: none; cursor: pointer;
  font-size: 1.3rem;
  align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(0,212,255,.4);
  transition: transform .18s;
}

.sidebar-toggle:hover { transform: scale(1.08); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  :root { --sidebar-w: 260px; }

  .topbar { padding: 0 1.2rem; }
  .topbar-meta { display: none; }

  .blog-sidebar {
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    z-index: 150;
  }

  .blog-sidebar.open {
    transform: translateX(0);
  }

  .blog-main {
    margin-left: 0;
    padding: 2rem 1.4rem 4rem;
  }

  .sidebar-toggle { display: flex; }

  .article-title { font-size: 1.7rem; }
}

@media (max-width: 520px) {
  .topbar-nav a span { display: none; }
  .topbar-nav a { padding: .45rem .6rem; }
}