/* ══════════════════════════════════════════
   DerH0nd – Design System
   Farben · Fonts · Variablen
   ══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Inter:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');

:root {
  /* ── Farben ──────────────────────────── */
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-card:       #1a1a24;
  --text-primary:  #e8e6e3;
  --text-muted:    #7a7980;
  --accent:        #c4a07a;
  --accent-faded:  rgba(196, 160, 122, 0.15);
  --accent-glow:   rgba(196, 160, 122, 0.08);
  --border:        #2a2a35;
  --error:         #a05050;

  /* ── Fonts ───────────────────────────── */
  --font-mono:     'Space Mono', monospace;
  --font-body:     'Inter', sans-serif;
  --font-display:  'Playfair Display', serif;
}


/* ══════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

strong {
  color: var(--text-primary);
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--accent);
}

::selection {
  background: var(--accent);
  color: var(--bg-primary);
}


/* ══════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════ */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-bracket {
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}


/* ══════════════════════════════════════════
   HERO (Startseite)
   ══════════════════════════════════════════ */

.hero {
  padding: 5rem 0 4rem;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

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

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--accent);
  cursor: pointer;
}

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

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent);
  color: var(--bg-primary);
}


/* ══════════════════════════════════════════
   SECTIONS (Allgemein)
   ══════════════════════════════════════════ */

.latest-posts,
.manifesto,
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.title-decoration {
  color: var(--accent);
  margin-right: 0.3rem;
}

.page-header {
  padding: 3rem 0 1rem;
}

.page-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.page-tagline {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--text-primary);
}


/* ══════════════════════════════════════════
   ARTIKEL-VORSCHAU (Startseite + Topics)
   ══════════════════════════════════════════ */

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-preview {
  border-left: 2px solid var(--accent-faded);
  padding-left: 1.5rem;
  transition: border-color 0.2s ease;
}

.post-preview:hover {
  border-color: var(--accent);
}

.post-preview-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  display: flex;
  gap: 0.5rem;
}

.separator {
  color: var(--accent-faded);
}

.post-preview-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.post-preview-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.post-preview-title a:hover {
  color: var(--accent);
}

.post-preview-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.post-preview-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.topic-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--accent-faded);
  color: var(--text-muted);
  border-radius: 2px;
}

.section-footer {
  margin-top: 2rem;
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}


/* ══════════════════════════════════════════
   TOPIC CARDS (Topics-Seite)
   ══════════════════════════════════════════ */

.topics-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.topic-card:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
}

.topic-card-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.topic-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.topic-card-title a {
  color: var(--accent);
  text-decoration: none;
}

.topic-card-title a:hover {
  color: var(--text-primary);
}

.topic-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.topic-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}


/* ══════════════════════════════════════════
   EINZELARTIKEL
   ══════════════════════════════════════════ */

.article-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.article-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.3;
  color: var(--text-primary);
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.article-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--accent-glow);
}

.article-body blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.article-body blockquote cite {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: normal;
}

.article-body ul, .article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--text-muted);
}

.article-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-body code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-card);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--border);
}

.article-back {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.article-back a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}


/* ══════════════════════════════════════════
   MANIFEST (Startseite)
   ══════════════════════════════════════════ */

.manifesto {
  border-top: 1px solid var(--border);
}

.manifesto-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.manifesto-stats {
  display: flex;
  gap: 3rem;
  margin-top: 2rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* ══════════════════════════════════════════
   ABOUT-SEITE
   ══════════════════════════════════════════ */

.about-section {
  margin-bottom: 3rem;
}

.about-section h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.about-section p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-list {
  list-style: none;
  padding: 0;
}

.about-list li {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.about-list li span {
  color: var(--accent);
  margin-right: 0.5rem;
}


/* ══════════════════════════════════════════
   LINKS-SEITE
   ══════════════════════════════════════════ */

.links-category {
  margin-bottom: 3rem;
}

.links-category h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.link-item {
  display: block;
  padding: 1rem;
  margin-bottom: 0.5rem;
  border-left: 2px solid var(--accent-faded);
  transition: border-color 0.2s, background 0.2s;
}

.link-item:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.link-item-title {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.link-item-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* ══════════════════════════════════════════
   GÄSTEBUCH
   ══════════════════════════════════════════ */

.guestbook-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.guestbook-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.guestbook-info code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-primary);
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border);
  color: var(--accent);
}

.guestbook-entries {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.guestbook-entry {
  border-left: 2px solid var(--accent-faded);
  padding: 1rem 1.5rem;
  background: var(--bg-card);
}

.guestbook-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.guestbook-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.guestbook-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.guestbook-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}


/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-link {
  color: var(--accent);
}


/* ══════════════════════════════════════════
   UTILITIES
   ══════════════════════════════════════════ */

.loading-text,
.error-text {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-muted);
}


/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: 3rem 0 2rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
  }

  .manifesto-stats {
    gap: 2rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .article-meta {
    flex-direction: column;
    gap: 0.3rem;
  }

  .guestbook-entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

/* ═══════════════════════════════════════
   TOPICS PAGE
   ═══════════════════════════════════════ */

.topics-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.topics-header {
  margin-bottom: 2rem;
}

.topics-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.topics-subtitle {
  font-family: var(--font-body);
  color: var(--text-muted);
  font-size: 1rem;
}

/* Tag-Filter */
.topics-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

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

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-faded);
}

/* Artikel-Karten */
.topics-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.topic-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color 0.3s ease;
}

.topic-card:hover {
  border-color: var(--accent);
}

.topic-card-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.topic-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.topic-card-title a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.topic-card-title a:hover {
  color: var(--text-primary);
}

.topic-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.topic-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* Loading Animation */
.article-loading {
  text-align: center;
  padding: 2rem;
  font-size: 1.5rem;
  color: var(--text-muted);
}

.loading-dot {
  animation: loadPulse 1.2s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}