/* =========================================================
   CYBER SHIKSHA FOUNDATION — Shared Stylesheet
   Theme: Indian Mythology × Modern Cyber Defense
   ========================================================= */

/* ---------- FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Rajdhani:wght@300;400;500;600;700&family=Teko:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Dark mode (default) */
  --bg-main:        #05070d;
  --bg-soft:        #0b1020;
  --bg-elev:        #111a2e;
  --text-main:      #e6e9f2;
  --text-muted:     #94a3b8;
  --text-faint:     #64748b;

  --gold-1:         #fde68a;
  --gold-2:         #f59e0b;
  --gold-3:         #b45309;
  --saffron:        #ff7a18;
  --crimson:        #dc2626;

  --cyan-1:         #67e8f9;
  --cyan-2:         #06b6d4;
  --cyan-3:         #0e7490;

  --border:         rgba(245, 158, 11, 0.18);
  --border-soft:    rgba(255, 255, 255, 0.08);
  --glass:          rgba(15, 23, 42, 0.55);
  --glass-strong:   rgba(11, 16, 32, 0.85);
  --card-grad:      linear-gradient(145deg, rgba(30, 41, 59, 0.55) 0%, rgba(11, 16, 32, 0.85) 100%);

  --shadow-gold:    0 10px 40px -10px rgba(245, 158, 11, 0.35);
  --shadow-cyan:    0 10px 40px -10px rgba(6, 182, 212, 0.35);

  --radius-sm:      8px;
  --radius:         14px;
  --radius-lg:      22px;
}

body.light-mode {
  --bg-main:        #faf7f0;
  --bg-soft:        #f3ede0;
  --bg-elev:        #ffffff;
  --text-main:      #1c1917;
  --text-muted:     #57534e;
  --text-faint:     #78716c;

  --gold-1:         #d97706;
  --gold-2:         #b45309;
  --gold-3:         #7c2d12;

  --border:         rgba(180, 83, 9, 0.25);
  --border-soft:    rgba(0, 0, 0, 0.08);
  --glass:          rgba(255, 255, 255, 0.85);
  --glass-strong:   rgba(255, 255, 255, 0.95);
  --card-grad:      linear-gradient(145deg, #ffffff 0%, #fef9ec 100%);
}

/* ---------- RESET ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Rajdhani', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 {
  font-family: 'Cinzel Decorative', serif;
  letter-spacing: 0.04em;
  line-height: 1.15;
  font-weight: 700;
}
h4, h5, h6, .tech-font {
  font-family: 'Teko', sans-serif;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.mono { font-family: 'JetBrains Mono', monospace; }

.gradient-gold {
  background: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 50%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.gradient-cyan {
  background: linear-gradient(135deg, var(--cyan-1) 0%, var(--cyan-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------- LAYOUT ---------- */
.container { width: min(1200px, 92%); margin: 0 auto; }
.section { padding: 6rem 0; position: relative; }
.section-sm { padding: 3rem 0; }

.eyebrow {
  font-family: 'Teko', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  color: var(--gold-2);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: inline-block;
}

/* ---------- TOPBAR ---------- */
.topbar {
  background: #000;
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.55rem 0;
  font-family: 'JetBrains Mono', monospace;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
}
body.light-mode .topbar { background: #1c1917; color: #f5f5f4; }
.topbar .container {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.topbar a { transition: color 0.2s; }
.topbar a:hover { color: var(--gold-1); }
.topbar-left { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar-right { display: flex; gap: 1rem; }

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed; top: 38px; left: 0; right: 0; z-index: 90;
  background: var(--glass-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 0;
}
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand-text {
  font-family: 'Cinzel Decorative', serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  line-height: 1;
}
.brand-text span { display: block; font-family: 'Teko', sans-serif; font-size: 0.75rem; color: var(--gold-2); letter-spacing: 0.2em; }

.nav-links {
  display: flex; gap: 1.75rem; align-items: center; list-style: none;
}
.nav-links a {
  font-family: 'Teko', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.2s;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--gold-2), var(--saffron));
  transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  transition: all 0.2s;
  font-size: 1.05rem;
}
.icon-btn:hover { background: var(--gold-2); color: #000; transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-2) 0%, var(--saffron) 100%);
  color: #0b1020;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-family: 'Teko', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: all 0.25s;
  box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }

.btn-ghost {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-main);
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-family: 'Teko', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.5rem;
  transition: all 0.25s;
}
.btn-ghost:hover { border-color: var(--gold-2); color: var(--gold-1); }

.mobile-toggle { display: none; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  position: relative;
  display: grid; place-items: center;
  padding: 9rem 0 5rem;
  overflow: hidden;
}
#hero-canvas {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(245, 158, 11, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(6, 182, 212, 0.10) 0%, transparent 50%),
    linear-gradient(180deg, transparent 0%, var(--bg-main) 95%);
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 950px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--gold-1);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(6px);
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  margin-bottom: 1.5rem;
}
.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-soft);
}
.stat .num {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat .lbl {
  font-family: 'Teko', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ---------- SECTION HEADER ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 4rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.section-head p { color: var(--text-muted); font-size: 1.1rem; }

/* ---------- CARDS ---------- */
.card {
  background: var(--card-grad);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.5s ease;
}
.card:hover {
  border-color: var(--border);
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
}
.card:hover::before { transform: scaleX(1); }
.card .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: inline-block;
}
.card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.card .tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--gold-1);
  display: inline-block;
  margin-bottom: 0.8rem;
}
.card p { color: var(--text-muted); margin-bottom: 1rem; }
.card ul { list-style: none; padding-left: 0; }
.card ul li {
  padding: 0.3rem 0;
  font-family: 'Teko', sans-serif;
  font-size: 1.05rem;
  color: var(--text-main);
  display: flex; gap: 0.5rem; align-items: center;
}
.card ul li::before {
  content: '▸';
  color: var(--gold-2);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

/* ---------- DIVIDER ORNAMENT ---------- */
.divider {
  display: flex; align-items: center; justify-content: center;
  margin: 3rem auto;
  color: var(--gold-2);
  font-size: 1.4rem;
  letter-spacing: 1rem;
}
.divider::before, .divider::after {
  content: ''; flex: 1; max-width: 120px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  margin: 0 1rem;
}

/* ---------- TIMELINE / ROADMAP ---------- */
.roadmap { position: relative; padding: 2rem 0; }
.roadmap::before {
  content: '';
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold-2) 10%, var(--gold-2) 90%, transparent);
  transform: translateX(-50%);
}
.milestone {
  position: relative;
  width: calc(50% - 3rem);
  margin-bottom: 3rem;
  padding: 1.5rem 2rem;
  background: var(--card-grad);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.milestone:nth-child(odd) { margin-right: auto; }
.milestone:nth-child(even) { margin-left: auto; }
.milestone::after {
  content: ''; position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 0 4px var(--bg-main), 0 0 24px var(--gold-2);
  top: 1.5rem;
}
.milestone:nth-child(odd)::after  { right: -3.5rem; }
.milestone:nth-child(even)::after { left:  -3.5rem; }
.milestone .num-badge {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--saffron));
  color: #000;
  display: grid; place-items: center;
  font-family: 'Cinzel Decorative', serif;
  font-weight: 700;
  top: -22px;
}
.milestone:nth-child(odd) .num-badge { right: 1.5rem; }
.milestone:nth-child(even) .num-badge { left: 1.5rem; }
.milestone h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--gold-1); }
.milestone .lvl {
  font-family: 'Teko', sans-serif;
  font-size: 1rem;
  color: var(--cyan-1);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 0.5rem;
}
.milestone p { color: var(--text-muted); margin-bottom: 1rem; }
.milestone .skills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.milestone .skills span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-1);
}

/* ---------- FOOTER ---------- */
footer {
  background: linear-gradient(180deg, var(--bg-main) 0%, #000 100%);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}
body.light-mode footer {
  background: linear-gradient(180deg, var(--bg-soft) 0%, #1c1917 100%);
  color: #f5f5f4;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-grid h5 {
  font-family: 'Teko', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.25em;
  color: var(--gold-1);
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-grid a {
  display: block;
  padding: 0.3rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s, transform 0.2s;
}
.footer-grid a:hover { color: var(--gold-1); transform: translateX(4px); }
.footer-brand { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; }
.footer-brand img { width: 50px; height: 50px; object-fit: contain; }
.footer-brand .ft-name { font-family: 'Cinzel Decorative', serif; font-weight: 700; font-size: 1.1rem; }
.social-row { display: flex; gap: 0.5rem; margin-top: 1rem; }
.social-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-family: 'Teko', sans-serif;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.25s;
}
.social-btn:hover { background: var(--gold-2); color: #000; transform: translateY(-3px); border-color: var(--gold-2); }
.footer-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 2rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.sanskrit-shloka {
  text-align: center;
  font-family: 'Cinzel Decorative', serif;
  color: var(--gold-2);
  font-size: 1.15rem;
  margin: 2rem 0;
  letter-spacing: 0.08em;
}
.sanskrit-shloka span { display: block; font-family: 'Teko', sans-serif; font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.3em; margin-top: 0.4rem; }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-family: 'Teko', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-1);
  margin-bottom: 0.4rem;
}
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  transition: all 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
textarea.form-control { resize: vertical; min-height: 140px; font-family: inherit; }

/* ---------- BACK TO TOP ---------- */
#to-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 80;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-2), var(--saffron));
  color: #000;
  display: grid; place-items: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-gold);
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: all 0.3s;
}
#to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

/* ---------- PAGE HERO (subpages) ---------- */
.page-hero {
  padding: 9rem 0 4rem;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(245, 158, 11, 0.10) 0%, transparent 60%),
    var(--bg-main);
}
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.page-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }
.breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-top: 1rem;
}
.breadcrumb a { color: var(--gold-1); }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in {
  opacity: 1; transform: translateY(0);
}
/* Safety net — if JS is disabled or observer doesn't fire, show after 2s */
@keyframes reveal-fallback {
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: reveal-fallback 0.7s ease 2s forwards;
}
.reveal.in {
  animation: none;
}
/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .roadmap::before { left: 24px; }
  .milestone { width: calc(100% - 60px); margin-left: 60px !important; margin-right: 0 !important; }
  .milestone::after { left: -45px !important; right: auto !important; }
  .milestone .num-badge { left: 1.5rem !important; right: auto !important; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed; top: 100px; left: 0; right: 0;
    flex-direction: column;
    background: var(--glass-strong);
    backdrop-filter: blur(14px);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-150%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .mobile-toggle { display: grid; place-items: center; width: 38px; height: 38px; }
  .nav-actions .btn-primary, .nav-actions .btn-ghost { display: none; }
  .topbar { font-size: 0.7rem; }
  .topbar-left a:nth-child(2) { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 4rem 0; }
}

/* ---------- UTILITIES ---------- */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
