
/* General Styles and Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Modern UI with Dark Mode Support */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --primary-color: #0984e3;
    --secondary-color: #00b894;
    --accent-color: #6c5ce7;
    --border-color: #dfe6e9;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --nav-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glow-shadow: 0 0 20px rgba(108, 92, 231, 0.3);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --nav-height: 3.5rem;
    --text-color: #2d3436;
    --text-color-dark: #f5f6fa;
    --nav-bg-dark: #1a1a1a;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-rainbow: linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    --neon-blue: #00f2fe;
    --neon-pink: #f093fb;
    --neon-purple: #a29bfe;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #f5f6fa;
    --text-secondary: #dcdde1;
    --primary-color: #74b9ff;
    --secondary-color: #00d8b2;
    --accent-color: #a29bfe;
    --border-color: #333333;
    --card-bg: #1e1e1e;
    --header-bg: rgba(18, 18, 18, 0.95);
    --nav-bg: #1e1e1e;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --glow-shadow: 0 0 30px rgba(162, 155, 254, 0.5);
}

/* Animated Background with Particles */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.05) 0%, transparent 50%);
}

[data-theme="dark"] .animated-bg {
    background: radial-gradient(ellipse at center, rgba(108, 92, 231, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 15s ease-in-out infinite;
    background: var(--primary-color);
    filter: blur(1px);
}

[data-theme="dark"] .shape {
    opacity: 0.15;
    filter: blur(2px);
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    top: 20%;
    left: 10%;
    animation: float 20s ease-in-out infinite, glow 4s ease-in-out infinite alternate;
}

.shape-2 {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    top: 60%;
    right: 20%;
    animation: float 18s ease-in-out infinite reverse, pulse-glow 3s ease-in-out infinite;
    animation-delay: -3s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    bottom: 30%;
    left: 30%;
    animation: float 22s ease-in-out infinite, rotate-slow 30s linear infinite;
    animation-delay: -6s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    top: 10%;
    right: 10%;
    animation: float 16s ease-in-out infinite, morph 8s ease-in-out infinite;
    animation-delay: -9s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    background: var(--gradient-secondary);
    bottom: 20%;
    right: 40%;
    animation: float 24s ease-in-out infinite, scale-pulse 5s ease-in-out infinite;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    25% { transform: translateY(-30px) rotate(90deg) scale(1.1); }
    50% { transform: translateY(-60px) rotate(180deg) scale(0.9); }
    75% { transform: translateY(-30px) rotate(270deg) scale(1.05); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(108, 92, 231, 0.2); }
    100% { box-shadow: 0 0 20px rgba(108, 92, 231, 0.4), 0 0 30px rgba(108, 92, 231, 0.2); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.2); }
}

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

@keyframes morph {
    0%, 100% { border-radius: 50%; }
    25% { border-radius: 20% 80% 40% 60%; }
    50% { border-radius: 80% 20% 60% 40%; }
    75% { border-radius: 40% 60% 20% 80%; }
}

@keyframes scale-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Header Styles with Enhanced Animations */
/* Header Styles */
header {
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    /* padding: 15px 0; */ /* Removed to match index.css */
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px; /* Changed to match index.css */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.logo-area h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-area h1 a {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

/* Typewriter Effect */
.typewriter {
    overflow: hidden;
    border-right: 0.15em solid var(--primary-color);
    white-space: nowrap;
    margin: 0;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    color: var(--text-secondary);
    animation: typewriter 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

/* Hamburger (this is the first definition, keep one) */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    outline: none;
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 4px;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

nav ul {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 6px;
    align-items: center;
}

nav ul li a {
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-weight: 500;
    display: inline-block;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: all 0.4s ease;
    z-index: -1;
}

nav ul li a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

nav ul li a:hover::before,
nav ul li a.active::before {
    left: 0;
    animation: shimmer 2s ease-in-out infinite;
}

nav ul li a:hover::after {
    width: 100px;
    height: 100px;
}

nav ul li a:hover,
nav ul li a.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--glow-shadow);
}

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

/* === New Button Styles (copied from index.css logic) === */
.nav-button-base {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-button-base:hover {
    background: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

.theme-toggle-icon-btn { /* Specific to theme icon button */
    padding: 10px;
    border-radius: 50%;
    font-size: 1.1rem;
}

.theme-toggle-icon-btn:hover { /* Replicates old .theme-toggle hover from projects.css more closely */
    transform: rotate(180deg) scale(1.1);
    color: white; /* Match old hover color */
}
/* Add the ripple effect for theme-toggle-icon-btn if desired, from old .theme-toggle */
.theme-toggle-icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}
.theme-toggle-icon-btn:hover::before {
    opacity: 1;
    animation: ripple 0.6s ease-out;
}


.language-toggle-btn { /* Specific to language text button */
    padding: 8px 12px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

.language-toggle-btn:hover {
    transform: scale(1.05);
}

@keyframes ripple { /* Ensure ripple is defined if used */
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}
/* === End New Button Styles === */

/* Hero Section Enhanced */
.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 100%;
    gap: 60px;
    animation: fadeInUp 1.2s ease-out 0.6s both;
}

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

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: titleReveal 1.5s ease-out 0.8s both;
}

/* Dark theme adjustments for project links */
[data-theme="dark"] .project-links .btn {
    box-shadow: 0 2px 8px rgba(116, 185, 255, 0.3);
}

[data-theme="dark"] .project-links .btn:hover {
    box-shadow: 0 4px 12px rgba(162, 155, 254, 0.4);
}

@keyframes titleReveal {
    from {
        transform: translateY(30px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotateX(0deg);
        opacity: 1;
    }
}

/* Responsive adjustments for project links */
@media (max-width: 768px) {
    .project-links {
        flex-wrap: wrap;
    }

    .project-card {
        min-height: 480px;
    }
}

@media (max-width: 480px) {
    .project-links {
        position: relative;
        bottom: 0;
        left: 0;
        margin-top: 20px;
        margin-left: 0;
        margin-bottom: 10px;
    }

    .project-content {
        padding-bottom: 20px;
    }

    .project-card {
        min-height: auto;
        padding-bottom: 0;
    }
}

.gradient-text {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 4s ease-in-out infinite, text-glow 3s ease-in-out infinite alternate;
    background-size: 200% 200%;
}

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

@keyframes text-glow {
    0% { filter: drop-shadow(0 0 5px rgba(108, 92, 231, 0.5)); }
    100% { filter: drop-shadow(0 0 20px rgba(108, 92, 231, 0.8)); }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 1.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 1.4s both;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: zoomIn 1.5s ease-out 1s both;
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.profile-circle {
    position: relative;
    width: 300px;
    height: 300px;
}

.hero-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--hover-shadow);
    transition: all 0.5s ease;
    animation: profile-float 6s ease-in-out infinite;
}

@keyframes profile-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.hero-image:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: var(--glow-shadow);
    filter: brightness(1.1) contrast(1.1);
}

.orbit-ring {
    position: absolute;
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
    border-radius: 50%;
    opacity: 0.4;
    animation: orbit 20s linear infinite;
}

.ring-1 {
    width: 320px;
    height: 320px;
    top: -10px;
    left: -10px;
    border-color: var(--primary-color);
    animation: orbit 25s linear infinite, ring-glow 4s ease-in-out infinite alternate;
}

.ring-2 {
    width: 360px;
    height: 360px;
    top: -30px;
    left: -30px;
    border-color: var(--secondary-color);
    animation: orbit 30s linear infinite reverse, ring-glow 3s ease-in-out infinite alternate;
    animation-delay: -7s;
}

.ring-3 {
    width: 400px;
    height: 400px;
    top: -50px;
    left: -50px;
    border-color: var(--accent-color);
    animation: orbit 35s linear infinite, ring-glow 5s ease-in-out infinite alternate;
    animation-delay: -14s;
}

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

@keyframes ring-glow {
    0% {
        box-shadow: 0 0 5px currentColor;
        opacity: 0.3;
    }
    100% {
        box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
        opacity: 0.6;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
        padding-bottom: 70px; /* Add space for links at bottom */
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: fadeInUp 1s ease-out 2s both;
}

.scroll-arrow {
    animation: bounce 2s infinite, rotate-360 4s linear infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

/* Enhanced Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: all 0.5s ease;
}

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

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
    animation: btn-pulse 2s ease-in-out infinite;
}

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

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--primary-color);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-secondary:hover {
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--glow-shadow);
}

.btn-secondary:hover::after {
    width: 100%;
}

@keyframes btn-pulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4); }
    50% { box-shadow: 0 8px 35px rgba(108, 92, 231, 0.6); }
}

.pulse-animation {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(9, 132, 227, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(9, 132, 227, 0); }
    100% { box-shadow: 0 0 0 0 rgba(9, 132, 227, 0); }
}

/* Enhanced Section Styles */
.section-padding {
    padding: 100px 20px;
    animation: fadeInUp 0.8s ease-out;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    animation: slideInFromTop 1s ease-out;
}

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

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: title-shine 3s ease-in-out infinite;
    background-size: 200% 200%;
}

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

.section-divider {
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: 0 auto 1rem;
    border-radius: 2px;
    animation: divider-expand 2s ease-out;
}

@keyframes divider-expand {
    from { width: 0; }
    to { width: 80px; }
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Enhanced Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    margin-bottom: 60px;
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    animation: section-line 2s ease-out;
}

@keyframes section-line {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

section:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* Enhanced Page Title */
.page-title {
    text-align: center;
    padding: 120px 20px 60px;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
    animation: pageTitle 1.5s ease-out;
}

[data-theme="dark"] .page-title {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

@keyframes pageTitle {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.page-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    animation: grain-move 20s linear infinite;
}

@keyframes grain-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100px, -100px); }
}

.page-title h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: textReveal 1.2s ease-out 0.3s both;
}

.page-title p {
    font-size: 1.3rem;
    opacity: 0.9;
    animation: textReveal 1.2s ease-out 0.6s both;
}

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

/* Enhanced Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 40px 20px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.5s ease;
    position: relative;
    border: 1px solid var(--border-color);
    animation: projectCard 0.8s ease-out;
}

[data-theme="dark"] .project-card {
    border-color: var(--border-color);
    background: rgba(30, 30, 30, 0.8);
}

@keyframes projectCard {
    from {
        transform: translateY(30px) rotateX(15deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotateX(0deg);
        opacity: 1;
    }
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 1;
}

.project-card:hover {
    transform: translateY(-10px) rotateY(5deg);
    box-shadow: var(--hover-shadow);
    margin-top: 0;
}

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

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1) rotate(2deg);
    filter: brightness(1.1);
}

.project-content {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.project-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.project-card:hover .project-content h3 {
    color: var(--primary-color);
    animation: textShine 2s ease-in-out infinite;
}

@keyframes textShine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.project-tags {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
    animation: tagsFade 1s ease-out 0.3s both;
}

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

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.project-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.7s both;
}

/* Enhanced Filter Buttons */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .filter-btn {
    background: rgba(30, 30, 30, 0.7);
    border-color: var(--border-color);
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: all 0.4s ease;
    z-index: -1;
}

.filter-btn:hover,
.filter-btn.active {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--glow-shadow);
}

.filter-btn:hover::before,
.filter-btn.active::before {
    left: 0;
}

/* Enhanced Search Container */
.search-container input {
    transition: all 0.4s ease;
    position: relative;
    width: 180px;
    font-size: 13px;
    padding: 8px 12px;
}

[data-theme="dark"] .search-container input {
    background-color: rgba(30, 30, 30, 0.7);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(9, 132, 227, 0.3);
    transform: translateY(-2px);
}

/* Loading and Transition Effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Enhanced Footer */
footer {
    background: var(--bg-secondary);
    padding: 60px 20px 40px;
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    animation: footerLine 2s ease-out;
}

@keyframes footerLine {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

footer p {
    text-align: center;
    color: var(--text-secondary);
    animation: fadeInUp 1s ease-out 0.3s both;
}

/* Enhanced Responsive Design with Animations */
@media (max-width: 768px) {
    .search-container input {
        width: 150px;
        font-size: 12px;
        padding: 7px 10px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        animation: mobileHero 1s ease-out;
    }

    @keyframes mobileHero {
        from { transform: scale(0.9); opacity: 0; }
        to { transform: scale(1); opacity: 1; }
    }

    .hero-text {
        text-align: center;
    }

    .profile-circle {
        width: 200px;
        height: 200px;
        animation: mobilePulse 3s ease-in-out infinite;
    }

    @keyframes mobilePulse {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.05); }
    }

    .projects-grid {
        grid-template-columns: 1fr;
        animation: mobileGrid 1s ease-out;
    }

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

/* Enhanced Scroll Animations */
html {
    scroll-behavior: smooth;
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
    transition: all 0.3s ease;
    max-height: 150px; /* Limit height to prevent pushing links */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.5);
}

/* Cursor Trail Effect */
.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.7;
    animation: cursorFade 1s ease-out forwards;
}

@keyframes cursorFade {
    from { opacity: 0.7; transform: scale(1); }
    to { opacity: 0; transform: scale(0); }
}

/* No Results Message Dark Mode */
[data-theme="dark"] #no-results {
    color: var(--text-secondary);
}

/* Performance optimizations */
* {
    will-change: auto;
}

.shape, .orbit-ring, .hero-image {
    will-change: transform;
}

.btn, .project-card, .filter-btn {
    will-change: transform, box-shadow;
}