:root {
  color-scheme: light dark;
  /* — Grundton: Papier (Grau-Blau) & Tinte — */
  --paper:        #ECEEEF;
  --paper-rgb:    236, 238, 239;
  --paper-edge:   #E4E7E8;
  --ink:          #23201B;
  --ink-soft:     #6A6256;
  --rule:         #DADFE1;
  /* — die Code-Welt: ein einziger kühler Akzent — */
  --thread:       #34505E;
  --thread-soft:  #5E7886;
  --thread-line:  #CBD3D6;

  --measure: 64ch;

  --serif-display: "Spectral", Georgia, serif;
  --serif-body:    "Source Serif 4", Georgia, serif;
  --mono:          "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.0rem;
  line-height: 1.74;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(52, 80, 94, 0.16); }

a {
  color: var(--thread);
  text-decoration: none;
  border-bottom: 1px solid var(--thread-line);
  transition: border-color .25s ease, color .25s ease;
}
a:hover { color: var(--ink); border-color: var(--thread-soft); }

:focus-visible {
  outline: 2px solid var(--thread);
  outline-offset: 3px;
  border-radius: 2px;
}

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6.5rem) clamp(1.4rem, 6vw, 3rem) 4rem;
}

/* ——— Kopf (Startseite) ——— */
.masthead {
  margin-bottom: clamp(2.6rem, 6.5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.8rem, 5vw, 2.4rem);
  align-items: stretch;
}
.masthead-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.masthead-figure { margin: 0; }
.masthead-figure img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  object-position: 55% center;
  filter: grayscale(100%);
}
@media (min-width: 620px) {
  .masthead {
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 2.8rem);
  }
  .masthead-figure { padding-top: clamp(1.6rem, 4.5vw, 3rem); }
  .masthead-figure img {
    aspect-ratio: auto;
    height: 100%;
    min-height: 170px;
  }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--thread);
  margin: 0 0 1.6rem;
}
.title {
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
.epigraph {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 1.4rem 0 0;
}

/* ——— der Faden (Zeitachse) ——— */
.feed {
  position: relative;
  border-top: 1px solid var(--thread-line);
  border-left: 1px solid var(--thread-line);
  padding-top: clamp(2.6rem, 6vw, 3.6rem);
  padding-left: clamp(1.6rem, 5vw, 2.6rem);
}
.entry {
  position: relative;
  padding-bottom: clamp(2.8rem, 7vw, 4.2rem);
  margin-bottom: clamp(2.8rem, 7vw, 4.2rem);
  border-bottom: 1px solid var(--rule);
}
.entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.node {
  position: absolute;
  top: 0.55rem;
  left: calc(-1 * clamp(1.6rem, 5vw, 2.6rem) - 4.5px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--thread);
}

.stamp {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  color: var(--thread);
  margin-bottom: 0.7rem;
  border-bottom: none;
}

.entry-title {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.28rem, 3vw, 1.55rem);
  line-height: 1.18;
  letter-spacing: -0.005em;
  margin: 0 0 1.1rem;
}
.entry-title a { color: inherit; border-bottom: none; }
.entry-title a:hover { color: var(--thread); }

/* Anriss auf der Startseite: ~ acht Zeilen + sanfter Auslauf */
.entry .prose {
  position: relative;
  max-height: 14.2rem;
  overflow: hidden;
}
.entry .prose::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3.4rem;
  background: linear-gradient(to bottom,
    rgba(var(--paper-rgb), 0),
    rgb(var(--paper-rgb)));
  pointer-events: none;
}
.more {
  display: inline-block;
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--thread);
  border-bottom: 1px solid transparent;
}
.more:hover { color: var(--ink); border-color: var(--thread-soft); }

.prose p {
  margin: 0 0 1.15rem;
  max-width: var(--measure);
}
.prose p:last-child { margin-bottom: 0; }
.prose em { font-style: italic; }
.prose strong { font-weight: 600; }

/* ——— Einzelseite eines Beitrags ——— */
.site-header {
  margin-bottom: clamp(2.4rem, 6vw, 3.6rem);
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--thread-line);
}
.site-title {
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: none;
}
.site-title:hover { color: var(--thread); }
.post .stamp { margin-bottom: 0.6rem; }
.post-title {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  line-height: 1.16;
  letter-spacing: -0.005em;
  margin: 0 0 1.6rem;
}
.back {
  margin-top: clamp(2.6rem, 7vw, 4rem);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.back a { border-bottom: 1px solid transparent; }
.back a:hover { border-color: var(--thread-soft); }

/* ——— Fuß ——— */
.colophon {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 clamp(1.4rem, 6vw, 3rem) clamp(3rem, 8vw, 5rem);
  border-top: 1px solid var(--rule);
  padding-top: 2.4rem;
  color: var(--ink-soft);
}
.colophon p { margin: 0; font-size: 0.95rem; }
.colophon .mark {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--thread);
  display: block;
  margin-top: 0.6rem;
}

/* ——— sanfte Bewegung beim Laden ——— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto; }
}

/* ——— dunkles Schema: folgt der Systemeinstellung ——— */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #14181B;
    --paper-rgb:    20, 24, 27;
    --paper-edge:   #1E2429;
    --ink:          #E7E4DC;
    --ink-soft:     #9AA1A3;
    --rule:         #2B3137;
    --thread:       #8DAEBF;
    --thread-soft:  #AAC2CE;
    --thread-line:  #44545E;
  }
  ::selection { background: rgba(141, 174, 191, 0.22); }
  .masthead-figure img { filter: grayscale(100%) brightness(0.9); }
}
