/* Global Styles & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Dark Theme (Default) */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark: #1e293b;
    --darker: #0f172a;
    
    --light: #f8fafc;
    --gray: #cbd5e1;
    --success: #10b981;
    --warning: #f59e0b;
    
    /* Theme Specific Variables - Dark Mode */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --card-bg: rgba(30, 41, 59, 0.85);
    --border-color: rgba(203, 213, 225, 0.15);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-ease-out: all 0.3s cubic-bezier(0, 0, 0.2, 1);
    --transition-ease-in-out: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 25px 30px -10px rgba(0, 0, 0, 0.15), 0 10px 15px -5px rgba(0, 0, 0, 0.1);
    --shadow-mobile: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg-mobile: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    
    /* Focus */
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.5);
    --focus-outline: 2px solid var(--primary);
    
    /* Spacing */
    --section-padding: 100px;
    --section-padding-tablet: 120px;
    --section-padding-desktop: 150px;
    --section-padding-mobile: 40px;
    --card-padding: 40px;
    --card-padding-tablet: 50px;
    --card-padding-desktop: 60px;
    --card-padding-mobile: 20px;
    
    /* Sizes */
    --border-radius: 25px;
    --border-radius-small: 15px;
    --border-radius-circle: 50%;
    --icon-size: 60px;
    --icon-size-mobile: 50px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --card-bg: rgba(255, 255, 255, 0.95);
    --border-color: rgba(148, 163, 184, 0.3);
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 25px 30px -10px rgba(0, 0, 0, 0.25), 0 10px 15px -5px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    font-size: 16px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body:before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 5% 15%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 95% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.05) 0%, transparent 30%);
    z-index: -1;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme body adjustments */
[data-theme="light"] body:before {
    background: 
        radial-gradient(circle at 5% 15%, rgba(59, 130, 246, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 95% 85%, rgba(139, 92, 246, 0.03) 0%, transparent 25%),
        radial-gradient(circle at 50% 30%, rgba(6, 182, 212, 0.02) 0%, transparent 30%);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    cursor: pointer;
    padding: 10px 12px;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-right: 15px;
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.theme-toggle i {
    font-size: 16px;
    transition: var(--transition-medium);
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* Enhanced Form Styles */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background: var(--card-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
    transform: translateY(-2px);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.form-input.success {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-medium);
}

.error-message.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.form-message {
    margin-top: 1rem;
    padding: 12px 16px;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-medium);
}

.form-message.show {
    opacity: 1;
    transform: translateY(0);
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-loader {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loader {
    display: inline-block;
}

/* Enhanced Glassmorphism Effects */
.profile-card,
.skill-card,
.project-card,
.contact-form,
.about-grid > div {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition-medium);
}

.profile-card:hover,
.skill-card:hover,
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.3);
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    opacity: 0;
    transition: var(--transition-medium);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.testimonial-content {
    position: relative;
    z-index: 1;
}

.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.testimonial-stars i {
    font-size: 16px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    font-style: italic;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 4rem;
    color: var(--primary);
    position: absolute;
    top: -1rem;
    left: -1rem;
    font-family: Georgia, serif;
    opacity: 0.3;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    font-family: 'Space Mono', monospace;
}

.author-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
}

/* Timeline Section */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    padding: 0 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--accent));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 2rem;
    margin-bottom: 3rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    top: 0;
    width: 60px;
    height: 60px;
    background: var(--card-bg);
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-marker {
    right: -30px;
}

.timeline-item:nth-child(even) .timeline-marker {
    left: -30px;
}

.timeline-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    position: relative;
    transition: var(--transition-medium);
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -30px;
    border-left-color: var(--border-color);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -30px;
    border-right-color: var(--border-color);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(59, 130, 246, 0.3);
}

.timeline-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    font-family: 'Space Mono', monospace;
}

.timeline-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Space Mono', monospace;
}

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

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-item:nth-child(odd) .timeline-skills {
    justify-content: flex-end;
}

.timeline-item:nth-child(even) .timeline-skills {
    justify-content: flex-start;
}

.skill-tag {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Mobile Timeline Styles */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left;
        padding-left: 80px;
        padding-right: 0;
    }
    
    .timeline-marker {
        left: 0 !important;
        right: auto !important;
    }
    
    .timeline-content::before {
        left: -30px !important;
        right: auto !important;
        border-right-color: var(--border-color) !important;
        border-left-color: transparent !important;
    }
    
    .timeline-skills {
        justify-content: flex-start !important;
    }
}

/* Achievements Section */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.achievement-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: var(--transition-medium);
    overflow: hidden;
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: var(--transition-slow);
}

.achievement-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.5);
}

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

.achievement-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    position: relative;
    z-index: 1;
}

.achievement-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: var(--transition-medium);
}

.achievement-card:hover .achievement-icon::before {
    opacity: 1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

.achievement-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: 'Space Mono', monospace;
}

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

.achievement-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-text {
    position: relative;
    z-index: 1;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .profile-card {
        animation: none;
    }
    
    .skill-progress:after,
    .profile-avatar:after {
        animation: none;
    }
}

/* Light mode */
body[data-theme="light"] {
    --darker: #e2e8f0;
    --dark: #f1f5f9;
    --light: #0f172a;
    --gray: #334155;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

/* Card base styles */
.card {
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.9);
    padding: var(--card-padding);
    will-change: transform, box-shadow;
}

body[data-theme="light"] .card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-lg-mobile);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.5);
}

body[data-theme="light"] .card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.5);
}

.mono {
    font-family: 'Space Mono', monospace;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.section {
    padding: var(--section-padding) 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Shared Icon Styles */
.icon-element {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow);
    will-change: transform;
    transition: var(--transition-medium);
}

/* Header & Navigation */
.header {
    background: rgba(15, 23, 42, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-theme="light"] .header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.header.sticky {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--light);
    letter-spacing: -0.5px;
    transition: var(--transition-fast);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--light);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 8px 0;
    letter-spacing: 0.3px;
    border-radius: 4px;
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

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

.nav-link:hover,
.nav-link:focus {
    color: var(--primary);
    outline: none;
    background: rgba(59, 130, 246, 0.1);
}

.nav-link:focus-visible {
    box-shadow: var(--focus-ring);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transform: scale(1.1);
}

body[data-theme="light"] .mobile-menu-btn:hover,
body[data-theme="light"] .mobile-menu-btn:focus {
    background: rgba(59, 130, 246, 0.1);
}

.mobile-menu-btn:focus-visible {
    box-shadow: var(--focus-ring);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding-top: 80px;
}

.hero-content {
    flex: 1;
    padding-right: 60px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card {
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-xl);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.9);
    padding: var(--card-padding);
    will-change: transform;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    animation: float 6s ease-in-out infinite;
}

body[data-theme="light"] .profile-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-lg-mobile);
}

.profile-card:hover {
    transform: translateY(-10px) rotateY(0deg);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.6);
}

.profile-card:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.2), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

.profile-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.profile-avatar {
    width: 180px;
    height: 180px;
    border-radius: var(--border-radius-circle);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    margin: 0 auto 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
    border: 5px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Style for the profile image */
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    contain: layout style;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 1;
}

.profile-avatar img.changing {
    transform: scale(1.1);
    opacity: 0.7;
    filter: blur(1px);
}

/* Add a new class for the fade transition effect */
.profile-avatar .image-fade-enter {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.profile-avatar .image-fade-enter-active {
    opacity: 1;
    transform: scale(1);
}

.profile-avatar .image-fade-exit {
    opacity: 1;
    transform: scale(1);
}

.profile-avatar .image-fade-exit-active {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.profile-avatar:after {
    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);
    animation: avatar-shine 3s ease-in-out infinite;
    z-index: 1;
}

.profile-icon {
    font-size: 70px;
    color: white;
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-avatar:hover .profile-icon {
    transform: scale(1.1);
}

/* Headings */
h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -1px;
    transition: var(--transition-fast);
    color: var(--light);
}

h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    position: relative;
    transition: var(--transition-fast);
    color: var(--light);
}

h2:after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 25px auto;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
    transition: var(--transition-fast);
    color: var(--light);
}

h4 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    transition: var(--transition-fast);
    color: var(--light);
}

p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: var(--gray);
    line-height: 1.7;
    transition: var(--transition-fast);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 15px;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    will-change: transform, box-shadow;
    color: white;
}

.btn:focus {
    outline: none;
}

.btn:focus-visible {
    box-shadow: var(--focus-ring);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn:hover:before,
.btn:focus:before {
    left: 100%;
}

.btn:hover,
.btn:focus {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    outline: none;
}

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

.btn:disabled:hover,
.btn.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-lg);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

/* Mobile button hover reduction */
@media (hover: none) {
    .btn:hover {
        transform: none;
        box-shadow: var(--shadow-lg);
    }
    
    .btn:hover:before {
        left: -100%;
    }
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

/* Grid Layouts - Enhanced */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.skills-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

/* About section specific styling */
.about-grid > div:first-child {
    padding: var(--card-padding);
}

.about-grid > div:last-child {
    padding: var(--card-padding);
}

/* Skill Categories */
.skill-category {
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.9);
    padding: var(--card-padding);
    will-change: transform;
}

body[data-theme="light"] .skill-category {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-lg-mobile);
}

.skill-category:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.5);
}

body[data-theme="light"] .skill-category:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.5);
}

.skill-category h3 {
    font-size: 1.6rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--light);
}

.skill-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow);
    will-change: transform;
    transition: var(--transition-medium);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.skill-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.skill-item {
    margin-bottom: 30px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--light);
}

.skill-bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    margin-bottom: 8px;
}

.skill-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    from {
        left: -75%;
    }
    to {
        left: 125%;
    }
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 5px;
    width: 0; /* Start with 0 width for animation */
    transition: width 2s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.skill-progress::after {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    color: var(--light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    animation: fadeIn 0.3s ease-out;
}

.skill-progress:hover::after {
    opacity: 1;
}

.skill-progress:before {
    content: attr(data-tooltip);
    position: absolute;
    top: -30px;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    color: var(--light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

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

/* Project Cards */
.project-card {
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.9);
    padding: var(--card-padding);
    will-change: transform;
    margin-bottom: 40px;
}

body[data-theme="light"] .project-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-lg-mobile);
}

.project-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.6);
}

body[data-theme="light"] .project-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(59, 130, 246, 0.6);
}

.project-status {
    display: inline-block;
    padding: 10px 25px;
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 25px;
    border: 1px solid rgba(59, 130, 246, 0.4);
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.project-status:hover {
    transform: scale(1.05);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.tech-tag {
    background: rgba(139, 92, 246, 0.2);
    color: var(--secondary);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(139, 92, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    will-change: transform;
}

.tech-tag:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow);
}

.tech-tag:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    animation: fadeIn 0.3s ease-out;
}

/* Project buttons */
.project-card .btn {
    margin-top: 30px;
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-small);
    transition: transform 0.3s ease;
}

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

/* Qualities Grid */
.qualities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.quality-tag {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
    padding: 15px 25px;
    border-radius: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    will-change: transform;
    color: var(--light);
}

.quality-tag:hover {
    transform: translateY(-8px) scale(1.05);
    background: rgba(6, 182, 212, 0.25);
    box-shadow: var(--shadow);
}

/* Goals List */
.goals-list {
    list-style: none;
}

.goal-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 40px;
    padding: 25px;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

body[data-theme="light"] .goal-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.goal-item:hover {
    transform: translateX(15px);
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(59, 130, 246, 0.4);
}

body[data-theme="light"] .goal-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.6);
}

.goal-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow);
    will-change: transform;
    transition: var(--transition-medium);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    flex-shrink: 0;
}

.goal-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Contact Section */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow);
    will-change: transform;
    transition: var(--transition-medium);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.contact-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.social-link {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow);
    will-change: transform;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-decoration: none;
}

.social-link:hover,
.social-link:focus {
    transform: translateY(-10px) rotate(10deg);
    box-shadow: var(--shadow-hover);
    outline: none;
}

.social-link:focus-visible {
    box-shadow: var(--focus-ring);
}

/* Contact Form */
.contact-form {
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.9);
    padding: var(--card-padding);
    will-change: transform;
}

body[data-theme="light"] .contact-form {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-lg-mobile);
}

.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--light);
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--light);
}

.form-input::placeholder {
    color: var(--gray);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

body[data-theme="light"] .form-input {
    background: rgba(255, 255, 255, 0.9);
    color: var(--light);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body[data-theme="light"] .form-input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: var(--focus-ring);
    transform: translateY(-2px);
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    display: none;
    transition: var(--transition-fast);
    animation: fadeIn 0.3s ease-out;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    display: block;
}

.form-message.error {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    display: block;
}

/* Footer */
.footer {
    background: var(--darker);
    text-align: center;
    padding: 80px 20px 50px;
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    transition: background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body[data-theme="light"] .footer {
    background: var(--dark);
    border-top: 1px solid rgba(59, 130, 246, 0.2);
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
    transition: var(--transition-fast);
    color: var(--light);
}

.footer-logo span {
    color: var(--primary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
}

.footer-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
    padding: 5px 0;
}

.footer-link:hover,
.footer-link:focus {
    color: var(--primary);
    outline: none;
}

.footer-link:focus-visible {
    box-shadow: var(--focus-ring);
    border-radius: 4px;
}

.footer-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
}

.footer-link:hover:after,
.footer-link:focus:after {
    width: 100%;
}

.copyright {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.9rem;
    color: var(--gray);
}

/* Typography classes to replace inline styles */
.profile-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.profile-description {
    font-size: 1rem;
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.section-text {
    font-size: 1.1rem;
}

.language-title {
    margin-top: 40px;
    font-size: 1.4rem;
}

.language-text {
    font-size: 1rem;
}

.goal-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.goal-text {
    font-size: 0.95rem;
}

.project-title {
    font-size: 2rem;
    margin-bottom: 25px;
}

.project-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.footer-text {
    font-size: 1rem;
    color: var(--gray);
}

/* Project buttons */
.project-card .btn {
    margin-top: 30px;
    margin-right: 15px;
    display: inline-block;
    min-width: 140px;
}

.project-card .btn:last-child {
    margin-right: 0;
}

/* Project buttons container for better layout */
.project-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    align-items: center;
}

.project-buttons .btn {
    margin: 0;
    flex: 1;
    min-width: 140px;
}

/* Tech tag colors for consistency */
.tech-tag.html {
    background: rgba(255, 102, 0, 0.2);
    border-color: rgba(255, 102, 0, 0.4);
    color: #ff6600;
}

.tech-tag.css {
    background: rgba(0, 128, 255, 0.2);
    border-color: rgba(0, 128, 255, 0.4);
    color: #0080ff;
}

.tech-tag.javascript {
    background: rgba(255, 204, 0, 0.2);
    border-color: rgba(255, 204, 0, 0.4);
    color: #ffcc00;
}

.tech-tag.react {
    background: rgba(97, 218, 251, 0.2);
    border-color: rgba(97, 218, 251, 0.4);
    color: #61dafb;
}

.tech-tag.nodejs {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

.tech-tag.mongodb {
    background: rgba(76, 175, 140, 0.2);
    border-color: rgba(76, 175, 140, 0.4);
    color: #4caf8c;
}

.tech-tag:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow);
}

/* Project image backgrounds */
.project-bg-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.project-bg-landing {
    background: url('../img/landingPage.webp') center/cover no-repeat;
}

.project-bg-movie {
    background: url('../img/movieApp.webp') center/cover no-repeat;
}

.project-bg-weather {
    background: url('../img/weatherApp.webp') center/cover no-repeat;
}

.project-bg-ecommerce {
    background: url('../img/E-commerce.webp') center/cover no-repeat;
}

/* Project image placeholder */
.project-image-placeholder {
    height: 200px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon {
    font-size: 4rem;
    color: white;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-circle);
    background: var(--primary);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    will-change: transform, opacity;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover,
.back-to-top:focus {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    outline: none;
    box-shadow: var(--shadow-hover);
}

.back-to-top:focus-visible {
    box-shadow: var(--focus-ring);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-circle);
    background: var(--primary);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
}

.theme-toggle:hover,
.theme-toggle:focus {
    transform: scale(1.1) rotate(15deg);
    outline: none;
    box-shadow: var(--shadow-hover);
}

.theme-toggle:focus-visible {
    box-shadow: var(--focus-ring);
}

.theme-toggle.theme-dark:before {
    content: "🕯️";
    opacity: 0.5;
    font-size: 1.2em; /* Slightly larger candle */
}

.theme-toggle.theme-light {
    box-shadow: var(--shadow-lg), 0 0 15px rgba(255, 0, 0, 0.3);
}

.theme-toggle.theme-light:before {
    content: "🕯️";
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff0000, 0 0 35px #ff0000, 0 0 40px #ff0000;
    opacity: 1;
    animation: candleFlicker 1.5s infinite ease-in-out; /* Faster flicker */
    font-size: 1.2em; /* Slightly larger candle */
}

.theme-toggle.animating {
    animation: themeToggle 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
}

/* Language container */
.language-container {
    display: flex;
    gap: 40px;
    margin: 20px 0;
}

/* Language Switcher */
.language-switcher {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

#language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--light);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

body[data-theme="light"] #language-btn {
    color: var(--light);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

#language-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-lg);
    width: 150px;
    z-index: 1000;
    display: none;
    flex-direction: column;
    font-family: var(--font-primary);
}

body[data-theme="light"] .language-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.language-dropdown.show {
    display: flex;
}

.language-option {
    background: transparent;
    border: none;
    color: var(--light);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
    width: 100%;
    font-family: var(--font-primary);
    font-size: 0.9rem;
}

body[data-theme="light"] .language-option {
    color: var(--light);
}

.language-option:hover,
.language-option:focus {
    background: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    outline: none;
}

.language-option:first-child {
    border-radius: var(--border-radius-small) var(--border-radius-small) 0 0;
}

.language-option:last-child {
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
}

/* Responsive */
@media (max-width: 768px) {
    .language-switcher {
        margin: 1rem 0 0 0;
        width: 100%;
    }
    
    #language-btn {
        width: 100%;
        justify-content: center;
    }
    
    .language-dropdown {
        width: 100%;
        right: auto;
        left: 0;
    }
}

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

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

@keyframes shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    50% { transform: rotate(45deg) translateX(0%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

@keyframes avatar-shine {
    0% { transform: rotate(45deg) translateX(-100%); }
    50% { transform: rotate(45deg) translateX(0%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

/* New animation for profile image transitions */
@keyframes imageTransition {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(0.95) rotate(5deg);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Theme toggle animation */
@keyframes themeToggle {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(15deg);
    }
    50% {
        transform: scale(1.3) rotate(30deg);
    }
    75% {
        transform: scale(1.2) rotate(20deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Floating Theme Toggle Button - Enhanced */
.theme-toggle-floating {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    font-size: 22px;
    overflow: hidden;
}

.theme-toggle-floating::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    border-radius: 50%;
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.theme-toggle-floating:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.theme-toggle-floating:hover::before {
    transform: translateX(100%);
}

.theme-toggle-floating:active {
    transform: translateY(-2px) scale(1.02);
    transition: all 0.1s ease;
}

/* Icon animation */
.theme-toggle-floating i {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.theme-toggle-floating:hover i {
    transform: rotate(20deg) scale(1.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Light theme adjustments */
[data-theme="light"] .theme-toggle-floating {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 
        0 8px 32px rgba(59, 130, 246, 0.2),
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme="light"] .theme-toggle-floating:hover {
    box-shadow: 
        0 12px 40px rgba(59, 130, 246, 0.3),
        0 6px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Theme transition for smooth color changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* No direct replacement needed - the animation is removed in the new version */

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

/* Mobile Menu Animation */
@keyframes slideIn {
    from {
        transform: translateX(-100%) translateY(0);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%) translateY(0);
        opacity: 0;
    }
}

/* Tablet Styles */
@media (min-width: 768px) {
    :root {
        --section-padding: var(--section-padding-tablet);
        --card-padding: var(--card-padding-tablet);
    }
    
    .nav-container {
        padding: 20px 40px;
    }
    
    .logo {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 3.2rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .about-grid,
    .skills-grid,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 70px;
    }
    
    .profile-avatar {
        width: 220px;
        height: 220px;
    }
    
    .profile-icon {
        font-size: 90px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    :root {
        --section-padding: var(--section-padding-desktop);
        --card-padding: var(--card-padding-desktop);
    }
    
    .hero {
        padding-top: 100px;
    }
    
    .hero-content {
        padding-right: 100px;
    }
    
    h1 {
        font-size: 3.5rem;
    }
    
    .profile-avatar {
        width: 260px;
        height: 260px;
    }
    
    .profile-icon {
        font-size: 110px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    h1 {
        font-size: 4rem;
    }
    
    .profile-avatar {
        width: 300px;
        height: 300px;
    }
    
    .profile-icon {
        font-size: 130px;
    }
}

/* Mobile Styles */
@media (max-width: 767px) {
    :root {
        --section-padding: var(--section-padding-mobile);
        --card-padding: var(--card-padding-mobile);
        --icon-size: var(--icon-size-mobile);
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.99);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        border-bottom: 1px solid rgba(59, 130, 246, 0.3);
        animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    body[data-theme="light"] .nav-links {
        background: rgba(255, 255, 255, 0.99);
        border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links:not(.active) {
        animation: slideOut 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 80px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .btn {
        display: block;
        margin: 15px auto;
        text-align: center;
        width: 90%;
    }
    
    .qualities-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .profile-avatar {
        width: 160px;
        height: 160px;
    }
    
    .profile-icon {
        font-size: 60px;
    }
    
    .profile-card {
        transform: none;
        animation: none;
    }
    
    .profile-card:hover {
        transform: none;
    }
    
    .back-to-top,
    .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    /* Adjust theme toggle position on mobile to avoid conflict with mobile menu button */
    .theme-toggle {
        bottom: 15px;
        left: 15px;
    }
    
    .about-grid,
    .skills-grid,
    .contact-grid {
        gap: 40px;
    }
    
    .goal-item {
        gap: 15px;
        padding: 20px;
    }
    
    .goal-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    /* Disable heavy animations on mobile */
    .profile-avatar:after {
        animation: none;
    }
    
    .skill-progress:after {
        animation: none;
    }
    
    /* Reduce shadows on mobile */
    .card {
        box-shadow: var(--shadow-mobile);
    }
    
    body[data-theme="light"] .card {
        box-shadow: var(--shadow-mobile);
    }
    
    .card:hover {
        box-shadow: var(--shadow-lg-mobile);
    }
    
    body[data-theme="light"] .card:hover {
        box-shadow: var(--shadow-lg-mobile);
    }
}

@keyframes candleFlicker {
    0%, 100% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff4500, 0 0 35px #ff4500, 0 0 40px #ff4500;
        transform: translateY(0);
    }
    10% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 22px #ff4500, 0 0 37px #ff4500, 0 0 42px #ff4500;
        transform: translateY(-1px);
    }
    20% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 18px #ff4500, 0 0 33px #ff4500, 0 0 38px #ff4500;
        transform: translateY(0);
    }
    30% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 25px #ff4500, 0 0 40px #ff4500, 0 0 45px #ff4500;
        transform: translateY(-1px);
    }
    40% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 20px #ff4500, 0 0 35px #ff4500, 0 0 40px #ff4500;
        transform: translateY(0);
    }
    50% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 23px #ff4500, 0 0 38px #ff4500, 0 0 43px #ff4500;
        transform: translateY(-1px);
    }
    60% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 19px #ff4500, 0 0 34px #ff4500, 0 0 39px #ff4500;
        transform: translateY(0);
    }
    70% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 26px #ff4500, 0 0 41px #ff4500, 0 0 46px #ff4500;
        transform: translateY(-1px);
    }
    80% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 21px #ff4500, 0 0 36px #ff4500, 0 0 41px #ff4500;
        transform: translateY(0);
    }
    90% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #fff, 0 0 24px #ff4500, 0 0 39px #ff4500, 0 0 44px #ff4500;
        transform: translateY(-1px);
    }
}

/* No direct replacement needed - the animation is removed in the new version */

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

/* ========================================= */
/* ENHANCED RESPONSIVE DESIGN FIXES */
/* ========================================= */

/* Tablet Styles */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
        --card-padding: 35px;
    }
    
    .hero {
        gap: 60px;
        padding: 80px 20px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .about-grid,
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .navbar .nav-links {
        gap: 30px;
    }
    
    .profile-avatar {
        width: 200px;
        height: 200px;
    }
}

/* Enhanced Mobile Fixes */
@media (max-width: 768px) {
    /* Container fixes */
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    /* Header fixes */
    .header {
        padding: 15px 20px;
    }
    
    /* Hero section fixes */
    .hero {
        flex-direction: column;
        gap: 40px;
        padding: 100px 20px 60px;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
        padding-right: 0;
        margin-bottom: 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }
    
    /* Profile section fixes */
    .profile-section {
        order: 1;
    }
    
    .profile-avatar {
        width: 180px;
        height: 180px;
        margin: 0 auto 20px;
    }
    
    /* Button fixes */
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 15px 25px;
        font-size: 0.95rem;
    }
    
    /* Better spacing for project buttons on tablets */
    .project-card .btn {
        width: 48%;
        margin: 10px 1% 10px 0;
        padding: 15px 20px;
    }
    
    .project-card .btn:nth-child(even) {
        margin-right: 0;
    }
    
    .project-card .btn:last-child {
        margin-right: 0;
    }
    
    /* Project buttons container for tablets */
    .project-buttons {
        flex-direction: row;
        gap: 2%;
    }
    
    .project-buttons .btn {
        flex: 1;
        min-width: auto;
        margin: 0;
    }
    
    /* Section spacing fixes */
    section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Grid fixes */
    .about-grid,
    .skills-grid,
    .contact-grid,
    .testimonials-grid,
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* About section mobile fixes */
    .about-grid > div:first-child,
    .about-grid > div:last-child {
        padding: 25px;
    }
    
    /* Card fixes */
    .card {
        padding: 25px;
        margin-bottom: 20px;
    }
    
    /* Skills section fixes */
    .skill-item {
        margin-bottom: 25px;
    }
    
    .skill-name {
        font-size: 0.95rem;
    }
    
    /* Contact form fixes */
    .contact-form .form-group {
        margin-bottom: 20px;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    /* Navigation fixes - Override existing mobile nav */
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        box-shadow: var(--shadow-xl);
        border-bottom: 1px solid var(--border-color);
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-link {
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Theme toggle mobile fixes */
    .theme-toggle {
        position: fixed;
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
        z-index: 1000;
    }
    
    /* Floating theme toggle mobile fixes */
    .theme-toggle-floating {
        bottom: 20px;
        left: 15px;
        width: 55px;
        height: 55px;
        font-size: 20px;
    }
    
    /* Back to top mobile fixes */
    .back-to-top {
        bottom: 20px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Small Mobile Fixes */
@media (max-width: 480px) {
    /* Even smaller spacing */
    :root {
        --section-padding: 40px;
        --card-padding: 20px;
    }
    
    .hero {
        padding: 80px 15px 40px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1rem;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 200px;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    /* Project card button improvements for mobile */
    .project-card .btn {
        width: 100%;
        max-width: none;
        margin: 8px 0;
        padding: 14px 20px;
        font-size: 0.9rem;
        text-align: center;
    }
    
    .project-card .btn:last-child {
        margin-right: 0;
        margin-bottom: 0;
    }
    
    /* Project buttons container for mobile */
    .project-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .project-buttons .btn {
        flex: none;
        width: 100%;
        min-width: auto;
    }
    
    .profile-avatar {
        width: 150px;
        height: 150px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    /* Smaller theme toggle for very small screens */
    .theme-toggle,
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .theme-toggle {
        bottom: 15px;
        left: 15px;
    }
    
    .theme-toggle-floating {
        bottom: 15px;
        left: 10px;
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Extra small screens protection */
@media (max-width: 320px) {
    .theme-toggle-floating {
        bottom: 10px;
        left: 5px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .back-to-top {
        bottom: 10px;
        right: 5px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}
