/* ============================
   1. Variables & Root
   ============================ */
:root {
  --nova-cyan: #00f0ff;
  --nova-blue: #0088ff;
  --nova-glow: rgba(0, 240, 255, 0.35);
  --graphite-900: #07070a;
  --graphite-800: #0e0e12;
  --graphite-700: #16161c;
  --silver-100: #f4f5f7;
  --silver-300: #c4c6cf;
  --silver-500: #7a7d8a;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(0, 240, 255, 0.1);
  --header-height: 80px;
  --radius: 16px;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Rajdhani', 'Inter', sans-serif;
  --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--graphite-900);
  color: var(--silver-100);
  line-height: 1.65;
  overflow-x: hidden;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--nova-cyan);
  color: var(--graphite-900);
  padding: 8px 16px;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ============================
   3. Typography
   ============================ */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

/* ============================
   4. Utilities & Layout
   ============================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section__header {
  margin-bottom: 64px;
}

.section__title {
  display: inline-block;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  color: var(--silver-100);
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.25);
}

.section__line {
  width: 80px;
  height: 3px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--nova-cyan), transparent);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--nova-glow);
}

.section__subtitle {
  margin-top: 18px;
  color: var(--silver-500);
  font-size: 1.05rem;
  max-width: 640px;
}

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

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

.reveal--delay-1 { transition-delay: 0.12s; }
.reveal--delay-2 { transition-delay: 0.24s; }
.reveal--delay-3 { transition-delay: 0.36s; }

/* ============================
   5. Buttons
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--nova-cyan);
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.45);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

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

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

.btn:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--nova-cyan);
  box-shadow: 0 0 28px var(--nova-glow), inset 0 0 10px rgba(0, 240, 255, 0.05);
  transform: translateY(-2px);
}

/* ============================
   6. Navigation (Glassmorphism)
   ============================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(7, 7, 10, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.header--scrolled {
  background: rgba(7, 7, 10, 0.88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--silver-100);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.logo__mark svg {
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.4));
}

.nav__list {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--silver-300);
  position: relative;
  padding: 6px 0;
  transition: var(--transition);
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--nova-cyan), transparent);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px var(--nova-glow);
}

.nav__link:hover,
.nav__link:focus {
  color: var(--nova-cyan);
  text-shadow: 0 0 10px var(--nova-glow);
}

.nav__link:hover::after,
.nav__link:focus::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--silver-100);
}

.hamburger {
  display: block;
  width: 28px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 0 6px var(--nova-glow);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: var(--transition);
  box-shadow: 0 0 6px var(--nova-glow);
}

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

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

/* ============================
   7. Hero Section
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(var(--header-height) + 40px) 24px 80px;
  background: radial-gradient(ellipse at center, var(--graphite-800) 0%, var(--graphite-900) 70%);
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 40%, transparent 0%, rgba(7, 7, 10, 0.7) 85%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 920px;
}

.hero__title {
  font-size: clamp(2rem, 5.5vw, 4.2rem);
  color: #ffffff;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.25), 0 0 60px rgba(0, 136, 255, 0.2);
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--silver-300);
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--nova-cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--nova-glow);
}

/* ============================
   8. About Section
   ============================ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about__lead {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--silver-100);
  margin-bottom: 16px;
  line-height: 1.5;
}

.about__content p + p {
  margin-top: 12px;
  color: var(--silver-300);
}

.about__list {
  margin-top: 28px;
  list-style: none;
  display: grid;
  gap: 14px;
}

.about__list li {
  position: relative;
  padding-left: 28px;
  color: var(--silver-300);
}

.about__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--nova-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--nova-glow);
}

/* Holographic schematic */
.holo-schematic {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
}

.holo-schematic__ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px dashed rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.holo-schematic__ring--outer {
  width: 100%;
  height: 100%;
  animation: rotateCW 12s linear infinite;
}

.holo-schematic__ring--inner {
  width: 60%;
  height: 60%;
  border-style: solid;
  border-width: 1px;
  animation: rotateCCW 8s linear infinite;
}

.holo-schematic__core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 40%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.holo-schematic__bar {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, transparent, var(--nova-cyan), transparent);
  opacity: 0.8;
  border-radius: 4px;
  animation: pulseBar 2.5s ease-in-out infinite;
}

.holo-schematic__bar:nth-child(2) {
  animation-delay: 0.4s;
  width: 80%;
}

.holo-schematic__bar:nth-child(3) {
  animation-delay: 0.8s;
  width: 60%;
}

.holo-schematic__glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08), transparent 70%);
  pointer-events: none;
}

/* ============================
   9. Programs Section
   ============================ */
.programs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.program-card {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 44px 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
  overflow: hidden;
}

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

.program-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 24px rgba(0, 240, 255, 0.08);
}

.program-card__icon {
  color: var(--nova-cyan);
  margin-bottom: 20px;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.3));
}

.program-card__title {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--silver-100);
}

.program-card__text {
  font-size: 0.95rem;
  color: var(--silver-500);
  line-height: 1.6;
}

/* ============================
   10. Laboratory Section
   ============================ */
.lab__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.lab-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--graphite-800);
  transition: var(--transition);
}

.lab-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.06);
  border-color: rgba(0, 240, 255, 0.25);
}

.lab-card__thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.lab-card__deco {
  position: absolute;
  inset: 0;
  background-size: cover;
  transition: transform 0.6s ease;
}

.lab-card:hover .lab-card__deco {
  transform: scale(1.06);
}

.lab-card__deco--1 {
  background:
    radial-gradient(circle at 30% 30%, rgba(0, 240, 255, 0.12), transparent 60%),
    linear-gradient(135deg, #12121a, #0a0a10);
}
.lab-card__deco--1::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 14px, rgba(0, 240, 255, 0.06) 15px),
                    repeating-linear-gradient(90deg, transparent, transparent 14px, rgba(0, 240, 255, 0.06) 15px);
}

.lab-card__deco--2 {
  background:
    radial-gradient(circle at 70% 60%, rgba(0, 136, 255, 0.14), transparent 60%),
    linear-gradient(45deg, #101018, #0c0c14);
}
.lab-card__deco--2::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 240, 255, 0.04) 11px);
}

.lab-card__deco--3 {
  background: linear-gradient(to bottom, #0f0f16, #151520);
}
.lab-card__deco--3::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background: conic-gradient(from 180deg, transparent, rgba(0, 240, 255, 0.08), transparent);
  border-radius: 50%;
}

.lab-card__deco--4 {
  background: radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.08), transparent 60%), #0e0e14;
}
.lab-card__deco--4::after {
  content: '';
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(0, 240, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

.lab-card__deco--5 {
  background: linear-gradient(120deg, #12121c, #0a0a10);
}
.lab-card__deco--5::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent, transparent 29px, rgba(0, 240, 255, 0.05) 30px);
}

.lab-card__deco--6 {
  background: radial-gradient(ellipse at top, rgba(0, 240, 255, 0.1), transparent 50%), #0d0d14;
}
.lab-card__deco--6::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 240, 255, 0.06), transparent);
}

.lab-card__content {
  padding: 24px;
  position: relative;
  z-index: 2;
}

.lab-card__title {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--silver-100);
}

.lab-card__desc {
  font-size: 0.92rem;
  color: var(--silver-500);
  line-height: 1.55;
}

/* ============================
   11. Contacts Section
   ============================ */
.contacts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 36px 28px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
}

.contact-card:hover,
.contact-card:focus {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 18px rgba(0, 240, 255, 0.06);
  transform: translateY(-4px);
  outline: none;
}

.contact-card__icon {
  color: var(--nova-cyan);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.3));
}

.contact-card__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--silver-500);
}

.contact-card__value {
  font-size: 1.1rem;
  color: var(--silver-100);
  font-weight: 500;
  line-height: 1.4;
  font-style: normal;
}

/* ============================
   12. Footer
   ============================ */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 40px 0;
  background: linear-gradient(to bottom, rgba(0, 240, 255, 0.02), transparent);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__copy,
.footer__note {
  font-size: 0.9rem;
  color: var(--silver-500);
}

/* ============================
   13. Keyframes
   ============================ */
@keyframes rotateCW {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotateCCW {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(-360deg); }
}

@keyframes pulseBar {
  0%, 100% { opacity: 0.5; transform: scaleX(0.9); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.1); }
}

/* ============================
   14. Responsive
   ============================ */
@media (max-width: 1024px) {
  .programs__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about__grid {
    gap: 48px;
  }
}

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

  .nav-toggle {
    display: block;
    z-index: 1001;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: calc(100vh - var(--header-height));
    background: rgba(7, 7, 10, 0.97);
    border-left: 1px solid var(--glass-border);
    padding: 40px 32px;
    transition: right 0.35s ease;
    display: flex;
    flex-direction: column;
  }

  .nav--open {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 28px;
  }

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

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

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

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

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}