/* Modern Glass morphism and Advanced Effects */

body {
    background: linear-gradient(to bottom, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 0.3) 0px, transparent 50%),
                radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 0.2) 0px, transparent 50%),
                radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 0.2) 0px, transparent 50%),
                radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 0.3) 0px, transparent 50%);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
    animation: meshMove 20s ease infinite;
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(50px, 50px); }
}

/* Glassmorphism Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Enhanced Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4) !important;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5) !important;
}

/* Profile Image with Rotating Gradient */
.profile-image-wrapper::before {
    filter: blur(20px) !important;
    opacity: 0.8 !important;
}

.profile-image-wrapper::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: conic-gradient(from 0deg, #667eea, #764ba2, #f093fb, #667eea);
    border-radius: 50%;
    z-index: -2;
    animation: rotate 4s linear infinite;
    filter: blur(10px);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.profile-image {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-image:hover {
    transform: scale(1.05);
}

/* Glassmorphism Cards */
.competency-card,
.timeline-content,
.project-card,
.skill-category,
.education-card,
.cert-card,
.contact-form {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-radius: 24px !important;
}

/* Card Hover Effects */
.competency-card {
    position: relative;
    overflow: hidden;
}

.competency-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

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

.competency-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15) !important;
    border-color: var(--primary-color) !important;
}

.competency-icon {
    width: 70px !important;
    height: 70px !important;
    border-radius: 20px !important;
    font-size: 2rem !important;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3) !important;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.competency-card:hover .competency-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4) !important;
}

/* Timeline */
.timeline-content {
    position: relative;
    overflow: hidden;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-primary);
    transition: height 0.3s ease;
}

.timeline-content:hover::before {
    height: 100%;
}

.timeline-content:hover {
    transform: translateX(10px) translateY(-5px) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15) !important;
}

/* Projects */
.project-card {
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card:hover::after {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2) !important;
}

/* Skills */
.skill-category {
    position: relative;
}

.skill-category::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15) !important;
}

.skill-tag:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3) !important;
}

/* Education */
.education-card:hover {
    transform: translateY(-8px) scale(1.01) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15) !important;
}

.education-icon {
    width: 90px !important;
    height: 90px !important;
    border-radius: 24px !important;
    font-size: 2.2rem !important;
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3) !important;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.education-card:hover .education-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4) !important;
}

/* Certifications */
.cert-card:hover {
    transform: translateY(-5px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15) !important;
    border-color: var(--primary-color) !important;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.form-group input,
.form-group textarea {
    background: rgba(248, 250, 252, 0.5) !important;
    backdrop-filter: blur(5px);
    border-radius: 12px !important;
}

.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
    transform: translateY(-2px);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-image {
    animation: float 6s ease-in-out infinite;
}

/* Scroll Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Social Links Enhanced */
.social-link:hover,
.social-btn:hover {
    transform: translateY(-5px) rotate(5deg) !important;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3) !important;
}

/* Custom Cursor */
.custom-cursor {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.3s ease;
    mix-blend-mode: difference;
}

.custom-cursor-dot {
    width: 8px;
    height: 8px;
    background: rgba(99, 102, 241, 0.8);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.8);
}

.custom-cursor-dot.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
}

.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(5px);
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::after {
    opacity: 1;
}

/* Particle Canvas */
#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

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

/* Typing Effect */
.rotating-text {
    display: inline-block;
    min-height: 1.5em;
    color: var(--primary-color);
    font-weight: 600;
}

/* Enhanced Section Titles */
.section-title {
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.5;
}

/* Project Card Enhanced */
.project-header {
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.6s ease;
}

.project-card:hover .project-header::before {
    transform: translate(-50%, -50%) scale(1);
}

/* Tech Tag Animations */
.tech-tag {
    position: relative;
    overflow: hidden;
}

.tech-tag::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;
}

.tech-tag:hover::before {
    left: 100%;
}

/* Timeline Enhanced */
.timeline-marker {
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 20px rgba(99, 102, 241, 0.5);
    animation: pulse-marker 2s ease-in-out infinite;
}

@keyframes pulse-marker {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--bg-primary), 0 0 20px rgba(99, 102, 241, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px var(--bg-primary), 0 0 30px rgba(99, 102, 241, 0.8);
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 9999;
    transform-origin: left;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.5);
}

/* Loading Animation */
.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Cursor - Hide on mobile */
@media (max-width: 768px) {
    .custom-cursor,
    .custom-cursor-dot {
        display: none;
    }
}

/* Enhanced Hover States */
.social-link,
.social-btn {
    position: relative;
    overflow: hidden;
}

.social-link::before,
.social-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.social-link:hover::before,
.social-btn:hover::before {
    opacity: 1;
}

/* Form Success/Error Animations */
.form-status {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Competency Cards */
.competency-card h4 {
    position: relative;
    display: inline-block;
}

.competency-card h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.competency-card:hover h4::after {
    width: 100%;
}

/* Certification Cards Shine Effect */
.cert-card {
    position: relative;
    overflow: hidden;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.cert-card:hover::before {
    opacity: 1;
    left: 100%;
    top: 100%;
}

/* Text Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* Smooth Scroll Snap */
html {
    scroll-snap-type: y proximity;
}

section {
    scroll-snap-align: start;
}
