/* ===================================================================
   INTERACTIVE ENHANCEMENTS
   Advanced interactions and animations for engaging user experience
   =================================================================== */

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.magnetic-btn:hover {
    transform: scale(1.05);
}

/* Card 3D Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tilt-card:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Animated Skill Progress Bars */
.skill-progress-container {
    position: relative;
    width: 100%;
    height: 6px;
    background: var(--color-surface);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.skill-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 1), rgba(var(--color-primary-dark-rgb), 1));
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
    position: relative;
    overflow: hidden;
}

.skill-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skill-progress-bar.animate {
    width: var(--progress-width);
}

/* Animated Counter */
.counter {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 1), rgba(var(--color-primary-dark-rgb), 1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Interactive Project Cards with Image Zoom */
.project-card-modern .project-image-container {
    overflow: hidden;
    border-radius: 12px;
}

.project-card-modern:hover .project-image-container img {
    transform: scale(1.1);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(var(--color-primary-rgb), 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Parallax Scroll Effect */
.parallax-element {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glow Effect on Hover */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.5),
                0 0 40px rgba(var(--color-primary-rgb), 0.3),
                0 0 60px rgba(var(--color-primary-rgb), 0.2);
}

/* Smooth Reveal Animation */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Interactive Icon Bounce */
.bounce-icon {
    animation: bounce 2s infinite;
}

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

/* Copy to Clipboard Animation */
.copy-success {
    position: relative;
}

.copy-success::after {
    content: 'Copied!';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-success);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    animation: copyFeedback 2s ease;
}

@keyframes copyFeedback {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* Gradient Border Animation */
.animated-border {
    position: relative;
    background: var(--color-surface-light);
    border-radius: 16px;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(45deg, 
        rgba(var(--color-primary-rgb), 1),
        rgba(var(--color-primary-dark-rgb), 1),
        rgba(var(--color-primary-rgb), 1));
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderGradient 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

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

@keyframes borderGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

/* Pulse Animation for Important Elements */
.pulse-element {
    animation: pulse 2s ease-in-out infinite;
}

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

/* Interactive Background Gradient */
.gradient-bg {
    background: linear-gradient(-45deg, 
        rgba(var(--color-primary-rgb), 0.1),
        rgba(var(--color-primary-dark-rgb), 0.1),
        rgba(var(--color-primary-rgb), 0.05),
        rgba(var(--color-primary-dark-rgb), 0.05));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Underline Slide Effect for Links */
.underline-slide {
    position: relative;
    text-decoration: none;
}

.underline-slide::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(var(--color-primary-rgb), 1), rgba(var(--color-primary-dark-rgb), 1));
    transition: width 0.3s ease;
}

.underline-slide:hover::after {
    width: 100%;
}

/* Rotate on Hover */
.rotate-hover {
    transition: transform 0.3s ease;
}

.rotate-hover:hover {
    transform: rotate(5deg);
}

/* Scale Pulse on Hover */
.scale-pulse:hover {
    animation: scalePulse 0.6s ease;
}

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

/* Text Gradient Reveal */
.gradient-text-reveal {
    background: linear-gradient(90deg, 
        rgba(var(--color-primary-rgb), 1) 0%,
        rgba(var(--color-primary-dark-rgb), 1) 50%,
        rgba(var(--color-primary-rgb), 1) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShine 3s linear infinite;
}

@keyframes textShine {
    to {
        background-position: 200% center;
    }
}

/* Interactive Button States */
.interactive-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.interactive-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.interactive-btn:hover::before {
    width: 300%;
    height: 300%;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg,
        var(--color-surface) 0%,
        var(--color-surface-dark) 50%,
        var(--color-surface) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom Cursor Trail */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: rgba(var(--color-primary-rgb), 0.8);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.2s ease;
}

/* Easter Egg - Konami Code Success */
.konami-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.95), rgba(var(--color-primary-dark-rgb), 0.95));
    color: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    animation: konamiReveal 0.5s forwards;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes konamiReveal {
    to { opacity: 1; }
}
