@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Layer Definitions & Variables --- */
:root {
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  /* --- DEFAULT LIGHT MODE DESIGN TOKENS --- */
  --color-brand-primary: #0284c7;    /* Sky blue primary */
  --color-brand-dark: #0f172a;       /* Slate 900 base */
  --color-brand-dark-bg: #f8fafc;    /* Slate 50 base background */
  --color-brand-accent: #06b6d4;      /* Cyan accent */
  --color-brand-teal: #14b8a6;        /* Teal support */
  --color-brand-light: #0f172a;       /* Slate 900 for dark text in light mode */
  
  /* Glassmorphism properties for light mode */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.04);
  
  /* Anim reduced backup */
  --animation-reduced: none;
  
  color-scheme: light dark;
}

/* --- DARK MODE OVERRIDES (html.dark) --- */
.dark {
  --color-brand-dark-bg: #030712;    /* Gray 950 deep background */
  --color-brand-light: #f8fafc;       /* Off-white for dark mode text */
  
  /* Glassmorphism properties for dark mode */
  --glass-bg: rgba(15, 23, 42, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.03);
}

/* Custom Scrollbar for premium feel */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-brand-dark-bg);
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb {
  background: rgba(2, 132, 199, 0.2);
  border-radius: 5px;
  border: 2px solid var(--color-brand-dark-bg);
  transition: background 0.3s ease, border-color 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(2, 132, 199, 0.4);
}

/* Base resets & layouts */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-brand-dark-bg);
  color: #475569; /* slate 600 default light mode body */
  transition: background-color 0.3s ease, color 0.3s ease;
}

html.dark {
  color: #94a3b8; /* slate 400 dark mode body */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-brand-light);
  transition: color 0.3s ease;
}

/* --- Marquee Animation for Partner Logos --- */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-container {
  overflow: hidden;
  position: relative;
  display: flex;
  user-select: none;
  gap: 3rem;
  mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  min-width: 100%;
  gap: 3rem;
  animation: marquee 30s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

/* --- Decorative Blurs & Gradients --- */
.gradient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}

html.dark .gradient-blob {
  opacity: 0.12;
}

/* --- Bento Grid & Glassmorphism --- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .glass-panel {
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-panel:hover {
  border-color: rgba(2, 132, 199, 0.3);
  box-shadow: 0 12px 40px 0 rgba(2, 132, 199, 0.1);
  transform: translateY(-2px);
}

.dark .glass-panel:hover {
  box-shadow: 0 12px 40px 0 rgba(2, 132, 199, 0.25);
}

/* Active Navigation Dots */
.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.2);
  transition: all 0.3s ease;
}
.dark .nav-dot {
  background: rgba(255, 255, 255, 0.2);
}
.nav-dot.active {
  background: var(--color-brand-primary);
  transform: scale(1.4);
}

/* Card Hover glow tracker */
.hover-glow-card {
  position: relative;
  overflow: hidden;
}

.hover-glow-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, 0px);
  left: var(--mouse-x, 0px);
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.dark .hover-glow-card::before {
  background: radial-gradient(circle, rgba(2, 132, 199, 0.12) 0%, transparent 70%);
}

.hover-glow-card:hover::before {
  opacity: 1;
}

/* Custom button states */
.btn-primary {
  background: linear-gradient(135deg, var(--color-brand-primary) 0%, #0369a1 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.15);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(2, 132, 199, 0.3);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Certificate Grid Hover Item */
.cert-card {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.dark .cert-card {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}
.cert-card:hover {
  transform: scale(1.05) rotate(1deg);
  z-index: 10;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}
.dark .cert-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
}

/* Text balancing and pretty wrapping */
.balance-text {
  text-wrap: balance;
}
.pretty-text {
  text-wrap: pretty;
}

/* Accessibility Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
