/* --- Variables & Reset --- */
:root {
  --bg-dark: #030014;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-light: rgba(255, 255, 255, 0.08);
  --primary: #7000ff;
  --secondary: #00d2ff;
  --accent: #ff007a;
  --text-main: #ffffff;
  --text-muted: #94a3b8;
  --font-head: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --glass: blur(12px);
}

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

/* FIX: Ensure HTML takes full height background to avoid white gaps */
html {
  background-color: var(--bg-dark);
  height: 100%;
  overflow-x: hidden;
}

body {
  background-color: transparent; /* Make body transparent so fixed background shows through */
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: hidden;
  position: relative;
  min-height: 100%;
}

/* --- BACKGROUND SYSTEM (The "Desktop Look" for Mobile) --- */
/* We create a fixed container for background elements so they don't move/resize on scroll */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none; /* Allows click-through */
}

/* Animated Ambient Lights */
.ambient-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px); /* Slightly reduced blur for performance */
  opacity: 0.4;
  animation: floatLight 10s infinite alternate;
}

.light-1 { 
  width: 600px; height: 600px; 
  top: -100px; left: -100px; 
  background: var(--primary); 
}

.light-2 { 
  width: 500px; height: 500px; 
  bottom: -100px; right: -100px; 
  background: var(--secondary); 
  animation-delay: 5s; 
}

/* Grid Overlay */
.grid-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
  linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -1;
  mask-image: radial-gradient(circle at center, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
  pointer-events: none;
}

@keyframes floatLight {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 50px) scale(1.1); }
}

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; }
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.2rem 0;
  z-index: 1000;
  transition: 0.3s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(3, 0, 20, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-light);
  padding: 0.8rem 0;
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}
.logo {
  font-size: 1.5rem;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -1px;
  display: flex; /* Align items */
  align-items: center;
}
.logo .highlight { color: var(--secondary); }

.nav-logo {
  height: 40px;
  width: auto;
  margin-right: 10px;
}

.nav-menu { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav-link:hover, .nav-link.active { color: white; }
.nav-link::after {
  content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px;
  background: var(--secondary); transition: 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-cta-small {
  padding: 0.5rem 1.2rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 0.9rem;
}
.nav-cta-small:hover { background: var(--primary); border-color: var(--primary); }

/* --- Hamburger --- */
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.bar { width: 25px; height: 2px; background: white; transition: 0.3s; }

/* --- Hero Section --- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 100px 20px 20px 20px;
  position: relative;
}
.badge-pill {
  background: rgba(112, 0, 255, 0.2);
  color: #d8b4fe;
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(112, 0, 255, 0.3);
  display: inline-block;
}
#hero h1 {
  font-size: 5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -2px;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tagline { font-size: 1.3rem; color: var(--text-muted); margin-bottom: 2.5rem; }
.dot { color: var(--primary); margin: 0 10px; }

.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
}
.stat-box { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: white; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-divider { width: 1px; height: 30px; background: var(--border-light); }

.cta-group { display: flex; gap: 1rem; justify-content: center; }
.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(45deg, var(--primary), #5b21b6);
  color: white;
  box-shadow: 0 0 20px rgba(112, 0, 255, 0.4);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(112, 0, 255, 0.6); }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
}
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: white; }

/* Scroll Indicator */
.scroll-indicator {
  position: absolute; bottom: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase;
}
.scroll-indicator .line { width: 1px; height: 50px; background: linear-gradient(to bottom, var(--secondary), transparent); }

/* --- General Section Styles --- */
.section { padding: 80px 20px; }
.container { max-width: 1100px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); }

/* Glass Panel Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 2rem;
  transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- About Grid --- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.about-card:hover { transform: translateY(-10px); background: rgba(255,255,255,0.06); border-color: var(--secondary); }
.card-icon { font-size: 2rem; color: var(--secondary); margin-bottom: 1rem; }
.stats-row { display: flex; justify-content: space-between; margin-top: 1.5rem; color: #fff; }

/* --- Themes --- */
.themes-wrapper { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.theme-card { position: relative; overflow: hidden; text-align: center; padding: 3rem 1rem; border-radius: 20px; }
.theme-card .content { position: relative; z-index: 2; }
.theme-card i { font-size: 2.5rem; margin-bottom: 1rem; background: linear-gradient(to bottom, #fff, #aaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.theme-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0.1; transition: 0.5s; z-index: 1;
}
.art-bg { background: radial-gradient(circle at center, #ff007a, transparent 70%); }
.sci-bg { background: radial-gradient(circle at center, #00d2ff, transparent 70%); }
.strat-bg { background: radial-gradient(circle at center, #7000ff, transparent 70%); }
.theme-card:hover .theme-bg { opacity: 0.3; transform: scale(1.2); }

/* --- Departments Tabs --- */
.tabs-container { padding: 2rem; }
.tabs-header { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tab-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-size: 1.1rem; padding: 0.5rem 1.5rem; cursor: pointer; transition: 0.3s;
  border-bottom: 2px solid transparent;
}
.tab-btn.active { color: white; border-bottom: 2px solid var(--secondary); }

.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }
.event-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.event-card {
  background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05); transition: 0.3s;
}
.event-card:hover { border-color: var(--primary); transform: translateY(-5px); }
.event-card h4 { color: var(--secondary); margin-bottom: 1rem; font-size: 1.2rem; }
.event-list { list-style: none; margin-bottom: 1.5rem; }
.event-list li { padding: 0.3rem 0; color: #ccc; font-size: 0.95rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.card-link { color: white; font-size: 0.9rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.card-link:hover { color: var(--secondary); gap: 10px; }

/* --- Timeline --- */
.timeline-wrapper { position: relative; max-width: 800px; margin: 0 auto; padding: 20px 0; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(to bottom, var(--primary), var(--secondary)); transform: translateX(-50%); }
.timeline-entry { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; width: 100%; }
.timeline-entry.right { flex-direction: row-reverse; }
.date-bubble {
  width: 60px; height: 60px; background: var(--bg-dark); border: 2px solid var(--secondary);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--secondary); z-index: 2;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.entry-content { width: 42%; text-align: right; }
.timeline-entry.right .entry-content { text-align: left; }
.entry-content h3 { color: var(--primary); margin-bottom: 0.5rem; }

/* --- Contact & Footer --- */
.contact-box { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 0; overflow: hidden; }
.contact-text { padding: 3rem; display: flex; flex-direction: column; justify-content: center; }
.contact-text h2 { margin-bottom: 2rem; }
.info-item { display: flex; align-items: center; gap: 15px; margin-bottom: 1.5rem; color: #ccc; }
.info-item i { color: var(--secondary); font-size: 1.2rem; }
.social-links { display: flex; gap: 1.5rem; margin-top: 1rem; }
.social-links i { font-size: 1.5rem; color: white; transition: 0.3s; }
.social-links i:hover { color: var(--primary); transform: scale(1.2); }
.contact-map iframe { width: 100%; height: 100%; min-height: 400px; border: none; filter: grayscale(1) invert(1) contrast(1.2); }

footer { text-align: center; padding: 2rem; border-top: 1px solid var(--border-light); font-size: 0.9rem; color: var(--text-muted); }

/* --- Animations --- */
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUpAnim 0.8s forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeUpAnim {
  to { opacity: 1; transform: translateY(0); }
}

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

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  /* MOBILE BACKGROUND FIX: */
  /* We resize the lights but keep the animation full and lush - adjusted positions to avoid negative offsets causing viewport expansion */
  .light-1 { width: 300px; height: 300px; left: 0; top: 0; }
  .light-2 { width: 250px; height: 250px; right: 0; bottom: 0; }
  
  #hero h1 { font-size: 3rem; }
  .hero-stats { gap: 1rem; }
  .timeline-line { left: 20px; }
  .date-bubble { left: 20px; width: 40px; height: 40px; font-size: 0.6rem; }
  .timeline-entry, .timeline-entry.right { flex-direction: column; align-items: flex-start; margin-left: 50px; }
  .entry-content, .timeline-entry.right .entry-content { width: 100%; text-align: left; margin-bottom: 1rem; }
  .contact-box { grid-template-columns: 1fr; }
  .contact-text { padding: 2rem; }
  .contact-map iframe { min-height: 250px; }
  
  .hamburger { display: flex; z-index: 1001; }
  .nav-menu {
      position: fixed; top: 0; right: -100%; width: 75%; height: 100vh;
      background: rgba(3,0,10,0.98); flex-direction: column; padding-top: 5rem;
      transition: 0.4s; backdrop-filter: blur(20px);
      box-shadow: -5px 0 15px rgba(0,0,0,0.5);
  }
  .nav-menu.active { right: 0; }
  .hamburger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active .bar:nth-child(2) { opacity: 0; }
  .hamburger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  /* Additional mobile fixes for horizontal overflow */
  .nav-container { padding: 0 max(10px, 5vw); } /* Responsive padding to prevent overflow on tiny screens */
  #hero { padding-left: max(10px, 5vw); padding-right: max(10px, 5vw); }
  .section { padding-left: max(10px, 5vw); padding-right: max(10px, 5vw); }
}

/* --- Identity / Logo Section --- */
.identity-wrapper {
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.glow-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0.2;
  filter: blur(60px);
  z-index: 0;
  animation: pulseGlow 5s infinite alternate;
}

@keyframes pulseGlow {
  0% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.2); }
}

.identity-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.identity-logo {
  width: 150px;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 15px rgba(112, 0, 255, 0.5));
  transition: transform 0.5s ease;
}

.identity-logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.identity-title {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -1px;
}

.identity-theme {
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 4px;
  color: var(--secondary);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.identity-divider {
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  margin-bottom: 2rem;
  border-radius: 2px;
}

.identity-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.8;
}

@media (max-width: 768px) {
  .identity-title { font-size: 2.5rem; }
  .identity-theme { font-size: 1rem; letter-spacing: 2px; }
  .identity-logo { width: 120px; }
}