/* Basic animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

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

@keyframes float-custom {
    0%, 100% { transform: translateY(0) rotate(-6deg); }
    50% { transform: translateY(-8px) rotate(-6deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-10px) rotate(45deg); }
}

/* Non-rotating float animations for stats */
@keyframes float-no-rotate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes float-slow-no-rotate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes float-delay-no-rotate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* Timeline animations */
@keyframes timeline-travel-1 {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes timeline-travel-2 {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    85% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes timeline-travel-3 {
    0% { top: 0%; opacity: 0; }
    30% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes ping-slow {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    80%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Scroll reveal animations */
@keyframes reveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-element {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Animation classes */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 7s ease-in-out infinite;
}

.animate-float-custom {
    animation: float-custom 9s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

/* Non-rotating animation classes for stats */
.animate-float-no-rotate {
    animation: float-no-rotate 6s ease-in-out infinite;
}

.animate-float-slow-no-rotate {
    animation: float-slow-no-rotate 7s ease-in-out infinite;
}

.animate-float-delay-no-rotate {
    animation: float-delay-no-rotate 8s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

.animate-ping-slow {
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-timeline-travel-1 {
    animation: timeline-travel-1 15s ease-in-out infinite;
}

.animate-timeline-travel-2 {
    animation: timeline-travel-2 18s ease-in-out infinite;
    animation-delay: 3s;
}

.animate-timeline-travel-3 {
    animation: timeline-travel-3 12s ease-in-out infinite;
    animation-delay: 6s;
}

/* Aspect ratio utilities for the About section */
.aspect-w-4 {
    position: relative;
    padding-bottom: calc(var(--tw-aspect-h) / var(--tw-aspect-w) * 100%);
    --tw-aspect-w: 4;
}

.aspect-h-3 {
    --tw-aspect-h: 3;
}

.aspect-w-4 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Core Animations */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Data dot animations for the hero section */
@keyframes moveAlongPath1 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-130px, -130px); }
    100% { transform: translate(0, 0); }
}

@keyframes moveAlongPath2 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-130px, 130px); }
    100% { transform: translate(0, 0); }
}

@keyframes moveAlongPath3 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(130px, -130px); }
    100% { transform: translate(0, 0); }
}

@keyframes moveAlongPath4 {
    0% { transform: translate(0, 0); }
    50% { transform: translate(130px, 130px); }
    100% { transform: translate(0, 0); }
}

/* Particle animations */
.particle {
    position: absolute;
    width: var(--size);
    height: var(--size);
    background-color: rgba(61, 82, 160, 0.3);
    border-radius: 50%;
    top: var(--top);
    left: var(--left);
    animation: particleFloat var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(30px, 30px);
    }
    50% {
        transform: translate(0, 60px);
    }
    75% {
        transform: translate(-30px, 30px);
    }
}

/* Data dots */
.data-dot {
    width: 4px;
    height: 4px;
    background-color: rgba(61, 82, 160, 0.6);
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 0 5px rgba(61, 82, 160, 0.4);
}

/* Connection path animations */
.connection-path {
    stroke-dasharray: 5;
    animation: dash 20s linear infinite;
    opacity: 0.6;
    animation: dashOffset 30s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: 1000;
    }
}

@keyframes dashOffset {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: 100; }
}

/* Specialized Styles */
.perspective {
    transform-style: preserve-3d;
    perspective: 800px;
}

.rotate-y-\[-5deg\] {
    transform: rotateY(-5deg);
}

/* For responsiveness in SVG connections */
@media (max-width: 640px) {
    .connection-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .tech-element {
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .tech-element {
        transform: scale(0.8);
    }
}
