:root {
  --primary: #1e3a8a;
  --primary-dark: #172554;
  --accent: #f97316;
  --accent-hover: #ea580c;
  
  /* Modern Dynamic Backdrops (Replaces flat pure white layouts) */
  --bg-main: #f0f4f8;          /* Elegant, soft cool slate background */
  --bg-alternate: #e2eaf0;     /* Darker tone variation for alternating sections */
  --bg-warm: #faf6ee;          /* Warm cream variant for specific accent balance */
  
  /* Non-White Card Shades */
  --card-tint-blue: #f7fafc;   /* Soft ice blue tint for inner grid elements */
  --card-tint-warm: #fffdfa;   /* Subtle linen color for highlighted elements */
  
  --white: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-light: #cbd5e1;
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.04), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.06), 0 4px 6px -4px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
}

/* LOGO IMAGE BRANDING */
.logo-img {
  height: 42px;         
  width: auto;
  border-radius: 50%;
  border: 4px solid var(--card-tint-warm);
  display: block;
  object-fit: contain;
}

/* CORRECTED NAVIGATION ALIGNMENT */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Keeps brand on left, navigation links on right */
  padding: 0 8%;
  background: rgba(240, 244, 248, 0.9); /* Styled tint background matching the page theme */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(30, 58, 138, 0.12);
}

.nav-brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;       /* Locks the logo image and text next to each other */
  text-decoration: none;
}

.nav-brand-text {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links a {
  text-decoration: none;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover:not(.nav-cta) {
  color: var(--primary);
}

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

/* HERO SECTION */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 8% 100px;
  background: radial-gradient(circle at 80% 20%, #1e40af 0%, var(--primary-dark) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-content {
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fed7aa;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.hero h1 {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.highlight {
  color: #fdba74;
  position: relative;
  display: inline-block;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(248, 250, 252, 0.85);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  text-decoration: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.visual-box {
  width: 100%;
  max-width: 380px;
  height: 380px;
  position: relative;
}

.hero-svg {
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.floating-card {
  position: absolute;
  background: rgba(240, 244, 248, 0.95);
  color: var(--text-main);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}

.floating-card.c1 { top: 15%; left: -20%; }
.floating-card.c2 { bottom: 20%; right: -15%; animation-delay: 2s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* UNIVERSAL FORMATTING SECTION */
section {
  padding: 120px 8%;
}

.section-tag {
  display: inline-block;
  background: #ffedd5;
  color: #ea580c;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
}

.section-title {
  font-family: 'Baloo 2', cursive;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--primary);
  font-weight: 800;
  line-height: 1.2;
}

.section-sub {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
}

/* ABOUT SECTION - Textured Gradient Backdrop */
#about {
  background: linear-gradient(180deg, var(--bg-main) 0%, var(--bg-alternate) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6rem;
  align-items: center;
}

.about-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.pill {
  background: var(--card-tint-blue);
  border: 1px solid var(--border-light);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.about-visual {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: 1px solid #7dd3fc;
  padding: 3.5rem 3rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.mission-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mission-header .icon { font-size: 2rem; }

.about-visual h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.8rem;
  color: var(--primary);
}

.about-visual p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* COURSES SECTION */
#courses {
  background: var(--bg-alternate);
}

.courses-header {
  text-align: center;
}

.courses-header .section-sub {
  margin: 1rem auto 0;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.course-card {
  background: var(--card-tint-blue);
  padding: 2.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(30, 58, 138, 0.1);
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #bfdbfe;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
}

.card-icon.math { background: #fee2e2; }
.card-icon.science { background: #e0f2fe; }
.card-icon.sst { background: #fef9c3; }
.card-icon.eng { background: #dcfce7; }
.card-icon.foundation { background: #f3e8ff; }
.card-icon.vmath { background: #ffedd5; }

.course-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.course-card p {
  color: var(--text-muted);
}

/* FACULTY SECTION - Dynamic Warm Soft Base Contrast */
#faculty {
  background: linear-gradient(180deg, var(--bg-alternate) 0%, var(--bg-warm) 100%);
}

.faculty-header {
  text-align: center;
  margin-bottom: 4rem;
}
.faculty-header .section-sub { margin: 1rem auto 0; }

.faculty-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 400px));
  gap: 3rem;
  justify-content: center;
}

.faculty-card {
  background: var(--card-tint-warm);
  border-radius: var(--radius-md);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  position: relative;
  transition: var(--transition);
}

.faculty-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #fed7aa;
}

.faculty-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  z-index: 2;
}

.faculty-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;                     
  display: block;
  margin: 0 auto 1.5rem;
  border: 4px solid var(--card-tint-warm);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.faculty-card h3 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.faculty-sub {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

.subject-tag {
  display: inline-block;
  background: var(--bg-main);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
}

/* CONTACT SECTION */
#contact {
  background: var(--bg-main);
}

.contact-container {
  max-w: 1100px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}
.contact-header .section-sub { margin: 1rem auto 0; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.contact-item {
  background: var(--card-tint-blue);
  border: 1px solid var(--border-light);
  padding: 2rem;
  border-radius: var(--radius-md);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.contact-item.linkable:hover {
  background: #fff7ed;
  border-color: #ffedd5;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.contact-item h4 {
  font-family: 'Baloo 2', cursive;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.contact-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* FOOTER BRAND LAYOUT */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 8%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.footer-brand-text {
  font-family: 'Baloo 2', cursive;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.3px;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 5%;
  }
  .nav-links {
    display: none;
  }
  section {
    padding: 80px 5%;
  }
  .about-pills {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  footer {
    flex-direction: column;
    text-align: center;
    padding: 3rem 5%;
  }
}
