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

/* ============================================
   1. CSS VARIABLES & IMPORTS
   ============================================ */
:root {
  --font-primary: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Orbitron', 'Inter', sans-serif;

  --color-bg: #f0f5ff;
  --color-surface: #ffffff;
  --color-text: #0b1120;
  --color-text-muted: #475569;
  --color-primary: #0044cc;
  --color-accent: #00e5ff;
  --color-accent-dim: rgba(0, 229, 255, 0.12);
  --color-border: rgba(255, 255, 255, 0.75);

  --radius: 24px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-glass: 0 8px 32px rgba(0, 60, 180, 0.12);
  --shadow-glass-hover: 0 20px 48px rgba(0, 60, 180, 0.18);
  --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

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

/* ============================================
   4. UTILITIES & REUSABLE COMPONENTS
   ============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 2rem;
}

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.glass:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glass-hover), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0077ff 100%);
  color: #fff;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.25), 0 10px 30px rgba(0, 50, 180, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 36px rgba(0, 229, 255, 0.4), 0 15px 40px rgba(0, 50, 180, 0.25);
}

.section {
  padding-block: 6rem;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 72px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 68, 204, 0.2);
}

.logo-accent {
  color: var(--color-primary);
  margin-left: 0.15em;
}

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

.nav-link {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.25s ease;
  padding-block: 0.5rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: 2px;
  box-shadow: 0 0 8px var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  position: absolute;
  left: 8px;
  transition: var(--transition);
}

.hamburger {
  top: 19px;
}

.hamburger::before {
  content: '';
  top: -7px;
}

.hamburger::after {
  content: '';
  top: 7px;
}

/* ============================================
   6. HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% -20%, #ffffff 0%, #e6f2ff 40%, #cce4ff 100%);
  padding-top: 72px;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 960px;
  padding: 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 100, 255, 0.15));
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
  pointer-events: none;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}

/* ============================================
   7. SYSTEMS SECTION
   ============================================ */
.systems-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.system-card {
  padding: 2.5rem;
  text-align: center;
}

.system-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.system-card p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.system-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 68, 204, 0.05), rgba(0, 229, 255, 0.08));
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 68, 204, 0.08);
}

/* ============================================
   8. ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.about-card {
  padding: 2.5rem;
  text-align: center;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.about-card p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.about-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 68, 204, 0.05), rgba(0, 229, 255, 0.08));
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 68, 204, 0.08);
}

/* ============================================
   9. PROGRAMS SECTION
   ============================================ */
.programs-grid {
  display: grid;
  gap: 2rem;
}

.program-card {
  padding: 2.5rem 2rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.program-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-text);
}

.program-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  flex-grow: 1;
}

.program-visual {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 68, 204, 0.06), rgba(0, 229, 255, 0.1));
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.program-tag {
  display: inline-flex;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  background: rgba(0, 68, 204, 0.08);
  border: 1px solid rgba(0, 68, 204, 0.12);
  font-family: var(--font-display);
  align-self: flex-start;
}

/* ============================================
   10. LAB SECTION
   ============================================ */
.lab-grid {
  display: grid;
  gap: 2rem;
}

.lab-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.lab-visual {
  position: relative;
  height: 220px;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hologram-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.06) 2px,
    rgba(0, 229, 255, 0.06) 4px
  );
  z-index: 2;
  pointer-events: none;
}

.lab-geometry {
  position: relative;
  z-index: 1;
}

/* Lab shapes */
.shape-ring {
  width: 70px;
  height: 70px;
  border: 3px solid var(--color-accent);
  border-radius: 50%;
  border-top-color: transparent;
  box-shadow: 0 0 20px var(--color-accent), inset 0 0 20px var(--color-accent);
  animation: spin 3s linear infinite;
}

.shape-hex {
  width: 64px;
  height: 64px;
  background: rgba(0, 229, 255, 0.2);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  border: 2px solid var(--color-accent);
  filter: drop-shadow(0 0 10px var(--color-accent));
  animation: pulse 3s ease-in-out infinite;
}

.shape-exo {
  width: 48px;
  height: 72px;
  border: 3px solid var(--color-accent);
  border-radius: 12px;
  box-shadow: 0 0 18px var(--color-accent);
  position: relative;
  animation: float 3s ease-in-out infinite;
}

.shape-exo::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -12px;
  width: 8px;
  height: 24px;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
}

.shape-exo::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -12px;
  width: 8px;
  height: 24px;
  border: 2px solid var(--color-accent);
  border-radius: 4px;
}

.shape-flask {
  width: 56px;
  height: 64px;
  position: relative;
}

.shape-flask::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 40px;
  border: 3px solid var(--color-accent);
  border-top: none;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 0 18px var(--color-accent);
}

.shape-flask::after {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  width: 16px;
  height: 24px;
  border: 3px solid var(--color-accent);
  border-bottom: none;
  box-shadow: 0 0 12px var(--color-accent);
}

.shape-cube {
  width: 56px;
  height: 56px;
  background: rgba(0, 229, 255, 0.25);
  border: 2px solid var(--color-accent);
  transform: rotate(45deg);
  box-shadow: 0 0 20px var(--color-accent);
  animation: pulse 2.5s ease-in-out infinite;
}

.shape-cross {
  width: 56px;
  height: 56px;
  position: relative;
}

.shape-cross::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 4px;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent);
}

.shape-cross::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--color-accent);
  box-shadow: 0 0 12px var(--color-accent);
}

.lab-info {
  padding: 1.75rem 2rem 2.5rem;
}

.lab-info h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.lab-info p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   11. CONTACTS SECTION
   ============================================ */
.contacts-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 3rem;
}

.contact-card {
  padding: 2.5rem;
  text-align: center;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.contact-card p {
  font-size: 1rem;
}

.contact-card a {
  color: var(--color-primary);
  font-weight: 500;
  position: relative;
  transition: color 0.25s ease;
}

.contact-card a:hover {
  color: var(--color-accent);
}

.contact-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 68, 204, 0.06), rgba(0, 229, 255, 0.1));
  color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(0, 68, 204, 0.1);
}

.map-container {
  height: 320px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  box-shadow: inset 0 0 40px rgba(0, 68, 204, 0.06);
}

.map-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.map-pin {
  color: var(--color-primary);
  animation: float 3s ease-in-out infinite;
}

.map-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 500;
}

/* ============================================
   12. FOOTER
   ============================================ */
.footer {
  padding-block: 2.5rem;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fff;
}

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

/* ============================================
   13. ANIMATIONS
   ============================================ */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) rotate(45deg);
  }
  40% {
    transform: translateY(10px) rotate(45deg);
  }
  60% {
    transform: translateY(5px) rotate(45deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

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

/* ============================================
   14. RESPONSIVE MEDIA QUERIES
   ============================================ */
@media (min-width: 1024px) {
  .programs-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .lab-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .programs-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .programs-grid,
  .lab-grid {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: 64px;
    right: 0;
    width: 100%;
    height: calc(100dvh - 64px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.35s ease;
  }

  .nav-list.nav-open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.15rem;
    font-family: var(--font-display);
    font-weight: 600;
  }

  .section {
    padding-block: 4rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 1rem;
  }

  .system-card,
  .about-card,
  .program-card,
  .lab-card,
  .contact-card {
    padding: 1.75rem;
  }

  .lab-info {
    padding: 1.25rem 1.5rem 1.75rem;
  }

  .btn {
    padding: 0.9rem 2rem;
    width: 100%;
  }
}