/* Theme Variables */
:root {
  --bg: #0a0f14;
  --bg-card: #111820;
  --text: #e8fff5;
  --text-muted: #6b8f7a;
  --primary: #22c55e;
  --border: #1e3a28;
  --glow: 0 0 20px rgba(34,197,94,0.4);
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
body {
  font-family: 'JetBrains Mono', monospace;
  background: linear-gradient(180deg, var(--bg), #050809);
  color: var(--text);
  min-height: 100vh;
}

/* Background Grid */
.background-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(34,197,94,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,197,94,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 15, 20, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
}

/* Back Button */
.back-btn {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: var(--glow);
}

/* Layout */
.container {
  max-width: 60rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 3rem;
  position: relative;
  z-index: 5;
}

/* Intro */
.intro h1 {
  font-size: 2rem;
}

.intro p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Blog Card */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.blog-card:hover {
  border-color: var(--primary);
  box-shadow: var(--glow);
  transform: translateY(-4px);
}

/* Tag */
.tag {
  font-size: 0.7rem;
  color: var(--bg);
  background: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.blog-card h2 {
  font-size: 1.2rem;
}

/* Excerpt */
.excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1rem;
}

/* Meta */
.meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.read {
  color: var(--primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 3rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.highlight {
  color: var(--primary);
}

/* Blog Content (aus JSON gerendert) */
.content {
  margin-bottom: 1rem;
}

.content p {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.content ul {
  margin: 0.5rem 0 0.75rem 1.2rem;
}

.content li {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* Tag Filter */
.tag-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.tag-filter button {
  font-family: inherit;
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-filter button.active,
.tag-filter button:hover {
  background: var(--primary);
  color: var(--bg);
  box-shadow: var(--glow);
}

/* Read more */
.read-more {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--primary);
  cursor: pointer;
}

/* Animated Content */
.blog-card .content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.45s ease,
    opacity 0.35s ease;
}

/* Expanded State */
.blog-card.expanded .content {
  max-height: 1000px; /* ausreichend groß */
  opacity: 1;
}

/* Read more hover polish */
.read-more {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  margin-bottom: 0.6rem;
  color: var(--primary);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.read-more:hover {
  transform: translateX(4px);
  opacity: 0.85;
}
