/* ============================================
   Christopher Teuchner — Blog
   Design tokens (gleiches System wie das Portfolio)
   ============================================ */
:root {
  --bg: #1c1e22;
  --bg-alt: #202327;
  --panel: #26292e;
  --panel-border: #383c42;
  --text: #eae7e1;
  --text-muted: #9ca0a8;
  --text-faint: #5c6168;
  --accent: #c98a4b;
  --accent-soft: rgba(201, 138, 75, 0.14);
  --accent-line: rgba(201, 138, 75, 0.35);
  --ok: #7a9e7e;
  --danger: #c96a5a;

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Courier New", monospace;

  --maxw: 900px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
::selection { background: var(--accent-soft); color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(28, 30, 34, 0.82);
  border-bottom: 1px solid var(--panel-border);
}
.site-nav .wrap {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo {
  font-family: var(--font-mono); font-size: 15px;
  text-decoration: none; color: var(--text);
}
.logo .dot { color: var(--accent); }
.nav-links {
  display: flex; gap: 28px; list-style: none; margin: 0; padding: 0;
  font-family: var(--font-mono); font-size: 13px;
}
.nav-links a { text-decoration: none; color: var(--text-muted); position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -21px; height: 2px; background: var(--accent);
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--accent);
  letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(122,158,126,0.18);
}
h1.title {
  font-family: var(--font-display); font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05; font-weight: 600; margin: 0 0 18px; letter-spacing: -0.01em;
}
h1.title span { color: var(--accent); }
.hero p.lede { font-size: 17px; color: var(--text-muted); max-width: 58ch; margin: 0 0 28px; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--font-mono); font-size: 13.5px; text-decoration: none;
  padding: 12px 20px; border-radius: 3px; transition: all 0.15s ease;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #1c1e22; font-weight: 600; }
.btn-primary:hover { background: #dc9c5f; }
.btn-ghost { border: 1px solid var(--panel-border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }

/* ---------- Section shell ---------- */
section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 30px;
  border-bottom: 1px solid var(--panel-border); padding-bottom: 18px;
}
.section-head .idx { font-family: var(--font-mono); color: var(--accent); font-size: 13px; }
.section-head h2 { font-family: var(--font-display); font-size: 26px; font-weight: 600; margin: 0; }
.section-head p { margin: 0 0 0 auto; color: var(--text-muted); font-size: 14px; max-width: 32ch; text-align: right; }

/* ---------- Blog: Grid & Karten ---------- */
.grid-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.post-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.post-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.post-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.post-date {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.post-card h3 { font-family: var(--font-display); font-size: 18px; margin: 0; }
.post-card p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* ---------- Einzelner Beitrag ---------- */
.post-single { padding: 48px 0 80px; }
.back-link {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-muted);
  text-decoration: none; display: inline-block; margin-bottom: 20px;
}
.back-link:hover { color: var(--accent); }
.post-single h1 {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 42px);
  margin: 10px 0 24px; font-weight: 600;
}
.post-hero-img {
  border-radius: 6px; overflow: hidden; border: 1px solid var(--panel-border);
  margin-bottom: 30px;
}
.post-content { font-size: 17px; color: var(--text-muted); }
.post-content p { margin: 0 0 20px; }
.post-content strong { color: var(--text); }
.post-content code {
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 3px; padding: 2px 6px; font-family: var(--font-mono); font-size: 0.9em; color: var(--accent);
}

/* ---------- Page head (Blog-Übersicht) ---------- */
.page-head { padding: 56px 0 20px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 44px); margin: 0 0 14px; font-weight: 600; }
.page-head p { color: var(--text-muted); max-width: 60ch; font-size: 16.5px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--panel-border); padding: 30px 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-faint); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .section-head { flex-wrap: wrap; }
  .section-head p { text-align: left; margin-left: 0; }
}
