/* Advanced Animations for Enhanced CV */

/* Particle Background Animation */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(34, 211, 238, 0.3);
    border-radius: 50%;
    animation: float-particle 20s infinite linear;
}

@keyframes float-particle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Advanced Text Effects */
.text-glow {
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5),
                 0 0 20px rgba(34, 211, 238, 0.3),
                 0 0 30px rgba(34, 211, 238, 0.2);
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #22d3ee;
    white-space: nowrap;
    animation: typewriter 3s steps(40) infinite,
               blink-cursor 0.5s step-end infinite;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-cursor {
    from, to { border-color: transparent; }
    50% { border-color: #22d3ee; }
}

/* Advanced Hover Effects */
.skill-card-advanced {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, rgba(30, 41, 59, 0.8), rgba(51, 65, 85, 0.6));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(34, 211, 238, 0.2);
    transition: all 0.3s ease;
}

.skill-card-advanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(34, 211, 238, 0.1),
        transparent,
        rgba(14, 165, 233, 0.1),
        transparent
    );
    animation: rotate-gradient 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-card-advanced:hover::before {
    opacity: 1;
}

@keyframes rotate-gradient {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Morphing Shapes */
.morph-shape {
    background: linear-gradient(45deg, #22d3ee, #0ea5e9);
    border-radius: 50%;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 50% 50% 50% 50%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 60% 40% 30% 70%;
        transform: rotate(90deg);
    }
    50% {
        border-radius: 30% 70% 60% 40%;
        transform: rotate(180deg);
    }
    75% {
        border-radius: 70% 30% 40% 60%;
        transform: rotate(270deg);
    }
}

/* Liquid Button Effect */
.liquid-button {
    position: relative;
    padding: 12px 24px;
    background: linear-gradient(45deg, #22d3ee, #0ea5e9);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.liquid-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.liquid-button:hover::before {
    width: 200%;
    height: 200%;
}

/* 3D Card Effect */
.card-3d {
    perspective: 1000px;
}

.card-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-3d:hover .card-inner {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Advanced Loading Animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22d3ee;
    margin-left: 4px;
    animation: loading-pulse 1.5s infinite;
}

@keyframes loading-pulse {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Neon Border Effect */
.neon-border {
    position: relative;
    background: rgba(30, 41, 59, 0.8);
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #22d3ee, #0ea5e9, #3b82f6, #22d3ee);
    background-size: 400% 400%;
    border-radius: 12px;
    z-index: -1;
    animation: neon-flow 3s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neon-border:hover::before {
    opacity: 1;
}

@keyframes neon-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.3);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.ripple:hover::before {
    width: 300%;
    height: 300%;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: #22d3ee;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0000;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #00ff00;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% {
        transform: translate(0);
    }
    15%, 49% {
        transform: translate(-2px, 1px);
    }
}

@keyframes glitch-2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% {
        transform: translate(0);
    }
    21%, 62% {
        transform: translate(2px, -1px);
    }
}

/* Magnetic Effect */
.magnetic {
    transition: transform 0.2s ease;
}

.magnetic:hover {
    transform: translate(0, -2px);
}

/* Smooth Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #22d3ee, #0ea5e9);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0ea5e9, #3b82f6);
}

/* Responsive Animations */
@media (max-width: 768px) {
    .particle {
        display: none;
    }
    
    .skill-card-advanced::before {
        display: none;
    }
    
    .card-3d:hover .card-inner {
        transform: none;
    }
}

/* Dark Mode Transitions */
.dark-mode-transition {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .gradient-text {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
}