/* Orbiting tech icon cloud — pure CSS animation */
.orbit-container {
  position: relative;
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1;
  margin: 0 auto;
}

/* Central code icon */
.orbit-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #374151, #111827);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.3), 0 0 80px rgba(147, 51, 234, 0.15);
}

.orbit-center::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.2);
  filter: blur(20px);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Orbit ring (the circular track) */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.orbit-ring--inner {
  width: 55%;
  height: 55%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.08), inset 0 0 30px rgba(6, 182, 212, 0.05);
}

.orbit-ring--outer {
  width: 85%;
  height: 85%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 30px rgba(147, 51, 234, 0.08), inset 0 0 30px rgba(147, 51, 234, 0.05);
}

/* Rotating wrapper — spins the entire orbit ring's icons */
.orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
}

.orbit-track--inner {
  width: 55%;
  height: 55%;
  transform: translate(-50%, -50%);
  animation: orbit-spin 25s linear infinite;
}

.orbit-track--outer {
  width: 85%;
  height: 85%;
  transform: translate(-50%, -50%);
  animation: orbit-spin 40s linear infinite reverse;
}

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

/* Individual icon positioned on the ring edge */
.orbit-icon {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(31, 41, 55, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.orbit-icon:hover {
  transform: scale(1.3) !important;
  z-index: 20;
}

.orbit-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Counter-rotate icons so they stay upright */
.orbit-track--inner .orbit-icon {
  animation: counter-spin 25s linear infinite;
}

.orbit-track--outer .orbit-icon {
  animation: counter-spin 40s linear infinite reverse;
}

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

/* Tooltip on hover */
.orbit-icon .orbit-tooltip {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.orbit-icon:hover .orbit-tooltip {
  opacity: 1;
}

/* Position icons evenly around the ring edge */
/* Inner ring: top, 120deg, 240deg */
.orbit-track--inner .orbit-icon:nth-child(1) { top: 0; left: 50%; transform: translate(-50%, -50%); }
.orbit-track--inner .orbit-icon:nth-child(2) { bottom: 13%; right: 0; transform: translate(50%, 50%); }
.orbit-track--inner .orbit-icon:nth-child(3) { bottom: 13%; left: 0; transform: translate(-50%, 50%); }

/* Outer ring: 5 icons evenly distributed (pentagon) */
.orbit-track--outer .orbit-icon:nth-child(1) { top: 0; left: 50%; transform: translate(-50%, -50%); }
.orbit-track--outer .orbit-icon:nth-child(2) { top: 20%; right: 0; transform: translate(50%, -50%); }
.orbit-track--outer .orbit-icon:nth-child(3) { bottom: 6%; right: 6%; transform: translate(50%, 50%); }
.orbit-track--outer .orbit-icon:nth-child(4) { bottom: 6%; left: 6%; transform: translate(-50%, 50%); }
.orbit-track--outer .orbit-icon:nth-child(5) { top: 20%; left: 0; transform: translate(-50%, -50%); }

/* Pause animation on container hover */
.orbit-container:hover .orbit-track {
  animation-play-state: paused;
}

.orbit-container:hover .orbit-icon {
  animation-play-state: paused;
}

/* Responsive */
@media (max-width: 640px) {
  .orbit-icon { width: 36px; height: 36px; padding: 6px; }
  .orbit-center { width: 60px; height: 60px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .orbit-track, .orbit-icon { animation: none !important; }
}
