@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-300-normal.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-300-italic.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('/fonts/dmsans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #faf5ec;
  --ink: #1c1c1a;
  --ink-soft: #6b6860;
  --line: #d9cdb8;
  --accent: #2d5f4f;
  --accent-hover: #1f4438;
  --layout-max: clamp(960px, 84vw, 2200px);
  --sidebar-w: clamp(220px, 24vw, 480px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(16px, 1.4vw, 26px);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
.page { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; max-width: var(--layout-max); margin: 0 auto; }
.sidebar { padding: 64px 32px 64px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; }
.sidebar::-webkit-scrollbar { display: none; }
.portrait-wrap { width: 80px; height: 80px; margin-bottom: 20px; background: #e4e0d4; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--ink-soft); line-height: 1.4; text-align: center; filter: grayscale(1); }
.name { display: block; font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-size: clamp(16px, 1.2vw, 22px); letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 4px; color: var(--ink); text-decoration: none; }
nav { }
.sidebar-page-icon { display: none; }
.sidebar-lede { flex: 1; padding-top: 20px; font-family: 'Fraunces', Georgia, serif; font-size: clamp(12px, 0.9vw, 16px); font-style: italic; font-weight: 300; line-height: 1.7; color: var(--ink-soft); }
nav a { display: block; font-size: clamp(13px, 1vw, 18px); color: var(--ink); text-decoration: none; padding: 9px 0 9px 8px; border-bottom: 1px solid var(--line); border-left: 2px solid transparent; transition: color 0.15s, border-left-color 0.15s; }
nav a:first-child { border-top: 1px solid var(--line); }
nav a:hover, nav a.active { color: var(--accent); border-left-color: var(--accent); }
.sidebar-footer { margin-top: 40px; font-size: clamp(10px, 0.8vw, 14px); color: var(--ink-soft); line-height: 2.2; }
.sidebar-footer a { color: var(--ink-soft); text-decoration: none; display: block; }
.sidebar-footer a:hover { color: var(--accent); }
.content { padding: 64px 52px 96px; }
h1 { font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-size: clamp(24px, 2vw, 36px); letter-spacing: -0.02em; margin-bottom: 8px; }
.page-subtitle { font-size: clamp(11px, 0.85vw, 15px); color: var(--ink-soft); margin-bottom: 40px; letter-spacing: 0.06em; text-transform: uppercase; }
h3 { font-family: 'DM Sans', system-ui, sans-serif; font-size: clamp(17px, 1.4vw, 26px); font-weight: 600; letter-spacing: 0.01em; margin: 0 0 0.6rem; padding-top: 1.25rem; color: var(--accent); }
h3 a { color: inherit; text-decoration: none; font-weight: inherit; }
h3 a:hover { color: var(--accent-hover); }
.entry { margin-bottom: 2rem; }
.entry > h3 { padding-top: 0; }
.entry-year { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 300; font-size: 0.75em; color: var(--ink-soft); letter-spacing: 0.02em; margin-left: 0.3em; }
h3::before { content: "[ "; font-weight: 300; opacity: 0.65; }
h3::after { content: " ]"; font-weight: 300; opacity: 0.65; }
p { margin-bottom: 1.5em; line-height: 1.75; }
p:last-child { margin-bottom: 0; }
.meta { font-size: 13px; color: var(--ink-soft); margin-top: 2px; margin-bottom: 0; }
blockquote { margin: 32px 0; padding: 0; font-style: italic; font-size: 16px; color: var(--ink-soft); }
blockquote p { margin: 0; }
.contact-line { margin-top: 52px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 14px; }
.contact-line a { color: var(--ink); text-decoration: none; }
.contact-line a:hover { color: var(--accent); }

/* Mobil-Navigation */
.mob-header { display: none; }
.mob-nav { display: none; }
.mob-footer { display: none; }

@media (max-width: 680px) {
  .page { grid-template-columns: 1fr; max-width: none; }
  .sidebar { display: none; }
  .content { padding: 24px 20px 60px; max-width: none; }
  .mob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 100;
  }
  .mob-name { font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-size: 16px; letter-spacing: -0.01em; }
  .mob-page-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 13px; color: var(--accent); letter-spacing: 0.02em; font-family: 'DM Sans', sans-serif; font-weight: 400; }
  .hamburger {
    background: none; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 5px; padding: 4px;
  }
  .hamburger span { display: block; width: 22px; height: 1px; background: var(--ink); transition: all 0.2s; }
  .mob-nav {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    z-index: 200;
    padding: 24px 24px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .mob-nav.open { transform: translateX(0); }
  .mob-nav-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
  .mob-nav-name { font-family: 'Fraunces', Georgia, serif; font-weight: 300; font-size: 16px; }
  .mob-close { background: none; border: none; cursor: pointer; font-size: 24px; color: var(--ink); line-height: 1; }
  .mob-nav a { display: block; font-size: 20px; color: var(--ink); text-decoration: none; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .mob-nav a:first-of-type { border-top: 1px solid var(--line); }
  .mob-nav a:hover, .mob-nav a.active { color: var(--accent); }
  .mob-nav-footer { margin-top: 32px; display: flex; gap: 16px; font-size: 12px; }
  .mob-nav-footer a { color: var(--ink-soft); text-decoration: none; }
  .mob-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 24px 20px;
    border-top: 1px solid var(--line);
    font-size: 13px;
  }
  .mob-footer a { color: var(--ink-soft); text-decoration: none; }
  .mob-footer a:hover { color: var(--accent); }
}

/* Begrenzt die Zeilenlänge für perfekte Lesbarkeit auf ca. 65 Zeichen */
.content p, 
.content ul, 
.content blockquote {
  max-width: 65ch;
}

/* Intro-Absatz (nur noch als Fallback für Seiten ohne lede) */
.content > p:first-child {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.7;
  margin-bottom: 1rem;
}


/* ─── Top Navigation Bar (sichtbar nur in Theme "Oben") ─── */
.top-nav-bar {
  display: none;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.top-nav-inner {
  display: flex;
  align-items: center;
  padding: 12px 0;
}
.top-nav-brand {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  margin-right: 36px;
  flex-shrink: 0;
}
.top-nav-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  padding: 0;
}
.top-nav-name:hover { border: none; color: var(--ink); }
.top-nav-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 11px;
  font-variant: small-caps;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.top-nav-links {
  display: flex;
  flex: 1;
  gap: 2px;
}
.top-nav-links a,
.top-nav-links a:first-child {
  font-size: clamp(13px, 1vw, 22px);
  color: var(--ink);
  text-decoration: none;
  padding: 5px clamp(8px, 0.7vw, 16px);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  border: none;
  border-top: none;
  border-bottom: none;
  border-left: none;
}
.top-nav-links a:hover { background: rgba(45, 95, 79, 0.08); color: var(--accent); }
.top-nav-links a.active { color: var(--accent); }

/* ─── Footer (sichtbar nur in Theme "Oben") ─── */
.top-footer {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 0;
  width: calc((100vw - var(--layout-max)) / 2 + var(--sidebar-w));
  max-width: 50vw;
  font-size: clamp(11px, 1vw, 18px);
  z-index: 100;
  text-align: center;
}
.top-footer a { color: var(--ink-soft); text-decoration: none; }
.top-footer a:hover { color: var(--accent); }
.top-footer a:first-child { display: block; margin-bottom: 6px; }
.top-footer a:nth-child(n+2) { margin: 0 4px; }
[data-theme="oben"] .top-footer { display: block; }


/* ─── Theme: Redaktionell ─── */
[data-theme="redaktionell"] .page { grid-template-columns: 290px 1fr; }
[data-theme="redaktionell"] .sidebar { padding-left: 32px; }
[data-theme="redaktionell"] .name { font-size: 22px; }
[data-theme="redaktionell"] nav a::before {
  content: "·";
  color: var(--accent);
  margin-right: 9px;
  font-size: 20px;
  line-height: 0;
  vertical-align: -3px;
}
[data-theme="redaktionell"] nav a:hover::before,
[data-theme="redaktionell"] nav a.active::before {
  content: "›";
  font-size: 15px;
  vertical-align: 0;
}

/* ─── Theme: Oben ─── */
[data-theme="oben"] .top-nav-bar { display: block; position: sticky; top: 0; }
[data-theme="oben"] .top-nav-inner {
  padding: clamp(20px, 3vw, 52px) 0 clamp(12px, 1.5vw, 28px) 0;
  position: relative;
}
[data-theme="oben"] .top-nav-brand {
  position: absolute;
  left: 0;
  width: calc((100vw - var(--layout-max)) / 2 + var(--sidebar-w));
  max-width: 50vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
[data-theme="oben"] .top-nav-brand a { pointer-events: all; }
[data-theme="oben"] .top-nav-name { font-size: clamp(24px, 2.6vw, 48px); text-align: center; }
[data-theme="oben"] .top-nav-tagline { display: none; }
[data-theme="oben"] .top-nav-links {
  max-width: var(--layout-max);
  margin: 0 auto;
  padding-left: calc(var(--sidebar-w) + 32px);
  display: flex;
  gap: 2px;
}
[data-theme="oben"] .top-nav-links a,
[data-theme="oben"] .top-nav-links a:first-child {
  border: none;
  border-top: none;
  border-bottom: none;
}
[data-theme="oben"] .page {
  grid-template-columns: 1fr;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding-left: var(--sidebar-w);
  position: relative;
}
[data-theme="oben"] .sidebar {
  padding: 0;
  border-right: none;
  top: 84px;
  height: calc(100vh - 84px);
  position: fixed;
  left: 0;
  width: calc((100vw - var(--layout-max)) / 2 + var(--sidebar-w));
  max-width: calc(50vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 96px;
}
[data-theme="oben"] .sidebar .portrait-wrap,
[data-theme="oben"] .sidebar .name,
[data-theme="oben"] .sidebar nav,
[data-theme="oben"] .sidebar .sidebar-footer { display: none; }
[data-theme="oben"] .sidebar-lede { flex: 1; padding-top: 0; font-size: clamp(14px, 1.4vw, 24px); line-height: 1.7; text-align: left; width: clamp(180px, 18vw, 380px); overflow-y: auto; padding-bottom: 60px; }
[data-theme="oben"] .sidebar-page-icon { display: block; margin-bottom: 20px; }
[data-theme="oben"] .sidebar-page-icon .nav-icon { width: 56px; height: 56px; opacity: 0.28; margin: 0 auto; display: block; }
[data-theme="oben"] .content { max-width: 72ch; margin: 0; padding: 132px 52px 96px 52px; }

/* ─── Icon linksbündig über Text ─── */
[data-icon="links"][data-theme="oben"] .sidebar-page-icon {
  align-self: flex-start;
  margin-left: calc(50% - 90px);
  margin-bottom: 12px;
}
[data-icon="links"][data-theme="oben"] .sidebar-page-icon .nav-icon { width: 36px; height: 36px; opacity: 1; color: var(--accent); }
[data-icon="links"][data-theme="oben"] .sidebar { padding-top: 32px; }
[data-icon="links"][data-theme="oben"] .content { padding-top: 56px; }
[data-theme="oben"] .content p,
[data-theme="oben"] .content ul,
[data-theme="oben"] .content blockquote { max-width: min(100%, 65ch); }
@media (min-width: 681px) {
  [data-theme="oben"] .content { border-left: 1px solid rgba(45, 95, 79, 0.12); }
}
@media (max-width: 680px) {
  [data-theme="oben"] .top-nav-bar { display: none; }
  [data-theme="oben"] .page { display: block; padding-left: 0; }
  [data-theme="oben"] .sidebar { display: none; }
  [data-theme="oben"] .content { padding: 24px 20px 60px; max-width: none; }
  [data-theme="oben"] .top-footer { display: none; }
}

/* ─── Nav Icons ─── */
.nav-icon {
  display: inline-block;
  width: clamp(13px, 1vw, 20px);
  height: clamp(13px, 1vw, 20px);
  vertical-align: -2px;
  margin-right: 7px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}
nav a:hover .nav-icon,
nav a.active .nav-icon,
.top-nav-links a:hover .nav-icon,
.top-nav-links a.active .nav-icon { opacity: 1; }


/* ─── Theme: Mutig ─── */
[data-theme="mutig"] h1 { font-size: 40px; letter-spacing: -0.03em; }
[data-theme="mutig"] .content { border-left: 3px solid var(--accent); padding-left: 49px; }
[data-theme="mutig"] .name { font-size: 21px; }
[data-theme="mutig"] nav a { font-size: 15px; }
[data-theme="mutig"] .page-subtitle { margin-bottom: 44px; }