/* ========================================
   NovaCore Institute - Custom Styles
   ======================================== */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0c10;
}

::-webkit-scrollbar-thumb {
  background: #1f2838;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #00f0ff;
}

/* ========================================
   Animated Background Grid
   ======================================== */
.grid-animation {
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(0,240,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,240,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

/* ========================================
   Scanning Line Animation
   ======================================== */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,240,255,0.3), rgba(0,240,255,0.6), rgba(0,240,255,0.3), transparent);
  animation: scanLine 6s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(0,240,255,0.3), 0 0 30px rgba(0,240,255,0.1);
}

@keyframes scanLine {
  0% {
    top: -2px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* ========================================
   Floating Dashboard Animations
   ======================================== */
.floating-dash {
  opacity: 0;
  animation: fadeInDash 1s ease forwards;
}

.dash-1 {
  position: absolute;
  top: 15%;
  left: 5%;
  animation-delay: 1.5s;
}
.dash-1 .floating-dash-inner,
.dash-1 {
  animation: float1 8s ease-in-out infinite;
}

.dash-2 {
  position: absolute;
  top: 65%;
  left: 8%;
  animation-delay: 2s;
}
.dash-2 {
  animation: float2 10s ease-in-out infinite;
}

.dash-3 {
  position: absolute;
  top: 25%;
  right: 5%;
  animation-delay: 2.5s;
}
.dash-3 {
  animation: float3 9s ease-in-out infinite;
}

@keyframes fadeInDash {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 0.6;
    transform: translateY(0);
  }
}

@keyframes float1 {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(1deg);
  }
}

@keyframes float2 {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(-1deg);
  }
}

@keyframes float3 {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-18px) rotate(1deg);
  }
}

/* ========================================
   Fade In Up Animation
   ======================================== */
.animate-fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Spin Slow Animation
   ======================================== */
.animate-spin-slow {
  animation: spin 20s linear infinite;
}

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

/* ========================================
   Navbar Scroll State
   ======================================== */
.navbar-scrolled {
  background: rgba(10, 12, 16, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ========================================
   About Card Hover Effect
   ======================================== */
.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,240,255,0.05), transparent 50%);
  opacity: 0;
  transition: opacity 0.5s ease;
  border-radius: inherit;
  z-index: 0;
}

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

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 240, 255, 0.05);
}

/* ========================================
   Program Card Hover Effect
   ======================================== */
.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 240, 255, 0.05);
}

.program-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0,240,255,0.5), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

/* ========================================  
   Lab Card Hover Effect
   ======================================== */
.lab-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 240, 255, 0.05);
}

/* ========================================
   Scroll Reveal Animations
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ========================================
   Custom Selection
   ======================================== */
::selection {
  background: rgba(0, 240, 255, 0.3);
  color: white;
}

/* ========================================
   Form Input Focus State Enhancement
   ======================================== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
}

/* ========================================
   Responsive Adjustments for Floating Dashboards
   ======================================== */
@media (max-width: 768px) {
  .floating-dash {
    display: none;
  }
}

/* ========================================
   Pulse Glow for Key Elements
   ======================================== */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  }
}

/* ========================================
   Background Gradient for Body
   ======================================== */
body {
  background: #0a0c10;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(0, 240, 255, 0.02) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 240, 255, 0.01) 0%, transparent 50%);
}

/* ========================================
   Responsive Typography Scale
   ======================================== */
@media (max-width: 640px) {
  .font-orbitron {
    letter-spacing: 0.02em;
  }
}