/* ===========================
   1. CSS Variables & Reset
   =========================== */
:root {
  --bg-deep: #010b14;
  --bg-dark: #001233;
  --bg-mid: #002855;
  --accent-cyan: #00f2ff;
  --accent-blue: #00b4d8;
  --accent-navy: #023e8a;
  --text-primary: #e0f7ff;
  --text-secondary: #90e0ef;
  --text-muted: #48cae4;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-heading: 'Exo 2', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

::selection {
  background: var(--accent-cyan);
  color: var(--bg-deep);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===========================
   2. Utilities & Layout
   =========================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: 7rem 0;
}

.section-header {
  margin-bottom: 4rem;
  max-width: 640px;
}

.section-tag {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
}

.text-accent {
  color: var(--accent-cyan);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* ===========================
   3. Navigation
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(1, 11, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--glass-border);
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.logo-icon {
  color: var(--accent-cyan);
  font-size: 1.3rem;
}

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

.nav-menu {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

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

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-cyan);
  transition: width 0.3s;
}

.nav-menu a:hover {
  color: var(--accent-cyan);
}

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

.mobile-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(--accent-cyan);
  position: absolute;
  left: 8px;
  transition: var(--transition);
}

.hamburger {
  top: 19px;
}

.hamburger::before,
.hamburger::after {
  content: '';
}

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

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

.mobile-toggle.active .hamburger {
  background: transparent;
}

.mobile-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.mobile-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ===========================
   4. Hero Section
   =========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 20% 50%, rgba(0, 180, 216, 0.12) 0%, transparent 50%),
              linear-gradient(135deg, var(--bg-deep) 0%, var(--bg-dark) 50%, var(--bg-mid) 100%);
}

.hero-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: floatOrb 10s ease-in-out infinite alternate;
}

.orb-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-navy), transparent 70%);
  top: -100px;
  right: -100px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-blue), transparent 70%);
  bottom: -50px;
  left: -50px;
  animation-delay: -5s;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 30px rgba(0, 242, 255, 0.25);
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 480px;
  margin-bottom: 2.5rem;
}

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

.btn-primary {
  background: rgba(0, 242, 255, 0.08);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 242, 255, 0.15), transparent);
  transition: left 0.6s;
}

.btn-primary:hover {
  background: var(--accent-cyan);
  color: var(--bg-deep);
  box-shadow: 0 0 40px rgba(0, 242, 255, 0.35);
}

.btn-primary:hover::before {
  left: 100%;
}

/* Hero Hologram */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.scan-hologram {
  width: 320px;
  height: 320px;
  position: relative;
  animation: float 6s ease-in-out infinite;
}

.scan-core {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(0, 242, 255, 0.2);
  background: radial-gradient(circle at 30% 30%, rgba(0, 242, 255, 0.1), transparent 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 180, 216, 0.1);
}

.brain-wireframe {
  width: 70%;
  height: 70%;
  animation: pulseGlow 4s ease-in-out infinite;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 5%;
  width: 90%;
  height: 3px;
  background: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan), 0 0 30px var(--accent-cyan);
  border-radius: 2px;
  animation: scanMove 3s ease-in-out infinite;
  z-index: 3;
}

.scan-data {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  display: flex;
  gap: 0.5rem;
}

.data-value {
  animation: blink 1.5s infinite;
}

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

.mouse {
  width: 24px;
  height: 40px;
  border: 2px solid var(--accent-cyan);
  border-radius: 14px;
  position: relative;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 2s infinite;
}

.scroll-text {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

/* ===========================
   5. About Section
   =========================== */
.about {
  background: linear-gradient(to bottom, var(--bg-deep), var(--bg-dark));
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-primary);
  font-weight: 500;
}

.list-icon {
  color: var(--accent-cyan);
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.panel-card {
  padding: 2rem;
  max-width: 400px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.panel-dot {
  width: 8px;
  height: 8px;
  background: #00ff41;
  border-radius: 50%;
  box-shadow: 0 0 10px #00ff41;
  animation: pulseDot 2s infinite;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.metric-label {
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.metric-value {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-heading);
}

.progress-bars {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.p-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.p-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0;
}

.reveal.active .p-fill {
  transform: scaleX(var(--w));
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===========================
   6. Programs Section
   =========================== */
.programs {
  background: var(--bg-deep);
}

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

.program-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.1s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.program-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

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

.program-card:hover {
  border-color: rgba(0, 242, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 180, 216, 0.08);
}

.card-icon {
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(0, 242, 255, 0.3));
}

.program-card h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.program-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.card-arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  color: var(--accent-cyan);
  font-size: 1.25rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: var(--transition);
}

.program-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ===========================
   7. Imaging Lab Section
   =========================== */
.lab {
  background: linear-gradient(to bottom, var(--bg-dark), var(--bg-deep));
}

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

.lab-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.lab-card:hover {
  border-color: rgba(0, 242, 255, 0.25);
  box-shadow: 0 15px 30px rgba(0, 180, 216, 0.08);
}

.lab-card:hover .lab-image {
  transform: scale(1.05);
}

.lab-image {
  height: 220px;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-dark);
  transition: transform 0.5s ease;
}

.lab-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 242, 255, 0.07) 2px, rgba(0, 242, 255, 0.07) 4px);
  z-index: 2;
  pointer-events: none;
}

.lab-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 255, 0.3);
  z-index: 3;
}

/* Abstract scan art */
.lab-image-1::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 180, 216, 0.35) 0%, transparent 50%),
              radial-gradient(circle at 30% 30%, rgba(0, 242, 255, 0.2) 0%, transparent 40%);
  animation: pulseScan 4s infinite;
}

.lab-image-2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(0, 180, 216, 0.25) 50%, transparent 60%),
              linear-gradient(-45deg, transparent 40%, rgba(0, 180, 216, 0.25) 50%, transparent 60%);
}

.lab-image-3::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 242, 255, 0.35) 2px, transparent 2px);
  background-size: 24px 24px;
  background-position: center;
}

.lab-image-4::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 242, 255, 0.45) 20%, rgba(0, 180, 216, 0.25) 50%, rgba(0, 242, 255, 0.45) 80%, transparent 100%);
  filter: blur(6px);
  animation: shiftGradient 3s infinite alternate;
}

.lab-image-5::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(from 0deg, rgba(0, 180, 216, 0.15) 0deg 10deg, transparent 10deg 20deg);
}

.lab-image-6::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(224, 247, 255, 0.12) 0%, transparent 30%, transparent 70%, rgba(224, 247, 255, 0.12) 100%),
              radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
}

.lab-content {
  padding: 1.5rem;
}

.lab-content h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

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

/* ===========================
   8. Contact Section
   =========================== */
.contact {
  background: var(--bg-deep);
}

.contact-wrapper {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.info-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.info-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.info-item a:hover {
  color: var(--accent-cyan);
}

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

.map-visual {
  background: var(--bg-dark);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.map-pulse {
  width: 12px;
  height: 12px;
  background: var(--accent-cyan);
  border-radius: 50%;
  position: relative;
  z-index: 2;
}

.map-pulse::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: mapPulse 2s infinite;
}

.map-label {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(0, 242, 255, 0.3);
}

/* ===========================
   9. Footer
   =========================== */
.footer {
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-deep);
}

/* ===========================
   10. Keyframes & Animations
   =========================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-20px, 20px) scale(1.1); }
}

@keyframes scanMove {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scrollWheel {
  0% { top: 6px; opacity: 1; }
  100% { top: 18px; opacity: 0; }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(0, 242, 255, 0.4)); }
  50% { filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.7)); }
}

@keyframes pulseScan {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes shiftGradient {
  0% { transform: translateX(-10%); }
  100% { transform: translateX(10%); }
}

@keyframes mapPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ===========================
   11. Media Queries
   =========================== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual {
    order: -1;
  }

  .scan-hologram {
    width: 260px;
    height: 260px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .panel-card {
    max-width: 100%;
  }

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

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

  .mobile-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(1, 11, 20, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right 0.35s ease;
  }

  .nav-menu.active {
    right: 0;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 2rem;
  }

  .map-visual {
    min-height: 240px;
  }

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

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