/* ==================== PHASE 7: ADVANCED VISUAL EFFECTS ==================== */
/* Award-winning portfolio visual effects - Glassmorphism, Liquid Motion, Gradients */

/* ==================== CSS VARIABLES FOR EFFECTS ==================== */
:root {
    /* Glassmorphism */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-mesh: radial-gradient(at 40% 20%, rgba(99, 102, 241, 0.3) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, rgba(236, 72, 153, 0.2) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.2) 0px, transparent 50%);
    
    /* Animation Timings */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Light theme glass adjustments */
[data-theme="light"] {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ==================== 7A: GLASSMORPHIC UI DESIGN ==================== */

/* 7A.1 - Glassmorphic Cards Base */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
}

.glass-card:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--glass-shadow), 0 0 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-5px);
}

[data-theme="light"] .glass-card:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* Apply glass effect to project cards */
.project-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border) !important;
    border-radius: 20px !important;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
    pointer-events: none;
    z-index: 1;
}

.project-card:hover {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: var(--glass-shadow), 0 0 40px rgba(99, 102, 241, 0.2);
    transform: translateY(-8px) scale(1.02);
}

.project-card:hover::before {
    opacity: 1;
}

/* Course cards glass effect */
.course-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.course-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--glass-shadow), 0 0 40px rgba(99, 102, 241, 0.2);
    transform: translateY(-8px);
}

/* Certification cards glass effect */
.certification-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
}

.certification-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: var(--glass-shadow), 0 0 40px rgba(20, 184, 166, 0.2);
    transform: translateY(-8px);
}

/* Development cards glass effect */
.development-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
}

.development-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(236, 72, 153, 0.4);
    box-shadow: var(--glass-shadow), 0 0 40px rgba(236, 72, 153, 0.2);
    transform: translateY(-8px);
}

/* Research cards glass effect */
.research-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
}

/* Skill category glass effect */
.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    transition: all 0.3s var(--ease-smooth);
}

.skill-category:hover {
    background: rgba(30, 41, 59, 0.75);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}

.course-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s var(--ease-smooth);
    pointer-events: none;
}

.course-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: var(--glass-shadow), 0 0 30px rgba(99, 102, 241, 0.15);
    transform: translateY(-6px);
}

.course-card:hover::after {
    left: 100%;
}

/* Certification cards glass effect */
.certification-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
    position: relative;
}

.certification-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(20, 184, 166, 0.4);
    box-shadow: var(--glass-shadow), 0 0 30px rgba(20, 184, 166, 0.15);
    transform: translateY(-6px) rotateX(2deg);
}

/* Skills category cards glass effect */
.skill-category {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
}

.skill-category:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--glass-shadow), 0 0 25px rgba(99, 102, 241, 0.1);
}

/* Professional development cards */
.professional-dev-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: all 0.4s var(--ease-smooth);
}

.professional-dev-card:hover {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(236, 72, 153, 0.4);
    transform: translateY(-5px);
}

/* 7A.2 - Glassmorphic Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.7) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all 0.4s var(--ease-smooth);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9) !important;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3), 0 0 1px rgba(99, 102, 241, 0.5);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* 7A.3 - Glassmorphic Modals */
.project-modal-overlay,
.course-modal-overlay {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-modal-content,
.course-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: modalGlassIn 0.4s var(--ease-elastic);
}

@keyframes modalGlassIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
        backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        backdrop-filter: blur(30px);
    }
}

/* ==================== 7B: LIQUID MOTION EFFECTS ==================== */

/* Hero Background Blobs Container - uses existing .hero positioning from style.css */

.hero-blobs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* Blob 1 - Primary Indigo */
.blob-1 {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(40px);
    animation: blobMorph1 20s ease-in-out infinite, blobFloat1 15s ease-in-out infinite;
}

/* Blob 2 - Secondary Pink */
.blob-2 {
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    filter: blur(40px);
    animation: blobMorph2 25s ease-in-out infinite, blobFloat2 18s ease-in-out infinite;
}

/* Blob 3 - Accent Teal */
.blob-3 {
    position: absolute;
    top: 30%;
    left: 30%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, transparent 70%);
    border-radius: 50% 60% 40% 70% / 50% 70% 30% 60%;
    filter: blur(50px);
    animation: blobMorph3 18s ease-in-out infinite, blobFloat3 12s ease-in-out infinite;
}

@keyframes blobMorph1 {
    0%, 100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
    25% { border-radius: 50% 50% 40% 60% / 60% 40% 60% 40%; }
    50% { border-radius: 60% 40% 50% 50% / 50% 60% 40% 60%; }
    75% { border-radius: 45% 55% 60% 40% / 55% 45% 55% 45%; }
}

@keyframes blobMorph2 {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    33% { border-radius: 40% 60% 50% 50% / 40% 60% 40% 60%; }
    66% { border-radius: 50% 50% 60% 40% / 50% 40% 60% 50%; }
}

@keyframes blobMorph3 {
    0%, 100% { border-radius: 50% 60% 40% 70% / 50% 70% 30% 60%; }
    50% { border-radius: 70% 30% 60% 40% / 30% 60% 70% 40%; }
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(5deg); }
    66% { transform: translate(-20px, 20px) rotate(-3deg); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-40px, 20px) rotate(-5deg); }
    66% { transform: translate(30px, -30px) rotate(3deg); }
}

@keyframes blobFloat3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.1); }
}

/* Section Background Blobs */
.section-blob {
    position: absolute;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.5;
    z-index: 0;
}

.about-blob {
    top: 20%;
    right: -5%;
    width: 30%;
    height: 30%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: blobMorph1 25s ease-in-out infinite;
}

.skills-blob {
    bottom: 10%;
    left: -5%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.15) 0%, transparent 70%);
    animation: blobMorph2 30s ease-in-out infinite;
}

.contact-blob {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    animation: blobMorph3 22s ease-in-out infinite;
}

/* ==================== 7C: ANIMATED GRADIENT EFFECTS ==================== */

/* 7C.1 - Animated Gradient Backgrounds */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    animation: gradientShift 15s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 0%, 100% 0%, 50% 100%;
        opacity: 1;
    }
    33% {
        background-position: 100% 50%, 0% 100%, 100% 0%;
        opacity: 0.8;
    }
    66% {
        background-position: 50% 100%, 50% 0%, 0% 50%;
        opacity: 1;
    }
}

/* 7C.2 - Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientTextFlow 5s ease-in-out infinite;
}

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

/* Section titles with gradient */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: underlineGlow 3s ease-in-out infinite;
}

@keyframes underlineGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(99, 102, 241, 0.5); width: 60px; }
    50% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.8); width: 80px; }
}

/* 7C.3 - Gradient Border Effects */
.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: var(--gradient-primary);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s var(--ease-smooth);
}

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

/* Featured project gradient border */
.featured-project {
    position: relative;
}

.featured-project::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 300% 300%;
    border-radius: 22px;
    z-index: -1;
    animation: gradientBorderFlow 4s ease-in-out infinite;
}

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

/* ==================== 7D: SVG MORPHING SECTION DIVIDERS ==================== */

.section-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 2;
    pointer-events: none;
}

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 100px;
}

.section-divider .shape-fill {
    fill: var(--bg-light);
    transition: fill 0.3s ease;
}

/* Different fill colors for different sections */
.hero .section-divider .shape-fill {
    fill: var(--bg-light);
}

.about .section-divider .shape-fill,
.skills .section-divider .shape-fill {
    fill: var(--bg-dark);
}

[data-theme="light"] .section-divider .shape-fill {
    fill: var(--bg-light);
}

[data-theme="light"] .hero .section-divider .shape-fill {
    fill: #ffffff;
}

/* Hero already has relative positioning from style.css - no override needed */

/* Wave animation - subtle movement */
@media (prefers-reduced-motion: no-preference) {
    .wave-divider svg {
        animation: waveFloat 6s ease-in-out infinite;
    }
    
    @keyframes waveFloat {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(-10px); }
    }
}

/* ==================== 7F: ENHANCED HOVER EFFECTS ==================== */

/* Card lift and glow */
.hover-lift {
    transition: all 0.4s var(--ease-smooth);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.2);
}

/* Button hover effects */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-smooth);
}

.btn::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: width 0.6s var(--ease-smooth), height 0.6s var(--ease-smooth);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Magnetic button effect placeholder - handled by JS */
.btn-magnetic {
    transition: transform 0.2s var(--ease-smooth);
}

/* Link hover underline animation */
.animated-underline {
    position: relative;
    text-decoration: none;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s var(--ease-smooth);
    transform: translateX(-50%);
}

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

/* Image hover effects */
.image-hover-zoom {
    overflow: hidden;
}

.image-hover-zoom img {
    transition: transform 0.6s var(--ease-smooth);
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Shine sweep effect */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s var(--ease-smooth);
}

.shine-effect:hover::after {
    left: 100%;
}

/* ==================== 7G: PAGE TRANSITION EFFECTS ==================== */

/* Page load overlay */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.page-transition-overlay.hidden {
    animation: overlayFadeOut 0.8s var(--ease-smooth) forwards;
}

@keyframes overlayFadeOut {
    0% { opacity: 1; clip-path: circle(100% at 50% 50%); }
    100% { opacity: 0; clip-path: circle(0% at 50% 50%); }
}

/* Section reveal on scroll */
.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-smooth);
}

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

/* ==================== 7H: LOADING SKELETON SCREENS ==================== */

.skeleton {
    background: linear-gradient(90deg, 
        var(--bg-card) 0%, 
        rgba(99, 102, 241, 0.1) 50%, 
        var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.skeleton-card {
    background: var(--glass-bg);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.skeleton-image {
    width: 100%;
    height: 200px;
    margin-bottom: 15px;
}

.skeleton-title {
    width: 70%;
    height: 24px;
    margin-bottom: 10px;
}

.skeleton-text {
    width: 100%;
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    width: 60%;
}

/* ==================== 7I: NEUMORPHIC ACCENT ELEMENTS ==================== */

.neumorphic {
    background: var(--bg-light);
    border-radius: 16px;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.3),
        -8px -8px 16px rgba(255, 255, 255, 0.05);
    transition: all 0.3s var(--ease-smooth);
}

.neumorphic:hover {
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.3),
        -4px -4px 8px rgba(255, 255, 255, 0.05);
}

.neumorphic-inset {
    box-shadow: 
        inset 4px 4px 8px rgba(0, 0, 0, 0.3),
        inset -4px -4px 8px rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .neumorphic {
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.1),
        -8px -8px 16px rgba(255, 255, 255, 0.8);
}

/* ==================== 7J: AMBIENT BACKGROUND MOTION ==================== */

/* Floating particles container */
.ambient-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(99, 102, 241, 0.3);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

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

/* Gradient pulse background */
.gradient-pulse {
    animation: gradientPulse 8s ease-in-out infinite;
}

@keyframes gradientPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ==================== 7K: ANIMATED ICONS ==================== */

/* Icon bounce on view */
.icon-animate {
    transition: all 0.4s var(--ease-bounce);
}

.icon-animate.in-view {
    animation: iconBounceIn 0.6s var(--ease-bounce);
}

@keyframes iconBounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Icon hover effects */
.icon-hover-rotate:hover {
    transform: rotate(15deg) scale(1.1);
}

.icon-hover-bounce:hover {
    animation: iconBounce 0.5s var(--ease-bounce);
}

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

/* Hamburger to X morph */
.hamburger-morph {
    transition: all 0.3s var(--ease-smooth);
}

.hamburger-morph.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-morph.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-morph.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== PERFORMANCE & ACCESSIBILITY ==================== */

/* 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;
    }
    
    .blob-1, .blob-2, .blob-3,
    .section-blob,
    .ambient-particle {
        animation: none !important;
    }
    
    .hero::before {
        animation: none !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Disable heavy effects on mobile */
    .blob-1, .blob-2, .blob-3 {
        display: none;
    }
    
    .ambient-particles {
        display: none;
    }
    
    /* Simpler glass effect */
    .project-card,
    .course-card,
    .certification-card,
    .skill-category,
    .research-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    /* Disable heavy animations on mobile */
    .blob-1, .blob-2, .blob-3 {
        display: none;
    }
    
    .wave-divider {
        display: none;
    }
    
    /* Reduce animation complexity */
    .project-card:hover,
    .course-card:hover {
        transform: translateY(-4px);
    }
}

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .glass-card,
    .project-card,
    .course-card,
    .certification-card,
    .skill-category,
    .navbar {
        background: rgba(30, 41, 59, 0.95) !important;
    }
    
    [data-theme="light"] .glass-card,
    [data-theme="light"] .project-card,
    [data-theme="light"] .course-card,
    [data-theme="light"] .certification-card,
    [data-theme="light"] .skill-category,
    [data-theme="light"] .navbar {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}

/* 7A.2 - Glassmorphic Navbar on Scroll */
.navbar.scrolled {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* 7A.3 - Glassmorphic Modals */
.research-modal-overlay,
.course-modal-overlay,
.project-modal-overlay {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.research-modal-content,
.course-modal-content,
.project-modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* GPU acceleration hints */
.blob-1, .blob-2, .blob-3 {
    will-change: transform;
    transform: translateZ(0);
}

.skeleton-card {
    transition: opacity 0.3s ease;
}

.skeleton-card.fade-out {
    opacity: 0;
}

@media (max-width: 768px) {
    .blob-1, .blob-2, .blob-3 {
        will-change: auto;
    }
}

/* ==================== 7B: LIQUID MOTION - HERO BLOBS ==================== */
/* Blobs are created dynamically by visual-effects.js */

.hero-blobs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.blob-1, .blob-2, .blob-3 {
    position: absolute;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    filter: blur(40px);
    opacity: 0.2;
    animation: blobMorphHero 20s ease-in-out infinite;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    top: -10%;
    right: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    bottom: -10%;
    left: -10%;
    animation-delay: 7s;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

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

/* ==================== 7C: ANIMATED GRADIENT EFFECTS ==================== */

/* Gradient backgrounds for sections */
.hero,
.about,
.research,
.skills {
    position: relative;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    animation: sectionGradientShift 20s ease infinite;
    background-size: 200% 200%;
}

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

/* Animated gradient text */
.section-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 8s ease infinite;
}

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

/* GPA gradient pulse */
.gpa-value {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gpaGradientPulse 3s ease-in-out infinite;
}

@keyframes gpaGradientPulse {
    0%, 100% { 
        background-position: 0% 50%;
        opacity: 1;
    }
    50% { 
        background-position: 100% 50%;
        opacity: 0.8;
    }
}

/* ==================== 7D: SVG SECTION DIVIDERS ==================== */
/* NOTE: .wave-divider is used with .section-divider class which has position: absolute
   Do NOT set position: relative here as it would override and break layout */

.wave-divider {
    /* position is inherited from .section-divider (absolute) */
    transform: rotate(180deg);
}

.wave-divider svg {
    height: 80px;
}

.wave-fill {
    fill: var(--bg-light);
    animation: waveMotion 15s ease-in-out infinite;
    transform-origin: center;
}

@keyframes waveMotion {
    0%, 100% { transform: translateX(0) scaleY(1); }
    50% { transform: translateX(-25px) scaleY(1.05); }
}

[data-theme="light"] .wave-fill {
    fill: var(--bg-light);
}

/* ==================== 7F: ENHANCED HOVER EFFECTS ==================== */

/* Ken Burns zoom effect for project images */
.project-image {
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

.project-image img {
    transition: transform 0.6s var(--ease-smooth);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

/* Image overlay on hover */
.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* Button glow pulse */
.btn-primary,
.research-btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before,
.research-btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-primary:hover::before,
.research-btn-primary:hover::before {
    transform: translateX(100%);
}

/* Link underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Card lift with glow */
.project-card,
.course-card,
.certification-card,
.research-card {
    position: relative;
    transition: all 0.4s var(--ease-smooth);
}

.project-card:hover,
.course-card:hover,
.certification-card:hover,
.research-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 40px rgba(99, 102, 241, 0.2);
}
