:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --text: #1c1d21;
  --muted: #5d6170;
  --line: #e3e3dd;
  --accent: #4f46e5;
  --accent-soft: #eceafd;
  --radius: 14px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111216;
    --surface: #1a1b21;
    --text: #ececf1;
    --muted: #a0a3b1;
    --line: #2b2d36;
    --accent: #8b85ff;
    --accent-soft: #24234a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.logo { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--text); text-decoration: none; }

/* Werbeplätze */
.ad { margin: 24px auto; text-align: center; overflow: hidden; }
.ad--live::before {
  content: "Anzeige"; display: block;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 4px;
}
.ad iframe { display: inline-block; max-width: 100%; border: 0; }
.ad--placeholder {
  border: 2px dashed var(--line); border-radius: var(--radius);
  color: var(--muted); font-size: 14px; padding: 28px 12px;
}

/* Hero */
.hero { padding: 56px 0 24px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.03em; }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding: 24px 0 48px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

/* Karten */
.posts { display: grid; gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h2 { margin: 6px 0 8px; font-size: 1.35rem; line-height: 1.3; }
.card h2 a { color: var(--text); }
.card p { margin: 0; color: var(--muted); }
.meta { font-size: 13px; color: var(--muted); }
.tag {
  display: inline-block; background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; margin-right: 8px;
}

/* Seitenleiste */
.sidebar > * + * { margin-top: 24px; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.box h3 { margin: 0 0 8px; font-size: 1rem; }
.box p, .box li { color: var(--muted); font-size: 15px; }
.box ul { padding-left: 18px; margin: 0; }
.sidebar .ad { margin: 0; }

/* Artikel */
.article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 48px);
}
.article h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -0.02em; }
.article h2 { margin-top: 2em; font-size: 1.45rem; }
.article .lead { font-size: 1.15rem; color: var(--muted); }
.article blockquote {
  margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0;
}
.article code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.article pre { background: var(--accent-soft); padding: 16px; border-radius: var(--radius); overflow-x: auto; white-space: pre-wrap; }
.back { display: inline-block; margin-bottom: 16px; font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); margin-left: 16px; }
.site-footer a:first-child { margin-left: 0; }
