/* ============================================
   QUANTUM ROBOTICS INSTITUTE - STYLES
   Theme: Ultra-Modern AI Robotics Academy
   ------------------------------------------ */

/* 1. CSS Variables & Design Tokens
   ------------------------------------------ */
:root {
  --bg-deep: #060a12;
  --bg-graphite: #0f1724;
  --bg-panel: rgba(16, 24, 40, 0.75);
  --neon-blue: #00f3ff;
  --neon-orange: #ff7b00;
  --text-primary: #e6f1ff;
  --text-secondary: #8b9bb4;
  --font-head: 'Orbitron', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --radius: 12px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  background-image: linear-gradient(180deg, #060a12 0%, #0b101e 100%);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* 3. Layout Utilities
   ------------------------------------------ */
.container {
  width: 92%;
  max-width: 1200px;
  margin-inline: auto;
}

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

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--neon-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 1px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin-inline: auto;
}

/* 4. Keyframe Animations
   ------------------------------------------ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes neonPulse {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
  }
  50% {
    opacity: 0.9;
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.6), 0 0 40px rgba(0, 243, 255, 0.2);
  }
}

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

@keyframes rotateHolo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 5. Scroll-Triggered Reveals
   ------------------------------------------ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* 6. Navigation
   ------------------------------------------ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(6, 10, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 243, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 0.8rem 0;
}

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

.logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--neon-orange);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-orange);
}

.nav-menu {
  display: flex;
  align-items: center;
}

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

.nav-link {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

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

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

/* Hamburger Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

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

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

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

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

/* 7. Hero Section
   ------------------------------------------ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at 70% 30%, rgba(0, 243, 255, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(6, 10, 18, 0.9) 100%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
  padding-top: 6rem;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(0, 243, 255, 0.25);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  margin-bottom: 1.5rem;
  color: var(--neon-blue);
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(0, 243, 255, 0.05);
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.15;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.hero-title .highlight {
  color: var(--neon-blue);
  animation: neonPulse 3s infinite ease-in-out;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.cta-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.25rem;
  border: 1px solid var(--neon-blue);
  border-radius: var(--radius);
  color: var(--neon-blue);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 1px;
  overflow: hidden;
  transition: var(--transition);
}

.cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 243, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.cta-btn:hover {
  color: #000;
  background: var(--neon-blue);
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.4);
}

.cta-btn:hover::before {
  transform: translateX(100%);
}

.btn-text {
  position: relative;
  z-index: 2;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.mouse {
  width: 22px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  position: relative;
}

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

.scroll-text {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* 8. Systems / About Section
   ------------------------------------------ */
.systems {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #070c17 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(0, 243, 255, 0.05), rgba(255, 123, 0, 0.05));
  border: 1px solid rgba(0, 243, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 243, 255, 0.25);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.system-card {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.system-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-orange), transparent);
  opacity: 0.6;
}

.system-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 243, 255, 0.08);
  border-color: rgba(0, 243, 255, 0.2);
}

.system-icon {
  width: 48px;
  height: 48px;
  color: var(--neon-blue);
  margin-bottom: 1rem;
}

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

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

/* 9. Programs Section
   ------------------------------------------ */
.programs {
  padding: 6rem 0;
  background: linear-gradient(180deg, #070c17 0%, var(--bg-deep) 100%);
}

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

.program-card {
  background: linear-gradient(180deg, rgba(20, 30, 48, 0.6), rgba(10, 16, 28, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.card-accent {
  height: 4px;
  width: 100%;
}

.card-accent.blue {
  background: linear-gradient(90deg, var(--neon-blue), transparent);
}

.card-accent.orange {
  background: linear-gradient(90deg, var(--neon-orange), transparent);
}

.card-content {
  padding: 2rem;
  flex: 1;
}

.card-hover-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-hover-glow.blue {
  box-shadow: inset 0 0 60px rgba(0, 243, 255, 0.05);
}

.card-hover-glow.orange {
  box-shadow: inset 0 0 60px rgba(255, 123, 0, 0.05);
}

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

.program-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.program-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-blue);
  border: 1px solid rgba(0, 243, 255, 0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

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

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

.feature-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--neon-orange);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-orange);
}

/* 10. Robotics Lab Section
   ------------------------------------------ */
.robotics-lab {
  padding: 6rem 0;
}

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

.lab-card {
  background: rgba(16, 24, 40, 0.6);
  border: 1px solid rgba(0, 243, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.lab-card:hover {
  border-color: rgba(0, 243, 255, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(-6px) scale(1.01);
}

.lab-visual {
  height: 180px;
  background: linear-gradient(135deg, #0f1724 0%, #111d30 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0, 243, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.lab-visual::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 243, 255, 0.08) 0%, transparent 60%);
  animation: rotateHolo 10s linear infinite;
}

.lab-icon {
  width: 64px;
  height: 64px;
  color: var(--neon-blue);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.3));
}

.lab-info {
  padding: 1.5rem;
}

.lab-info h4 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.lab-meta {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  color: var(--neon-orange);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lab-meta ul {
  margin-top: 0.25rem;
  list-style: none;
}

.lab-meta ul li {
  padding-left: 0.75rem;
  position: relative;
}

.lab-meta ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--neon-blue);
}

/* 11. Contact Section
   ------------------------------------------ */
.contact {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, #05080f 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.glass-panel {
  background: rgba(20, 30, 48, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 243, 255, 0.12);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(0, 243, 255, 0.25);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-blue);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px -4px rgba(0, 243, 255, 0.25);
}

.form-group textarea {
  resize: vertical;
}

.form-group option {
  background: #0b101e;
  color: var(--text-primary);
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--neon-blue), #0044ff);
  color: #000;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.submit-btn:hover {
  box-shadow: 0 0 30px rgba(0, 243, 255, 0.4);
  transform: translateY(-2px);
}

/* Holographic UI for Contact Details */
.holo-frame {
  position: relative;
  padding: 1rem;
}

.holo-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--neon-blue);
  border-style: solid;
  opacity: 0.5;
  transition: var(--transition);
}

.holo-corner.tl {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
}

.holo-corner.tr {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
}

.holo-corner.bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
}

.holo-corner.br {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
}

.contact-details:hover .holo-corner {
  width: 100%;
  height: 100%;
  border-color: var(--neon-orange);
  opacity: 0.2;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.detail-item:last-child {
  margin-bottom: 0;
}

.detail-icon {
  width: 40px;
  height: 40px;
  color: var(--neon-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.detail-text .label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-orange);
  margin-bottom: 0.25rem;
}

.detail-text a,
.detail-text p {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.detail-text a:hover {
  color: var(--neon-blue);
  text-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

/* 12. Footer
   ------------------------------------------ */
.footer {
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* 13. Responsive Design
   ------------------------------------------ */
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(6, 10, 18, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(0, 243, 255, 0.1);
  }

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

  .nav-list {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }

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

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

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

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

  .hero-content {
    text-align: center;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

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

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

@media (max-width: 480px) {
  .section-header {
    margin-bottom: 2.5rem;
  }

  .glass-panel {
    padding: 1.5rem;
  }

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