/* ============================================================
   TEAL & GOLD: the site theme
   ------------------------------------------------------------
   Everything here is scoped to <body class="theme-tg">, which every
   page has. Removing that class from a page shows the plain base
   styles (site.css + Tailwind) underneath.

   Colour roles
     Teal  (#2dd4bf)  water & science: links, data, icons, maps
     Gold  (#e8b35a)  the Sahel & people: honors, key actions,
                      section eyebrows, mentoring (matches Spark Kimiyya)
     Ivory (#f5efe3)  headings: warmer than pure white
     Ink   (#0a1220)  page background: deeper, warmer navy

   Load order on the page: site.css → this file → Tailwind, so
   Tailwind hover states still apply on top of these overrides.
   ============================================================ */

.theme-tg {
  --tg-ink:        #0a1220;
  --tg-surface:    #131f35;
  --tg-surface-2:  #182640;
  --tg-line:       rgba(148,163,184,0.13);
  --tg-teal:       #2dd4bf;
  --tg-teal-soft:  #99f6e4;
  --tg-gold:       #e8b35a;
  --tg-gold-soft:  #f3cf8a;
  --tg-ivory:      #f5efe3;
  --tg-text:       #c9d2dd;
}
body.theme-tg { background-color: var(--tg-ink); }

/* ── Surfaces, lines, text ───────────────────────────────── */
.theme-tg .bg-slate-900     { background-color: var(--tg-ink); }
.theme-tg .bg-slate-800     { background-color: var(--tg-surface); }
.theme-tg .border-slate-700\/50,
.theme-tg .border-slate-700\/40 { border-color: var(--tg-line); }
.theme-tg .text-white       { color: var(--tg-ivory); }
.theme-tg .text-slate-300   { color: var(--tg-text); }
.theme-tg .border-slate-900 { border-color: var(--tg-ink); }  /* timeline dot "gap" rings */

/* Translucent card surfaces, re-based on the ink/surface palette */
.theme-tg .bg-slate-800\/30 { background-color: rgba(19,31,53,0.45); }
.theme-tg .bg-slate-800\/40 { background-color: rgba(19,31,53,0.5); }
.theme-tg .bg-slate-800\/50 { background-color: rgba(19,31,53,0.6); }
.theme-tg .bg-slate-800\/60 { background-color: rgba(19,31,53,0.7); }
.theme-tg .bg-slate-800\/70 { background-color: rgba(19,31,53,0.8); }
.theme-tg .bg-slate-900\/50 { background-color: rgba(10,18,32,0.5); }
.theme-tg .bg-slate-900\/60 { background-color: rgba(10,18,32,0.6); }
/* Keep the hover lift on list cards (site.css sets it, the lines above would mask it) */
.theme-tg .talk-entry:hover,
.theme-tg .media-card:hover,
.theme-tg .blog-card:hover { background-color: rgba(24,38,64,0.92); }

/* Blog post body */
.theme-tg .prose h2,
.theme-tg .prose h3 { color: var(--tg-ivory); }
.theme-tg .prose blockquote { border-left-color: rgba(232,179,90,0.6); }

/* ── Navigation ──────────────────────────────────────────── */
.theme-tg nav.fixed { background-color: rgba(10,18,32,0.82); }
.theme-tg nav.scrolled { background: rgba(10,18,32,0.96) !important; }
/* Monogram mark beside the name */
.theme-tg nav a.font-serif {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}
.theme-tg nav a.font-serif::before {
  content: 'FM';
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(232,179,90,0.6);
  color: var(--tg-gold-soft);
  font: 700 0.68rem/1 'Playfair Display', Georgia, serif;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 25%, rgba(232,179,90,0.18), transparent 70%);
}
.theme-tg nav [aria-current="page"] { color: var(--tg-gold-soft) !important; }
.theme-tg nav [aria-current="page"]::after { width: 100%; background: var(--tg-gold); }
.theme-tg #mobile-overlay { background: rgba(10,18,32,0.98); }
.theme-tg #mobile-overlay a.active { color: var(--tg-gold-soft); }
.theme-tg .skip-link { background: var(--tg-ink); color: var(--tg-gold-soft); }
.theme-tg #scroll-progress { background: linear-gradient(90deg, var(--tg-teal), var(--tg-gold)); }

/* ── Section labels on every page: gold ──────────────────── */
/* Small uppercase labels ("Curriculum Vitae", "Talks", ...). */
.theme-tg .text-teal-400.uppercase.tracking-widest {
  color: var(--tg-gold) !important;
  letter-spacing: 0.22em;
}
/* Page-header labels get the short leading gold rule */
.theme-tg header .text-teal-400.uppercase.tracking-widest {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.theme-tg header .text-teal-400.uppercase.tracking-widest::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tg-gold));
}
/* "── LABEL ──" dividers: the side lines fade into gold */
.theme-tg .flex:has(> .tracking-widest) > .h-px.flex-1:first-child {
  background: linear-gradient(90deg, transparent, rgba(232,179,90,0.35)) !important;
}
.theme-tg .flex:has(> .tracking-widest) > .h-px.flex-1:last-child {
  background: linear-gradient(90deg, rgba(232,179,90,0.35), transparent) !important;
}

/* ── Home section eyebrows: gold, with a short leading rule ─ */
.theme-tg .tg-eyebrow {
  color: var(--tg-gold) !important;
  letter-spacing: 0.22em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.theme-tg .tg-eyebrow::before,
.theme-tg .tg-eyebrow--center::after {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tg-gold));
}
.theme-tg .tg-eyebrow--center::after { background: linear-gradient(90deg, var(--tg-gold), transparent); }
/* "About" label: soften the full-width lines into a teal→gold fade */
.theme-tg .tg-rule-left  { background: linear-gradient(90deg, transparent, rgba(232,179,90,0.35)) !important; }
.theme-tg .tg-rule-right { background: linear-gradient(90deg, rgba(232,179,90,0.35), transparent) !important; }

/* ── Hero ────────────────────────────────────────────────── */
.theme-tg .hero-name-accent {
  color: var(--tg-gold-soft);
  font-style: italic;
  font-weight: 400;
}
.theme-tg .hero-badge {
  border-color: rgba(232,179,90,0.4);
  background-color: rgba(10,18,32,0.55);
}
.theme-tg .hero-badge > span:first-child { background-color: var(--tg-gold); }
.theme-tg .hero-badge > span:last-child  { color: var(--tg-ivory); }
.theme-tg .hero-role.text-teal-300 { color: var(--tg-teal-soft); }
.theme-tg .hero-scrim {
  background: linear-gradient(180deg, rgba(10,18,32,0.55) 0%, rgba(10,18,32,0.72) 40%, rgba(10,18,32,0.92) 100%);
}
.theme-tg .hero-glow {
  background:
    radial-gradient(ellipse 55% 45% at 12% 105%, rgba(232,179,90,0.16) 0%, transparent 70%),
    radial-gradient(ellipse 70% 55% at 75% 115%, rgba(45,212,191,0.14) 0%, transparent 70%);
}
@media (min-width: 1024px) {
  .theme-tg .hero-scrim {
    background:
      linear-gradient(180deg, rgba(10,18,32,0.55) 0%, transparent 18%, transparent 78%, var(--tg-ink) 100%),
      linear-gradient(90deg, rgba(10,18,32,0.95) 0%, rgba(10,18,32,0.86) 32%, rgba(10,18,32,0.42) 58%, rgba(10,18,32,0.1) 100%);
  }
}

/* ── Buttons: gold for the key action ────────────────────── */
/* Any primary teal button (a/button with bg-teal-600) becomes gold. */
.theme-tg .tg-btn-gold,
.theme-tg a.bg-teal-600,
.theme-tg button.bg-teal-600 {
  background: linear-gradient(180deg, #f0c470, #e0a744) !important;
  color: #1c1406 !important;
  box-shadow: 0 12px 32px rgba(232,179,90,0.22) !important;
}
.theme-tg .tg-btn-gold:hover,
.theme-tg a.bg-teal-600:hover,
.theme-tg button.bg-teal-600:hover {
  background: linear-gradient(180deg, #f6d18a, #e8b35a) !important;
}
.theme-tg a.bg-teal-600 .text-teal-100\/75 { color: rgba(28,20,6,0.7) !important; }

/* ── Banded sections: contour texture + teal→gold hairline ─ */
.theme-tg .tg-band {
  position: relative;
  background:
    linear-gradient(180deg, rgba(19,31,53,0.55), rgba(10,18,32,0.25)),
    url('../images/contours.svg') center / cover no-repeat;
  border-color: transparent !important;
}
.theme-tg .tg-band::before,
.theme-tg footer::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(45,212,191,0.45), rgba(232,179,90,0.45), transparent);
}

/* ── Honors ──────────────────────────────────────────────── */
.theme-tg .honor-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24,38,64,0.92), rgba(19,31,53,0.6));
  border-color: rgba(232,179,90,0.18);
}
.theme-tg .honor-card::before {
  content: '';
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tg-gold), transparent);
}
.theme-tg .honor-value { color: var(--tg-gold-soft); }

/* ── About ───────────────────────────────────────────────── */
.theme-tg .tg-portrait {
  box-shadow:
    0 0 0 1px rgba(232,179,90,0.45),
    0 0 0 7px var(--tg-ink),
    0 0 0 8px rgba(232,179,90,0.22),
    0 30px 60px rgba(0,0,0,0.35);
  border-color: transparent !important;
}
.theme-tg .tg-chips > span {
  background-color: rgba(45,212,191,0.08);
  color: #b8efe6;
  box-shadow: inset 0 0 0 1px rgba(45,212,191,0.2);
}

/* ── Spark Kimiyya callout: gold, like its own page ──────── */
.theme-tg .tg-spark-card {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(232,179,90,0.16), transparent 70%),
    linear-gradient(180deg, rgba(24,38,64,0.9), rgba(19,31,53,0.75)),
    url('../images/contours.svg') center / cover no-repeat !important;
  border-color: rgba(232,179,90,0.28) !important;
}
.theme-tg .tg-spark-card [data-counter] { color: var(--tg-gold-soft); }

/* ── Page heroes with their own gradient (Spark Kimiyya) ─── */
/* Mid stop re-based on ink, and the bottom edge fades into the page
   so the hero does not end on a hard line. */
.theme-tg .via-slate-900 {
  --tw-gradient-stops: var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tg-ink) var(--tw-gradient-via-position), var(--tw-gradient-to);
}
.theme-tg .tg-fade-bottom::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4rem;                       /* = the section's pb-16, so content is never covered */
  background: linear-gradient(180deg, transparent, var(--tg-ink));
  pointer-events: none;
}

/* ── Footer ──────────────────────────────────────────────── */
.theme-tg footer {
  position: relative;
  border-top-color: transparent !important;
}
