/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #0070f3;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-secondary: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    
    /* Theme transition */
    --transition-theme: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --animation-duration: 1.5s;
    --animation-delay: 0.3s;
}


/* Enhanced Code Window Animation */
.about-image {
  display: flex;
  justify-content: flex-end;
}
.code-window {
  margin-left: auto;
  margin-right: 0;
}
@media (max-width: 900px) {
  .about-image {
    justify-content: center;
  }
  .code-window {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 600px) {
  .about-image {
    justify-content: center;
    width: 100%;
  }
  .code-window {
    margin: 0 auto;
    display: block;
    max-width: 95vw;
  }
}
/* Staggered Animation Classes */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }


/* Enhanced Slide Animations */
@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft var(--animation-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-right {
    animation: slideInRight var(--animation-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Enhanced Scale Animation */
@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.scale-in {
    animation: scaleIn var(--animation-duration) cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Enhanced Hero Section with Parallax Effect */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    position: relative;
    padding-top: 70px;
    transition: var(--transition-theme);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 112, 243, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    transform-origin: center;
    z-index: 0;
}

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

/* Hero floating particles effect */
@keyframes float-particles {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.hero::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-particles 15s ease-in-out infinite;
    z-index: 0;
}

/* Enhanced Page Load Animation */
@keyframes pageLoad {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typing Animation for Text */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typing-animation {
    overflow: hidden;
    border-right: 3px solid var(--primary-color);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Custom Scroll Animations */
@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-100px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp var(--animation-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-down {
    animation: slideDown var(--animation-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s ease;
}

/* Dark Theme Colors */
[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-light: #ffffff;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-dark: #000000;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Account for fixed navbar */
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: var(--transition-theme);
    animation: pageLoad 1s ease-out;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.code-bracket {
    color: var(--primary-color);
    animation: pulse var(--animation-duration) ease-in-out infinite;
}

.loading-text {
    color: var(--text-primary);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-theme);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .navbar {
    background: rgba(15, 23, 42, 0.9);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: var(--transition-theme);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0.5rem 1rem;
    display: block;
    border-radius: 4px;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    background: rgba(0, 112, 243, 0.1);
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-50%);
    z-index: -1;
}

.nav-link:hover::before {
    width: 100%;
}


.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

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

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

/* Theme Toggle Button */
.theme-toggle {
    width: 45px;
    height: 45px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
    transform: scale(1.15) rotate(15deg);
}

.theme-toggle:hover #theme-icon {
    color: white;
    transform: rotate(360deg);
    transform: rotate(360deg) scale(1.1);
}

#theme-icon {
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.theme-toggle:hover::before {
    width: 100%;
    height: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    margin-left: 1rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition-theme);
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4rem;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Ensure hero content takes full width of left column */
.hero-content {
    width: 100%;
    max-width: none;
    position: relative;
    z-index: 2;
}

/* Ensure hero image takes full width of right column */
.hero-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-greeting {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(-50%, -50%);
}

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

.btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 112, 243, 0.3);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-light);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Profile Card - Enhanced */
.profile-card {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    max-width: 350px;
    width: 100%;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateZ(0); /* Force hardware acceleration */
}

.profile-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 112, 243, 0.15);
}

.profile-img {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar {
    width: 250px;
    height: 250px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 3rem;
    box-shadow: var(--shadow-lg);
}


.avatar-img {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
    display: block;
    margin: 0 auto;
    background: var(--bg-secondary);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.avatar-img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 15px 30px rgba(0, 112, 243, 0.3);
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    justify-items: center;
}

.tech-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 12px;
    font-size: 1.8rem;
    transition: var(--transition-theme);
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.tech-item:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.tech-item.react { 
    animation-delay: 0s;
    color: #61dafb;
}
.tech-item.node { 
    animation-delay: 0.5s;
    color: #339933;
}
.tech-item.js { 
    animation: float 4s ease-in-out infinite;
    color: #f7df1e;
}
.tech-item.mongodb { 
    animation-delay: 1.5s;
    color: #47a248;
}
/* Enhanced Float Animation */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(2deg);
    }
    50% { 
        transform: translateY(-10px) rotate(-1deg);
    }
    75% {
        transform: translateY(-20px) rotate(1deg);
    }
}


/* Social Sidebar */
.social-sidebar {
    position: fixed;
    left: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 100;
}

.social-link {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 1.2rem;
    border: 1px solid var(--border-color);
    position: relative;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.social-link:hover::before {
    width: 120%;
    height: 120%;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-8px) scale(1.1);
    color: white;
}

.social-line {
    width: 2px;
    height: 80px;
    background: var(--border-color);
    transition: var(--transition-theme);
}

/* Section Styles */
section {
    padding: 6rem 0;
    transition: var(--transition-theme);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-title.animate {
    animation: titleGlow var(--animation-duration) ease-in-out;
}

@keyframes titleGlow {
    0%, 100% {
        text-shadow: 0 0 0 transparent;
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 112, 243, 0.3);
    }
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* About Section */
.about {
    background: var(--bg-secondary);
    transition: var(--transition-theme);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(0, 112, 243, 0.1), transparent);
    transition: top 0.6s ease;
}

.stat-item:hover::before {
    top: 100%;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 112, 243, 0.2);
}

.stat-item h4 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

/* Enhanced Code Window Animation */
.code-window {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.code-window:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .code-window {
    background: #0f172a;
    border: 1px solid var(--border-color);
}

.window-header {
    background: #334155;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

[data-theme="dark"] .window-header {
    background: #1e293b;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.control:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px currentColor;
}

.control.close { background: #ef4444; }
.control.minimize { background: #f59e0b; }
.control.maximize { background: #10b981; }

.window-title {
    color: #94a3b8;
    font-size: 0.9rem;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.keyword { color: #c678dd; }
.variable { color: #e06c75; }
.property { color: #56b6c2; }
.string { color: #98c379; }

/* Skills Section */
.skills {
    background: var(--bg-primary);
    transition: var(--transition-theme);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.skills-grid .skill-category:nth-child(1) {
    animation-delay: 0.1s;
}

.skills-grid .skill-category:nth-child(2) {
    animation-delay: 0.2s;
}

.skills-grid .skill-category:nth-child(3) {
    animation-delay: 0.3s;
}

.skills-grid .skill-category:nth-child(4) {
    animation-delay: 0.4s;
}

.skill-category {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.skill-category:hover::before {
    transform: scaleX(1);
}

.skill-category:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 112, 243, 0.15);
}

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

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

.category-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.skills-list {
    display: grid;
    gap: 1.2rem;
    margin-top: 1rem;
}

/* Add smooth entrance animation to skill items */
.skills-list .skill-item:nth-child(1) { transition-delay: 0.1s; }
.skills-list .skill-item:nth-child(2) { transition-delay: 0.2s; }
.skills-list .skill-item:nth-child(3) { transition-delay: 0.3s; }
.skills-list .skill-item:nth-child(4) { transition-delay: 0.4s; }

.skill-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 112, 243, 0.1), transparent);
    transition: left 0.6s ease;
}

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

.skill-item:hover {
    transform: translateX(12px) scale(1.05);
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 25px rgba(0, 112, 243, 0.3);
    border-color: var(--primary-color);
}

.skill-item:hover i {
    color: white !important;
    transform: scale(1.1);
}

.skill-item:hover span {
    color: white;
    font-weight: 500;
}

.skill-item i {
    font-size: 1.5rem;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
    transition: var(--transition-theme);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 112, 243, 0.1), rgba(124, 58, 237, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px;
    pointer-events: none;
}

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

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.project-card.featured::before {
    background: var(--gradient-secondary);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 112, 243, 0.2);
}

.project-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition-theme);
}

.project-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--bg-secondary);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition-theme);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info > p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    transition: var(--transition-theme);
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-theme);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
}

.form-group input:focus,
.form-group textarea:focus {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 112, 243, 0.2);
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 2rem 0;
    transition: var(--transition-theme);
}

[data-theme="dark"] .footer {
    background: #000000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-8px) rotate(15deg) scale(1.2);
}

/* Theme Switch Animation */
.theme-switching {
    transition: none !important;
}

.theme-switching * {
    transition: none !important;
}

/* Better mobile navigation */
.nav-menu li {
    margin: 0.5rem 0;
}

/* Performance Optimization for Animations */
.tech-item,
.profile-card,
.project-card,
.skill-item,
.btn {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Enhanced Mobile Animations */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile for better performance */
    .tech-item {
        animation-duration: 3s;
    }
    
    .btn:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .project-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .social-link:hover {
        transform: translateY(-5px) scale(1.05);
    }
    
    /* Optimize animations for touch devices */
    .skill-item:hover {
        transform: translateX(10px) scale(1.02);
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
        height: 60px; /* Reduced height for mobile */
    }

    .logo {
        font-size: 1.2rem; /* Smaller logo on mobile */
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
        margin-left: 0.5rem;
    }

    #theme-icon {
        font-size: 0.9rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px; /* Match reduced nav height */
        flex-direction: column;
        background: var(--bg-primary);
        border: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
        transition: var(--transition-theme);
        box-shadow: var(--shadow-md);
        padding: 1.5rem 0;
        gap: 0.5rem; /* Reduced gap between nav items */
    }

    .nav-menu.active {
        left: 0;
    }

    /* Hero Section Mobile Fixes */
    .hero {
        padding-top: 60px; /* Match reduced nav height */
        min-height: calc(100vh - 60px);
    }

    .hero-container {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
        padding: 0 1rem;
    }

    .hero-greeting {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 2.2rem; /* Better mobile sizing */
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    /* Profile Card Mobile Optimization */
    .profile-card {
        max-width: 280px;
        margin: 0 auto;
        padding: 1.5rem;
    }

    .avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .avatar-img {
        width: 90px;
        height: 90px;
        border-width: 3px;
    }

    .tech-stack {
        gap: 0.8rem;
        margin-top: 1.5rem;
    }

    .tech-item {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    /* Sections Mobile Spacing */
    section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* About Section Mobile */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-text h3 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .about-text p {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-item h4 {
        font-size: 2rem;
    }

    /* Skills Section Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .skill-category {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .category-header {
        margin-bottom: 1.2rem;
    }

    .category-header i {
        font-size: 1.3rem;
    }

    .category-header h3 {
        font-size: 1.1rem;
    }

    .skills-list {
        gap: 1rem;
    }

    .skill-item {
        padding: 0.8rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .skill-item i {
        font-size: 1.3rem;
    }

    .skill-item:hover {
        transform: translateX(8px) scale(1.02);
    }

    /* Projects Section Mobile */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-content h3 {
        font-size: 1.3rem;
    }

    .project-content p {
        font-size: 0.9rem;
    }

    /* Contact Section Mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info h3 {
        font-size: 1.6rem;
    }

    .contact-info > p {
        font-size: 0.95rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Button Mobile Optimization */
    .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
    }

    /* Hide social sidebar on mobile */
    .social-sidebar {
        display: none;
    }

    /* Code window mobile */
    .code-window {
        margin: 0 -1rem;
        border-radius: 8px;
    }

    .code-content {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 400px) {
    .container,
    .nav-container,
    .hero-container {
        padding: 0 0.8rem;
    }

    .hero-title {
        font-size: 1.9rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .profile-card {
        max-width: 260px;
        padding: 1.2rem;
    }

    .avatar {
        width: 85px;
        height: 85px;
        font-size: 2.2rem;
    }

    .avatar-img {
        width: 75px;
        height: 75px;
    }

    .tech-item {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .btn {
        max-width: 250px;
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .theme-toggle {
        width: 32px;
        height: 32px;
    }

    #theme-icon {
        font-size: 0.8rem;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .hero-container {
        gap: 1.5rem;
    }
    
    .profile-card {
        max-width: 250px;
        padding: 1.2rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .tech-item {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .theme-toggle {
        width: 35px;
        height: 35px;
    }

    #theme-icon {
        font-size: 0.9rem;
    }
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .logo {
        font-size: 1rem;
    }
    
    .hero-title {
        font-size: 1.7rem;
    }
    
    .profile-card {
        max-width: 240px;
        padding: 1rem;
    }
    
    .nav-menu {
        padding: 1rem 0;
    }
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .theme-toggle,
    .social-link,
    .project-link {
        min-height: 44px; /* Apple's recommended touch target size */
        min-width: 44px;
    }
}

/* Prevent horizontal scrolling */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }
    
    .hero-container,
    .container {
        overflow-x: hidden;
    }
}

/* Enhanced Fade In Up Animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    50% {
        opacity: 0.5;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp var(--animation-duration) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* Theme Transition Effect */
@keyframes themeTransition {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.theme-transition {
    animation: themeTransition 0.3s ease-in-out;
}

/* Dark theme specific adjustments */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

[data-theme="dark"] .loading-screen {
    background: var(--bg-primary);
}

[data-theme="dark"] .hamburger span {
    background: var(--text-primary);
}

/* Custom scrollbar for dark theme */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

