/* ============================================
   hanseat Logbuch — Main Stylesheet
   Papier-Manufaktur Aesthetic
   Lokale Fonts (DSGVO-konform, kein Google Fonts Request)
============================================ */

/* ---- Lokale Variable Fonts (DSGVO-konform, kein Google Fonts Request) ---- */
/* Eine WOFF2-Datei pro Schriftfamilie deckt alle Gewichte ab (Variable Font) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/jetbrains-mono.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================
   DESIGN TOKENS
============================================ */
:root {
  --paper:        #f1ebe0;
  --paper-warm:   #ebe3d3;
  --paper-deep:   #d9d2c4;
  --paper-edge:   #c9bfa9;
  --ink:          #1e3a5f;
  --ink-deep:     #15263d;
  --ink-soft:     #2d4f7a;
  --seal:         #c8362d;
  --seal-deep:    #a82a22;
  --muted:        #6b6354;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  --shadow-paper: 0 1px 0 rgba(30,58,95,.04), 0 14px 28px -18px rgba(30,58,95,.18), 0 4px 10px -6px rgba(30,58,95,.10);
  --shadow-deep:  0 2px 0 rgba(30,58,95,.06), 0 30px 50px -28px rgba(30,58,95,.35);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain on the whole page */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(30,58,95,.025) 1px, transparent 1px),
    radial-gradient(rgba(200,54,45,.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.2vw, 76px); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.1; }
h3 { font-size: 22px; line-height: 1.25; }
p  { margin: 0; text-wrap: pretty; }

a { color: var(--seal); text-decoration: none; }
a:hover { color: var(--seal-deep); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--seal);
  font-weight: 500;
}
.eyebrow-ink { color: var(--ink-soft); }

/* Utility */
.text-seal { color: var(--seal); }
.text-ink  { color: var(--ink); }
.text-muted { color: var(--muted); }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}

/* ============================================
   HEADER
============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 235, 224, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-edge);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.logo img {
  display: block;
  height: 60px;
  width: auto;
}
.footer-brand .logo img { height: 52px; }
.footer-boat-img { height: 96px; width: auto; display: block; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  position: relative;
  padding: 6px 0;
}
.site-nav a.active::after,
.site-nav a.current-menu-item::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--seal);
  border-radius: 2px;
}
.site-nav a:hover { color: var(--seal); }

/* Sprachumschalter */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.js-lang-switch-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 3px 6px;
  border-radius: 3px;
  transition: color 150ms, background 150ms;
  line-height: 1;
}
.js-lang-switch-btn.is-active,
.js-lang-switch-btn[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
  background: rgba(30,58,95,.07);
}
.js-lang-switch-btn:hover:not(.is-active) { color: var(--seal); }
.lang-switcher .sep { color: var(--paper-edge); font-size: 10px; }

/* Subscribe-Button (border-image Papierstreifen) */
.subscribe-strip {
  --slice-top: 0;
  --slice-right: 50;
  --slice-bottom: 0;
  --slice-left: 14;
  --cap-scale: 0.9;

  appearance: none;
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 12px 38px 12px 18px;
  min-height: calc(40px * var(--cap-scale));

  border: solid;
  border-width:
    calc(var(--slice-top)    * 1px)
    calc(var(--slice-right)  * 1px * var(--cap-scale))
    calc(var(--slice-bottom) * 1px)
    calc(var(--slice-left)   * 1px * var(--cap-scale));
  border-image-source: url("../img/navi-strip.png");
  border-image-slice:
    var(--slice-top)
    var(--slice-right)
    var(--slice-bottom)
    var(--slice-left)
    fill;
  border-image-repeat: stretch;
  border-image-width: 1;

  transform: rotate(-1.2deg) translateY(0);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1.2), filter 150ms ease;
}
.subscribe-strip:hover,
.subscribe-strip:focus-visible {
  outline: none;
  transform: rotate(0deg) translateY(-2px) scale(1.02);
  filter: brightness(1.05) saturate(1.05);
}
.subscribe-strip:active {
  transform: rotate(0deg) translateY(-1px) scale(0.99);
}

.header-tools { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--paper-edge);
  background: var(--paper);
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--ink);
  transition: all .15s ease;
}
.icon-btn:hover { border-color: var(--ink); }

/* ============================================
   HERO
============================================ */
.hero {
  padding: 80px 0 100px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 { margin-top: 18px; }
.hero h1 .ink { color: var(--ink); display: block; }
.hero h1 .seal { color: var(--seal); display: block; }
.hero-lede {
  margin-top: 28px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 460px;
}
.hero-meta {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* Author chip */
.author-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  border-radius: 100px;
}
.author-chip .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.author-chip .meta { line-height: 1.2; }
.author-chip .meta .name { font-weight: 600; font-size: 14px; color: var(--ink); }
.author-chip .meta .role { font-size: 11px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .05em; }

/* Hero visual */
.hero-visual {
  aspect-ratio: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
}
.hero-brain {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
}

/* ============================================
   PLACEHOLDERS (paper-textured)
============================================ */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      var(--paper-warm) 0px,
      var(--paper-warm) 6px,
      var(--paper-deep) 6px,
      var(--paper-deep) 7px
    );
  border: 1px dashed var(--paper-edge);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  overflow: hidden;
}
.placeholder.ink {
  background:
    repeating-linear-gradient(
      135deg,
      var(--ink) 0px,
      var(--ink) 6px,
      var(--ink-deep) 6px,
      var(--ink-deep) 7px
    );
  color: rgba(241,235,224,.55);
  border-color: rgba(241,235,224,.18);
}
.placeholder.seal {
  background:
    repeating-linear-gradient(
      135deg,
      var(--seal) 0px,
      var(--seal) 6px,
      var(--seal-deep) 6px,
      var(--seal-deep) 7px
    );
  color: rgba(241,235,224,.7);
  border-color: rgba(241,235,224,.2);
}
.placeholder .label {
  background: rgba(241,235,224,.92);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid var(--paper-edge);
}
.placeholder.ink .label,
.placeholder.seal .label {
  background: rgba(241,235,224,.92);
  color: var(--ink);
}

/* Symbol placeholder */
.symbol-slot {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--seal);
  display: grid; place-items: center;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  border: 2px solid var(--paper);
  box-shadow: 0 4px 10px -4px rgba(200,54,45,.4);
  position: relative;
}
.symbol-slot.ink { background: var(--ink); }
.symbol-slot.outline {
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.symbol-slot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(255,255,255,.25);
  border-radius: 50%;
  pointer-events: none;
}
.symbol-slot.outline::after { border-color: rgba(30,58,95,.18); }

/* ============================================
   TORN PAPER EDGES (SVG-Maske per CSS)
============================================ */
.torn-edge {
  --edge-base: #1f3c63;

  display: block;
  width: 100%;
  height: 28px;
  position: relative;
  z-index: 3;
  background-color: var(--edge-base);
  background-image:
    radial-gradient(rgba(241,235,224,.04) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.07) 0.6px, transparent 1px),
    repeating-linear-gradient(118deg, rgba(241,235,224,.015) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(28deg, rgba(0,0,0,.02) 0 1px, transparent 1px 7px);
  background-size: 3px 3px, 7px 7px, auto, auto;
  background-position: 0 0, 1px 2px, 0 0, 0 0;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1180 30' preserveAspectRatio='none'><path d='M0,0 L40,8 L80,2 L130,12 L180,4 L240,14 L300,6 L360,16 L420,4 L490,12 L560,2 L630,14 L700,6 L770,16 L840,4 L910,12 L980,2 L1050,14 L1120,6 L1180,12 L1180,30 L0,30 Z' fill='white'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1180 30' preserveAspectRatio='none'><path d='M0,0 L40,8 L80,2 L130,12 L180,4 L240,14 L300,6 L360,16 L420,4 L490,12 L560,2 L630,14 L700,6 L770,16 L840,4 L910,12 L980,2 L1050,14 L1120,6 L1180,12 L1180,30 L0,30 Z' fill='white'/></svg>");
  -webkit-mask-size: 100% 100%;
          mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
}
.torn-edge.flip {
  --edge-base: #1a3354;
  transform: scaleY(-1);
}
.torn-edge svg { display: none; }

/* ============================================
   INK BAND (Kategorien)
============================================ */
.ink-band {
  background-color: var(--ink);
  color: var(--paper);
  position: relative;
  padding: 70px 0 80px;
  background-image:
    radial-gradient(rgba(241,235,224,.04) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.07) 0.6px, transparent 1px),
    repeating-linear-gradient(118deg, rgba(241,235,224,.015) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(28deg, rgba(0,0,0,.02) 0 1px, transparent 1px 7px),
    radial-gradient(ellipse 60% 40% at 18% 22%, rgba(241,235,224,.03), transparent 70%),
    radial-gradient(ellipse 50% 55% at 82% 78%, rgba(0,0,0,.08), transparent 70%),
    radial-gradient(ellipse 40% 30% at 45% 60%, rgba(241,235,224,.02), transparent 70%),
    linear-gradient(180deg, #1f3c63 0%, #1a3354 100%);
  background-size:
    3px 3px,
    7px 7px,
    auto, auto,
    auto, auto, auto,
    auto;
  background-position:
    0 0,
    1px 2px,
    0 0, 0 0,
    0 0, 0 0, 0 0,
    0 0;
}
.ink-band::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 30% 20% at 12% 8%, rgba(241,235,224,.04), transparent 70%),
    radial-gradient(ellipse 25% 18% at 90% 30%, rgba(0,0,0,.10), transparent 70%),
    radial-gradient(ellipse 35% 25% at 60% 95%, rgba(0,0,0,.08), transparent 70%),
    radial-gradient(rgba(241,235,224,.02) 0.5px, transparent 0.8px);
  background-size: auto, auto, auto, 5px 5px;
  background-position: 0 0, 0 0, 0 0, 2px 1px;
  mix-blend-mode: overlay;
  opacity: .65;
}
.ink-band > * { position: relative; z-index: 1; }
.ink-band h2 { color: var(--paper); }
.ink-band .eyebrow { color: rgba(241,235,224,.6); }
.ink-band-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 20px;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 44px;
}
.cat-cell {
  padding: 8px 28px;
  border-left: 1px solid rgba(241,235,224,.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cat-cell:first-child { border-left: none; padding-left: 0; }
.cat-cell .cat-icon {
  display: flex;
  align-items: center;
}
.cat-cell .cat-icon img {
  width: 110px; height: 110px;
  object-fit: contain;
}
.cat-cell h3 {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 22px;
}
.cat-cell p {
  color: rgba(241,235,224,.72);
  font-size: 14px;
  line-height: 1.55;
}

/* ============================================
   POSTS / LOGBUCH
============================================ */
.section { padding: 90px 0; }
.section--notizen { padding-top: 30px; }
.section--newsletter { padding-top: 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 20px;
}
.section-head h2 { margin-top: 8px; }
.section-head h2 .quill { color: var(--seal); }
.section-head .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .06em;
}

.post-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.post-card {
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  position: relative;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-paper);
}

.post-card.featured .post-cover { aspect-ratio: 16 / 10; }
.post-card.featured .post-body { padding: 32px; }
.post-card.featured .post-title { font-size: 30px; line-height: 1.15; }

.post-cover {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.post-cover-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.post-cover .placeholder {
  position: absolute;
  inset: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.post-tag {
  --cap-scale: 0.62;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;

  padding: 5px 28px 5px 10px;
  min-height: calc(40px * var(--cap-scale));

  border: solid;
  border-width:
    0
    calc(50px * var(--cap-scale))
    0
    calc(14px * var(--cap-scale));
  border-image-source: url("../img/navi-strip.png");
  border-image-slice: 0 50 0 14 fill;
  border-image-repeat: stretch;
  border-image-width: 1;
}
.post-tag.seal { color: var(--paper); }
.post-tag.outline { color: var(--paper); }

.post-body {
  padding: 22px 22px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.post-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.post-title {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.22;
  color: var(--ink);
  font-weight: 600;
}
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--seal); }

.post-excerpt {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.post-readmore {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.post-readmore svg { transition: transform .2s ease; }
.post-card:hover .post-readmore svg { transform: translateX(4px); }

/* ============================================
   PROJEKTE / WERKSTATT
============================================ */
.werkstatt {
  background: var(--paper-warm);
  position: relative;
}
.proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.proj-card {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  align-items: start;
  transition: all .2s ease;
  position: relative;
}
.proj-card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-paper);
}
.proj-thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proj-status {
  position: absolute;
  top: 0; right: 0;
  background: var(--seal);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 0 var(--radius) 0 var(--radius);
}
.proj-status.done { background: var(--ink); }
.proj-status.lab { background: var(--paper-deep); color: var(--ink); }

.proj-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.proj-title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 600;
  margin-top: 4px;
}
.proj-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: 10px;
}
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.proj-detail-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--seal);
  text-decoration: none;
}
.proj-detail-btn svg { transition: transform .2s ease; }
.proj-card:hover .proj-detail-btn svg { transform: translateX(4px); }
.proj-tag {
  --tag-cap: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink);
  display: inline-block;
  padding: 3px 4px;
  line-height: 1.4;
  border-style: solid;
  border-width: 0 var(--tag-cap) 0 var(--tag-cap);
  border-image-source: url('../img/schnipsel-tag.webp');
  border-image-slice: 0 22% 0 22% fill;
  border-image-repeat: stretch;
  border-image-width: 1;
}

/* ============================================
   NOTIZEN VOM SCHREIBTISCH
============================================ */
.notizen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.notiz {
  --paper-deckle: 36px;
  border-style: solid;
  border-width: var(--paper-deckle);
  border-image-source: url('../img/paper.webp');
  border-image-slice: 90 fill;
  border-image-repeat: round;
  background-clip: padding-box;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 8px 6px 8px;
}
.notiz .kind {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seal);
}
.notiz.ink .kind { color: var(--ink); }
.notiz .text {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink);
  font-weight: 500;
}
.notiz .when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
}

/* ============================================
   ÜBER JULIAN
============================================ */
.about-card {
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  padding: 50px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
}
.about-portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.about-portrait-img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.about-text h2 { font-size: 36px; line-height: 1.1; }
.about-text p {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-edge);
}
.about-stats .num {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--seal);
  line-height: 1;
  font-weight: 600;
}
.about-stats .lab {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

/* ============================================
   NEWSLETTER
============================================ */
.newsletter {
  background-color: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 44px 50px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image:
    radial-gradient(rgba(241,235,224,.04) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.07) 0.6px, transparent 1px),
    repeating-linear-gradient(118deg, rgba(241,235,224,.015) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(28deg, rgba(0,0,0,.02) 0 1px, transparent 1px 7px),
    radial-gradient(ellipse 50% 50% at 20% 30%, rgba(241,235,224,.03), transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 70%, rgba(0,0,0,.10), transparent 70%),
    linear-gradient(180deg, #1f3c63 0%, #1a3354 100%);
  background-size: 3px 3px, 7px 7px, auto, auto, auto, auto, auto;
}
.newsletter > * { position: relative; z-index: 1; }
.newsletter-book {
  height: 110px;
  width: auto;
  flex-shrink: 0;
}
.newsletter h2 { color: var(--paper); font-size: 30px; }
.newsletter p {
  color: rgba(241,235,224,.72);
  font-size: 15px;
  margin-top: 10px;
}
.newsletter-disclaimer {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(241,235,224,.45);
  margin-top: 12px;
}
.newsletter-form {
  display: flex;
  gap: 0;
  background: rgba(241,235,224,.08);
  border: 1px solid rgba(241,235,224,.2);
  border-radius: 6px;
  padding: 6px;
}
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 10px 14px;
}
.newsletter-form input::placeholder { color: rgba(241,235,224,.5); }
.newsletter-success {
  color: rgba(241,235,224,.85);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  margin-top: 10px;
  display: none;
}
.newsletter-success.visible { display: block; }

.btn-seal {
  background: var(--seal);
  color: var(--paper);
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s ease;
}
.btn-seal:hover { background: var(--seal-deep); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background-color: var(--ink);
  color: var(--paper);
  padding: 70px 0 28px;
  position: relative;
  background-image:
    radial-gradient(rgba(241,235,224,.04) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.07) 0.6px, transparent 1px),
    repeating-linear-gradient(118deg, rgba(241,235,224,.015) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(28deg, rgba(0,0,0,.02) 0 1px, transparent 1px 7px),
    radial-gradient(ellipse 50% 40% at 15% 30%, rgba(241,235,224,.03), transparent 70%),
    radial-gradient(ellipse 45% 50% at 85% 70%, rgba(0,0,0,.10), transparent 70%),
    linear-gradient(180deg, #1f3c63 0%, #15263d 100%);
  background-size: 3px 3px, 7px 7px, auto, auto, auto, auto, auto;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 30% 20% at 88% 12%, rgba(241,235,224,.04), transparent 70%),
    radial-gradient(ellipse 25% 18% at 20% 80%, rgba(0,0,0,.10), transparent 70%),
    radial-gradient(rgba(241,235,224,.02) 0.5px, transparent 0.8px);
  background-size: auto, auto, 5px 5px;
  background-position: 0 0, 0 0, 1px 2px;
  mix-blend-mode: overlay;
  opacity: .65;
}
.site-footer > * { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(241,235,224,.5);
  font-weight: 500;
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--paper); font-size: 14px; }
.footer-grid a:hover { color: var(--seal); }

.footer-brand .footer-tagline {
  color: rgba(241,235,224,.7);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 16px;
  max-width: 320px;
}

.social-row { display: flex; gap: 10px; margin-top: 22px; }
.social-btn {
  display: inline-flex;
  cursor: pointer;
  transition: filter .15s ease;
}
.social-btn img { width: 38px; height: 38px; object-fit: contain; display: block; }
.social-btn:hover { filter: brightness(1.4); }

.footer-bottom {
  padding-top: 26px;
  border-top: 1px solid rgba(241,235,224,.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(241,235,224,.55);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ============================================
   SEARCH OVERLAY
============================================ */
.search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(30,58,95,.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.search-overlay.is-active { display: flex; }
.search-overlay-inner {
  width: 100%;
  max-width: 640px;
  padding: 0 32px;
}
.search-overlay form {
  display: flex;
  gap: 0;
  background: var(--paper);
  border-radius: var(--radius);
  overflow: hidden;
}
.search-overlay input[type="search"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--ink);
  padding: 18px 20px;
}
.search-overlay button[type="submit"] {
  background: var(--seal);
  border: none;
  cursor: pointer;
  color: var(--paper);
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--paper);
  cursor: pointer;
  opacity: .7;
}
.search-close:hover { opacity: 1; }

/* ============================================
   MOBILE NAV DRAWER + OVERLAY (body-level, escapes header stacking)
============================================ */
.nav-toggle { display: none; }

/* Drawer ist immer im DOM, aber per default ausgeblendet */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100dvh;
  background: var(--cream, #f1ebe0);
  box-shadow: -6px 0 32px rgba(30,58,95,.14);
  z-index: 9999;            /* body-level, schlägt jeden Header */
  padding: 72px 28px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.mobile-drawer.is-open { display: flex; }
.mobile-drawer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--seal, #c8362d);
}

/* Drawer-Navigation: Links groß und gestapelt */
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 12px;
}
.mobile-drawer-nav a {
  display: block;
  width: 100%;
  font-family: var(--font-display, Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink, #1a1612);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--paper-edge, rgba(30,58,95,.14));
}
.mobile-drawer-nav a:last-child { border-bottom: none; }
.mobile-drawer-nav a.active { color: var(--seal, #c8362d); }
.mobile-drawer-nav a:hover { color: var(--seal, #c8362d); }

/* Close-Button im Drawer */
.nav-close {
  display: grid;
  place-items: center;
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: var(--ink, #1a1612);
  cursor: pointer;
  border-radius: 4px;
  z-index: 1;
}
.nav-close:hover { background: rgba(30,58,95,.06); }
.nav-close svg { display: block; }

/* Overlay: hinter dem Drawer (z=9998 < drawer z=9999), aber über allem anderen */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(30,58,95,.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
body.nav-open .nav-overlay { display: block; }
body.nav-open { overflow: hidden; }

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 980px) {
  .hero-grid, .about-card, .newsletter { grid-template-columns: 1fr; gap: 30px; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-card.featured { grid-column: span 2; }
  .proj-grid, .footer-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 30px 0; }
  .cat-cell { padding-top: 8px; padding-bottom: 8px; }
  .cat-cell:nth-child(3) { border-left: none; padding-left: 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 22px; }
  .post-grid, .notizen-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-column: span 1; }
  .proj-card { grid-template-columns: 1fr; }

  /* Burger-Button einblenden */
  .nav-toggle { display: grid; }

  /* Flaschenpost-Button ausblenden */
  .js-hide-mobile { display: none !important; }

  /* Desktop-Nav im Header ausblenden (mobile-drawer übernimmt) */
  .site-header .site-nav { display: none; }
}
