/* ==================================================
   hegellovefichte.com — Shared Stylesheet
   ==================================================
   Two themes:
   - .theme-red   (default, used by index.html: revolutionary)
   - .theme-blue  (used by henrich.html: scholarly)
================================================== */

:root {
  --bg: #0d0d0d;
  --bg-elevated: #161616;
  --text: #f5f1e8;
  --text-muted: #7a7a7a;
  --text-dim: #555;
  --rule: #2a2a2a;

  /* Red theme (revolution) */
  --red: #c1121f;
  --red-dim: #8a0d17;
  --red-glow: rgba(193, 18, 31, 0.5);
  --red-tint: rgba(193, 18, 31, 0.04);

  /* Blue theme (scholarly) */
  --blue: #4a7ba6;
  --blue-dim: #345a7a;
  --blue-glow: rgba(74, 123, 166, 0.5);
  --blue-tint: rgba(74, 123, 166, 0.05);

  /* Default accent (overridden per page via .theme-* class) */
  --accent: var(--red);
  --accent-dim: var(--red-dim);
  --accent-glow: var(--red-glow);
  --accent-tint: var(--red-tint);

  --display: 'Bebas Neue', 'Impact', sans-serif;
  --serif-display: 'EB Garamond', 'Times New Roman', serif;
  --serif-body: 'Crimson Pro', Georgia, serif;
}

/* Theme overrides */
.theme-red {
  --accent: var(--red);
  --accent-dim: var(--red-dim);
  --accent-glow: var(--red-glow);
  --accent-tint: var(--red-tint);
}

.theme-blue {
  --accent: var(--blue);
  --accent-dim: var(--blue-dim);
  --accent-glow: var(--blue-glow);
  --accent-tint: var(--blue-tint);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  font-size: 21px;
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.6;
  mix-blend-mode: overlay;
}

main { position: relative; z-index: 3; }

/* === CONTAINERS === */
.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 40px;
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* === NAVIGATION BAR === */
.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--display);
  letter-spacing: 0.3em;
}

.navbar .brand {
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
}

.navbar .brand:hover {
  color: var(--text);
}

.navbar .nav-links {
  display: flex;
  gap: 36px;
  font-size: 14px;
}

.navbar .nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
}

.navbar .nav-links a:hover {
  color: var(--text);
}

.navbar .nav-links a.active {
  color: var(--text);
}

.navbar .nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
}

/* === DIVIDER === */
.divider {
  text-align: center;
  padding: 60px 0;
  color: var(--accent);
  font-family: var(--display);
  letter-spacing: 0.5em;
  font-size: 13px;
}

/* === MANIFESTO (used by index.html opening) === */
.manifesto {
  padding: 140px 0 100px;
  animation: fadeUp 1.2s ease-out 0.2s backwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.manifesto .eyebrow {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.manifesto .eyebrow::before,
.manifesto .eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-dim);
  max-width: 60px;
}

.manifesto h1 {
  font-family: var(--display);
  font-size: clamp(56px, 11vw, 140px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.005em;
  margin-bottom: 32px;
  color: var(--text);
}

.manifesto h1 .accent {
  color: var(--accent);
}

.manifesto .translation {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 26px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 80px;
  max-width: 640px;
}

.manifesto .lede {
  font-family: var(--serif-body);
  font-size: 26px;
  line-height: 1.65;
  color: var(--text);
  max-width: 760px;
}

.manifesto .lede em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}

/* === TIMELINE (used by index.html) === */
.timeline-section {
  padding: 100px 0;
  background: linear-gradient(180deg, transparent, var(--accent-tint) 50%, transparent);
}

.timeline-eyebrow {
  text-align: center;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.5em;
  color: var(--accent);
  margin-bottom: 16px;
}

.timeline-title {
  text-align: center;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1;
}

.timeline-subtitle {
  text-align: center;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 19px;
  color: var(--text-muted);
  margin-bottom: 80px;
}

.timeline-wrap {
  position: relative;
  padding: 80px 60px 200px;
  max-width: 1200px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 50%;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--rule), var(--text-muted), var(--rule));
  transform: translateY(-50%);
}

.timeline-events {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.timeline-event {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.timeline-event:hover {
  transform: scale(1.4);
}

.timeline-event .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--text);
  transition: all 0.2s ease;
}

.timeline-event.revolution .dot {
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 20px var(--accent-glow);
}

.timeline-event.death .dot {
  background: var(--bg);
  border: 2px solid var(--text-muted);
  box-shadow: 0 0 0 2px var(--text-muted);
}

.timeline-event .year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.timeline-event:nth-child(odd) .year {
  bottom: 28px;
}

.timeline-event:nth-child(even) .year {
  top: 28px;
}

.timeline-event.revolution .year {
  color: var(--accent);
}

.timeline-event:hover .year {
  color: var(--text);
}

.timeline-event .tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 10;
}

.timeline-event:nth-child(odd) .tooltip {
  bottom: 60px;
}

.timeline-event:nth-child(even) .tooltip {
  top: 60px;
}

.timeline-event:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.timeline-event .tooltip .t-year {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 8px;
}

.timeline-event .tooltip .t-title {
  font-family: var(--serif-display);
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
  font-weight: 500;
}

.timeline-event .tooltip .t-desc {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.timeline-legend {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 60px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
}

.timeline-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timeline-legend .swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.timeline-legend .swatch.life {
  background: var(--text);
}

.timeline-legend .swatch.rev {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-legend .swatch.death {
  background: var(--bg);
  border: 1.5px solid var(--text-muted);
}

/* === CHAPTER === */
.chapter {
  padding: 80px 0;
}

.chapter-num {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 24px;
}

.chapter-title {
  font-family: var(--display);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.005em;
  margin-bottom: 16px;
  color: var(--text);
}

.chapter-subtitle {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 24px;
  color: var(--text-muted);
  margin-bottom: 64px;
}

/* === PROSE === */
.prose p {
  font-family: var(--serif-body);
  font-size: 23px;
  line-height: 1.7;
  margin-bottom: 28px;
  color: var(--text);
}

.prose p.muted {
  color: var(--text-muted);
  font-style: italic;
  font-size: 19px;
  line-height: 1.65;
  border-left: 2px solid var(--rule);
  padding-left: 24px;
  margin-left: -26px;
  margin-bottom: 56px;
}

.prose em.term {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.prose em.de {
  color: var(--text);
  font-style: italic;
  font-weight: 500;
}

/* === PULL QUOTE === */
.pull-quote {
  margin: 80px 0;
  padding: 48px 0 48px 40px;
  border-left: 3px solid var(--accent);
}

.pull-quote .quote-de {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 32px;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 24px;
}

.pull-quote .quote-en {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.pull-quote .quote-source {
  font-family: var(--display);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.25em;
}

/* === DATE MARKER === */
.date-marker {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  padding: 6px 14px;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.15em;
  margin: 8px 0;
}

/* === IMAGE BLOCKS === */
.image-block {
  margin: 80px auto;
  text-align: center;
}

.image-block img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.image-block.portrait {
  max-width: 460px;
}

.image-block.landscape {
  max-width: 880px;
}

.image-block figcaption {
  margin-top: 20px;
  padding: 0 40px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  text-align: left;
}

.image-block figcaption .name {
  color: var(--accent);
  margin-right: 16px;
}

/* === LINEAGE === */
.lineage {
  margin: 64px 0;
  border-top: 1px solid var(--rule);
}

.lineage-item {
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 36px;
  align-items: baseline;
}

.lineage-item .num {
  font-family: var(--display);
  font-size: 42px;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.lineage-item .name-de {
  font-family: var(--display);
  font-size: 32px;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.lineage-item .desc {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 19px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === WISH === */
.wish {
  padding: 160px 0 120px;
  background: linear-gradient(180deg, transparent 0%, var(--accent-tint) 100%);
}

.wish .label {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.5em;
  color: var(--accent);
  margin-bottom: 48px;
}

.wish .wish-de {
  font-family: var(--display);
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -0.005em;
  margin-bottom: 28px;
  color: var(--text);
}

.wish .wish-de .accent { color: var(--accent); }

.wish .wish-en {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 80px;
}

.wish .historical-note {
  font-family: var(--serif-body);
  font-size: 19px;
  line-height: 1.8;
  color: var(--text-muted);
  border-top: 1px solid var(--rule);
  padding-top: 36px;
}

.wish .historical-note .accent {
  color: var(--accent);
  font-style: italic;
}

/* === SCHOLAR PORTRAIT (henrich.html) === */
.scholar-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
  margin: 64px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.scholar-card .scholar-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 80px;
  color: var(--accent);
  letter-spacing: 0.05em;
  overflow: hidden;
  flex-shrink: 0;
}

.scholar-card .scholar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
  filter: grayscale(15%) contrast(1.05);
  transition: filter 0.3s ease;
}

.scholar-card .scholar-img:hover img {
  filter: grayscale(0%) contrast(1.05);
}

.scholar-card .scholar-info .name {
  font-family: var(--display);
  font-size: 36px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1;
}

.scholar-card .scholar-info .dates {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}

.scholar-card .scholar-info .bio {
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* === BIBLIOGRAPHY (henrich.html) === */
.bibliography {
  margin: 80px 0;
  padding: 48px 40px;
  background: var(--bg-elevated);
  border-left: 3px solid var(--accent);
}

.bibliography .biblio-title {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 28px;
}

.bibliography ol {
  list-style: none;
  counter-reset: biblio;
}

.bibliography li {
  counter-increment: biblio;
  position: relative;
  padding: 14px 0 14px 40px;
  border-bottom: 1px dashed var(--rule);
  font-family: var(--serif-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
}

.bibliography li:last-child {
  border-bottom: none;
}

.bibliography li::before {
  content: counter(biblio);
  position: absolute;
  left: 0;
  top: 14px;
  font-family: var(--display);
  font-size: 16px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.bibliography li .year {
  font-family: var(--display);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-right: 12px;
}

.bibliography li .title-de {
  font-style: italic;
  color: var(--text);
}

.bibliography li .desc {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  font-style: italic;
  color: var(--text-muted);
}

/* === FOOTER === */
footer {
  position: relative;
  z-index: 3;
  padding: 80px 40px 60px;
  text-align: center;
  border-top: 1px solid var(--rule);
  max-width: 1200px;
  margin: 80px auto 0;
}

footer .marker {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 12px;
}

footer .footer-line {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

footer .domain {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  margin-top: 24px;
}

/* === MOBILE === */
@media (max-width: 900px) {
  body { font-size: 18px; }
  .container { max-width: 100%; padding: 0 24px; }
  .container-wide { padding: 0 24px; }
  .navbar { padding: 24px 24px 0; flex-direction: column; gap: 16px; align-items: flex-start; }
  .navbar .nav-links { gap: 24px; font-size: 12px; letter-spacing: 0.2em; }
  .navbar .brand { font-size: 16px; letter-spacing: 0.2em; }
  .manifesto { padding: 80px 0 60px; }
  .manifesto .lede { font-size: 19px; }
  .manifesto .translation { font-size: 20px; }
  .chapter { padding: 60px 0; }
  .chapter-subtitle { font-size: 19px; }
  .prose p { font-size: 19px; }
  .prose p.muted { font-size: 16px; }
  .pull-quote { padding: 24px 0 24px 20px; margin: 56px 0; }
  .pull-quote .quote-de { font-size: 22px; }
  .pull-quote .quote-en { font-size: 15px; }
  .lineage-item { grid-template-columns: 60px 1fr; gap: 16px; padding: 24px 0; }
  .lineage-item .num { font-size: 30px; }
  .lineage-item .name-de { font-size: 24px; }
  .lineage-item .desc { font-size: 16px; }
  .image-block { margin: 56px auto; }
  .image-block figcaption { padding: 0 24px; font-size: 11px; }
  .wish { padding: 100px 0 80px; }
  .wish .wish-en { font-size: 20px; }
  .wish .historical-note { font-size: 16px; }

  .scholar-card { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; text-align: center; }
  .scholar-card .scholar-img { width: 140px; height: 140px; margin: 0 auto; }
  .scholar-card .scholar-info .name { font-size: 28px; }

  .bibliography { padding: 28px 20px; margin: 56px 0; }
  .bibliography li { padding: 12px 0 12px 32px; font-size: 15px; }

  /* Timeline mobile: vertical */
  .timeline-wrap { padding: 60px 24px 80px; }
  .timeline-line {
    width: 2px;
    height: calc(100% - 120px);
    top: 60px;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--rule), var(--text-muted), var(--rule));
  }
  .timeline-events {
    flex-direction: column;
    align-items: center;
    gap: 50px;
    height: auto;
  }
  .timeline-event:nth-child(odd) .year,
  .timeline-event:nth-child(even) .year {
    position: absolute;
    top: 50%;
    left: 28px;
    bottom: auto;
    transform: translateY(-50%);
  }
  .timeline-event:nth-child(even) .year {
    left: auto;
    right: 28px;
  }
  .timeline-event .tooltip {
    width: 240px;
    left: auto;
    transform: none;
  }
  .timeline-event:nth-child(odd) .tooltip {
    left: 60px;
    bottom: auto;
    top: -10px;
  }
  .timeline-event:nth-child(even) .tooltip {
    right: 60px;
    left: auto;
    top: -10px;
  }
  .timeline-event:hover .tooltip {
    transform: none;
  }
  .timeline-legend { flex-wrap: wrap; gap: 20px; }
}
