:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --bg-dark: #0f0f23;
    --bg-light: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.03);
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #6b7280;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-elevated: 0 20px 40px rgba(0, 0, 0, 0.4);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 20px;
    --border-radius-sm: 10px;
    --border-radius-lg: 30px;
}

/* Light Theme Variables */
body.light-mode {
    --bg-dark: #f8fafc;
    --bg-light: #ffffff;
    --glass: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Grid overlay for subtle texture */
.grid-overlay {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -4;
    pointer-events: none;
    opacity: 0.5;
    animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.1; }
}

/* Advanced Multi-Layer Background Animation */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 25% 75%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.06) 0%, transparent 40%);
    z-index: -3;
    animation: morphingBg 40s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        conic-gradient(from 0deg at 30% 70%, transparent 0deg, rgba(99, 102, 241, 0.03) 60deg, transparent 120deg),
        conic-gradient(from 180deg at 70% 30%, transparent 0deg, rgba(236, 72, 153, 0.03) 60deg, transparent 120deg),
        linear-gradient(45deg, transparent 40%, rgba(6, 182, 212, 0.02) 50%, transparent 60%);
    z-index: -2;
    animation: geometricRotate 60s linear infinite;
}

/* Additional animated layer */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.4;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px;
    animation: meshMove 25s ease-in-out infinite;
    z-index: -1;
    pointer-events: none;
}

/* Remove all other background layers */
.aurora-layer,
.quantum-field,
.fractal-layer,
.plasma-layer,
.dna-helix,
.starfield,
.interactive-orbs {
    display: none;
}

/* OPTIMIZED ANIMATION KEYFRAMES - PERFORMANCE FOCUSED */

@keyframes cosmicFlow {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translate(20px, 15px) rotate(180deg);
        opacity: 1;
    }
}

@keyframes cosmicPulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

@keyframes energyFlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes waveShift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes auroraFlow {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.6;
    }
    50% {
        transform: translate(15px, -10px);
        opacity: 0.8;
    }
}

@keyframes quantumShift {
    0% { transform: translate(0, 0); }
    25% { transform: translate(5px, -8px); }
    50% { transform: translate(-3px, 10px); }
    75% { transform: translate(-6px, -4px); }
    100% { transform: translate(0, 0); }
}

@keyframes fractalSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes plasmaWave {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.5;
    }
    50% {
        transform: translate(10px, -15px);
        opacity: 0.7;
    }
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    50% {
        transform: translate(20px, -15px);
        opacity: 0.5;
    }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-20px, -20px) scale(1.05); }
    66% { transform: translate(20px, 20px) scale(0.95); }
}

@keyframes morphingBg {
    0%, 100% {
        transform: scale(1) rotate(0deg) translate(0, 0);
        opacity: 1;
    }
    25% {
        transform: scale(1.2) rotate(90deg) translate(-30px, -30px);
        opacity: 0.8;
    }
    50% {
        transform: scale(0.8) rotate(180deg) translate(30px, 30px);
        opacity: 0.9;
    }
    75% {
        transform: scale(1.1) rotate(270deg) translate(-20px, 20px);
        opacity: 0.7;
    }
}

@keyframes geometricRotate {
    0% {
        transform: rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        filter: hue-rotate(180deg);
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: hue-rotate(360deg);
    }
}

/* Advanced Floating particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: float 20s infinite linear;
    filter: blur(0.5px);
    opacity: 0.7;
}

.particle.large {
    width: 6px !important;
    height: 6px !important;
    animation-duration: 25s;
    filter: blur(1px);
}

.particle.small {
    width: 2px !important;
    height: 2px !important;
    animation-duration: 15s;
    filter: blur(0.2px);
}

@keyframes float {
    0% {
        transform: translateY(110vh) translateX(0) rotate(0deg) scale(0);
        opacity: 0;
    }
    5% {
        opacity: 0.7;
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(1);
    }
    50% {
        transform: translateY(50vh) translateX(50px) rotate(180deg) scale(1.2);
        opacity: 1;
    }
    95% {
        opacity: 0.7;
        transform: translateY(-5vh) translateX(-30px) rotate(350deg) scale(0.8);
    }
    100% {
        transform: translateY(-10vh) translateX(0) rotate(360deg) scale(0);
        opacity: 0;
    }
}

/* Glass Effect Header - Matches Background */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    padding: 1rem 0;
    background: var(--glass);
    backdrop-filter: blur(30px) saturate(1.2);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

header.scrolled {
    padding: 0.75rem 0;
    background: var(--glass-hover);
    backdrop-filter: blur(30px) saturate(1.2);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
    z-index: 2002;
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.8rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

nav a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Special styling for resume link */
.resume-link {
    background: var(--gradient-1) !important;
    color: var(--text-primary) !important;
    border-radius: 20px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
    transition: var(--transition-smooth) !important;
    will-change: transform, box-shadow, background;
}

.resume-link:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5) !important;
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%) !important;
    filter: brightness(1.05);
}

.resume-link:active {
    transform: translateY(-1px) scale(1.01) !important;
    transition: var(--transition-fast) !important;
}

/* Mobile Navigation */
.mobile-nav-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 2002;
}

.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 2rem;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 0 0 6rem;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-image {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    animation: rotate 2s linear infinite, pulse 1.5s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        opacity: 0.8; 
    }
    100% { 
        transform: scale(1.03); 
        opacity: 1; 
    }
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

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

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    margin-bottom: 0rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { filter: brightness(1) saturate(1); }
    100% { filter: brightness(1.2) saturate(1.3); }
}

.hero .subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 1s forwards;
}

.hero-name {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGlow 3s ease-in-out infinite alternate;
}

.hero-actions {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem; /* Increased gap between buttons */
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
}

.social-link {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-glow);
}

/* Directional tilt effects for social links */
.social-link:first-child:hover {
    transform: translateY(-5px) scale(1.1) rotate(-10deg);
}

.social-link:nth-child(2):hover {
    transform: translateY(-5px) scale(1.1) rotate(0deg);
}

.social-link:last-child:hover {
    transform: translateY(-5px) scale(1.1) rotate(10deg);
}

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

.social-link i {
    position: relative;
    z-index: 1;
}

/* Tooltip styles */
.social-link[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    z-index: 1000;
}

/* Status indicator styles */
.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--glass);
    backdrop-filter: blur(15px) saturate(1.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    font-size: 0.8rem;
    color: var(--text-primary);
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Hero stats styles */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    backdrop-filter: blur(15px) saturate(1.1);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Section subtitle */
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Skills section styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Center the last row if it has only one item */
.skills-grid .skill-category:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 50%;
}

.skill-category {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(25px) saturate(1.2);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-icon {
    font-size: 1.5rem;
    color: var(--primary);
}

.category-header h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-tag {
    background: rgba(99, 102, 241, 0.1); /* Using a colored, darker glass effect */
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2); /* Matching border */
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    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 ease;
    z-index: 1;
}

.skill-tag:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.2); /* Darken on hover */
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

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

/* Skill tag variations for different categories */
.skill-category:nth-child(1) .skill-tag:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.skill-category:nth-child(2) .skill-tag:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.skill-category:nth-child(3) .skill-tag:hover {
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.skill-category:nth-child(4) .skill-tag:hover {
    border-color: var(--success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Project enhancements */
.featured-project {
    position: relative;
    border: 2px solid var(--primary);
}

.project-badge {
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--gradient-1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0 10px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.project-status {
    position: absolute;
    top: -1px;
    left: 20px;
    background: var(--gradient-2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.project-highlights {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.highlight-item i {
    color: var(--accent);
    font-size: 0.8rem;
}

/* Button Styles */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, background;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%);
    filter: brightness(1.05);
}

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

.btn-primary:active {
    transform: translateY(-1px) scale(1.01);
    transition: var(--transition-fast);
}

.btn-primary i {
    position: relative;
    z-index: 1;
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

/* Text content positioning */
.btn-primary > * {
    position: relative;
    z-index: 1;
}

/* Secondary button styles */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
    backdrop-filter: blur(15px) saturate(1.1);
}

.btn-secondary:hover {
    transform: translateY(-2px) scale(1.02);
    border-color: var(--primary);
    background: var(--glass);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

/* Section Styles */
.section {
    margin-bottom: 4rem;
    opacity: 1;
    transform: translateY(0);
    transition: var(--transition);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-2);
    border-radius: 2px;
}

/* Glass Cards */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    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 ease;
    z-index: 1;
}

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

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Ensure project card content doesn't get blurred */
.project-card:hover * {
    filter: none !important;
    backdrop-filter: none !important;
}
/* Education Grid */
.education-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.education-card {
    position: relative;
}

.education-card h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.institution {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.grade {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Handle last row centering for projects */
.projects-grid .project-card:last-child:nth-child(3n+1) {
    grid-column: 2 / 3;
}

.projects-grid .project-card:nth-last-child(2):nth-child(3n+1) {
    grid-column: 1 / 2;
    margin-left: auto;
}

.projects-grid .project-card:nth-last-child(1):nth-child(3n+2) {
    grid-column: 3 / 4;
    margin-right: auto;
}

.project-card {
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    /* Remove all transform and movement effects */
    transform: none !important;
}

/* Ensure no child elements have transform effects except project images */
.project-card:hover *:not(.project-image):not(.project-image img),
.project-card:hover *:hover:not(.project-image):not(.project-image img) {
    transform: none !important;
}

/* Prevent any blur effects on project card children */
.project-card:hover h3,
.project-card:hover .project-description,
.project-card:hover .tech-stack,
.project-card:hover .project-highlights,
.project-card:hover .project-links,
.project-card:hover .project-image img,
.project-card:hover .project-link {
    filter: none !important;
    backdrop-filter: none !important;
}

.project-card h3 {
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Project Image Styles */
.project-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    position: relative;
    background: var(--glass);
    border: 1px solid var(--glass-border);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 15px;
}

.project-image {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-image:hover {
    transform: scale(1.2);
    z-index: 10;
    overflow: visible;
}

.project-image:hover img {
    transform: none;
}

.project-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(99, 102, 241, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 15px;
    pointer-events: none;
}

/* Remove the tint overlay effect on project images */
.project-card:hover .project-image::after {
    opacity: 0 !important;
}


.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem; /* Add space below the buttons */
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
.project-link {
    animation: projectPulse 1.2s infinite cubic-bezier(0.4, 0, 0.6, 1) !important;
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7) !important;
    position: relative;
    z-index: 2;
}
@keyframes projectPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    60% {
        transform: scale(1.12);
        box-shadow: 0 0 0 18px rgba(99, 102, 241, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}
}

.project-link:hover {
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.youtube-link {
    background: var(--gradient-2);
}

.youtube-link:hover {
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.3);
}

/* Experience Section */
.experience-card {
    position: relative;
    padding-left: 2rem;
}

.experience-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-3);
    border-radius: 2px;
}

.experience-card h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.experience-duration {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

.experience-list {
    list-style: none;
}

.experience-list li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.experience-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Certifications */
.cert-grid {
    display: grid;
    gap: 1rem;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    transition: var(--transition);
}

.cert-item:hover {
    transform: translateX(10px);
    border-color: rgba(255, 255, 255, 0.2);
}

.cert-icon {
    font-size: 2rem;
    width: 60px;
    text-align: center;
}

.cert-icon.aws { color: #ff9900; }
.cert-icon.coursera { color: #0056d3; }
.cert-icon.trophy { color: #ffd700; }
.cert-icon.users { color: var(--accent); }

.cert-content h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cert-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Contact Section */
.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.2);
}

.contact-icon {
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-item span {
    overflow-wrap: break-word;
    min-width: 0;
}

/* Enhanced Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-logo {
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--secondary);
    border-radius: 50%;
    animation: loadingSpin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    position: relative;
}

.loading-logo::before {
    content: 'V';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes loadingPulse {
    0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.2); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    nav {
        display: none;
    }
    
    .mobile-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        padding: 0;
        z-index: 2001;
        display: block;
    }
    
    .mobile-nav ul {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--glass);
        backdrop-filter: blur(30px) saturate(180%);
        border-top: 1px solid var(--glass-border);
        border-bottom: 1px solid var(--glass-border);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.25),
            0 0 60px rgba(99, 102, 241, 0.15);
        z-index: 2000;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        list-style: none;
        margin: 0;
        display: flex;
    }
    
    .mobile-nav ul.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-nav ul li {
        width: 100%;
        text-align: center;
    }
    
    .mobile-nav a {
        display: block;
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0.25rem 0;
        transition: all 0.3s ease;
        color: var(--text-primary);
        text-decoration: none;
    }

    .mobile-nav a:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    }

    .mobile-nav .resume-link {
        background: var(--gradient-1) !important;
        color: var(--text-primary) !important;
        font-weight: 600 !important;
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .mobile-nav .resume-link:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #667eea 100%) !important;
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5) !important;
        transform: translateY(-2px) !important;
    }
}

@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

/* Tablet breakpoint */
@media (max-width: 1024px) and (min-width: 769px) {
    .skills-grid {
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Adjust centering for 2-column layout */
    .projects-grid .project-card:last-child:nth-child(odd) {
        grid-column: 1 / 3;
        justify-self: center;
        max-width: 400px;
    }
    
    /* Reset 3-column specific rules for projects */
    .projects-grid .project-card:last-child:nth-child(3n+1),
    .projects-grid .project-card:nth-last-child(2):nth-child(3n+1),
    .projects-grid .project-card:nth-last-child(1):nth-child(3n+2) {
        grid-column: auto;
        justify-self: auto;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Enhanced Mobile Styles */
@media (max-width: 768px) {
    .hero-stats {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .stat-item {
        padding: 0.8rem;
        flex: 1;
        min-width: 100px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .skills-grid,
    .projects-grid,
    .education-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Reset centering for mobile */
    .skills-grid .skill-category:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: none;
        justify-self: auto;
    }
    
    /* Reset grid positioning for mobile */
    .projects-grid .project-card:last-child:nth-child(3n+1),
    .projects-grid .project-card:nth-last-child(2):nth-child(3n+1),
    .projects-grid .project-card:nth-last-child(1):nth-child(3n+2) {
        grid-column: auto;
        justify-self: auto;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .status-indicator {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }
    
    .hero-image {
        width: 200px;
        height: 200px;
    }
    
    .project-highlights {
        font-size: 0.85rem;
    }
    
    .highlight-item {
        gap: 0.75rem;
    }

    /* Performance optimizations for mobile */
    body::before,
    body::after,
    .bg-mesh,
    .particles {
        animation: none;
        display: none;
    }

    .grid-overlay {
        animation: none;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .skills-grid {
        gap: 1rem;
    }
    
    .skill-category {
        padding: 1rem;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-header h3 {
        font-size: 1rem;
    }
    
    .social-links {
        gap: 1rem;
    }
    
    .social-link {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Improved accessibility and focus states */
.btn-primary:focus,
.btn-secondary:focus,
.social-link:focus,
.project-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.skill-progress.animated {
    animation: skillBarFill 1.5s ease-out forwards;
}

@keyframes skillBarFill {
    from { width: 0%; }
    to { width: var(--target-width); }
}

/* Enhanced glass morphism effects */
.glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover::after {
    opacity: 1;
}
/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), var(--secondary));
}

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

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

/* Performance optimizations */
.glass-card,
.project-card,
.skill-category,
.cert-item,
.contact-item {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

/* Enhanced focus indicators */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--border-radius-sm);
}

/* Print styles */
@media print {
    .particles,
    .grid-overlay,
    .bg-mesh,
    .loading-screen {
        display: none !important;
    }
    
    body::before,
    body::after {
        display: none !important;
    }
    
    .glass-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --glass: rgba(255, 255, 255, 0.1);
        --glass-border: rgba(255, 255, 255, 0.3);
        --text-secondary: #e5e5e5;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles,
    .bg-mesh,
    .grid-overlay {
        animation: none !important;
    }
}
.pulse {
  position: relative;
  z-index: 1;
  overflow: visible;
}
.pulse::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108%;
  height: 108%;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 30px;
  background: rgba(99,102,241,0.25);
  opacity: 0.7;
  pointer-events: none;
  z-index: -1;
  animation: ripplePulse 1.4s infinite;
}
@keyframes ripplePulse {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}