/* ========================================================================
   نورة بنت حمد المسيفري — Editorial Design System
   Inspired by literary periodicals: The Atlantic, Aeon Magazine,
   Granta, with Qatari cultural roots.
   ======================================================================== */

/* ---------- 1. CSS Custom Properties (Design Tokens) ---------- */
:root {
  /* Color: Deep Qatari palette */
  --ink:           #1A0E15;     /* near-black for body text */
  --ink-soft:      #443038;
  --bordeaux:      #4A1525;     /* deepest maroon for hero (lightened) */
  --maroon:        #6E2336;     /* primary maroon (lightened) */
  --maroon-warm:   #8C3A52;     /* warmer maroon for accents (lightened) */
  --rust:          #8B3A3A;     /* old-photograph red */
  --gold:          #B8935C;     /* antique gold for ornaments */
  --gold-warm:     #C9A876;
  --rose-dust:     #D4B5AA;     /* soft pink-beige */
  --pearl:         #F4EFE3;     /* warm cream */
  --pearl-soft:    #FAF6EC;
  --pearl-deep:    #E8E0CF;
  --sage:          #4A5D52;     /* hint of complementary green */
  --paper:         #FBF7EF;     /* page background */
  --white:         #FFFFFF;

  /* Typography — luxury Arabic pairing */
  --font-ar-display: "Aref Ruqaa", "Amiri", "Times New Roman", serif;   /* Calligraphic — for hero, h1, h2 */
  --font-ar-body:    "El Messiri", "Markazi Text", "Cairo", system-ui, sans-serif;  /* Elegant body text */
  --font-ar-quote:   "Amiri", "Aref Ruqaa", serif;                       /* For italic quotes */
  --font-ar-accent:  "Reem Kufi", "El Messiri", sans-serif;             /* For eyebrows, small caps */
  --font-latin-display: "Cormorant Garamond", "Playfair Display", serif;
  --font-latin-body: "Inter", system-ui, sans-serif;

  /* Spacing scale (Bauhaus-inspired) */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
  --space-7: 10rem;

  /* Layout */
  --container-narrow: 720px;
  --container:        1200px;
  --container-wide:   1480px;

  /* Easing */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration: 0.7s;
}

/* ---------- 2. Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  margin: 0;
  font-family: var(--font-ar-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  direction: rtl;
  overflow-x: hidden;
  font-weight: 400;
}
img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease-out); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

/* Subtle paper texture overlay */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.1  0 0 0 0 0.15  0 0 0 0.025 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-ar-display);
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: 0;
}
/* Slightly larger weight for smaller headings */
h3, h4, h5, h6 { font-weight: 700; }

.display-1 { font-size: clamp(3.5rem, 9vw, 7.5rem); line-height: 1.05; font-weight: 400; }
.display-2 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); }
.display-3 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }

.eyebrow {
  font-family: var(--font-ar-accent);
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.eyebrow.with-rule {
  display: inline-flex; align-items: center; gap: 18px;
}
.eyebrow.with-rule::before,
.eyebrow.with-rule::after {
  content: ""; width: 38px; height: 1px;
  background: var(--gold); opacity: 0.5;
}

.lead {
  font-family: var(--font-ar-body);
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  line-height: 1.85;
  color: var(--ink-soft);
  font-weight: 400;
}

p { margin: 0 0 1.2em; }

::selection { background: var(--maroon); color: var(--pearl); }

/* ---------- 4. Layout primitives ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 28px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 28px; }

.divider-thread {
  display: block; width: 1px; height: 60px; background: var(--gold); margin: 0 auto; opacity: 0.4;
}
.divider-ornament {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: var(--space-5) auto; color: var(--gold);
}
.divider-ornament::before,
.divider-ornament::after {
  content: ""; flex: 0 1 80px; height: 1px; background: currentColor; opacity: 0.4;
}
.divider-ornament svg { width: 18px; height: 18px; opacity: 0.75; }

/* ---------- 5. Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 22px 0;
  background: rgba(251, 247, 239, 0.0);
  backdrop-filter: blur(0);
  transition: all 0.5s var(--ease-out);
}
.site-header.scrolled {
  background: rgba(251, 247, 239, 0.94);
  backdrop-filter: blur(14px) saturate(180%);
  padding: 14px 0;
  box-shadow: 0 1px 0 rgba(63, 15, 31, 0.08);
}
.site-header.on-hero { color: var(--pearl); }
.site-header.on-hero:not(.scrolled) .nav-link { color: rgba(244, 239, 227, 0.96); }
.site-header.on-hero:not(.scrolled) .nav-link:hover,
.site-header.on-hero:not(.scrolled) .nav-link.active { color: var(--pearl); }
.site-header.on-hero:not(.scrolled) .site-brand { color: var(--pearl); }

.site-header-inner {
  max-width: var(--container-wide); margin: 0 auto; padding: 0 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
}
.site-brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-ar-display);
  font-size: 1.2rem; font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
  transition: all 0.3s var(--ease-out);
}
.site-brand:hover { transform: translateY(-1px); }
.site-brand img.logo-mark {
  width: 50px; height: 50px;
  display: block;
  transition: transform 0.6s var(--ease-out), filter 0.4s var(--ease-out);
}
.site-brand:hover img.logo-mark { transform: rotate(-8deg); }
/* Brighten the small logo when it sits on the dark hero (low-contrast otherwise) */
.site-header.on-hero:not(.scrolled) .logo-mark {
  filter: brightness(1.85) saturate(0.85) drop-shadow(0 0 6px rgba(244, 239, 227, 0.2));
}
.site-brand .brand-text {
  display: flex; flex-direction: column;
  line-height: 1.1;
}
.site-brand .brand-text .brand-name {
  font-size: 1.15rem;
  color: inherit;
}
.site-brand .brand-text .brand-sub {
  font-family: var(--font-ar-body);
  font-size: 0.62rem;
  letter-spacing: 0;
  color: var(--gold);
  margin-top: 4px;
  text-transform: uppercase;
}
.site-header.on-hero:not(.scrolled) .brand-text .brand-name { color: var(--pearl); }
.site-header.on-hero:not(.scrolled) .brand-text .brand-sub { color: var(--gold-warm); }

/* Hero logo (simple) */
.hero-logo {
  width: clamp(80px, 12vw, 130px);
  height: auto;
  margin: 0 auto 28px;
  display: block;
  opacity: 0;
  animation: fade-up 1.4s var(--ease-out) 0.1s forwards;
  filter: drop-shadow(0 8px 30px rgba(0,0,0,0.4));
}

/* ========== ANIMATED 3D HERO LOGO (full scene) ========== */
.logo-scene {
  perspective: 850px;
  width: min(92vw, 540px);
  aspect-ratio: 1;
  margin: 0 auto 8px;
}
.logo-3d {
  width: 100%; height: 100%; position: relative;
  transform-style: preserve-3d; will-change: transform;
  transition: transform 0.06s ease-out;
}
.logo-ly {
  position: absolute; inset: 0;
  transform: translateZ(var(--z, 0px));
  pointer-events: none;
}
.logo-ly svg { width: 100%; height: 100%; display: block; overflow: visible; }
.logo-ly:nth-child(4) { filter: drop-shadow(0 6px 18px rgba(0,0,0,.25)); }
.logo-ly:nth-child(5) { filter: drop-shadow(0 4px 12px rgba(0,0,0,.2)); }

.logo-spin-cw  { animation: logo-sCW 180s linear infinite; transform-origin: 300px 300px; }
.logo-spin-ccw { animation: logo-sCCW 140s linear infinite; transform-origin: 300px 300px; }
@keyframes logo-sCW  { to { transform: rotate(360deg); } }
@keyframes logo-sCCW { to { transform: rotate(-360deg); } }

.logo-breathe { animation: logo-br 5s ease-in-out infinite alternate; }
@keyframes logo-br { 0% { opacity: .05; } 100% { opacity: .13; } }

.logo-page-flutter { animation: logo-pf 6s ease-in-out infinite; transform-origin: 0% 50%; }
@keyframes logo-pf { 0%,85%,100% { transform: scaleX(1); } 92% { transform: scaleX(.96); } }

.logo-ink-drip { animation: logo-ink 3.5s ease-in-out infinite; }
@keyframes logo-ink { 0%,100% { opacity: .3; r: 2; } 50% { opacity: .7; r: 3.2; } }

.logo-star-glow { animation: logo-sg 4s ease-in-out infinite alternate; }
@keyframes logo-sg { 0% { opacity: .2; transform: translate(300px,195px) scale(.9); transform-box: fill-box; transform-origin: center; }
                     100% { opacity: .55; transform: translate(300px,195px) scale(1.08); } }
/* Simpler: animate via stroke */
.logo-star-glow { animation: logo-sg2 4s ease-in-out infinite alternate; }
@keyframes logo-sg2 { from { opacity: .2; } to { opacity: .65; } }

.logo-dot-float { animation: logo-df 4s ease-in-out infinite alternate; }
@keyframes logo-df { 0% { opacity: .12; transform: translateY(2px); } 100% { opacity: .4; transform: translateY(-2px); } }

.logo-name-in {
  opacity: 0; transform: translateY(10px);
  animation: logo-ni 1.2s cubic-bezier(.22,1,.36,1) 0.7s forwards;
}
@keyframes logo-ni { to { opacity: 1; transform: none; } }

.logo-draw {
  stroke-dasharray: 500; stroke-dashoffset: 500;
  animation: logo-dl 2.5s ease-out 1.2s forwards;
}
@keyframes logo-dl { to { stroke-dashoffset: 0; } }

/* Footer logo */
.footer-brand-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 12px;
}
.footer-brand-row img {
  width: 56px; height: 56px;
}
.footer-brand-row p {
  margin: 0;
}

.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 0.3s;
}
.nav-link::after {
  content: ""; position: absolute; bottom: 4px; left: 14px; right: 14px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link:hover, .nav-link.active { color: var(--maroon); }

/* Mobile nav */
.nav-toggle { display: none; width: 36px; height: 36px; padding: 0; }
@media (max-width: 880px) {
  .nav-toggle { display: grid; place-items: center; font-size: 1.5rem; color: currentColor; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); padding: 14px 28px 22px;
    flex-direction: column; gap: 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: all 0.4s var(--ease-out);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 14px 0; border-bottom: 1px solid rgba(63,15,31,.08); width: 100%; }
  .nav-link:last-child { border-bottom: 0; }
  .nav-link::after { display: none; }
  /* Mobile menu opens on a cream panel — force readable dark text even when header is "on-hero" */
  .site-header.on-hero:not(.scrolled) .site-nav .nav-link { color: var(--ink-soft); }
  .site-header.on-hero:not(.scrolled) .site-nav .nav-link:hover,
  .site-header.on-hero:not(.scrolled) .site-nav .nav-link.active { color: var(--maroon); }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bordeaux);
  color: var(--pearl);
  text-align: center;
  overflow: hidden;
  padding: 120px 24px 100px;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(184, 147, 92, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 110%, rgba(90, 26, 42, 0.6) 0%, transparent 60%),
    linear-gradient(180deg, var(--bordeaux) 0%, #1F060F 100%);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'><g fill='none' stroke='%23B8935C' stroke-width='0.5' stroke-opacity='0.12'><path d='M200 50 L350 200 L200 350 L50 200 Z'/><path d='M200 90 L310 200 L200 310 L90 200 Z'/><path d='M200 130 L270 200 L200 270 L130 200 Z'/><circle cx='200' cy='200' r='50'/><circle cx='200' cy='200' r='90'/><circle cx='200' cy='200' r='130'/><path d='M50 200 L350 200 M200 50 L200 350 M88 88 L312 312 M88 312 L312 88'/></g></svg>");
  background-size: 540px;
  background-position: center;
  opacity: 0.85;
  animation: float-pattern 60s linear infinite;
}
@keyframes float-pattern {
  from { background-position: 0 0; }
  to { background-position: 540px 540px; }
}

.hero-inner { position: relative; z-index: 2; max-width: 1000px; }
.hero .eyebrow { color: var(--gold-warm); opacity: 0; animation: fade-up 1.2s var(--ease-out) 0.3s forwards; }
.hero-name {
  font-family: var(--font-ar-display);
  font-size: clamp(4rem, 11vw, 9rem);
  line-height: 0.95;
  color: var(--pearl);
  margin: 32px 0 16px;
  letter-spacing: -0.02em;
  font-weight: 400;
  opacity: 0;
  animation: fade-up 1.4s var(--ease-out) 0.6s forwards;
}
.hero-name .first-name { display: block; }
.hero-name .last-name { display: block; color: var(--rose-dust); }
.hero-tagline {
  font-family: var(--font-ar-display);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--rose-dust);
  letter-spacing: 0.08em;
  margin-top: 18px;
  opacity: 0;
  animation: fade-up 1.4s var(--ease-out) 0.9s forwards;
}
.hero-ornament {
  margin: 36px auto 0;
  width: 60px; height: 1px; background: var(--gold-warm);
  opacity: 0;
  animation: scale-in 1.2s var(--ease-out) 1.2s forwards;
  transform-origin: center;
}
.hero-cta {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 44px;
  padding: 16px 34px;
  border: 1px solid var(--rose-dust);
  color: var(--pearl);
  font-family: var(--font-ar-body);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  border-radius: 0;
  transition: all 0.4s var(--ease-out);
  opacity: 0;
  animation: fade-up 1.4s var(--ease-out) 1.4s forwards;
}
.hero-cta:hover {
  background: var(--rose-dust);
  color: var(--bordeaux);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  color: var(--rose-dust);
  font-size: 0.78rem; letter-spacing: 0;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  opacity: 0;
  animation: fade-up 1.4s var(--ease-out) 1.8s forwards;
}
.hero-scroll .line {
  width: 1px; height: 50px;
  background: linear-gradient(180deg, transparent, var(--rose-dust), transparent);
  animation: scroll-line 2.4s ease-in-out infinite;
}
@keyframes scroll-line {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scale-in {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

/* ---------- 7. Section ---------- */
.section {
  padding: var(--space-6) 0;
  position: relative;
  z-index: 2;
}
.section-head {
  margin-bottom: var(--space-5);
  text-align: center;
  max-width: 720px;
  margin-left: auto; margin-right: auto;
}
.section-head h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  margin: 14px 0 18px;
  color: var(--maroon);
}
.section-head .lead { color: var(--ink-soft); }

/* ---------- 8. Pull Quote (signature element) ---------- */
.pullquote {
  margin: var(--space-6) auto;
  text-align: center;
  max-width: 920px;
  padding: 0 28px;
  position: relative;
}
.pullquote-mark {
  font-family: var(--font-ar-display);
  font-size: 7rem;
  line-height: 0.4;
  color: var(--gold);
  opacity: 0.35;
  display: block;
  margin-bottom: 20px;
}
.pullquote-text {
  font-family: var(--font-ar-quote);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.7;
  color: var(--maroon);
  font-style: italic;
  font-weight: 400;
}
.pullquote-cite {
  margin-top: 28px;
  font-family: var(--font-ar-body);
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--gold);
  text-transform: uppercase;
}

/* ---------- 9. Featured Article (magazine cover style) ---------- */
.featured-article {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5);
  align-items: center;
  background: var(--pearl);
  padding: var(--space-5);
  position: relative;
}
@media (max-width: 880px) { .featured-article { grid-template-columns: 1fr; padding: var(--space-4); gap: var(--space-3); } }

.featured-image {
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, var(--maroon), var(--bordeaux));
  position: relative; overflow: hidden;
}
.featured-image::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><g fill='none' stroke='%23B8935C' stroke-width='0.6' stroke-opacity='0.25'><circle cx='100' cy='100' r='35'/><circle cx='100' cy='100' r='65'/><path d='M100 35 L165 100 L100 165 L35 100 Z'/></g></svg>") center / 240px;
  opacity: 0.5;
}
.featured-image-label {
  position: absolute; inset: auto 24px 24px;
  color: var(--pearl);
  font-family: var(--font-ar-display);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  z-index: 2;
}
.featured-content .eyebrow { color: var(--gold); }
.featured-content h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin: 14px 0 22px;
  color: var(--maroon);
  line-height: 1.2;
}
.featured-content .lead { margin-bottom: 24px; }
.featured-meta {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-ar-body);
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--gold);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.featured-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.read-link {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 20px;
  font-family: var(--font-ar-body);
  font-size: 0.88rem;
  letter-spacing: 0;
  color: var(--maroon);
  font-weight: 500;
  position: relative;
  padding-bottom: 8px;
}
.read-link::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: var(--maroon); opacity: 0.4;
  transition: opacity 0.3s, transform 0.5s var(--ease-out);
  transform-origin: right;
}
.read-link:hover::after { opacity: 1; transform: scaleX(1.15); }

/* ---------- 10. Year Timeline ---------- */
.timeline {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 4px;
  position: relative;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  margin: var(--space-5) 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(100% / 11 - 1px), rgba(184, 147, 92, 0.2) calc(100% / 11 - 1px) calc(100% / 11));
}
.timeline-year {
  padding: 36px 18px 32px;
  text-align: center;
  background: var(--pearl-soft);
  position: relative;
  transition: all 0.5s var(--ease-out);
  cursor: pointer;
  border-right: 1px solid rgba(184, 147, 92, 0.2);
}
.timeline-year:last-child { border-right: 0; }
.timeline-year:hover {
  background: var(--maroon);
  color: var(--pearl);
  transform: translateY(-3px);
  z-index: 2;
  box-shadow: 0 16px 40px rgba(63, 15, 31, 0.25);
}
.timeline-year:hover .year-count { color: var(--gold-warm); }
.timeline-year:hover .year-label { color: var(--rose-dust); }

.year-number {
  font-family: var(--font-ar-display);
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  display: block;
  color: var(--maroon);
  transition: color 0.4s;
  font-weight: 400;
}
.timeline-year:hover .year-number { color: var(--pearl); }
.year-count {
  display: block;
  font-family: var(--font-ar-body);
  font-size: 0.85rem;
  color: var(--gold);
  margin-top: 6px;
  transition: color 0.4s;
}
.year-label {
  display: block;
  font-family: var(--font-ar-body);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 4px;
  letter-spacing: 0;
  transition: color 0.4s;
}

/* ---------- 11. Curated Articles Grid ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gold);
  border: 1px solid var(--gold);
  margin: var(--space-5) 0;
}
@media (max-width: 880px) {
  .articles-grid { grid-template-columns: 1fr; }
}
.article-tile {
  background: var(--pearl-soft);
  padding: var(--space-4);
  transition: background 0.5s var(--ease-out);
  display: flex; flex-direction: column;
  position: relative;
  min-height: 360px;
}
.article-tile:hover { background: var(--pearl); }
.article-tile .number {
  position: absolute; top: 24px; left: 28px;
  font-family: var(--font-latin-display);
  font-size: 0.9rem;
  color: var(--gold);
  letter-spacing: 0;
}
.article-tile .meta {
  font-family: var(--font-ar-body);
  font-size: 0.78rem;
  color: var(--gold);
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.article-tile h3 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  color: var(--maroon);
  margin: 8px 0 18px;
  line-height: 1.25;
}
.article-tile h3 a { color: inherit; }
.article-tile h3 a:hover { color: var(--rust); }
.article-tile p {
  font-family: var(--font-ar-body);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.85;
  flex: 1;
}
.article-tile .read-more {
  margin-top: 20px;
  font-family: var(--font-ar-body);
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--maroon);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--maroon);
  display: inline-block;
  align-self: flex-start;
  transition: all 0.4s;
}
.article-tile .read-more:hover {
  color: var(--rust); border-color: var(--rust);
  letter-spacing: 0;
}

/* ---------- 12. Photography Gallery preview ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin: var(--space-5) 0;
}
@media (max-width: 880px) { .photo-grid { grid-template-columns: repeat(3, 1fr); } }
.photo-tile {
  aspect-ratio: 1/1;
  background: var(--pearl-deep);
  position: relative; overflow: hidden;
  cursor: pointer;
}
.photo-tile::before {
  content: ""; position: absolute; inset: 0;
  background-position: center; background-size: cover;
  transition: transform 0.7s var(--ease-out);
}
.photo-tile:nth-child(1)::before { background: linear-gradient(135deg, #5A1A2A, #2A0813); }
.photo-tile:nth-child(2)::before { background: linear-gradient(135deg, #B8935C, #8B6740); }
.photo-tile:nth-child(3)::before { background: linear-gradient(135deg, #D4B5AA, #A07666); }
.photo-tile:nth-child(4)::before { background: linear-gradient(135deg, #4A5D52, #2A3A30); }
.photo-tile:nth-child(5)::before { background: linear-gradient(135deg, #3F0F1F, #1A0E15); }
.photo-tile:nth-child(6)::before { background: linear-gradient(135deg, #C9A876, #8B6740); }
.photo-tile:hover::before { transform: scale(1.08); }
.photo-tile::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><g fill='none' stroke='%23F4EFE3' stroke-width='0.4' stroke-opacity='0.2'><path d='M40 5 L75 40 L40 75 L5 40 Z'/></g></svg>");
  background-size: 100px;
  opacity: 0.4;
  transition: opacity 0.5s;
}
.photo-tile:hover::after { opacity: 0.7; }
.photo-tile .label {
  position: absolute; inset: auto 0 0 0;
  padding: 14px 18px;
  color: var(--pearl);
  font-family: var(--font-ar-display);
  font-size: 1rem;
  z-index: 2;
  background: linear-gradient(0deg, rgba(0,0,0,0.6), transparent);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.5s var(--ease-out);
}
.photo-tile:hover .label { opacity: 1; transform: translateY(0); }

/* ---------- 13. CTA Strip ---------- */
.cta-strip {
  background: var(--maroon);
  color: var(--pearl);
  padding: var(--space-5) 0;
  position: relative;
  overflow: hidden;
  margin: var(--space-6) 0 0;
}
.cta-strip::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='200' viewBox='0 0 600 200'><g fill='none' stroke='%23B8935C' stroke-width='0.4' stroke-opacity='0.15'><path d='M0 100 Q150 0 300 100 T600 100'/><path d='M0 130 Q150 30 300 130 T600 130'/></g></svg>") center / cover no-repeat;
  opacity: 0.6;
}
.cta-strip-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  position: relative; z-index: 2;
  flex-wrap: wrap;
}
.cta-strip h2 {
  color: var(--pearl); font-size: clamp(1.6rem, 2.5vw, 2.4rem); margin: 0;
}
.cta-strip p { margin: 8px 0 0; color: var(--rose-dust); font-family: var(--font-ar-display); }
.cta-button {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  background: var(--pearl); color: var(--maroon);
  font-family: var(--font-ar-body); font-size: 0.95rem;
  letter-spacing: 0;
  transition: all 0.4s var(--ease-out);
}
.cta-button:hover {
  background: var(--gold); color: var(--bordeaux);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

/* ---------- 14. Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--rose-dust);
  padding: var(--space-6) 0 var(--space-3);
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); } }
.footer-brand {
  font-family: var(--font-ar-display);
  font-size: 1.8rem;
  color: var(--pearl);
  margin-bottom: 12px;
}
.footer-quote {
  font-family: var(--font-ar-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--rose-dust);
  max-width: 380px;
  line-height: 1.8;
}
.footer h4 {
  font-family: var(--font-ar-body);
  font-size: 0.82rem;
  color: var(--gold);
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: 8px; }
.footer ul a {
  color: var(--rose-dust); font-size: 0.95rem;
  transition: color 0.3s;
}
.footer ul a:hover { color: var(--pearl); }
.footer-bottom {
  border-top: 1px solid rgba(184, 147, 92, 0.2);
  padding-top: var(--space-3);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.82rem; color: var(--rose-dust); opacity: 0.7;
  flex-wrap: wrap; gap: 12px;
}

/* ---------- 15. Scroll Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
  will-change: transform, opacity;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- 16. Reading progress bar (for article pages) ---------- */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: transparent; z-index: 1000;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--maroon));
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------- 17. Article page (reader mode) ---------- */
.article-hero {
  background: var(--maroon);
  color: var(--pearl);
  padding: 180px 0 var(--space-6);
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><g fill='none' stroke='%23B8935C' stroke-width='0.5' stroke-opacity='0.12'><path d='M200 50 L350 200 L200 350 L50 200 Z'/><circle cx='200' cy='200' r='90'/></g></svg>") center / 480px;
  opacity: 0.7;
}
.article-hero-inner { text-align: center; max-width: 820px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }
.article-hero .eyebrow { color: var(--gold-warm); }
.article-hero h1 {
  font-family: var(--font-ar-display);
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  color: var(--pearl);
  line-height: 1.2;
  margin: 22px 0 18px;
  font-weight: 400;
}
.article-hero-meta {
  display: flex; gap: 14px; justify-content: center;
  font-family: var(--font-ar-body); font-size: 0.85rem; letter-spacing: 0;
  color: var(--rose-dust); text-transform: uppercase;
}
.article-hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); opacity: 0.7; align-self: center; }

.article-content {
  max-width: 720px; margin: 0 auto;
  padding: var(--space-5) 28px;
  font-family: var(--font-ar-body);
  font-size: 1.1rem;
  line-height: 2.05;
  color: var(--ink);
}
.article-content p { margin: 0 0 1.5em; }
.article-content > p:first-of-type::first-letter,
.article-content .has-drop-cap::first-letter {
  float: right; font-family: var(--font-ar-display);
  font-size: 4.4rem; line-height: 0.9; padding: 8px 0 4px 14px;
  color: var(--maroon);
}
.article-content h2, .article-content h3, .article-content .wp-block-heading {
  font-family: var(--font-ar-display);
  color: var(--maroon);
  margin: 2em 0 0.6em;
  font-weight: 400;
}
.article-content h3 { font-size: 1.6rem; }
.article-content blockquote, .article-content .wp-block-pullquote {
  background: var(--pearl);
  border-right: 3px solid var(--gold);
  padding: 28px 32px;
  margin: 2em 0;
  font-family: var(--font-ar-display);
  font-size: 1.25rem;
  line-height: 1.8;
  font-style: italic;
  color: var(--maroon);
}
.article-content blockquote p, .article-content .wp-block-pullquote p { margin: 0; }
.article-tags {
  max-width: 720px; margin: 0 auto var(--space-5);
  padding: 0 28px;
  display: flex; gap: 10px; flex-wrap: wrap;
}
.article-tag {
  padding: 6px 16px; border: 1px solid var(--gold);
  font-family: var(--font-ar-body); font-size: 0.78rem;
  color: var(--maroon); letter-spacing: 0;
  transition: all 0.3s;
}
.article-tag:hover { background: var(--maroon); color: var(--pearl); }
.article-signature {
  max-width: 720px; margin: var(--space-5) auto 0;
  padding: 0 28px;
  font-family: var(--font-ar-display);
  font-size: 1.05rem;
  color: var(--gold);
  text-align: left; letter-spacing: 0;
}

/* ---------- 18. Archive page ---------- */
.archive-hero {
  background: var(--maroon);
  color: var(--pearl);
  padding: 180px 28px 80px;
  text-align: center;
  position: relative; overflow: hidden;
}
.archive-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><g fill='none' stroke='%23B8935C' stroke-width='0.5' stroke-opacity='0.1'><path d='M200 0 L400 200 L200 400 L0 200 Z'/><path d='M200 60 L340 200 L200 340 L60 200 Z'/><circle cx='200' cy='200' r='80'/></g></svg>") center / 580px;
  opacity: 0.7;
}
.archive-hero-inner { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; }
.archive-hero h1 {
  font-family: var(--font-ar-display);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  color: var(--pearl);
  line-height: 1.1; margin: 22px 0 18px;
}
.archive-hero .lead { color: var(--rose-dust); font-family: var(--font-ar-display); }
.archive-stats {
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  margin-top: 36px;
}
.archive-stat {
  text-align: center;
}
.archive-stat .number {
  font-family: var(--font-ar-display);
  font-size: 2.6rem;
  color: var(--gold-warm);
  line-height: 1;
  display: block;
}
.archive-stat .label {
  font-family: var(--font-ar-body);
  font-size: 0.8rem;
  letter-spacing: 0;
  color: var(--rose-dust);
  margin-top: 6px; display: block;
  text-transform: uppercase;
}

.archive-toolbar {
  background: var(--pearl);
  padding: 24px 28px;
  margin: -40px auto 60px;
  max-width: 920px;
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 1fr 220px; gap: 14px;
  box-shadow: 0 24px 60px rgba(63, 15, 31, 0.18);
}
@media (max-width: 720px) { .archive-toolbar { grid-template-columns: 1fr; margin: -40px 16px 50px; } }
.archive-toolbar input, .archive-toolbar select {
  padding: 14px 18px;
  border: 1px solid var(--pearl-deep);
  font-family: var(--font-ar-body);
  font-size: 0.95rem;
  background: var(--paper);
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.3s;
}
.archive-toolbar input:focus, .archive-toolbar select:focus {
  outline: none; border-color: var(--maroon);
}
.archive-results {
  text-align: center; color: var(--ink-soft);
  font-family: var(--font-ar-body); font-size: 0.9rem;
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

.year-group { margin-bottom: var(--space-5); }
.year-group-head {
  display: flex; align-items: baseline; gap: 18px;
  padding-bottom: 14px; margin-bottom: 32px;
  border-bottom: 1px solid var(--gold);
}
.year-group-head .year {
  font-family: var(--font-ar-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  color: var(--maroon);
  line-height: 1;
  font-weight: 400;
}
.year-group-head .count {
  font-family: var(--font-ar-body);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0;
  text-transform: uppercase;
}
.year-articles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 980px) { .year-articles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .year-articles { grid-template-columns: 1fr; } }

.archive-card {
  background: var(--pearl-soft);
  padding: 28px;
  border-top: 2px solid transparent;
  transition: all 0.5s var(--ease-out);
  display: flex; flex-direction: column;
  min-height: 220px;
}
.archive-card:hover {
  background: var(--pearl);
  border-top-color: var(--gold);
  transform: translateY(-4px);
}
.archive-card .date {
  font-family: var(--font-ar-body); font-size: 0.78rem;
  color: var(--gold); letter-spacing: 0;
  text-transform: uppercase; margin-bottom: 10px;
}
.archive-card h3 {
  font-family: var(--font-ar-display);
  font-size: 1.4rem; color: var(--maroon);
  margin-bottom: 12px; line-height: 1.3;
}
.archive-card h3 a { color: inherit; }
.archive-card h3 a:hover { color: var(--rust); }
.archive-card p {
  font-family: var(--font-ar-body); font-size: 0.92rem; color: var(--ink-soft);
  line-height: 1.8;
  flex: 1;
}
.archive-card .read-more {
  align-self: flex-start;
  margin-top: 18px;
  font-family: var(--font-ar-body); font-size: 0.78rem;
  letter-spacing: 0; text-transform: uppercase;
  color: var(--maroon); padding-bottom: 4px;
  border-bottom: 1px solid var(--maroon);
}

/* ---------- 19. Generic page header (for about / gallery / etc.) ---------- */
.page-header {
  background: var(--maroon);
  color: var(--pearl);
  padding: 200px 28px 100px;
  text-align: center;
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><g fill='none' stroke='%23B8935C' stroke-width='0.4' stroke-opacity='0.1'><path d='M200 50 L350 200 L200 350 L50 200 Z'/><circle cx='200' cy='200' r='90'/></g></svg>") center / 500px;
  opacity: 0.7;
}
.page-header > .container-narrow { position: relative; z-index: 2; }
.page-header h1 {
  font-family: var(--font-ar-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  color: var(--pearl);
  margin: 22px 0 18px;
  line-height: 1.1;
}
.page-header .lead { color: var(--rose-dust); font-family: var(--font-ar-display); }

/* About / bio layout */
.bio-layout {
  display: grid; grid-template-columns: 0.6fr 1.4fr; gap: var(--space-5);
  margin: var(--space-6) 0;
  align-items: start;
}
@media (max-width: 880px) { .bio-layout { grid-template-columns: 1fr; } }
.portrait-frame {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--maroon), var(--bordeaux));
  position: relative;
  box-shadow: 12px 12px 0 var(--gold);
}
.portrait-frame::after {
  content: ""; position: absolute; inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><g fill='none' stroke='%23B8935C' stroke-width='0.5' stroke-opacity='0.3'><circle cx='100' cy='100' r='60'/><path d='M100 40 L160 100 L100 160 L40 100 Z'/></g></svg>") center / 200px;
  opacity: 0.5;
}
.portrait-frame .portrait-label {
  position: absolute; inset: auto 0 24px 0; text-align: center;
  color: var(--pearl); font-family: var(--font-ar-display);
  font-size: 1.1rem; letter-spacing: 0; z-index: 2;
}
.bio-text h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  color: var(--maroon);
  margin-bottom: 24px;
}
.bio-text p {
  font-family: var(--font-ar-body);
  font-size: 1.05rem;
  line-height: 2;
  color: var(--ink);
  margin-bottom: 1.4em;
}

/* Timeline (vertical) */
.timeline-vertical {
  position: relative; padding-right: 40px;
  border-right: 1px solid var(--gold);
  margin: var(--space-5) 0;
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-4);
}
.timeline-item::before {
  content: ""; position: absolute; top: 8px; right: -47px;
  width: 14px; height: 14px;
  background: var(--paper); border: 2px solid var(--gold); border-radius: 50%;
}
.timeline-item:hover::before { background: var(--maroon); }
.timeline-item .year {
  font-family: var(--font-ar-display);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.timeline-item h3 {
  font-size: 1.4rem; color: var(--maroon);
  margin: 6px 0 10px;
}
.timeline-item p {
  font-family: var(--font-ar-body);
  color: var(--ink-soft);
  font-size: 1rem; line-height: 1.85;
}

/* ---------- 20. Custom scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rose-dust); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--maroon); }

/* ---------- 21. Subtle utilities ---------- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========== Theme Switcher (palette picker) ========== */
#theme-switcher-btn {
  position: fixed; bottom: 24px; left: 24px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--pearl);
  border: 1px solid var(--gold);
  cursor: pointer; z-index: 998;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  transition: transform .3s var(--ease-out), background .3s, border-color .3s;
  padding: 0;
}
#theme-switcher-btn:hover { transform: scale(1.08); background: var(--maroon-warm); }
#theme-switcher-btn svg { width: 24px; height: 24px; }

#theme-switcher-panel {
  position: fixed; bottom: 88px; left: 24px;
  width: min(340px, calc(100vw - 36px));
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 12px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.25);
  padding: 18px 18px 20px;
  z-index: 999;
  transform: translateY(12px) scale(.97);
  opacity: 0; pointer-events: none;
  transition: transform .3s var(--ease-out), opacity .3s;
  direction: rtl; text-align: right;
}
#theme-switcher-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
#theme-switcher-panel .ts-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
#theme-switcher-panel .ts-title { font-family: var(--font-ar-display); font-size: 1.2rem; color: var(--maroon); }
#theme-switcher-panel .ts-close { background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 0 6px; }
#theme-switcher-panel .ts-close:hover { color: var(--maroon); }
#theme-switcher-panel .ts-sub { color: var(--ink-soft); font-size: 0.82rem; margin: 0 0 12px; }
#theme-switcher-panel .ts-list { list-style: none; padding: 0; margin: 0; }
#theme-switcher-panel .ts-list li { margin-bottom: 6px; }
#theme-switcher-panel .ts-item {
  width: 100%; background: var(--white);
  border: 1px solid var(--rose-dust);
  border-radius: 9px; padding: 10px 12px;
  text-align: right; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px;
  font-family: inherit;
  transition: border-color .3s, background .3s;
}
#theme-switcher-panel .ts-item:hover { border-color: var(--gold); }
#theme-switcher-panel .ts-item.is-active { border-color: var(--maroon); background: var(--pearl-soft); }
#theme-switcher-panel .ts-row { display: flex; align-items: center; justify-content: space-between; }
#theme-switcher-panel .ts-name { font-family: var(--font-ar-display); font-size: 1rem; color: var(--maroon); }
#theme-switcher-panel .ts-check { color: var(--gold); opacity: 0; font-size: 0.95rem; transition: opacity .25s; }
#theme-switcher-panel .ts-item.is-active .ts-check { opacity: 1; }
#theme-switcher-panel .ts-essence { font-family: var(--font-ar-accent); color: var(--ink-soft); font-size: 0.78rem; }
#theme-switcher-panel .ts-dots { display: flex; gap: 5px; margin-top: 5px; }
#theme-switcher-panel .ts-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); }
@media (max-width: 480px) {
  #theme-switcher-btn { bottom: 16px; left: 16px; width: 46px; height: 46px; }
  #theme-switcher-panel { bottom: 72px; left: 16px; padding: 16px; }
}

/* ============================================================
   Theme-aware SVG recoloring
   Make hardcoded #A63B55 (maroon) and #C4637A (pink) in inline
   SVGs and external logo files follow the current theme variables.
   ============================================================ */

/* Generic SVG color overrides via attribute selectors */
svg [stroke="#A63B55"]      { stroke: var(--maroon); }
svg [fill="#A63B55"]        { fill: var(--maroon); }
svg [stroke="#C4637A"]      { stroke: var(--maroon-warm); }
svg [fill="#C4637A"]        { fill: var(--maroon-warm); }
svg [stop-color="#A63B55"]  { stop-color: var(--maroon); }
svg [flood-color="#A63B55"] { flood-color: var(--maroon); }

/* Hero animated logo (index.html) — gradient & shadow */
.logo-3d [stop-color="#A63B55"] { stop-color: var(--maroon); }
.logo-3d [stop-color="#100D12"] { stop-color: var(--ink); }
.logo-3d [flood-color="#A63B55"] { flood-color: var(--maroon); }
.logo-3d [stroke="#100D12"]     { stroke: var(--ink); }
.logo-3d [fill="#3A1525"]       { fill: var(--bordeaux); }
.logo-3d [fill="#100D12"]       { fill: var(--ink); }

/* Footer seal logo */
.footer-brand-row img,
.site-footer img[src*="logo-seal"] {
  /* Children of external SVG can't be styled from outside <img>;
     but logo-seal is loaded as <img>, so use a filter as fallback
     when theme bordeaux is very different from default */
}

/* Logo-mark (the small header logo, loaded via <img>):
   we can't override its internal SVG attributes from CSS since
   it's <img src="...svg">. The existing brightness filter on .on-hero
   handles dark backgrounds. For best results, consider inline-svg-ing
   logo-mark — kept as fallback. */


/* ============================================================
   Source logo in article meta line (Style 4) — sized to text
   ============================================================ */
.article-hero-meta .source-logo {
  display: inline-flex;
  align-items: center;
  height: 1.25em;        /* matches surrounding line-height */
  vertical-align: -0.18em; /* aligns logo baseline with text */
  text-decoration: none;
  gap: 4px;
}
.article-hero-meta .source-logo img {
  height: 100%;
  width: auto;
  display: block;
  transition: opacity .25s;
}
.article-hero-meta a.source-logo:hover img { opacity: .65; }
.article-hero-meta a.source-logo::after {
  content: "↗";
  color: var(--gold);
  font-size: 0.72em;
  vertical-align: middle;
  opacity: 0.8;
}
