/* Dark theme animations - slow, melancholic animations */

/* Slow pulse animation for subtle elements */
@keyframes slowPulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Slow fade-in animation */
@keyframes slowFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fade-in {
    animation: slowFadeIn 1.5s ease-in;
}

/* Content transition animation */
@keyframes contentFade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.content-transition {
    animation: contentFade 1s ease-out;
}

/* Staggered content loading for list items */
.stagger-item {
    opacity: 0;
    animation: contentFade 0.8s ease-out forwards;
}

/* Generate staggered delays for up to 20 items */
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }
.stagger-item:nth-child(6) { animation-delay: 0.6s; }
.stagger-item:nth-child(7) { animation-delay: 0.7s; }
.stagger-item:nth-child(8) { animation-delay: 0.8s; }
.stagger-item:nth-child(9) { animation-delay: 0.9s; }
.stagger-item:nth-child(10) { animation-delay: 1s; }
.stagger-item:nth-child(11) { animation-delay: 1.1s; }
.stagger-item:nth-child(12) { animation-delay: 1.2s; }
.stagger-item:nth-child(13) { animation-delay: 1.3s; }
.stagger-item:nth-child(14) { animation-delay: 1.4s; }
.stagger-item:nth-child(15) { animation-delay: 1.5s; }
.stagger-item:nth-child(16) { animation-delay: 1.6s; }
.stagger-item:nth-child(17) { animation-delay: 1.7s; }
.stagger-item:nth-child(18) { animation-delay: 1.8s; }
.stagger-item:nth-child(19) { animation-delay: 1.9s; }
.stagger-item:nth-child(20) { animation-delay: 2s; }

/* Slow wave animation for background elements */
@keyframes slowWave {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.floating-element {
    animation: slowWave 6s ease-in-out infinite;
}

/* Delayed floating elements for more organic feel */
.floating-delay-1 {
    animation-delay: 1s;
}

.floating-delay-2 {
    animation-delay: 2s;
}

.floating-delay-3 {
    animation-delay: 3s;
}

/* Subtle text blur on hover */
@keyframes subtleBlur {
    0% { text-shadow: 0 0 0 rgba(150, 150, 150, 0); }
    50% { text-shadow: 0 0 3px rgba(150, 150, 150, 0.3); }
    100% { text-shadow: 0 0 0 rgba(150, 150, 150, 0); }
}

.text-blur:hover {
    animation: subtleBlur 3s ease-in-out;
}

/* Slow rotation animation */
@keyframes slowRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rotating-slow {
    animation: slowRotate 12s linear infinite;
}

/* Rain/falling effect for special pages */
@keyframes fall {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(100vh);
    }
}

.rain-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
}

.raindrop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(to bottom, transparent, rgba(150, 150, 150, 0.5));
    border-radius: 0 0 5px 5px;
    animation: fall linear infinite;
}

/* Generate 20 random raindrops */
.raindrop:nth-child(1) { left: 5%; animation-duration: 7s; animation-delay: 0s; }
.raindrop:nth-child(2) { left: 10%; animation-duration: 6s; animation-delay: 0.5s; }
.raindrop:nth-child(3) { left: 15%; animation-duration: 8s; animation-delay: 1s; }
.raindrop:nth-child(4) { left: 20%; animation-duration: 5s; animation-delay: 1.5s; }
.raindrop:nth-child(5) { left: 25%; animation-duration: 7.5s; animation-delay: 2s; }
.raindrop:nth-child(6) { left: 30%; animation-duration: 6.5s; animation-delay: 2.5s; }
.raindrop:nth-child(7) { left: 35%; animation-duration: 8.5s; animation-delay: 3s; }
.raindrop:nth-child(8) { left: 40%; animation-duration: 7s; animation-delay: 3.5s; }
.raindrop:nth-child(9) { left: 45%; animation-duration: 6s; animation-delay: 4s; }
.raindrop:nth-child(10) { left: 50%; animation-duration: 8s; animation-delay: 4.5s; }
.raindrop:nth-child(11) { left: 55%; animation-duration: 7.5s; animation-delay: 5s; }
.raindrop:nth-child(12) { left: 60%; animation-duration: 6.5s; animation-delay: 5.5s; }
.raindrop:nth-child(13) { left: 65%; animation-duration: 8.5s; animation-delay: 6s; }
.raindrop:nth-child(14) { left: 70%; animation-duration: 7s; animation-delay: 6.5s; }
.raindrop:nth-child(15) { left: 75%; animation-duration: 6s; animation-delay: 7s; }
.raindrop:nth-child(16) { left: 80%; animation-duration: 8s; animation-delay: 7.5s; }
.raindrop:nth-child(17) { left: 85%; animation-duration: 7.5s; animation-delay: 8s; }
.raindrop:nth-child(18) { left: 90%; animation-duration: 6.5s; animation-delay: 8.5s; }
.raindrop:nth-child(19) { left: 95%; animation-duration: 8.5s; animation-delay: 9s; }
.raindrop:nth-child(20) { left: 98%; animation-duration: 7s; animation-delay: 9.5s; }

/* Fog effect for background areas */
@keyframes fogAnimation {
    0% { 
        transform: translateX(-10%) translateY(0);
        opacity: 0.3;
    }
    50% {
        opacity: 0.4;
    }
    100% { 
        transform: translateX(10%) translateY(0);
        opacity: 0.3;
    }
}

.fog-container {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30vh;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}

.fog-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(50, 50, 50, 0.2) 0%, rgba(50, 50, 50, 0) 70%);
    animation: fogAnimation 35s ease-in-out infinite alternate;
}

.fog-layer:nth-child(2) {
    animation-duration: 45s;
    animation-delay: 5s;
    background: radial-gradient(ellipse at center, rgba(60, 60, 60, 0.15) 0%, rgba(60, 60, 60, 0) 70%);
}

.fog-layer:nth-child(3) {
    animation-duration: 55s;
    animation-delay: 10s;
    background: radial-gradient(ellipse at center, rgba(40, 40, 40, 0.1) 0%, rgba(40, 40, 40, 0) 70%);
}

/* Typing animation for messages */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: rgba(150, 150, 150, 0.75); }
}

.typing-animation {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid;
    width: 0;
    animation: 
        typing 3.5s steps(40, end) forwards,
        blink-caret 0.75s step-end infinite;
}

/* Slow spotlight effect */
@keyframes spotlight {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

.spotlight-text {
    background: linear-gradient(90deg, 
                var(--text-main) 0%, 
                var(--text-bright) 25%, 
                var(--text-main) 50%);
    background-size: 200% auto;
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    animation: spotlight 8s linear infinite;
}

/* Monochrome image filter with hover reveal */
.monochrome-img {
    filter: grayscale(100%) contrast(0.8) brightness(0.9);
    transition: all 1.5s ease;
}

.monochrome-img:hover {
    filter: grayscale(50%) contrast(1) brightness(1);
}

/* Slow entrance animations for pages */
@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-enter {
    animation: fadeSlideUp 1.2s ease-out forwards;
}

/* Staggered entrance for page elements */
.enter-delay-1 { animation-delay: 0.2s; }
.enter-delay-2 { animation-delay: 0.4s; }
.enter-delay-3 { animation-delay: 0.6s; }
.enter-delay-4 { animation-delay: 0.8s; }
.enter-delay-5 { animation-delay: 1s; } 