/* Import Caveat font */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap');

:root {
  --bg: #1a1a2e;
  --fg: #e0e0e0;
  --gold: #f0b429;
  --teal: #38b2ac;
  --blue: #4299e1;
  --green: #48bb78;
  --red: #fc8181;
  --orange: #fc814a;
  --pink: #ed64a6;
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.10);
  --nav-bg: rgba(18,18,42,0.92);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Caveat', 'Comic Sans MS', cursive;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

svg text { font-family: 'Caveat', 'Comic Sans MS', cursive; }

a { color: inherit; text-decoration: none; }

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.page-content { flex: 1; padding: 2.5rem 1rem; max-width: 1280px; margin: 0 auto; width: 100%; }

/* Navbar */
nav.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 1rem; display: flex; align-items: center; justify-content: space-between; height: 3.5rem; }
.nav-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.25rem; font-weight: 700; }
.nav-logo .accent { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a { padding: .375rem .75rem; border-radius: .5rem; font-size: .95rem; color: rgba(255,255,255,0.6); transition: color .15s, background .15s; }
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { background: rgba(240,180,41,0.2); color: var(--gold); font-weight: 600; }
.nav-support { margin-left: .75rem; padding: .375rem .75rem; border-radius: .5rem; background: rgba(240,180,41,0.15); color: var(--gold); border: 1px solid rgba(240,180,41,0.3); font-size: .9rem; transition: background .15s; }
.nav-support:hover { background: rgba(240,180,41,0.25) !important; }
.nav-burger { display: none; background: none; border: none; color: rgba(255,255,255,0.7); font-size: 1.4rem; cursor: pointer; padding: .5rem; }
.nav-mobile { display: none; background: #12122a; border-top: 1px solid var(--card-border); padding: .75rem 1rem; flex-direction: column; gap: .5rem; }
.nav-mobile a { padding: .5rem .75rem; border-radius: .5rem; font-size: .95rem; color: rgba(255,255,255,0.6); }
.nav-mobile a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-mobile a.active { background: rgba(240,180,41,0.2); color: var(--gold); }
.nav-mobile.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
}

/* Footer */
footer.site-footer { border-top: 1px solid var(--card-border); padding: 1.5rem 1rem; text-align: center; font-size: .875rem; color: rgba(255,255,255,0.4); }
footer.site-footer a { text-decoration: underline; }
footer.site-footer a:hover { color: rgba(255,255,255,0.7); }

/* Cards */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 1rem; padding: 1.5rem; }
.card-section { margin-bottom: 2.5rem; }

/* Page header */
.page-header { text-align: center; margin-bottom: 2.5rem; }
.page-header h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: .75rem; }
.page-header p { color: rgba(255,255,255,0.5); max-width: 36rem; margin: 0 auto; }

/* Color helpers */
.text-gold { color: var(--gold); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-orange { color: var(--orange); }
.text-pink { color: var(--pink); }
.text-teal { color: var(--teal); }
.text-muted { color: rgba(255,255,255,0.5); }
.text-faint { color: rgba(255,255,255,0.25); }

/* Section titles */
.section-title { font-size: 1.5rem; font-weight: 700; color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; text-align: center; }

/* SVG infographic container */
.infographic svg { width: 100%; height: auto; display: block; }

/* Grid layouts */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Topic cards (home nav) */
.topic-card { display: block; border-radius: .75rem; padding: 1.5rem; border: 1px solid; transition: transform .15s; text-decoration: none; }
.topic-card:hover { transform: scale(1.02); }
.topic-card .icon { font-size: 2.25rem; margin-bottom: .75rem; }
.topic-card h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: .5rem; }
.topic-card p { color: rgba(255,255,255,0.5); font-size: .9rem; line-height: 1.5; }
.topic-card .arrow { margin-top: 1rem; font-size: .875rem; opacity: .7; }
.topic-card:hover .arrow { opacity: 1; }

/* Color variants for topic cards */
.card-gold { background: linear-gradient(135deg, rgba(240,180,41,0.15) 0%, rgba(240,180,41,0.03) 100%); border-color: rgba(240,180,41,0.3); }
.card-gold h3, .card-gold .arrow { color: var(--gold); }
.card-green { background: linear-gradient(135deg, rgba(72,187,120,0.15) 0%, rgba(72,187,120,0.03) 100%); border-color: rgba(72,187,120,0.3); }
.card-green h3, .card-green .arrow { color: var(--green); }
.card-blue { background: linear-gradient(135deg, rgba(66,153,225,0.15) 0%, rgba(66,153,225,0.03) 100%); border-color: rgba(66,153,225,0.3); }
.card-blue h3, .card-blue .arrow { color: var(--blue); }
.card-orange { background: linear-gradient(135deg, rgba(252,129,74,0.15) 0%, rgba(252,129,74,0.03) 100%); border-color: rgba(252,129,74,0.3); }
.card-orange h3, .card-orange .arrow { color: var(--orange); }
.card-pink { background: linear-gradient(135deg, rgba(237,100,166,0.15) 0%, rgba(237,100,166,0.03) 100%); border-color: rgba(237,100,166,0.3); }
.card-pink h3, .card-pink .arrow { color: var(--pink); }

/* Stats row */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: .75rem; padding: 1rem; text-align: center; }
.stat-card .value { font-size: 1.75rem; font-weight: 700; }
.stat-card .sub { color: rgba(255,255,255,0.4); font-size: .75rem; margin-top: .25rem; }
.stat-card .label { color: rgba(255,255,255,0.6); font-size: .875rem; margin-top: .5rem; }

/* Dividend table */
.div-table { width: 100%; border-collapse: collapse; }
.div-table tr { border-bottom: 1px solid rgba(255,255,255,0.05); }
.div-table tr:last-child { border-bottom: none; }
.div-table td { padding: .6rem 0; font-size: .9rem; }
.div-table .stock-name { color: rgba(255,255,255,0.8); font-weight: 600; }
.div-table .stock-meta { color: rgba(255,255,255,0.35); font-size: .8rem; }
.div-table .yield-val { font-weight: 700; font-size: 1.1rem; text-align: right; }

/* Learn page */
.day-card { border-radius: .75rem; padding: 1.25rem; border: 1px solid; }
.glossary-item { display: flex; gap: .75rem; padding: .75rem; border-radius: .5rem; background: var(--card-bg); border: 1px solid rgba(255,255,255,0.08); }
.glossary-term { color: var(--gold); font-weight: 700; font-size: .875rem; min-width: 100px; }
.glossary-def { color: rgba(255,255,255,0.5); font-size: .875rem; }
.book-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: .75rem; padding: 1rem; text-align: center; }
.book-card .emoji { font-size: 2.5rem; margin-bottom: .75rem; }
.mental-model-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: .75rem; padding: 1rem; transition: border-color .15s; }
.mental-model-card:hover { border-color: rgba(255,255,255,0.2); }

/* Disclaimer */
.disclaimer { text-align: center; font-size: .75rem; color: rgba(255,255,255,0.25); padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 2rem; }

/* TradingView */
.tv-container { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 1rem; padding: 1rem; margin-bottom: 2.5rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
