/* ============================================
   Dr. Ijezie's Science Website — Design System
   "Raising the Next Generation of Science Ambassadors"
   ============================================ */

/* --- Custom Font --- */
@font-face {
  font-family: 'Breathing';
  src: url('/assets/fonts/Breathing.ttf') format('truetype');
  font-display: swap;
}

/* --- CSS Variables --- */
:root {
  --neon-purple: #a855f7;
  --neon-blue: #3b82f6;
  --neon-pink: #ec4899;
  --neon-green: #10b981;
  --neon-gold: #f59e0b;
  --neon-cyan: #06b6d4;
  --neon-red: #ef4444;
  --dark-bg: #0a0a1a;
  --dark-card: rgba(255,255,255,0.05);
  --dark-border: rgba(255,255,255,0.1);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
  --glass-hover-border: rgba(168,85,247,0.3);
  --glass-hover-shadow: rgba(168,85,247,0.15);
  --header-bg: #0d0d2b;
  --header-height: 72px;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(168,85,247,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(59,130,246,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(236,72,153,0.06) 0%, transparent 70%);
  background-attachment: fixed;
}

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

img {
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
.font-breathing {
  font-family: 'Breathing', cursive;
}

.gradient-text {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-gold {
  background: linear-gradient(135deg, var(--neon-gold), #fbbf24, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-green {
  background: linear-gradient(135deg, var(--neon-green), #34d399, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Glass Morphism --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
  transition: var(--transition-smooth);
}

.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--glass-hover-border);
  box-shadow: 0 20px 40px var(--glass-hover-shadow);
}

.glass-card-static {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 1.5rem;
}

/* --- Neon Glow Effects --- */
.neon-glow {
  box-shadow: 0 0 20px rgba(168,85,247,0.3), 0 0 40px rgba(168,85,247,0.1);
}

.neon-glow-blue {
  box-shadow: 0 0 20px rgba(59,130,246,0.3), 0 0 40px rgba(59,130,246,0.1);
}

.neon-glow-green {
  box-shadow: 0 0 20px rgba(16,185,129,0.3), 0 0 40px rgba(16,185,129,0.1);
}

.neon-glow-pink {
  box-shadow: 0 0 20px rgba(236,72,153,0.3), 0 0 40px rgba(236,72,153,0.1);
}

.neon-glow-gold {
  box-shadow: 0 0 20px rgba(245,158,11,0.3), 0 0 40px rgba(245,158,11,0.1);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: white;
  border: none;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(168,85,247,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--neon-purple);
  transform: translateY(-2px);
}

/* --- Badges --- */
.badge {
  font-size: 0.65rem;
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-purple { background: rgba(168,85,247,0.3); color: #c4b5fd; }
.badge-blue { background: rgba(59,130,246,0.3); color: #93c5fd; }
.badge-green { background: rgba(16,185,129,0.3); color: #6ee7b7; }
.badge-pink { background: rgba(236,72,153,0.3); color: #f9a8d4; }
.badge-gold { background: rgba(245,158,11,0.3); color: #fcd34d; }
.badge-red { background: rgba(239,68,68,0.3); color: #fca5a5; }

/* --- Animations --- */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.7; }
  100% { transform: scale(0.95); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(50px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(50px) rotate(-360deg); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(168,85,247,0.3); }
  50% { box-shadow: 0 0 40px rgba(168,85,247,0.6), 0 0 60px rgba(168,85,247,0.2); }
}

.float { animation: float 6s ease-in-out infinite; }
.pulse-ring { animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite; }
.glow-pulse { animation: glow-pulse 3s ease-in-out infinite; }

.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Scroll-triggered animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children animations */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* --- Particle Container --- */
#particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  pointer-events: none;
}

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  height: var(--header-height);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.header-logo img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--neon-purple);
}

.header-logo-text {
  font-family: 'Breathing', cursive;
  font-size: 1.3rem;
  color: white;
  line-height: 1.2;
}

.header-logo-sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- Navigation --- */
.nav-container {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

.nav-link .arrow {
  font-size: 0.6rem;
  transition: transform 0.3s ease;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  min-width: 220px;
  background: rgba(15,15,45,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  z-index: 200;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.nav-dropdown a:hover {
  color: white;
  background: rgba(168,85,247,0.15);
}

.nav-dropdown a .dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.nav-divider {
  display: none;
}

/* --- Mobile Menu --- */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 201;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: var(--transition-smooth);
}

.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Footer --- */
.site-footer {
  background: var(--header-bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand-name {
  font-family: 'Breathing', cursive;
  font-size: 1.3rem;
  color: white;
}

.footer-brand-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--neon-purple);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: var(--neon-purple);
}

/* --- Main Content Area --- */
.site-main {
  padding-top: calc(var(--header-height) + 2rem);
  min-height: calc(100vh - 200px);
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- Section Headings --- */
.section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-heading-icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.section-heading h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.section-heading p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* --- Atom Animation --- */
.atom-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.atom-nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px;
  background: var(--neon-purple);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--neon-purple), 0 0 40px rgba(168,85,247,0.4);
}

.atom-orbit {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 50%;
}

.atom-orbit:nth-child(2) { transform: rotateX(60deg); }
.atom-orbit:nth-child(3) { transform: rotateY(60deg); }
.atom-orbit:nth-child(4) { transform: rotateX(60deg) rotateY(60deg); }

.atom-electron {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.atom-orbit:nth-child(2) .atom-electron { animation: orbit 3s linear infinite; }
.atom-orbit:nth-child(3) .atom-electron { animation: orbit 4s linear infinite reverse; }
.atom-orbit:nth-child(4) .atom-electron { animation: orbit 5s linear infinite; }

/* --- Iframe Wrapper --- */
.iframe-container {
  width: 100%;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--dark-bg);
}

.iframe-container iframe {
  width: 100%;
  min-height: 600px;
  border: none;
  display: block;
}

/* --- Page Hero --- */
.page-hero {
  text-align: center;
  padding: 3rem 0;
  position: relative;
}

.page-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .mobile-toggle {
    display: flex;
  }

  .nav-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: rgba(10,10,30,0.98);
    backdrop-filter: blur(30px);
    flex-direction: column;
    padding: 5rem 1.5rem 2rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 200;
  }

  .nav-container.open {
    right: 0;
  }

  .nav-menu {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    justify-content: space-between;
    width: 100%;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0 0 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  .nav-item.expanded .nav-dropdown {
    max-height: 500px;
  }

  .nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-divider {
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168,85,247,0.3), transparent);
    margin: 1rem 0;
    width: 100%;
  }

  .page-hero h1 {
    font-size: 1.8rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .header-logo-text {
    font-size: 1.1rem;
  }
}

/* --- Overlay for mobile nav --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Accessibility Modes
   Toggled by the floating accessibility widget
   ============================================ */
body.a11y-high-contrast {
  filter: contrast(1.4);
}

body.a11y-high-contrast .glass-card,
body.a11y-high-contrast .glass-card-static {
  background: rgba(0,0,0,0.9) !important;
  border-color: rgba(255,255,255,0.5) !important;
}

body.a11y-large-text {
  font-size: 125% !important;
}

body.a11y-large-text h1 {
  font-size: 2.5rem !important;
}

body.a11y-large-text h2 {
  font-size: 2rem !important;
}

body.a11y-large-text p,
body.a11y-large-text li {
  font-size: 1.2rem !important;
}

body.a11y-xlarge-text { font-size: 200% !important; }
body.a11y-xlarge-text h1 { font-size: 3.5rem !important; }
body.a11y-xlarge-text h2 { font-size: 2.8rem !important; }
body.a11y-xlarge-text h3 { font-size: 2.2rem !important; }
body.a11y-xlarge-text p, body.a11y-xlarge-text li, body.a11y-xlarge-text td { font-size: 1.5rem !important; line-height: 1.8 !important; }
body.a11y-xlarge-text .nav-link, body.a11y-xlarge-text .nav-menu a { font-size: 1.1rem !important; }

body.a11y-simple-font,
body.a11y-simple-font * {
  font-family: Arial, Helvetica, sans-serif !important;
}
