/* ============================================
   1. RESET & BASE
   ============================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   2. VARIABLES
   ============================================ */
:root {
  --bg-dark: #080a0f;
  --bg-graphite: #11151f;
  --panel: #161b27;
  --accent-green: #00ff9d;
  --accent-turquoise: #00f2ff;
  --neon-blue: #0ea5e9;
  --text-light: #f0f4f8;
  --text-dim: #97a3b6;
  --glass-bg: rgba(18, 22, 32, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* ============================================
   3. UTILITIES & LAYOUT
   ============================================ */
.container {
  width: 92%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding: 100px 0;
  position: relative;
}

.centered {
  text-align: center;
}

/* ============================================
   4. GLASSMORPHISM
   ============================================ */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--glass-border);
  padding: 14px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-light);
  letter-spacing: 1px;
}

.logo span {
  color: var(--accent-green);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-turquoise));
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--text-light);
}

.nav-link:hover::after {
  width: 100%;
}

/* Toggle & Close controls */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-light);
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

.nav-close {
  display: none;
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* ============================================
   6. HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: 120px 20px 80px;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 242, 255, 0.10) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(8, 10, 15, 0.35), var(--bg-dark));
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-green) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 20px rgba(0, 255, 157, 0.12));
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent-green), var(--accent-turquoise));
  color: var(--bg-dark);
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(0, 242, 255, 0.38);
}

/* ============================================
   7. SECTIONS COMMON & REVEAL
   ============================================ */
.section-header {
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  background: rgba(0, 242, 255, 0.08);
  color: var(--accent-turquoise);
  border: 1px solid rgba(0, 242, 255, 0.18);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.18;
  color: var(--text-light);
}

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

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

/* ============================================
   8. ABOUT SECTION
   ============================================ */
.about {
  background: linear-gradient(to bottom, var(--bg-dark), var(--bg-graphite));
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  padding: 28px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 255, 157, 0.12);
  border-color: rgba(0, 255, 157, 0.22);
}

.stat-number {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1;
}

.stat-suffix {
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  color: var(--accent-turquoise);
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* ============================================
   9. SYSTEMS SECTION
   ============================================ */
.systems {
  background: var(--bg-dark);
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.system-card {
  padding: 36px 28px;
  text-align: center;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.7s ease;
  pointer-events: none;
}

.system-card:hover::before {
  left: 100%;
}

.system-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 242, 255, 0.3);
  box-shadow: 0 20px 50px rgba(0, 242, 255, 0.08);
}

.system-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--accent-turquoise);
}

.system-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.system-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

.system-card p {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ============================================
   10. PROGRAMS SECTION
   ============================================ */
.programs {
  background: linear-gradient(to bottom, var(--bg-graphite), var(--bg-dark));
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.program-card {
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  border-color: rgba(0, 255, 157, 0.2);
}

.program-visual {
  height: 200px;
  background: linear-gradient(135deg, #0f2e1c, #143829);
  position: relative;
  overflow: hidden;
}

.program-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 255, 157, 0.04) 10px, rgba(0, 255, 157, 0.04) 20px);
}

.program-visual.bg-2 {
  background: linear-gradient(135deg, #0b2a3a, #0e202f);
}

.program-visual.bg-3 {
  background: linear-gradient(135deg, #1a2e0b, #223a10);
}

.program-visual.bg-4 {
  background: linear-gradient(135deg, #2a1b0b, #3d260e);
}

.program-info {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.program-info h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-light);
}

.program-info p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 18px;
  flex: 1;
}

.link-arrow {
  color: var(--accent-turquoise);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.3s ease;
}

.link-arrow:hover {
  color: var(--accent-green);
}

/* ============================================
   11. LAB SECTION
   ============================================ */
.lab {
  background: var(--bg-graphite);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.lab-card {
  padding: 36px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.lab-card:hover {
  border-color: rgba(0, 255, 157, 0.25);
  transform: translateY(-4px);
}

.lab-num {
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
  user-select: none;
}

.lab-card h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--accent-green);
}

.lab-card p {
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   12. CONTACTS SECTION
   ============================================ */
.contacts {
  background: linear-gradient(to bottom, var(--bg-graphite), var(--bg-dark));
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.contacts-desc {
  color: var(--text-dim);
  margin: 16px 0 32px;
  font-size: 1.05rem;
}

.contacts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacts-list li {
  position: relative;
  padding-left: 24px;
}

.contacts-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 12px var(--accent-green);
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.contacts-list a,
.contacts-list address {
  color: var(--text-light);
  text-decoration: none;
  font-style: normal;
  font-size: 1.05rem;
  transition: color 0.3s ease;
}

.contacts-list a:hover {
  color: var(--accent-turquoise);
}

.contacts-map {
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.map-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  background:
    radial-gradient(circle at 50% 40%, #162a20 0%, #0f1512 100%);
}

.map-pin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-turquoise);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.45);
  animation: pulsePin 2.2s infinite;
}

.map-label {
  position: absolute;
  top: calc(50% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  border: 1px solid var(--glass-border);
}

@keyframes pulsePin {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.45);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(0, 242, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 242, 255, 0);
  }
}

/* ============================================
   13. FOOTER
   ============================================ */
.site-footer {
  background: #05070a;
  padding: 40px 0;
  border-top: 1px solid var(--glass-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-note {
  font-style: italic;
  opacity: 0.7;
}

/* ============================================
   14. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .about-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .contacts-map {
    height: 280px;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .nav-close {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 340px;
    height: 100vh;
    background: var(--bg-graphite);
    border-left: 1px solid var(--glass-border);
    padding: 80px 32px;
    transition: right 0.4s ease;
    z-index: 1000;
  }

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

  .nav-list {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 72px 0;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    justify-content: center;
    flex-direction: column;
    text-align: center;
  }
}