/* Stylish Scroll Animations */

/* Base animation styles */
.animate {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.animate.animated {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* Fade in animations */
.fade-in-up {
    transform: translateY(30px);
}

.fade-in-down {
    transform: translateY(-30px);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.fade-in-scale {
    transform: scale(0.9);
}

/* Staggered animations for lists */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stagger-children.animated > * {
    opacity: 1;
    transform: translateY(0);
}

/* Hover animations */
.hover-float {
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(107, 75, 204, 0.4);
}

/* Gradient text animation */
.gradient-text {
    background: linear-gradient(90deg, var(--primary-pink) 0%, var(--light-purple) 50%, var(--primary-pink) 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientText 5s linear infinite;
}

@keyframes gradientText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Pulse animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

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

/* Glow animation */
.glow {
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(107, 75, 204, 0.3); }
    100% { box-shadow: 0 0 20px rgba(107, 75, 204, 0.6), 0 0 40px rgba(107, 75, 204, 0.3); }
}

/* Typing cursor animation */
.typing::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-pink), var(--light-purple));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Reveal animation for images */
.reveal-mask {
    position: relative;
    overflow: hidden;
}

.reveal-mask::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--deep-purple);
    transform: translateX(-100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.reveal-mask.animated::after {
    transform: translateX(100%);
}

/* Magnetic button effect */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Smooth page transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--deep-purple);
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.page-transition.active {
    transform: translateY(0);
}

/* Add a subtle parallax effect to backgrounds */
.parallax-bg {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Add animation to the scroll down indicator */
.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}
