/* Custom Properties for Purple Premium Theme */
:root {
    --purple-primary: #7F52FF;
    --purple-light: #9B7BFF;
    --purple-dark: #5E3AD9;
    --purple-glow: rgba(127, 82, 255, 0.4);
    --bg-dark: #0a0a0a;
    --bg-card: rgba(25, 20, 45, 0.85);
}

/* Global Background */
body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
    min-height: 100vh;
}

/* Background Glow Effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(127, 82, 255, 0.08), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, #7F52FF, #9B7BFF, #C084FC, #A855F7, #7F52FF);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 5s ease infinite;
    filter: drop-shadow(0 0 15px rgba(127, 82, 255, 0.3));
}

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

/* Premium Buttons */
.btn-primary {
    background: linear-gradient(135deg, #7F52FF 0%, #9B7BFF 50%, #A855F7 100%);
    background-size: 200% auto;
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(127, 82, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6B3FEA 0%, #7F52FF 50%, #9B7BFF 100%);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(127, 82, 255, 0.5);
}

.btn-primary:active {
    transform: translateY(0px);
}

/* Profile Image Animation */
.glow-pulse {
    animation: floatGlow 3s ease-in-out infinite;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 0 0 25px rgba(127, 82, 255, 0.3), 0 10px 20px -5px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: translateY(-12px);
        box-shadow: 0 0 50px rgba(127, 82, 255, 0.6), 0 20px 30px -8px rgba(0, 0, 0, 0.4);
    }
}

/* Glassmorphism Cards */
.stat-card,
.project-card,
.tool-card,
.contact-glass-card {
    background: rgba(25, 20, 45, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(127, 82, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover,
.project-card:hover,
.tool-card:hover {
    background: rgba(35, 25, 55, 0.95);
    transform: translateY(-8px);
    border-color: rgba(127, 82, 255, 0.5);
    box-shadow: 0 20px 35px -12px rgba(127, 82, 255, 0.25);
}

/* Skill Bars */
.skill-bar {
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

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

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-child {
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.8s ease;
}

.reveal.active .reveal-child {
    opacity: 1;
    transform: translateY(0);
}

.reveal.active .reveal-child:nth-child(1) { transition-delay: 0s; }
.reveal.active .reveal-child:nth-child(2) { transition-delay: 0.1s; }
.reveal.active .reveal-child:nth-child(3) { transition-delay: 0.2s; }
.reveal.active .reveal-child:nth-child(4) { transition-delay: 0.3s; }

/* Loading Bar */
.loading-bar {
    width: 0%;
    animation: progress 2.5s ease-in-out forwards;
}

@keyframes progress {
    0% { width: 0%; }
    30% { width: 40%; }
    70% { width: 85%; }
    100% { width: 100%; }
}

/* Social Icons Hover */
.social-icon:hover {
    transform: translateY(-3px);
    background: #7F52FF !important;
    border-color: #7F52FF !important;
}

.social-icon:hover i {
    color: white !important;
}

/* Counter Animation */
.counter {
    transition: all 0.4s ease;
}

.live-card {
    background: linear-gradient(135deg, #1a1535, #2a2050);
    box-shadow: 0 0 30px rgba(127, 82, 255, 0.45);
    transform: translateY(-4px);
}

/* Pulse Icon */
.pulse-icon {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 0px #7F52FF); }
    50% { transform: scale(1.12); opacity: 0.8; filter: drop-shadow(0 0 10px #7F52FF); }
}

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

::-webkit-scrollbar-track {
    background: #1a0a2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7F52FF, #A855F7);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9B7BFF, #C084FC);
}

/* Section Heading Underline */
section h2 {
    position: relative;
    display: inline-block;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #7F52FF, #C084FC);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .glow-pulse {
        animation: floatGlow 3s ease-in-out infinite;
    }
    
    @keyframes floatGlow {
        0%, 100% { transform: translateY(0px); }
        50% { transform: translateY(-6px); }
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal, .skill-bar, .glow-pulse, .pulse-icon {
        animation: none !important;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        filter: none;
    }
}