/* Enhanced Hero Section Animations
 * Additional animations and visual effects for the hero section
 * This preserves the existing style while adding more dynamic elements
 */

/* Enhanced glowing orb with particle effects */
.glowing-orb {
  position: relative;
  animation: pulse-glow 6s infinite alternate, color-shift 12s infinite;
  overflow: visible;
}

.glowing-orb::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.4) 0%, rgba(0, 240, 255, 0) 70%);
  filter: blur(15px);
  opacity: 0.7;
  z-index: -1;
  animation: pulse-outer-glow 6s infinite alternate;
}

/* Particle effects around the orb */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.particle {
  position: absolute;
  background-color: rgba(0, 240, 255, 0.6);
  border-radius: 50%;
  width: 3px;
  height: 3px;
  opacity: 0;
  animation: particle-float 3s ease-in-out infinite;
}

/* Create 20 particles with different animations */
.particle:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; --xdir: 1; --ydir: -1; }
.particle:nth-child(2) { top: 35%; left: 85%; animation-delay: 0.2s; --xdir: -1; --ydir: -1; }
.particle:nth-child(3) { top: 65%; left: 25%; animation-delay: 0.4s; --xdir: 1; --ydir: 1; }
.particle:nth-child(4) { top: 75%; left: 75%; animation-delay: 0.6s; --xdir: -1; --ydir: 1; }
.particle:nth-child(5) { top: 45%; left: 5%; animation-delay: 0.8s; --xdir: 0.7; --ydir: -0.7; }
.particle:nth-child(6) { top: 10%; left: 45%; animation-delay: 1.0s; --xdir: -0.7; --ydir: -0.7; }
.particle:nth-child(7) { top: 80%; left: 55%; animation-delay: 1.2s; --xdir: 0.7; --ydir: 0.7; }
.particle:nth-child(8) { top: 60%; left: 95%; animation-delay: 1.4s; --xdir: -0.7; --ydir: 0.7; }
.particle:nth-child(9) { top: 25%; left: 35%; animation-delay: 1.6s; --xdir: 0.3; --ydir: -0.9; }
.particle:nth-child(10) { top: 50%; left: 65%; animation-delay: 1.8s; --xdir: -0.3; --ydir: -0.9; }
.particle:nth-child(11) { top: 30%; left: 48%; animation-delay: 0.3s; --xdir: 0.3; --ydir: 0.9; }
.particle:nth-child(12) { top: 62%; left: 32%; animation-delay: 0.5s; --xdir: -0.3; --ydir: 0.9; }
.particle:nth-child(13) { top: 42%; left: 78%; animation-delay: 0.7s; --xdir: 0.9; --ydir: -0.3; }
.particle:nth-child(14) { top: 72%; left: 18%; animation-delay: 0.9s; --xdir: -0.9; --ydir: -0.3; }
.particle:nth-child(15) { top: 15%; left: 58%; animation-delay: 1.1s; --xdir: 0.9; --ydir: 0.3; }
.particle:nth-child(16) { top: 85%; left: 38%; animation-delay: 1.3s; --xdir: -0.9; --ydir: 0.3; }
.particle:nth-child(17) { top: 55%; left: 88%; animation-delay: 1.5s; --xdir: 0.5; --ydir: -0.8; }
.particle:nth-child(18) { top: 35%; left: 28%; animation-delay: 1.7s; --xdir: -0.5; --ydir: -0.8; }
.particle:nth-child(19) { top: 78%; left: 68%; animation-delay: 1.9s; --xdir: 0.5; --ydir: 0.8; }
.particle:nth-child(20) { top: 22%; left: 82%; animation-delay: 2.1s; --xdir: -0.5; --ydir: 0.8; }

@keyframes particle-float {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  25% {
    opacity: 0.8;
  }
  100% {
    transform: translate(calc(var(--xdir) * 50px), calc(var(--ydir) * 50px)) scale(0);
    opacity: 0;
  }
}

/* Enhanced data streams */
.data-stream {
  position: absolute;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, rgba(0, 240, 255, 0.8), rgba(0, 240, 255, 0));
  animation: data-flow 3s linear infinite;
  opacity: 0.4;
  transform-origin: top center;
  z-index: 1;
}

/* Position 12 data streams around the orb */
.data-stream:nth-child(1) { top: 0; left: 20%; animation-delay: 0s; height: 60px; }
.data-stream:nth-child(2) { top: 0; left: 40%; animation-delay: 0.5s; height: 80px; }
.data-stream:nth-child(3) { top: 0; left: 60%; animation-delay: 1s; height: 100px; }
.data-stream:nth-child(4) { top: 0; left: 80%; animation-delay: 1.5s; height: 70px; }
.data-stream:nth-child(5) { top: 40%; left: 100%; animation-delay: 0.2s; height: 90px; transform: rotate(90deg); }
.data-stream:nth-child(6) { top: 70%; left: 100%; animation-delay: 0.7s; height: 60px; transform: rotate(90deg); }
.data-stream:nth-child(7) { top: 100%; left: 80%; animation-delay: 1.2s; height: 80px; transform: rotate(180deg); }
.data-stream:nth-child(8) { top: 100%; left: 60%; animation-delay: 1.7s; height: 50px; transform: rotate(180deg); }
.data-stream:nth-child(9) { top: 100%; left: 40%; animation-delay: 2.2s; height: 70px; transform: rotate(180deg); }
.data-stream:nth-child(10) { top: 100%; left: 20%; animation-delay: 2.7s; height: 60px; transform: rotate(180deg); }
.data-stream:nth-child(11) { top: 70%; left: 0; animation-delay: 3.2s; height: 80px; transform: rotate(270deg); }
.data-stream:nth-child(12) { top: 30%; left: 0; animation-delay: 3.7s; height: 90px; transform: rotate(270deg); }

@keyframes data-flow {
  0% {
    opacity: 0;
    transform: scaleY(0);
  }
  50% {
    opacity: 0.6;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(0);
  }
}

/* Enhanced pulse effect for the outer glow */
@keyframes pulse-outer-glow {
  0% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

/* 3D floating elements with improved depth */
.floating-elements {
  animation: slow-rotation 60s linear infinite;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.floating-element {
  position: absolute;
  border-radius: 4px;
  box-shadow: 0 0 25px rgba(0, 150, 255, 0.4), inset 0 0 10px rgba(0, 240, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 150, 255, 0.2), rgba(123, 0, 255, 0.2));
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 240, 255, 0.3);
  animation: element-float 15s ease-in-out infinite;
  transform-style: preserve-3d;
}

/* Custom positioning and sizes for each floating element */
.floating-element:nth-child(1) {
  width: 40px;
  height: 60px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  width: 50px;
  height: 50px;
  top: 60%;
  left: 80%;
  animation-delay: 1s;
}

.floating-element:nth-child(3) {
  width: 70px;
  height: 30px;
  top: 40%;
  left: 70%;
  animation-delay: 2s;
}

.floating-element:nth-child(4) {
  width: 35px;
  height: 65px;
  top: 75%;
  left: 30%;
  animation-delay: 1.5s;
}

.floating-element:nth-child(5) {
  width: 60px;
  height: 40px;
  top: 15%;
  left: 60%;
  animation-delay: 0.5s;
}

.floating-element:nth-child(6) {
  width: 45px;
  height: 45px;
  top: 50%;
  left: 20%;
  animation-delay: 2.5s;
}

.floating-element:nth-child(7) {
  width: 55px;
  height: 25px;
  top: 80%;
  left: 55%;
  animation-delay: 1.2s;
}

.floating-element:nth-child(8) {
  width: 30px;
  height: 70px;
  top: 30%;
  left: 85%;
  animation-delay: 0.8s;
}

@keyframes element-float {
  0%, 100% {
    transform: translateZ(10px) translateY(0);
  }
  25% {
    transform: translateZ(30px) translateY(-15px) rotateX(5deg);
  }
  50% {
    transform: translateZ(20px) translateY(5px) rotateY(10deg);
  }
  75% {
    transform: translateZ(40px) translateY(10px) rotateX(-5deg);
  }
}

/* Code stream visualization with syntax highlighting */
.code-stream {
  position: absolute;
  color: rgba(0, 240, 255, 0.2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  white-space: pre;
  overflow: hidden;
  opacity: 0;
  animation: code-appear 20s linear infinite;
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
  pointer-events: none;
  z-index: 1;
}

/* Position multiple code streams across the hero section */
.code-stream:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.code-stream:nth-child(2) { top: 25%; left: 85%; animation-delay: 5s; }
.code-stream:nth-child(3) { top: 60%; left: 15%; animation-delay: 10s; }
.code-stream:nth-child(4) { top: 80%; left: 75%; animation-delay: 15s; }

.code-stream .keyword { color: rgba(200, 100, 255, 0.5); }
.code-stream .string { color: rgba(100, 255, 150, 0.5); }
.code-stream .number { color: rgba(255, 150, 100, 0.5); }
.code-stream .comment { color: rgba(150, 150, 150, 0.5); }

@keyframes code-appear {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  10% {
    opacity: 0.7;
    transform: translateY(0);
  }
  90% {
    opacity: 0.7;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Interactive tech specs with hover effects */
.tech-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.tech-spec {
  display: flex;
  align-items: center;
  background: rgba(10, 20, 40, 0.6);
  border: 1px solid rgba(0, 150, 255, 0.3);
  border-radius: 30px;
  padding: 8px 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.tech-spec i {
  margin-right: 8px;
  color: #00d4ff;
  transition: transform 0.3s ease;
}

.tech-spec:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 150, 255, 0.2);
  border-color: rgba(0, 240, 255, 0.6);
  background: rgba(15, 30, 60, 0.8);
}

.tech-spec:hover i {
  transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .floating-element {
    /* Scale down on mobile */
    transform: scale(0.8);
  }
  
  .tech-specs {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .data-stream, 
  .code-stream {
    display: none; /* Hide more complex animations on mobile for performance */
  }
}
