/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
  --bg-deep: #020617;
  --bg-dark: #0b1021;
  --bg-panel: rgba(11, 16, 33, 0.65);
  --neon-cyan: #00f3ff;
  --neon-blue: #38bdf8;
  --neon-purple: #a855f7;
  --neon-violet: #7c3aed;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.15);
  --shadow-glow: 0 0 40px rgba(0, 243, 255, 0.15);
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Exo 2', 'Orbitron', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 243, 255, 0.08) 0%, transparent 50%);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
}

button {
  font: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

/* ============================================
   TYPOGRAPHY & UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-fade {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.glass-panel,
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}

.glass-panel::before,
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.6;
}

.glass-card {
  padding: 2.5rem;
}

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

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.is-scrolled {
  padding: 0.75rem 0;
  background: rgba(2, 6, 23, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.logo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px solid var(--glass-border-strong);
  color: var(--neon-cyan);
  font-size: 1.5rem;
  line-height: 1;
}

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

.nav-link {
  font-family: var(--font-display);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

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

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

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

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  position: relative;
}

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

.hamburger {
  top: 19px;
}

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

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

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

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8rem 1.5rem 4rem;
}

#quantum-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  padding: 3.5rem;
  border-radius: 32px;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 40px rgba(0, 243, 255, 0.25), 0 0 80px rgba(168, 85, 247, 0.15);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2.75rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-radius: 50px;
  border: 1px solid transparent;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.12), rgba(168, 85, 247, 0.12));
  border-color: rgba(0, 243, 255, 0.5);
  color: var(--neon-cyan);
  box-shadow: 0 0 0px rgba(0, 243, 255, 0);
}

.btn--primary:hover {
  background: var(--neon-cyan);
  color: var(--bg-deep);
  box-shadow: 0 0 50px rgba(0, 243, 255, 0.35);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-indicator__mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 13px;
  position: relative;
}

.scroll-indicator__wheel {
  width: 4px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollWheel 1.8s ease-in-out infinite;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding: 8rem 0;
}

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

.about__info p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about__features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about__features li {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.feature__icon {
  color: var(--neon-cyan);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}

.about__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantum-core {
  position: relative;
  width: 320px;
  height: 320px;
}

.quantum-core__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(0, 243, 255, 0.15);
}

.quantum-core__ring:nth-child(1) {
  width: 120px;
  height: 120px;
  border-top-color: var(--neon-cyan);
  border-right-color: var(--neon-cyan);
  animation: spin 5s linear infinite;
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.05);
}

.quantum-core__ring:nth-child(2) {
  width: 180px;
  height: 180px;
  border-bottom-color: var(--neon-purple);
  border-left-color: var(--neon-purple);
  animation: spin 7s linear infinite reverse;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.05);
}

.quantum-core__ring:nth-child(3) {
  width: 240px;
  height: 240px;
  border-top-color: var(--neon-blue);
  border-bottom-color: var(--neon-blue);
  animation: spin 10s linear infinite;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.05);
}

.quantum-core__nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 40px var(--neon-cyan), 0 0 80px var(--neon-blue);
  animation: pulseCore 3s ease-in-out infinite;
}

/* ============================================
   PROGRAMS
   ============================================ */
.programs {
  padding: 8rem 0;
  background: linear-gradient(180deg, transparent 0%, rgba(168, 85, 247, 0.03) 50%, transparent 100%);
}

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

.program-card {
  padding: 2.5rem;
  border-radius: 24px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s ease,
    border-color 0.4s ease;
  position: relative;
  overflow: hidden;
}

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

.program-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 243, 255, 0.25);
  box-shadow: 0 25px 60px rgba(0, 243, 255, 0.08), var(--shadow-glow);
}

.program-card:hover::after {
  left: 100%;
  opacity: 1;
  transition: left 0.8s ease, opacity 0.3s;
}

.program-card__icon {
  width: 56px;
  height: 56px;
  color: var(--neon-cyan);
  margin-bottom: 1.5rem;
}

.program-card__icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.program-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.program-card__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   LAB / DASHBOARD
   ============================================ */
.lab {
  padding: 8rem 0;
}

.lab__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.lab__status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--neon-cyan);
  margin-bottom: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
  animation: blink 2s infinite;
}

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

.project-card {
  padding: 1.75rem;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
  transform: scale(1.02) translateY(-4px);
  border-color: rgba(168, 85, 247, 0.3);
  box-shadow: 0 15px 40px rgba(168, 85, 247, 0.1);
}

.project-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-card__id {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--text-primary);
}

.project-card__tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  background: rgba(168, 85, 247, 0.12);
  color: var(--neon-purple);
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.project-card__metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric__label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.metric__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.mini-chart {
  width: 100%;
  height: 50px;
  opacity: 0.8;
}

/* ============================================
   CONTACTS
   ============================================ */
.contacts {
  padding: 8rem 0;
  background: radial-gradient(circle at 50% 0%, rgba(0, 243, 255, 0.03) 0%, transparent 60%);
}

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.contacts__info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 2.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.contact-item__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(0, 243, 255, 0.08);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 243, 255, 0.15);
}

.contact-item__icon svg {
  width: 24px;
  height: 24px;
}

.contact-item__body {
  display: flex;
  flex-direction: column;
}

.contact-item__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-item__link,
.contact-item__text {
  font-size: 1.05rem;
  color: var(--text-primary);
  transition: color 0.3s;
}

.contact-item__link:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.contacts__map {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.map-pin {
  position: relative;
  width: 20px;
  height: 20px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--neon-cyan);
}

.map-pin__pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--neon-cyan);
  animation: pinPulse 2s ease-out infinite;
}

.map-label {
  position: absolute;
  bottom: 2rem;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--neon-cyan);
}

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

.footer__copy {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulseCore {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.8;
  }
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

@keyframes pinPulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}

/* ============================================
   MEDIA QUERIES
   ============================================ */
@media (max-width: 1024px) {

  .about__grid,
  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .quantum-core {
    transform: scale(0.85);
  }

  .lab__header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    top: 72px;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-link {
    font-size: 1.25rem;
  }

  .hero__content {
    padding: 2rem;
    border-radius: 20px;
  }

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

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

  .about__grid {
    gap: 2rem;
  }

  .contacts__grid {
    gap: 1.5rem;
  }

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

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

  .hero__content {
    padding: 1.5rem;
  }

  .glass-card {
    padding: 1.75rem;
  }

  .quantum-core {
    transform: scale(0.7);
  }

  .btn {
    width: 100%;
  }
}