/* =============================================================
   Swedes Who Became Ethiopians — Memorial stylesheet
   Sepia / archival aesthetic with bilingual EN/SV switcher
   ============================================================= */

:root {
  --paper:         #f4ecd8;
  --paper-warm:    #ece1c4;
  --ink:           #2b1f12;
  --ink-soft:      #4a3a26;
  --sepia:         #8b6a3b;
  --sepia-light:   #a98a5b;
  --sepia-dark:    #5a4220;
  --accent:        #7a3b18;
  --accent-soft:   #a85a30;
  --rule:          #c9b58a;
  --rule-soft:     #d9c69d;
  --gold:          #b88a3a;
  --shadow:        0 2px 12px rgba(70, 50, 20, 0.15);
  --shadow-soft:   0 1px 4px rgba(70, 50, 20, 0.08);
  --serif:         "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:          "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse at top, #f8f0d8 0%, var(--paper) 50%, var(--paper-warm) 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ---------- Top language bar ---------- */
.top-bar {
  background: var(--sepia-dark);
  color: var(--paper);
  border-bottom: 2px solid var(--gold);
  font-size: 13px;
}
.top-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.top-bar-tag {
  font-style: italic;
  letter-spacing: 0.04em;
  opacity: 0.92;
}
.lang-switcher { display: inline-flex; gap: 2px; }
.lang-btn {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--gold);
  padding: 4px 14px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:first-child { border-radius: 3px 0 0 3px; }
.lang-btn:last-child  { border-radius: 0 3px 3px 0; }
.lang-btn[aria-pressed="true"] {
  background: var(--gold);
  color: var(--sepia-dark);
}
.lang-btn:hover:not([aria-pressed="true"]) { background: rgba(184, 138, 58, 0.25); }

/* ---------- Header ---------- */
.site-header {
  text-align: center;
  padding: 50px 24px 30px;
  background:
    linear-gradient(180deg, rgba(244, 236, 216, 0) 0%, rgba(244, 236, 216, 0.5) 100%);
}
.site-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.15;
}
.alt-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--sepia);
  margin-bottom: 14px;
}
.dates {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--sepia-dark);
  letter-spacing: 0.15em;
  padding: 4px 22px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* ---------- Navigation ---------- */
.main-nav {
  background: var(--paper-warm);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-soft);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-inner a {
  display: inline-block;
  padding: 14px 22px;
  color: var(--sepia-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.nav-inner a:hover,
.nav-inner a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(184, 138, 58, 0.08);
}

/* ---------- Main layout ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px;
  color: var(--ink);
}
.page-subtitle {
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--sepia);
  margin: 0 auto 36px;
  max-width: 720px;
}

/* ---------- Hero block on home ---------- */
.hero {
  background: rgba(255, 250, 235, 0.6);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px 36px;
  margin: 28px 0;
  box-shadow: var(--shadow);
  position: relative;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 2px solid var(--gold);
}
.hero::before { top: -1px; left: -1px;  border-right: none; border-bottom: none; }
.hero::after  { bottom: -1px; right: -1px; border-left:  none; border-top:    none; }
.hero-inner p {
  font-size: 1.07rem;
  line-height: 1.85;
  margin: 0;
  color: var(--ink-soft);
}
.hero-lead {
  font-family: var(--serif);
  font-size: 1.4rem !important;
  font-style: italic;
  text-align: center;
  color: var(--ink) !important;
  margin: 0 0 18px !important;
  line-height: 1.4 !important;
}

/* ---------- Featured Von Rosen card on home ---------- */
.featured-figure {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid var(--rule);
  padding: 28px;
  margin: 36px 0;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
@media (max-width: 640px) { .featured-figure { grid-template-columns: 1fr; } }
.featured-portrait {
  background: linear-gradient(135deg, #d9c69d 0%, #b89a64 100%);
  border-radius: 4px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  text-align: center;
  padding: 20px;
}
.featured-portrait i { font-size: 4.5rem; opacity: 0.85; }
.featured-portrait .label {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 12px;
  opacity: 0.9;
}
.featured-body h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0 0 4px;
  color: var(--ink);
}
.featured-body .years {
  color: var(--sepia);
  font-style: italic;
  margin-bottom: 14px;
}
.featured-body p { margin: 0 0 12px; color: var(--ink-soft); }

/* ---------- Section grid (cards on home) ---------- */
.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 24px 0;
}
.section-card {
  display: block;
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 26px 22px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  box-shadow: var(--shadow-soft);
}
.section-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow);
}
.section-card .icon {
  font-size: 1.9rem;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.section-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- Biography cards ---------- */
.bio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.bio-card {
  background: rgba(255, 250, 235, 0.75);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 22px 22px 24px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
}
.bio-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bio-card.lead {
  background: linear-gradient(180deg, rgba(255, 245, 220, 0.9) 0%, rgba(255, 250, 235, 0.7) 100%);
  border: 2px solid var(--gold);
  grid-column: 1 / -1;
  padding: 28px;
}
.bio-card.lead .bio-portrait { min-height: 200px; }
.bio-portrait {
  background: linear-gradient(135deg, #d9c69d 0%, #b89a64 100%);
  border-radius: 4px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  margin-bottom: 16px;
  padding: 16px;
  text-align: center;
}
.bio-portrait .silhouette { font-size: 3rem; opacity: 0.85; }
.placeholder-caption {
  font-size: 0.75rem;
  font-style: italic;
  margin-top: 8px;
  opacity: 0.9;
}
.bio-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--ink);
}
.bio-card.lead .bio-name { font-size: 1.7rem; }
.bio-years {
  color: var(--sepia);
  font-style: italic;
  font-size: 0.92rem;
  margin-bottom: 4px;
}
.bio-role {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rule-soft);
}
.bio-desc {
  font-size: 0.96rem;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.65;
}
.bio-desc + .bio-desc { margin-top: 10px; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  margin: 24px 0;
  padding-left: 4px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 130px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--rule);
}
@media (max-width: 640px) { .timeline::before { left: 12px; } }

.timeline-event {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  margin-bottom: 30px;
  position: relative;
}
@media (max-width: 640px) {
  .timeline-event { grid-template-columns: 1fr; gap: 6px; padding-left: 32px; }
}
.timeline-year {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  text-align: right;
  padding-top: 4px;
  position: relative;
}
.timeline-year::after {
  content: "";
  position: absolute;
  right: -28px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
}
@media (max-width: 640px) {
  .timeline-year { text-align: left; }
  .timeline-year::after { right: auto; left: -28px; top: 8px; }
}
.timeline-content {
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 20px;
  box-shadow: var(--shadow-soft);
}
.timeline-content p { margin: 0; color: var(--ink-soft); line-height: 1.65; }
.timeline-content em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ---------- Story sections (special-stories, historians) ---------- */
.story-section {
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 32px 36px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-soft);
}
.story-section h2 {
  font-family: var(--serif);
  font-size: 1.7rem;
  margin: 0 0 6px;
  color: var(--ink);
}
.story-section h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  margin: 22px 0 6px;
  color: var(--sepia-dark);
}
.story-section p { color: var(--ink-soft); margin: 12px 0; }
.story-section blockquote {
  border-left: 3px solid var(--gold);
  margin: 18px 0;
  padding: 6px 20px;
  font-style: italic;
  color: var(--sepia-dark);
  background: rgba(184, 138, 58, 0.06);
}
.story-image {
  background: linear-gradient(135deg, #d9c69d 0%, #b89a64 100%);
  border-radius: 4px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  margin: 16px 0 20px;
  padding: 20px;
  text-align: center;
}
.story-image .icon { font-size: 3rem; opacity: 0.85; }
.story-image .placeholder-caption { margin-top: 10px; font-size: 0.85rem; }

/* ---------- Sources list ---------- */
.sources-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}
.sources-list li {
  background: rgba(255, 250, 235, 0.7);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  padding: 14px 20px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  line-height: 1.55;
  box-shadow: var(--shadow-soft);
}
.sources-list li strong { color: var(--ink); }
.sources-list li em { color: var(--accent); }
.sources-list .section-label {
  background: transparent;
  border: none;
  padding: 22px 0 6px;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--sepia-dark);
  font-weight: 600;
  box-shadow: none;
}

/* ---------- Update note + small text ---------- */
.update-note {
  text-align: center;
  font-style: italic;
  color: var(--sepia);
  font-size: 0.95rem;
  margin: 26px 0;
}

/* ---------- Footer ---------- */
footer {
  background: var(--sepia-dark);
  color: var(--paper);
  text-align: center;
  padding: 36px 24px;
  margin-top: 60px;
  font-size: 0.93rem;
}
footer p { margin: 6px 0; line-height: 1.6; }
footer a { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold); }
footer a:hover { color: var(--paper); }
.footer-rule {
  width: 80px;
  height: 1px;
  background: var(--gold);
  margin: 14px auto;
  opacity: 0.6;
}

/* ---------- Misc ---------- */
.center { text-align: center; }
.small  { font-size: 0.88rem; }
.muted  { color: var(--sepia); }

/* ---------- Real photographs in bio / story portraits ---------- */
.bio-portrait.has-image,
.story-image.has-image,
.featured-portrait.has-image {
  background: var(--paper-warm);
  padding: 0;
  overflow: hidden;
  display: block;
  position: relative;
}
.bio-portrait.has-image img,
.story-image.has-image img,
.featured-portrait.has-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}
.bio-portrait.has-image { min-height: 260px; }
.bio-card.lead .bio-portrait.has-image { min-height: 360px; }
.story-image.has-image { min-height: 320px; }
.featured-portrait.has-image { min-height: 280px; }

.bio-portrait.has-image .placeholder-caption,
.story-image.has-image .placeholder-caption,
.featured-portrait.has-image .label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.72) 100%);
  color: var(--paper);
  padding: 28px 14px 10px;
  font-size: 0.78rem;
  text-align: center;
  margin: 0;
  opacity: 1;
}
