/* Shared stylesheet for pandoc-generated articles.
   Use with: pandoc -s --css article.css in.md -o out.html */

/* Rokkitt (Rockwell-Alternative) + Carlito (metrikkompatible Calibri-Alternative),
   beide OFL, selbst gehostet -> kein Google-Fonts-CDN. Lizenzen in fonts/. */

@font-face {
  font-family: Carlito;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/carlito-400.woff2) format("woff2");
}
@font-face {
  font-family: Carlito;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/carlito-700.woff2) format("woff2");
}
@font-face {
  font-family: Rokkitt;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/rokkitt-700.woff2) format("woff2");
}

:root {
  color-scheme: light dark;
  --ink:     light-dark(#1c1b19, #e6e3dd);
  --muted:   light-dark(#6b6862, #a09c94);
  --bg:      light-dark(#fdfcfa, #222222);
  --rule:    light-dark(#e2ded5, #34343b);
  --accent:  light-dark(#0a5aa8, #82b6ea);
  --code-bg: light-dark(#f1eee7, #43434c);

  --font-body: Carlito, Calibri, "Segoe UI", system-ui, sans-serif;
  --font-head: Rokkitt, Rockwell, "Roboto Slab", Georgia, serif;
}

body {
  max-width: 38rem;
  margin-inline: auto;
  padding: 3rem 1.25rem 6rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 0.7rem + 0.9vw, 1.25rem);
  line-height: 1.6;
  text-wrap: pretty;
  hyphens: auto;
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  hyphens: manual;
}
h1 { font-size: 2.1rem; margin: 0 0 1rem; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; margin: 3rem 0 0.6rem; }
h3 { font-size: 1.08rem; margin: 2.25rem 0 0.4rem; }

#title-block-header {
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
#title-block-header > :not(h1) {
  display: block;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

p { margin: 0 0 1.15rem; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

ul, ol { padding-inline-start: 1.4rem; }
li { margin-block: 0.4rem; }

blockquote {
  margin-inline: 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 3px solid var(--rule);
  color: var(--muted);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
}
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  line-height: 1.45;
}
pre code { background: none; padding: 0; }

img, video { max-width: 100%; height: auto; }

table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
th, td { padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--rule); text-align: start; }

hr { margin: 3rem 0; border: 0; border-top: 1px solid var(--rule); }

.footnotes { font-size: 0.9em; color: var(--muted); }

/* --- site chrome: index.html and the pandoc header include --- */

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.25rem;
  margin-bottom: 2.25rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9rem;
}
.site-nav strong { margin-inline-end: auto; font-size: 1rem; }
.site-nav a { color: inherit; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

.posts { list-style: none; padding: 0; margin: 0; }
.posts li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.2rem .5rem;
  align-items: baseline;
  margin-block: 1.25rem;
}
.posts time {
  text-align: end;
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.posts p { grid-column: 2; margin: 0; color: var(--muted); font-size: 0.95rem; }

.site-footer {
  margin-top: 4rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
