/* ═══════════════════════════════════════════════════════════════
   style.css  –  Dr. Ludwig Neidhart
   Geteilt von index.html, contributions.html, 404.html
   ═══════════════════════════════════════════════════════════════ */

@import url('../fonts/fonts.css');

/* ── Design-Tokens ──────────────────────────────────────────── */
:root {
  --bg:        #f4f5f7;
  --surface:   #ffffff;
  --border:    #d8dce4;
  --text:      #1e2330;
  --muted:     #6b7280;
  --accent:    #2d5b8e;
  --accent-lt: #e8eef6;
  --accent-dk: #1a3d61;
  --rule:      #c5cdd8;
  --radius:    5px;
}

/* ── Reset & Basis ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  /* Seitenübergang: Seite blendet beim Laden ein */
  opacity: 1;
  transition: opacity 0.25s ease;
}
/* Klasse, die kurz vor dem Navigieren gesetzt wird */
body.page-fade-out { opacity: 0; }

/* ── Typografie ─────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  line-height: 1.2;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--accent-dk); margin-bottom: 1.4rem; }
h3 { font-size: 1.15rem; font-weight: 600; }
p  { margin-bottom: 1rem; }
em { font-style: italic; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout-Helfer ──────────────────────────────────────────── */
.container { max-width: 960px; margin-inline: auto; padding-inline: 1.5rem; }
.section   { padding-block: 4.5rem; }
.section + .section { border-top: 1px solid var(--border); }

/* ── SVG-Hilfselemente ──────────────────────────────────────── */
/* Globale Symbol-Definitionen (display:none im HTML) */
.icon-defs { display: none; }
/* Kleines Icon, geerbt von Elternelement */
.dl-icon {
  display: inline-block;
  width: 14px; height: 14px;
  vertical-align: middle;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Navigation
   ═══════════════════════════════════════════════════════════════ */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.85rem;
}
.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 500;
  color: var(--text); white-space: nowrap;
}
/* Reguläre Nav-Links (Desktop) */
.nav-links {
  display: flex; align-items: center; gap: 0.2rem;
  list-style: none; flex-wrap: wrap;
}
.nav-links a {
  font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); padding: 0.4rem 0.65rem;
  border-radius: 3px; transition: color 0.15s, background 0.15s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); background: var(--accent-lt); text-decoration: none; }
.nav-links a.nav-highlight { color: var(--accent); font-weight: 500; }

/* Sprachumschalter */
.lang-switch { display: flex; gap: 0.25rem; }
.lang-switch a {
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.52rem; border-radius: 3px;
  border: 1px solid var(--border); color: var(--muted); transition: all 0.15s;
}
.lang-switch a.active, .lang-switch a:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent); text-decoration: none;
}

/* Hamburger-Button (Mobile) – standardmäßig versteckt */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 38px; height: 38px;
  background: none; border: 1px solid var(--border);
  border-radius: 3px; cursor: pointer; padding: 6px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--muted); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
/* Kreuz-Animation wenn Menü offen */
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile-Menü-Drawer */
.nav-drawer {
  display: none; /* wird per JS + Klasse gesteuert */
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 0.5rem;
  background: rgba(26,61,97,0.97);
  backdrop-filter: blur(6px);
}
.nav-drawer.is-open { display: flex; }
.nav-drawer a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;   /* war 2rem, bleibt groß */
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  padding: 0.35rem 1rem;
  transition: color 0.15s;
}
.nav-drawer a:hover { color: #fff; text-decoration: none; }
.nav-drawer .drawer-lang {
  display: flex; gap: 0.75rem; margin-top: 1.5rem;
}
.nav-drawer .drawer-lang a {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.nav-drawer .drawer-lang a.active { color: #fff; }
/* ══════════════════════════════════════════════════════════════
   Expandierende Nav-Gruppen
   ══════════════════════════════════════════════════════════════ */

/* Container für beide Gruppen nebeneinander */
.nav-groups {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

/* Eine Gruppe = Label + aufklappbare Links */
.nav-group {
  display: flex;
  align-items: center;
  border-radius: 3px;
  transition: background 0.2s;
}
.nav-group.is-active {
  background: var(--accent-lt);
}

/* Label (immer sichtbar) */
.nav-group-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.4rem 0.65rem;
  white-space: nowrap;
  transition: color 0.2s;
  /* Kein text-decoration, da es ein Link ist */
}
.nav-group-label:hover { text-decoration: none; }
.nav-group.is-active .nav-group-label {
  color: var(--accent);
}

/* Dünner Trenner zwischen Label und expandierten Links */
.nav-group-label::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 0.85em;
  background: var(--accent);
  opacity: 0;
  margin-left: 0;
  vertical-align: middle;
  transition: opacity 0.2s, margin-left 0.35s;
}
.nav-group.is-active .nav-group-label::after {
  opacity: 0.3;
  margin-left: 0.6rem;
}

/* Aufklappbarer Link-Bereich: max-width-Trick für smooth expand */
.nav-group-links {
  display: flex;
  align-items: center;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-width 0.38s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.25s ease;
}
.nav-group.is-active .nav-group-links {
  max-width: 480px; /* großzügiger Wert; Transition stoppt bei tatsächlicher Breite */
  opacity: 1;
}

/* Einzelne Links innerhalb der Gruppe */
.nav-group-links a {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.4rem 0.45rem;
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-group-links a:hover { color: var(--accent); text-decoration: none; }

/* Punkt-Separator zwischen den Links */
.nav-group-links a + a::before {
  content: '·';
  color: var(--rule);
  margin-right: 0.2rem;
  pointer-events: none;
}

/* Trennlinie zwischen den zwei Gruppen */
.nav-group + .nav-group {
  margin-left: 0.25rem;
  padding-left: 0.4rem;
  border-left: 1px solid var(--border);
}

/* ── Mobile Drawer: strukturierte Gruppen ──────────────────── */
.drawer-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin-bottom: 1.8rem;
}
.drawer-group-label {
  font-family: 'Jost', sans-serif !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4) !important;
  padding: 0 0.5rem !important;
  margin-bottom: 0.4rem;
}
.drawer-group-label:hover {
  color: rgba(255,255,255,0.7) !important;
}

/* Bei schmalem Fenster: Nav-Gruppen verstecken (Hamburger übernimmt) */
@media (max-width: 680px) {
  .nav-groups { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Hero-Bereich (Hauptseite)
   ═══════════════════════════════════════════════════════════════ */
#hero {
  background: linear-gradient(160deg, #1a3d61 0%, #2d5b8e 55%, #3d7ab5 100%);
  color: #fff;
  padding-block: 5rem 4rem;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr auto;
  gap: 3rem; align-items: center;
}
.hero-subtitle {
  font-family: 'Jost', sans-serif; font-weight: 300;
  font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.6); margin-bottom: 0.75rem;
}
.hero-name { color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,0.25); margin-bottom: 1.1rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.5rem; }
.hero-tag {
  font-size: 0.76rem; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  border-radius: 2px; padding: 0.25rem 0.65rem; color: rgba(255,255,255,0.9);
}
.hero-desc {
  max-width: 520px; color: rgba(255,255,255,0.78);
  font-size: 0.93rem; line-height: 1.8; margin-bottom: 0;
}
/* Portrait */
.hero-portrait { flex-shrink: 0; width: 160px; height: 200px; }
.hero-portrait img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.15);
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   Publikations-Teaser (prominenter Bereich auf der Hauptseite)
   ═══════════════════════════════════════════════════════════════ */
#pub-teaser {
  background: var(--accent-dk);
  color: #fff;
  padding-block: 3.5rem;
}
.pub-teaser-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
}
.pub-teaser-label {
  font-family: 'Jost', sans-serif; font-weight: 300;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 0.6rem;
}
.pub-teaser-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 500; color: #fff; line-height: 1.15;
  margin-bottom: 1rem;
}
.pub-teaser-desc {
  color: rgba(255,255,255,0.65);
  font-size: 0.92rem; max-width: 520px;
  margin-bottom: 1.8rem; line-height: 1.75;
}
/* Kategorie-Vorschau-Chips */
.pub-teaser-cats {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-bottom: 2rem;
}
.pub-teaser-cat {
  font-size: 0.76rem; letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px; padding: 0.28rem 0.8rem;
  color: rgba(255,255,255,0.75);
}
/* Haupt-Button */
.pub-cta {
  display: inline-flex; align-items: center; gap: .8rem;
  background: #fff;
  color: var(--accent-dk);
  padding: 1rem 2rem;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem; font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.pub-cta:hover {
  background: #f0f5ff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  text-decoration: none; color: var(--accent-dk);
}
.pub-cta svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0;
}
/* Statistik-Karten rechts */
.pub-stats {
  display: flex; flex-direction: column; gap: 0.75rem;
}
.pub-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  text-align: center; min-width: 120px;
}
.pub-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 500;
  color: #fff; line-height: 1;
  display: block; margin-bottom: 0.2rem;
}
.pub-stat-label {
  font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.5);
}

/* ═══════════════════════════════════════════════════════════════
   Über mich
   ═══════════════════════════════════════════════════════════════ */
#ueber .two-col {
  display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start;
}
.info-box {
  background: var(--accent-lt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
}
.info-box dt {
  font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-top: 1rem;
}
.info-box dt:first-child { margin-top: 0; }
.info-box dd { font-size: 0.875rem; color: var(--text); }
.info-box dd a { color: var(--accent); }

/* ── Interessen ─────────────────────────────────────────────── */
#interessen { background: var(--surface); }
.interessen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 3rem;
}
.interessen-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.interessen-list li {
  font-size: 0.875rem;
  color: var(--accent-dk);
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  /* Kleiner Akzentpunkt links */
  padding-left: 1rem;
  position: relative;
}
.interessen-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.5;
}
@media (max-width: 620px) {
  .interessen-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   Forschungsschwerpunkte
   ═══════════════════════════════════════════════════════════════ */
/* #schwerpunkte { background: var(--surface); } */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.card {
  border: 1px solid var(--border); border-radius: 6px; padding: 1.6rem;
  background: var(--bg); transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--accent); box-shadow: 0 4px 20px rgba(45,91,142,0.1); }
.card-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card-icon svg {
  width: 22px; height: 22px;
  stroke: var(--accent); fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.45rem; color: var(--accent-dk); }
.card p  { font-size: 0.858rem; color: var(--muted); margin-bottom: 0; line-height: 1.65; }

/* ═══════════════════════════════════════════════════════════════
   Lehrtätigkeit
   ═══════════════════════════════════════════════════════════════ */
#lehrtaetigkeit { background: var(--surface); }
.lehre-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.lehre-table th {
  text-align: left; font-weight: 400; font-size: 0.68rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding: 0.5rem 0.75rem; border-bottom: 2px solid var(--rule);
}
.lehre-table td { padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.lehre-table tr:last-child td { border-bottom: none; }
.lehre-table tr:hover td { background: var(--accent-lt); }

/* ═══════════════════════════════════════════════════════════════
   Kontakt
   ═══════════════════════════════════════════════════════════════ */
/* #kontakt { background: var(--surface); } */
.kontakt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.kontakt-card { border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; }
.kontakt-card h3 { font-size: 1rem; color: var(--accent-dk); margin-bottom: 0.7rem; }
.kontakt-card address { font-style: normal; font-size: 0.875rem; color: var(--muted); line-height: 1.9; }
.kontakt-card a { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   Seiten-Header (Unterseite: Veröffentlichungen, 404)
   ═══════════════════════════════════════════════════════════════ */
.page-header {
  background: linear-gradient(160deg, #1a3d61 0%, #2d5b8e 55%, #3d7ab5 100%);
  color: #fff; padding-block: 3.5rem 3rem;
}
.page-header-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-bottom: 1.2rem; transition: color 0.15s;
}
.page-header-back:hover { color: #fff; text-decoration: none; }
.page-header h1 { color: #fff; margin-bottom: 0.6rem; }
.page-header p { color: rgba(255,255,255,0.7); font-size: 0.92rem; max-width: 520px; margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════════════
   Suchleiste (Veröffentlichungen)
   ═══════════════════════════════════════════════════════════════ */
.search-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-block: 1rem;
  position: sticky; top: 55px; z-index: 90;
}
.search-bar-inner { display: flex; gap: 0.75rem; align-items: flex-start; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 200px; }
.search-wrap .search-icon {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: var(--muted);
  fill: none; stroke-width: 2; pointer-events: none;
}
#search-input {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  font-family: 'Jost', sans-serif; font-size: 0.875rem; font-weight: 300;
  color: var(--text); background: var(--bg); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45,91,142,0.12); }
#search-input::placeholder { color: var(--muted); }

/* Aufklappbare Kategorien */
.filter-section { display: flex; flex-direction: column; gap: 0.5rem; }
#cat-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: 'Jost', sans-serif; font-size: 0.76rem; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); background: none;
  border: 1px solid var(--border); border-radius: 3px;
  padding: 0.35rem 0.7rem; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
#cat-toggle:hover,
#cat-toggle[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-lt); }
#cat-toggle .chevron {
  width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5;
  transition: transform 0.2s ease;
}
#cat-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

#filter-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  overflow: hidden; max-height: 0; opacity: 0;
  transition: max-height 0.25s ease, opacity 0.2s ease;
}
#filter-chips.is-open { max-height: 200px; opacity: 1; }
.chip {
  font-size: 0.73rem; font-weight: 400; letter-spacing: 0.04em;
  padding: 0.26rem 0.7rem; border-radius: 20px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--muted); cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   Veröffentlichungs-Listen
   ═══════════════════════════════════════════════════════════════ */
.result-count { font-size: 0.78rem; color: var(--muted); padding-block: 0.9rem 0.2rem; }
#count-num { font-weight: 500; color: var(--accent); }

main { padding-block: 0.5rem 5rem; }

.pub-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;       /* identisch zum gap innerhalb der pub-list */
  margin-bottom: 3rem;
}
.group-header {
  display: flex; align-items: baseline; gap: 1rem;
  padding-bottom: 0.6rem; margin-bottom: 1.1rem;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 0;
}
.group-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem; font-weight: 500; color: var(--accent-dk);
}
.group-count { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* Untergruppe mit Box */
.pub-subgroup {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
}
.subgroup-title {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em;
  color: var(--accent-dk); background: var(--accent-lt);
  padding: 0.55rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.pub-subgroup .pub-list { gap: 0; }
.pub-subgroup .pub-item { border: none; border-bottom: 1px solid var(--border); border-radius: 0; }
.pub-subgroup .pub-item:last-child { border-bottom: none; }
.pub-group [id], .pub-subgroup [id], li[id] {
  scroll-margin-top: var(--scroll-margin, 130px);
}

/* Einzelner Eintrag:
   item-link::after-Overlay macht das ganze Item klickbar;
   pub-downloads liegt per z-index:1 darüber */
.pub-list { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.pub-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.1rem 1rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: start;
  transition: border-color 0.15s, background 0.15s;
}
.pub-item:hover { border-color: var(--accent); background: var(--accent-lt); }
.pub-item[data-hidden="true"] { display: none; }
/* Einträge ohne Link: kein Hover-Effekt */
.pub-item.no-link:hover { border-color: var(--border); background: var(--surface); cursor: default; }

.item-link {
  grid-column: 1; grid-row: 1;
  font-size: 0.92rem; color: var(--text); line-height: 1.5;
}
.item-link:hover { color: var(--accent); text-decoration: none; }
/* Overlay für den Klickbereich */
.item-link::after {
  content: ''; position: absolute; inset: 0;
  z-index: 0; border-radius: inherit;
}
.pub-item.no-link .item-link::after { display: none; }

.pub-meta {
  font-size: 0.78rem; color: var(--muted); line-height: 1.55;
  grid-column: 1; grid-row: 2;
}
.pub-meta a {
  position: relative;
  z-index: 1;
}
.pub-downloads {
  grid-column: 2; grid-row: 1 / 3;
  display: flex; flex-direction: column; gap: 0.35rem;
  align-items: flex-end; align-self: center;
  position: relative; z-index: 1;
}
.dl-label {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; font-weight: 400; letter-spacing: 0.05em;
  color: var(--accent); text-transform: uppercase;
  padding: 0.2rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: 3px; background: var(--surface);
  white-space: nowrap; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dl-label:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.dl-label.no-link { color: var(--muted); cursor: default; pointer-events: none; }
.dl-label.dl-youtube { color: #c00; border-color: #f0c0c0; }
.dl-label.dl-youtube:hover { background: #c00; color: #fff; border-color: #c00; }

/* Leer-Zustand */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); display: none; }
.empty-state .empty-icon { width: 44px; height: 44px; stroke: var(--rule); display: block; margin: 0 auto 1rem; fill: none; stroke-width: 1.5; }
.empty-state p { font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════════ */
footer {
  background: var(--accent-dk); color: rgba(255,255,255,0.5);
  padding-block: 2.2rem; font-size: 0.78rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; align-items: center;
}
.footer-inner a { color: rgba(255,255,255,0.6); }
.footer-inner a:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   404-Seite
   ═══════════════════════════════════════════════════════════════ */
.notfound-body {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 1.5rem;
}
.notfound-code {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 300; color: var(--border);
  line-height: 1; display: block; margin-bottom: 1rem;
}
.notfound-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--accent-dk); margin-bottom: 0.75rem;
}
.notfound-body p { color: var(--muted); max-width: 420px; }
.notfound-back {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem;
  background: var(--accent); color: #fff;
  padding: 0.7rem 1.5rem; border-radius: var(--radius);
  font-size: 0.875rem; transition: background 0.15s;
}
.notfound-back:hover { background: var(--accent-dk); text-decoration: none; color: #fff; }

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 780px) {
  .pub-teaser-inner { grid-template-columns: 1fr; }
  .pub-stats { flex-direction: row; }
  .pub-stat { min-width: 90px; }
}
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { width: 120px; height: 150px; }
}
@media (max-width: 680px) {
  #ueber .two-col { grid-template-columns: 1fr; }
  /* Desktop-Nav verstecken, Hamburger zeigen */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 620px) {
  .pub-item { grid-template-columns: 1fr; }
  .pub-downloads { grid-column: 1; grid-row: 3; flex-direction: row; justify-content: flex-start; margin-top: 0.3rem; }
}
