/* ===== Additional Modern Effects ===== */

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Text selection styling */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Enhanced card hover effects */
.project-card,
.competency-card,
.education-card {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.project-card::before,
.competency-card::before,
.education-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
    z-index: 1;
    pointer-events: none;
}

.project-card:hover::before,
.competency-card:hover::before,
.education-card:hover::before {
    left: 100%;
}

/* Floating animation for icons */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.competency-card i,
.skill-category i {
    animation: float 3s ease-in-out infinite;
}

.competency-card:nth-child(2) i {
    animation-delay: 0.5s;
}

.competency-card:nth-child(3) i {
    animation-delay: 1s;
}

.competency-card:nth-child(4) i {
    animation-delay: 1.5s;
}

/* Gradient text effect */
.gradient-text-animated {
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb, #4facfe);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

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

/* Button ripple effect */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

/* Enhanced navbar glassmorphism on scroll */
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated gradient border for cards */
@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.project-card,
.education-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid transparent;
}

.project-card::after,
.education-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover::after,
.education-card:hover::after {
    opacity: 1;
}

/* Enhanced form input focus effects */
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Skill progress bar shine effect */
.skill-progress-bar {
    position: relative;
    overflow: hidden;
}

.skill-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Social links enhanced hover */
.social-links a {
    position: relative;
    transition: var(--transition);
}

.social-links a::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.social-links a:hover::before {
    opacity: 0.2;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Pulse animation for CTA buttons */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.8);
    }
}

.btn-primary {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Enhanced profile image border animation */
.profile-image-wrapper::before {
    animation: rotateBorder 8s linear infinite;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .project-card:hover::after,
    .education-card:hover::after {
        opacity: 0.5;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
