/* ============== Reset + Tokens ============== */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  color-scheme: light;

  /* Kühle Palette: paper, graphite, blau */
  --paper:        oklch(0.985 0.003 240);
  --paper-2:      oklch(0.965 0.005 240);
  --ink:          oklch(0.16 0.02 250);
  --ink-2:        oklch(0.28 0.02 250);
  --muted:        oklch(0.45 0.015 250); /* WCAG AA on --paper (≈ 5.3:1) */
  --rule:         oklch(0.90 0.005 240);
  --rule-2:       oklch(0.83 0.008 240);
  --accent:       oklch(0.52 0.16 250);  /* graphite-blue */
  --accent-ink:   oklch(0.40 0.18 252);
  --accent-soft:  oklch(0.94 0.04 250);
  --surface:      #ffffff;

  --bg:           var(--paper);
  --text:         var(--ink);
  --text-muted:   var(--muted);
  --border:       var(--rule);
  --border-strong:var(--rule-2);

  /* Always-dark scrim for lightbox/dialog overlays — must NOT flip in dark
     mode (the scrim is "behind a glass" regardless of page brightness). */
  --scrim:        oklch(0.10 0.02 250);

  --radius-card: 4px;
  --radius-img: 2px;

  --container: 1240px;
  --gutter: 32px;

  --t-fast: 160ms cubic-bezier(.2,.7,.2,1);
  --t-mid:  280ms cubic-bezier(.2,.7,.2,1);
}

/* ============== Dark mode tokens ==============
   Triggered by either the system preference OR an explicit
   data-theme="dark" on <html>. Manual data-theme="light" beats the
   system preference (the :not(...) excludes that case from the @media
   block, so the default light tokens win). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:        oklch(0.16 0.02 250);
    --paper-2:      oklch(0.20 0.02 250);
    --ink:          oklch(0.93 0.01 240);
    --ink-2:        oklch(0.78 0.02 240);
    --muted:        oklch(0.60 0.02 250);
    --rule:         oklch(0.30 0.02 250);
    --rule-2:       oklch(0.40 0.02 250);
    --accent:       oklch(0.72 0.14 250);
    --accent-ink:   oklch(0.82 0.14 250);
    --accent-soft:  oklch(0.30 0.08 250);
    --surface:      oklch(0.22 0.02 250);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:        oklch(0.16 0.02 250);
  --paper-2:      oklch(0.20 0.02 250);
  --ink:          oklch(0.93 0.01 240);
  --ink-2:        oklch(0.78 0.02 240);
  --muted:        oklch(0.60 0.02 250);
  --rule:         oklch(0.30 0.02 250);
  --rule-2:       oklch(0.40 0.02 250);
  --accent:       oklch(0.72 0.14 250);
  --accent-ink:   oklch(0.82 0.14 250);
  --accent-soft:  oklch(0.30 0.08 250);
  --surface:      oklch(0.22 0.02 250);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter Tight", "Söhne", "Helvetica Neue", system-ui, -apple-system, Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { font-size: 16px; line-height: 1.55; }

/* ============== Type ============== */
h1,h2,h3,h4 { font-family: "Inter Tight", "Söhne", system-ui, sans-serif; letter-spacing: -0.02em; margin: 0; line-height: 1.05; font-weight: 600; }
h1 { font-size: clamp(2.5rem, 5vw, 4.25rem); letter-spacing: -0.035em; font-weight: 600; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.25rem); letter-spacing: -0.025em; }
h3 { font-size: 1.125rem; }

a { color: inherit; text-decoration: none; }

.mono { font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, monospace; }
.eyebrow {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============== App shell ============== */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.app > main { flex: 1; }
.app > .footer { flex-shrink: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============== Top bar ============== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.02em;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent);
  position: relative;
  flex-shrink: 0;
}
.brand-dot::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: var(--bg);
  border-radius: 50%;
}
.brand-dot::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--accent);
  border-radius: 50%;
}

/* Nav-toggle wrapper. Acts as a flex container itself so the inner nav
   sits inline on desktop, and as the positioning context for the mobile
   drawer when .is-open is set by JS. */
.nav-toggle {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-burger {
  cursor: pointer;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  padding: 0;
  font: inherit;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.nav-burger:hover { border-color: var(--border-strong); }
.nav-burger-close { display: none; }
.nav-toggle.is-open > .nav-burger .nav-burger-open  { display: none; }
.nav-toggle.is-open > .nav-burger .nav-burger-close { display: block; }
.nav-toggle.is-open > .nav-burger {
  border-color: var(--border-strong);
  background: var(--paper-2);
}

.nav {
  display: flex; gap: 4px;
  margin-left: 8px;
}
.nav button,
.nav a {
  background: none;
  border: 0;
  font: inherit;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav button:hover,
.nav a:hover { color: var(--text); background: var(--paper-2); }
.nav button.active,
.nav a.active,
.nav a[aria-current="page"] { color: var(--text); background: var(--paper-2); }

.topbar-spacer { flex: 1; }

/* NOTE: WP adds `.search` to <body> on search result pages, so style the
   form via `.search-form` (which is also on the form) to avoid collision. */
.search-form {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px 0 38px;
  height: 38px;
  width: 280px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
}
.search-form svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
}
.search-form input {
  border: 0; background: none; outline: none;
  font: inherit;
  color: var(--text);
  width: 100%;
  font-size: 14px;
}
.search-form input::placeholder { color: var(--text-muted); }
.search-kbd {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg);
}

/* ============== Hero / index header ============== */
.index-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.index-head.has-newsletter {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 80px;
  align-items: end;
}
.index-head .eyebrow { margin-bottom: 16px; }
.index-head h1 {
  max-width: none;
}
.index-head-meta {
  margin-top: 24px;
  display: flex; gap: 24px; align-items: center;
  color: var(--text-muted);
  font-size: 14px;
}
.index-head-aside {
  align-self: end;
  padding-bottom: 4px;
}
.index-head-meta .dot { width: 4px; height: 4px; background: currentColor; border-radius: 50%; opacity: 0.5; }

.cat-pills {
  display: flex; gap: 6px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.cat-pill {
  display: inline-block;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  text-decoration: none;
}
.cat-pill:hover { color: var(--text); border-color: var(--border-strong); }
.cat-pill.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* ============== Post list — Variant A: Image-left rows ============== */
.posts-A {
  padding: 8px 0 80px;
  display: flex;
  flex-direction: column;
}
.post-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
}
.post-row:hover { background: color-mix(in oklab, var(--paper-2) 70%, transparent); }
.post-row .cover-wrap {
  display: block;
  width: 280px; height: 280px;
  overflow: hidden;
  border-radius: var(--radius-img);
  background: var(--paper-2);
  transition: transform var(--t-mid);
}
.post-row:hover .cover-wrap { transform: translateY(-2px); }
.post-row .cover-wrap > svg { transition: transform 600ms cubic-bezier(.2,.7,.2,1); }
.post-row:hover .cover-wrap > svg { transform: scale(1.04); }

.post-body { display: flex; flex-direction: column; justify-content: center; max-width: 60ch; }
.post-meta {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 14px;
  font-size: 12px;
}
.post-meta .cat {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.post-meta .sep { color: var(--border-strong); }
.post-meta .date { color: var(--text-muted); font-family: ui-monospace, monospace; }
.post-meta .read { color: var(--text-muted); font-family: ui-monospace, monospace; }

.post-row h2 { font-size: clamp(1.4rem, 2vw, 1.75rem); }
.post-row .dek {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 56ch;
  /* Hard visual cap so the row height stays anchored to the 280px cover.
     Three lines fit cleanly under post-meta + h2 within that height. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-row .read-more {
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 500;
  transition: gap var(--t-fast);
}
.post-row:hover .read-more { gap: 12px; }
.post-row .read-more::after {
  content: "→";
  transition: transform var(--t-fast);
}

/* ============== Variant B: Editorial — first item full bleed, rest stack ============== */
.posts-B { padding: 0 0 80px; }
.post-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  padding: 56px 0;
  align-items: center;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.post-feature .cover-wrap {
  aspect-ratio: 1/1;
  width: 100%;
  border-radius: var(--radius-img);
  overflow: hidden;
  transition: transform var(--t-mid);
}
.post-feature:hover .cover-wrap { transform: translateY(-3px); }
.post-feature h2 {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
  letter-spacing: -0.03em;
  margin-top: 18px;
  line-height: 1.05;
}
.post-feature .dek {
  font-size: 17px;
  max-width: 50ch;
  margin-top: 18px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-feature .read-more {
  margin-top: 28px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-ink);
  font-size: 14px; font-weight: 500;
}
.post-feature .read-more::after { content: "→"; transition: transform var(--t-fast); }
.post-feature:hover .read-more::after { transform: translateX(4px); }

.posts-B-rest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
  padding: 48px 0 0;
}
.post-card-b {
  cursor: pointer;
  display: flex; flex-direction: column;
}
.post-card-b .cover-wrap {
  aspect-ratio: 1/1;
  border-radius: var(--radius-img);
  overflow: hidden;
  margin-bottom: 24px;
  transition: transform var(--t-mid);
}
.post-card-b:hover .cover-wrap { transform: translateY(-3px); }
.post-card-b h2 {
  font-size: 1.5rem;
  margin-top: 8px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.post-card-b .dek {
  color: var(--text-muted);
  font-size: 15px;
  margin-top: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============== Variant C: Type-first table ============== */
.posts-C {
  padding: 8px 0 80px;
  border-top: 1px solid var(--border);
}
.post-line {
  display: grid;
  grid-template-columns: 80px 1fr 220px 90px 60px;
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: padding-left var(--t-fast);
}
.post-line:hover { padding-left: 12px; }
.post-line::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform var(--t-mid);
}
.post-line:hover::before { transform: scaleY(1); }

.post-line .num {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-muted);
  font-feature-settings: "tnum";
}
.post-line h2 {
  font-size: clamp(1.4rem, 2.1vw, 1.85rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.post-line .dek-inline {
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-line .cat-c {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.post-line .date-c {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-muted);
}
.post-line .preview {
  width: 60px; height: 60px;
  border-radius: var(--radius-img);
  overflow: hidden;
  justify-self: end;
}

/* ============== Single post ============== */
.single-wrap { padding: 48px 0 96px; }
.single-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  margin-bottom: 40px;
  text-decoration: none;
  transition: color var(--t-fast), border-color var(--t-fast),
              background var(--t-fast), gap var(--t-fast),
              transform var(--t-fast);
}
.single-back::before {
  content: "←";
  display: inline-block;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 14px;
  line-height: 1;
  transition: transform var(--t-fast);
}
.single-back:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--paper-2);
}
.single-back:hover::before {
  transform: translateX(-3px);
}
.single-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.single-head {
  max-width: 760px;
  margin: 0 auto 56px;
  text-align: left;
}
.single-head .eyebrow { color: var(--accent-ink); }
.single-head h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-top: 16px;
  line-height: 1.05;
}
.single-head .dek {
  font-size: 20px;
  color: var(--text-muted);
  margin-top: 22px;
  line-height: 1.45;
  max-width: 60ch;
}
.single-head-meta {
  display: flex; align-items: center; gap: 16px;
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.single-cover {
  max-width: 1040px;
  margin: 0 auto 56px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-img);
  overflow: hidden;
  background: var(--paper-2);
}
.single-cover svg { width: 100%; height: 100%; display: block; }

.single-body {
  max-width: 680px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
}
.single-body p { margin: 0 0 1.4em; }
.single-body p:first-of-type::first-letter {
  font-size: 3.2em;
  float: left;
  line-height: 0.9;
  padding: 4px 10px 0 0;
  font-weight: 600;
  color: var(--text);
}

/* ============== Rich body blocks ============== */
.body-heading {
  max-width: 680px;
  margin: 56px auto 20px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

.body-quote {
  max-width: 680px;
  margin: 40px auto;
  padding: 4px 0 4px 28px;
  border-left: 2px solid var(--accent);
}
.body-quote p {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 12px;
  font-style: italic;
}
.body-quote p::first-letter { all: unset; }
.body-quote cite {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
  font-family: ui-monospace, "JetBrains Mono", monospace;
  letter-spacing: 0.01em;
}

/* Inline figure (single image) */
.post-figure {
  max-width: 920px;
  margin: 48px auto;
}
.post-figure-frame {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: oklch(0.18 0.02 250);
  box-shadow: 0 1px 0 var(--border);
}
.post-figure-frame > svg { width: 100%; height: 100%; }
.post-figure figcaption,
.post-gallery figcaption,
.post-code figcaption {
  max-width: 680px;
  margin: 14px auto 0;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}

/* Gallery (multi-image) */
.post-gallery {
  max-width: 920px;
  margin: 48px auto;
}
.post-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.post-gallery-item {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: oklch(0.18 0.02 250);
}
.post-gallery-item > figure { margin: 0; }
.post-gallery-item .post-figure-frame { border-radius: 0; }

/* Code block */
.post-code {
  max-width: 880px;
  margin: 36px auto;
  background: oklch(0.18 0.02 250);
  border-radius: 10px;
  border: 1px solid oklch(0.30 0.02 250);
  overflow: hidden;
  font-family: ui-monospace, "JetBrains Mono", "Söhne Mono", monospace;
}
.post-code-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px;
  background: oklch(0.22 0.02 250);
  border-bottom: 1px solid oklch(0.30 0.02 250);
}
.post-code-lang {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.78 0.06 240);
  font-weight: 500;
}
.post-code-copy {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.06em;
  background: transparent;
  border: 1px solid oklch(0.40 0.02 250);
  color: oklch(0.85 0.02 250);
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.post-code-copy:hover {
  background: oklch(0.30 0.02 250);
  border-color: oklch(0.50 0.04 250);
}
.post-code pre {
  margin: 0;
  padding: 18px 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: oklch(0.92 0.01 250);
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}
.post-code code { font: inherit; }

/* Token colors — calm, consistent with cool palette */
.tok-comment { color: oklch(0.55 0.02 250); font-style: italic; }
.tok-string  { color: oklch(0.78 0.10 160); }
.tok-keyword { color: oklch(0.75 0.13 290); font-weight: 500; }
.tok-number  { color: oklch(0.80 0.13 50); }
.tok-fn      { color: oklch(0.80 0.10 220); }
.tok-prop    { color: oklch(0.85 0.05 220); }
.tok-punct   { color: oklch(0.70 0.02 250); }
.tok-plain   { color: inherit; }

/* When rich blocks appear inside the .single-body, drop the drop-cap so
   only the very first paragraph (if any) has it. */
.single-body > .body-heading + p::first-letter,
.single-body > .post-figure + p::first-letter,
.single-body > .post-gallery + p::first-letter,
.single-body > .post-code + p::first-letter,
.single-body > .body-quote + p::first-letter {
  all: unset;
}

.single-tags {
  max-width: 680px;
  margin: 56px auto 0;
  display: flex; gap: 8px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.single-tag {
  font-size: 12px;
  font-family: ui-monospace, monospace;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.single-related {
  max-width: 1040px;
  margin: 96px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.single-related h3 {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.related-card { cursor: pointer; }
.related-card a { display: block; }
.related-card .cover-wrap {
  display: block;
  aspect-ratio: 1/1;
  border-radius: var(--radius-img);
  overflow: hidden;
  margin-bottom: 16px;
  transition: transform var(--t-mid);
}
.related-card:hover .cover-wrap { transform: translateY(-2px); }
.related-card h4 {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.3;
}
.related-card .cat {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 8px;
  display: block;
}

/* ============== About / Contact ============== */
.page-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}
.page-head .eyebrow { margin-bottom: 16px; }
.page-content {
  padding: 56px 0 96px;
  max-width: 880px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
}
.page-content--narrow { max-width: 760px; }
.page-content--wide   { max-width: 1040px; }
.page-content p { margin: 0 0 1.3em; }
.page-content h2 { margin: 2em 0 0.6em; font-size: 1.4rem; color: var(--text); }
.page-content a { color: var(--accent-ink); border-bottom: 1px solid currentColor; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  padding: 56px 0 96px;
  align-items: start;
}
.about-text {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 60ch;
}
.about-text p { margin: 0 0 1.3em; }
/* Stats card — visual treatment shared by the about-page sidebar and the
   stand-alone "Journal in Zahlen" block. */
.mr-stats-card {
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface);
}
.mr-stats-card h4 { font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin-bottom: 14px; margin-top: 0; }
.mr-stats-card ul { list-style: none; margin: 0; padding: 0; }
.mr-stats-card li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; display: flex; justify-content: space-between; }
.mr-stats-card li:last-child { border: 0; }
.mr-stats-card li span { color: var(--text-muted); font-family: ui-monospace, monospace; font-size: 12px; }

/* About-page sidebar adds sticky positioning on top of the card visual. */
.about-side {
  position: sticky;
  top: 96px;
}

/* Contact form */
.contact-form {
  max-width: 560px;
  display: flex; flex-direction: column; gap: 20px;
  margin-top: 32px;
}
.contact-form label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
}
.contact-form button {
  align-self: flex-start;
  background: var(--text);
  color: var(--bg);
  border: 0;
  padding: 12px 28px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast);
}
.contact-form button:hover { transform: translateY(-1px); background: var(--accent-ink); }
.contact-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.contact-success {
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--border));
  color: var(--accent-ink);
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 14px;
  margin-top: 12px;
}

/* Archiv */
.archive-list { padding: 32px 0 96px; }
.archive-year {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.archive-year h3 {
  font-size: 28px;
  font-family: ui-monospace, monospace;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}
.archive-year ul { list-style: none; margin: 0; padding: 0; }
.archive-year li {
  display: grid;
  grid-template-columns: 80px 1fr 140px;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  cursor: pointer;
  transition: color var(--t-fast);
}
.archive-year li:hover { color: var(--accent-ink); }
.archive-year li:last-child { border: 0; }
.archive-year li .month {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.archive-year li .ttl { font-size: 16px; font-weight: 500; }
.archive-year li .cat-mini {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}

/* Empty state */
.empty {
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* ============== Footer ============== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  background: var(--paper-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin-bottom: 16px; font-family: ui-monospace, monospace; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer ul a { font-size: 14px; color: var(--text-muted); cursor: pointer; }
.footer ul a:hover { color: var(--text); }
.footer-blurb { color: var(--text-muted); font-size: 14px; line-height: 1.6; max-width: 36ch; margin-top: 12px; }
.footer-bot {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ============== Search overlay highlight ============== */
mark {
  background: color-mix(in oklab, var(--accent) 25%, transparent);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* ============== Single — variants ============== */
.single-head-compact { max-width: 1040px; margin: 0 auto 56px; }
.single-head-row {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 48px;
  align-items: start;
}
.single-head-row .single-head-text h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
.single-cover-thumb {
  position: relative;
  width: 140px; height: 140px;
  border-radius: var(--radius-img);
  overflow: hidden;
  border: 1px solid var(--border);
  padding: 0;
  background: var(--paper-2);
  cursor: zoom-in;
  transition: transform var(--t-mid), box-shadow var(--t-mid);
  display: block;
  margin-top: 8px;
}
.single-cover-thumb:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(20, 30, 60, 0.18);
}
.single-cover-thumb svg { width: 100%; height: 100%; display: block; }
/* Zoom-hint chip on the cover thumbnails / sidenote cover.
   Always visible (with subtle opacity) so users see immediately that the
   image is zoomable; intensifies on hover. Colors are intentionally NOT
   themed — the chip is a frosted-glass "control" floating over the image,
   so we keep it dark-on-white in BOTH light and dark mode. */
.zoom-hint {
  position: absolute;
  right: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px;
  background: rgba(15, 22, 35, 0.62);
  color: #ffffff; /* hardcoded — frosted control sits over arbitrary cover art */
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);
  opacity: 0.85;
  transition: opacity var(--t-fast), transform var(--t-fast),
              background var(--t-fast);
  pointer-events: none;
}
.zoom-hint-icon { display: block; flex-shrink: 0; }
.zoom-hint-label { display: inline-block; }
.single-cover-thumb:hover .zoom-hint,
.single-cover-aside:hover .zoom-hint {
  opacity: 1;
  transform: translateY(-1px);
  background: rgba(15, 22, 35, 0.78);
}

/* On the small 140/160px thumbs the label gets cramped — drop it, keep just
   the icon so the chip stays compact. */
.single-cover-thumb .zoom-hint-label { display: none; }
.single-cover-thumb .zoom-hint { padding: 5px 6px; }

/* Sidenote variant — image floats next to body */
.variant-sidenote .single-head-side {
  max-width: 1040px;
  margin: 0 auto 48px;
}
.variant-sidenote .single-head-side h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  max-width: 22ch;
}
.variant-sidenote .single-head-side .dek { max-width: 56ch; }
.single-sidenote {
  max-width: 1040px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 80px;
  align-items: start;
}
.single-sidenote .sidenote-body { min-width: 0; }
.single-sidenote .sidenote-body .single-body { max-width: 64ch; font-size: 18px; }
.single-sidenote .sidenote-related {
  grid-column: 1 / -1;
  margin-top: 80px;
}
.single-cover-aside {
  position: sticky;
  top: 96px;
  width: 160px;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  cursor: zoom-in;
  display: block;
  font-family: inherit;
}
.single-cover-aside > svg {
  width: 160px; height: 160px;
  border-radius: var(--radius-img);
  border: 1px solid var(--border);
  overflow: hidden;
  display: block;
  transition: transform var(--t-mid);
}
.single-cover-aside:hover > svg { transform: translateY(-3px); }
.single-cover-aside .zoom-hint { right: 10px; bottom: 10px; }
.aside-cap {
  display: block;
  margin-top: 12px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: color-mix(in oklab, var(--scrim) 86%, transparent);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  cursor: zoom-out;
  animation: lb-fade var(--t-mid) ease;
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-inner {
  max-width: min(80vh, 80vw);
  aspect-ratio: 1/1;
  border-radius: 8px;
  overflow: hidden;
  cursor: default;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: lb-pop 320ms cubic-bezier(.2,.8,.2,1);
}
@keyframes lb-pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.lightbox-inner svg { width: 100%; height: 100%; display: block; }
.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 24px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit;
  transition: background var(--t-fast);
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-cap {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 60ch;
}

/* ============== Newsletter card (inline next to hero) ============== */
.nl-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 24px 24px 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 12px 36px rgba(15, 30, 60, 0.10);
  font-family: inherit;
  animation: nl-in 360ms cubic-bezier(.2,.8,.2,1);
}
@keyframes nl-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.nl-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.nl-eyebrow {
  display: block;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 8px;
}
.nl-head h4 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
}
.nl-icon {
  width: 28px; height: 28px;
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast);
  flex-shrink: 0;
}
.nl-icon:hover { background: var(--paper-2); color: var(--text); }
.nl-blurb {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 16px;
}
.nl-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.nl-form input {
  font: inherit;
  font-size: 14px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  outline: none;
  color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.nl-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 14%, transparent);
}
.nl-form button {
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 16px;
  background: var(--text);
  color: var(--bg);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
}
.nl-form button:hover:not(:disabled) { background: var(--accent-ink); transform: translateY(-1px); }
.nl-form button:disabled { opacity: 0.5; cursor: not-allowed; }
.nl-fine {
  margin: 14px 0 0;
  font-family: ui-monospace, "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.nl-success {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 4px 0;
}
.nl-check {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.nl-success p { font-size: 14px; margin: 6px 0 0; color: var(--text); line-height: 1.5; }

/* ============== Responsive ============== */
@media (max-width: 900px) {
  .index-head.has-newsletter { grid-template-columns: 1fr; gap: 32px; }
  .single-head-row { grid-template-columns: 1fr; gap: 24px; }
  .single-cover-thumb { width: 160px; height: 160px; }
  .single-sidenote { grid-template-columns: 1fr; gap: 24px; }
  .single-cover-aside { position: static; width: 100%; max-width: 280px; }
  .single-cover-aside > svg { width: 100%; height: auto; aspect-ratio: 1/1; }
  .lightbox { padding: 24px; }
}
@media (max-width: 900px) {
  .post-row { grid-template-columns: 160px 1fr; gap: 24px; }
  .post-row .cover-wrap { width: 160px; height: 160px; }
  .post-feature { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .posts-B-rest { grid-template-columns: 1fr; gap: 32px; }
  .related-grid { grid-template-columns: 1fr; }
  .post-line { grid-template-columns: 40px 1fr 60px; }
  .post-line .dek-inline, .post-line .date-c { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .search-form { width: 180px; }
  .search-form:focus-within { width: 220px; }
}

/* === Burger-Menü: Burger nur mobil sichtbar, Nav daneben als Dropdown === */
@media (max-width: 900px) {
  .nav-toggle > .nav {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 200px;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 30, 60, 0.10);
    z-index: 60;
  }
  .nav-toggle.is-open > .nav { display: flex; }
  .nav-toggle > .nav a {
    padding: 10px 14px;
    border-radius: 8px;
    text-align: left;
    width: 100%;
  }
}

@media (min-width: 901px) {
  /* Desktop: Burger weg, Nav inline neben dem Brand. */
  .nav-burger { display: none; }
}

/* === Mono font enforcement (was inline in the prototype's index.html) === */
.mono,
.eyebrow,
.post-meta .cat,
.post-meta .date,
.post-meta .read,
.post-line .num,
.post-line .cat-c,
.post-line .date-c,
.single-tag,
.archive-year h3,
.archive-year li .month,
.archive-year li .cat-mini,
.footer h4,
.footer-bot,
.single-head-meta,
.search-kbd,
.mr-stats-card h4,
.mr-stats-card li span,
.related-card .cat,
.single-related h3 {
  font-family: "JetBrains Mono", ui-monospace, monospace !important;
}

/* === Reduced-motion: respect user preference (WCAG 2.3.3) === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .post-row:hover .cover-wrap,
  .post-feature:hover .cover-wrap,
  .post-card-b:hover .cover-wrap,
  .single-cover-thumb:hover,
  .single-cover-aside:hover > svg {
    transform: none;
  }
}

/* === Search page — overrides for arbitrary-length queries ===
   Same .index-head box treatment as the home, but with a calmer h1 size
   (long queries shouldn't dominate the viewport) and word-break so very
   long single tokens don't horizontal-scroll the page. The container has
   a min-height so even a 0-result page never collapses to topbar+footer. */
.container-search {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
}
.index-head-search h1 {
  max-width: 26ch;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.1;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.index-head-search .search-q-quotes {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0.05em;
}
.index-head-search .search-back-link {
  color: var(--accent-ink);
  text-decoration: none;
  transition: color var(--t-fast);
}
.index-head-search .search-back-link:hover {
  color: var(--text);
}

/* Empty state for search — more visually substantial than the generic .empty */
.empty-search {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 0 120px;
  text-align: center;
}
.empty-search-headline {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
  max-width: 50ch;
}
.empty-search-hint {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 48ch;
  margin: 0;
}
.empty-search-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.empty-search-link {
  color: var(--accent-ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
  text-underline-offset: 3px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.empty-search-link:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}
