/*
Theme Name: The Math Is Mathing
Theme URI: https://themathismathing.net
Author: Dr. Kyndall Brown
Author URI: https://themathismathing.net
Description: Custom theme for The Math Is Mathing — a platform celebrating Black and Brown math educators.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: themathismathing
*/

/* ─── TOKENS ─── */
:root {
  --navy:       #0B1628;
  --navy2:      #13213A;
  --gold:       #C8A84B;
  --gold2:      #E5C97A;
  --parchment:  #F2E8D5;
  --cream:      #FAF5EC;
  --text:       #1A1A2E;
  --muted:      #7A8599;
  --white:      #FFFFFF;
  --rust:       #8B3A2A;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--navy); color: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ─── NAV ─── */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem; height: 72px;
  background: rgba(11,22,40,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,168,75,0.2);
}

.site-logo img { height: 44px; width: auto; }

#primary-menu { display: flex; gap: 2rem; list-style: none; }
#primary-menu a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}
#primary-menu a:hover { opacity: 1; color: var(--gold); }
#primary-menu .menu-cta > a {
  background: var(--gold); color: var(--navy) !important;
  padding: 0.45rem 1.1rem; border-radius: 2px; opacity: 1 !important; font-weight: 700;
}

.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--gold); }

/* ─── WRAP ─── */
.tmim-wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── SECTION SHARED ─── */
.tmim-section { padding: 6rem 1.5rem; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2;
  color: var(--white); margin-bottom: 1.2rem;
}
.section-body { font-size: 1rem; line-height: 1.8; color: var(--parchment); opacity: 0.85; }
.gold-rule { width: 48px; height: 2px; background: var(--gold); margin: 1.2rem 0; }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-block;
  background: var(--gold); color: var(--navy);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85rem 2rem; border: none; border-radius: 2px;
  text-decoration: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); color: var(--navy); }

.btn-outline {
  display: inline-block;
  border: 1px solid rgba(200,168,75,0.5); color: var(--gold);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.85rem 2rem; border-radius: 2px;
  text-decoration: none; cursor: pointer; background: transparent;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--gold); background: rgba(200,168,75,0.1); color: var(--gold); }

/* ─── HERO ─── */
#hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 6rem 2rem 4rem; overflow: hidden;
  background: var(--navy);
}
#starCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 860px; margin: 0 auto; }
.hero-logo {
  width: min(320px, 80vw); margin: 0 auto 2.5rem;
  filter: drop-shadow(0 0 30px rgba(200,168,75,0.35));
  animation: fadeUp 1s ease both;
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem;
  animation: fadeUp 1s 0.2s ease both; opacity: 0;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 900; line-height: 1.1;
  color: var(--white); margin-bottom: 1.6rem;
  animation: fadeUp 1s 0.35s ease both; opacity: 0;
}
.hero-headline em { font-style: italic; color: var(--gold2); }
.hero-sub {
  font-size: 1.1rem; line-height: 1.75; color: var(--parchment); opacity: 0.85;
  max-width: 580px; margin: 0 auto 2.8rem;
  animation: fadeUp 1s 0.5s ease both;
}
.hero-actions {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  animation: fadeUp 1s 0.65s ease both; opacity: 0;
}

/* ─── ABOUT ─── */
#about { background: var(--navy2); }
.about-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center;
}
.about-video-wrap {
  position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 16/9;
  border: 1px solid rgba(200,168,75,0.25); box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.about-video-wrap iframe { width: 100%; height: 100%; border: none; }
.video-caption {
  margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase;
}

/* ─── EDUCATORS ─── */
#educators { background: var(--navy); }
.educators-header { max-width: 1100px; margin: 0 auto 3.5rem; }
.educator-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem;
}
.educator-card {
  background: var(--navy2); border: 1px solid rgba(200,168,75,0.15);
  border-radius: 4px; padding: 2rem; position: relative;
  transition: border-color 0.25s, transform 0.2s; overflow: hidden;
}
.educator-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent); opacity: 0; transition: opacity 0.25s;
}
.educator-card:hover { border-color: rgba(200,168,75,0.4); transform: translateY(-4px); }
.educator-card:hover::before { opacity: 1; }
.educator-tag {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); background: rgba(200,168,75,0.1);
  padding: 0.25rem 0.6rem; border-radius: 2px; display: inline-block; margin-bottom: 1rem;
}
.educator-name { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--white); margin-bottom: 0.35rem; }
.educator-title { font-size: 0.82rem; color: var(--gold); margin-bottom: 1rem; font-style: italic; }
.educator-bio { font-size: 0.9rem; line-height: 1.7; color: var(--parchment); opacity: 0.8; }
.educator-link {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.2rem;
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s;
}
.educator-link:hover { border-bottom-color: var(--gold); color: var(--gold); }
.educator-link::after { content: ' →'; }
.educator-card-dashed {
  border-style: dashed; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; min-height: 220px;
}
.educator-card-dashed p { color: var(--parchment); font-size: 0.88rem; line-height: 1.7; margin-bottom: 1.2rem; }

/* ─── VIDEOS ─── */
#videos { background: var(--navy2); }
.videos-header { max-width: 1100px; margin: 0 auto 3.5rem; }
.video-grid {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem;
}
.video-card { background: var(--navy); border: 1px solid rgba(200,168,75,0.12); border-radius: 4px; overflow: hidden; transition: border-color 0.25s; }
.video-card:hover { border-color: rgba(200,168,75,0.4); }
.video-embed { aspect-ratio: 16/9; width: 100%; }
.video-embed iframe { width: 100%; height: 100%; border: none; display: block; }
.video-thumb-placeholder {
  aspect-ratio: 16/9; width: 100%;
  background: rgba(200,168,75,0.05); display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(200,168,75,0.3);
}
.video-card-body { padding: 1.25rem; }
.video-card-meta { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.video-card-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--white); margin-bottom: 0.5rem; line-height: 1.4; }
.video-card-desc { font-size: 0.83rem; line-height: 1.65; color: var(--parchment); opacity: 0.75; }

/* ─── COMMENTARY ─── */
#commentary { background: var(--navy); }
.commentary-header {
  max-width: 1100px; margin: 0 auto 3.5rem;
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem;
}
.post-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.post-featured {
  background: var(--navy2); border: 1px solid rgba(200,168,75,0.15);
  border-radius: 4px; padding: 2.5rem;
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px;
}
.post-date { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; color: var(--gold); text-transform: uppercase; margin-bottom: 0.6rem; }
.post-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.3; color: var(--white); margin-bottom: 0.8rem; }
.post-excerpt { font-size: 0.88rem; line-height: 1.7; color: var(--parchment); opacity: 0.8; margin-bottom: 1.2rem; }
.post-list { display: flex; flex-direction: column; gap: 1rem; }
.post-item { background: var(--navy2); border: 1px solid rgba(200,168,75,0.1); border-radius: 4px; padding: 1.4rem 1.6rem; flex: 1; transition: border-color 0.2s; }
.post-item:hover { border-color: rgba(200,168,75,0.35); }
.post-item .post-title { font-size: 1rem; margin-bottom: 0.4rem; }
.post-item .post-excerpt { font-size: 0.8rem; margin-bottom: 0.5rem; }

/* ─── GAMES ─── */
#games { background: var(--parchment); color: var(--text); }
#games .section-title { color: var(--navy); }
#games .section-body { color: var(--navy); opacity: 0.8; }
#games .section-label { color: var(--rust); }
#games .gold-rule { background: var(--navy); }
.games-header { max-width: 1100px; margin: 0 auto 3.5rem; }
.game-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.game-card { background: var(--white); border-radius: 4px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.08); transition: box-shadow 0.25s, transform 0.2s; display: flex; flex-direction: column; }
.game-card:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.15); transform: translateY(-4px); }
.game-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.game-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.game-origin { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--rust); margin-bottom: 0.5rem; }
.game-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; color: var(--navy); margin-bottom: 0.25rem; }
.game-subtitle { font-size: 0.82rem; color: var(--muted); font-style: italic; margin-bottom: 1rem; }
.game-desc { font-size: 0.88rem; line-height: 1.7; color: var(--text); opacity: 0.8; flex: 1; margin-bottom: 1.2rem; }
.game-buy {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--navy); color: var(--gold);
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 0.7rem 1.2rem;
  border-radius: 2px; text-decoration: none; transition: background 0.2s; align-self: flex-start;
}
.game-buy:hover { background: var(--navy2); color: var(--gold); }
.game-buy::after { content: ' →'; }
.affiliate-note { max-width: 1100px; margin: 2rem auto 0; font-size: 0.72rem; color: var(--muted); font-style: italic; }

/* ─── NEWSLETTER ─── */
#newsletter { background: linear-gradient(135deg, var(--navy2) 0%, #1A2F52 100%); border-top: 1px solid rgba(200,168,75,0.2); }
.newsletter-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.newsletter-form { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; justify-content: center; }
.newsletter-form input {
  flex: 1; min-width: 220px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(200,168,75,0.3); border-radius: 2px;
  padding: 0.85rem 1.2rem; color: var(--white); font-family: var(--font-body); font-size: 0.9rem; outline: none;
}
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-form input:focus { border-color: var(--gold); }

/* ─── FOOTER ─── */
#colophon { background: #070F1C; padding: 3rem 1.5rem; border-top: 1px solid rgba(200,168,75,0.1); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand img { height: 40px; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.82rem; line-height: 1.7; color: var(--muted); }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul a { font-size: 0.85rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--parchment); }
.footer-bottom { max-width: 1100px; margin: 2.5rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-bottom p { font-size: 0.72rem; color: var(--muted); }

/* ─── SINGLE PAGES ─── */
.page-content-wrap { max-width: 760px; margin: 120px auto 6rem; padding: 0 1.5rem; }
.page-content-wrap h1 { font-family: var(--font-display); font-size: 2.5rem; color: var(--white); margin-bottom: 1.5rem; }
.page-content-wrap .entry-content { font-size: 1rem; line-height: 1.8; color: var(--parchment); opacity: 0.85; }
.page-content-wrap .entry-content h2 { font-family: var(--font-display); color: var(--gold2); margin: 2rem 0 1rem; }
.page-content-wrap .entry-content a { color: var(--gold); }
.page-content-wrap .entry-content a:hover { text-decoration: underline; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .post-grid  { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 640px) {
  #site-header { padding: 0 1.25rem; }
  #primary-menu { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}
