:root {
    /* Light Mode Color Palette */
    --bg-color: #f8f9ff;
    --bg-gradient-1: #e8f0ff;
    --bg-gradient-2: #fff5f8;
    --surface-color: #ffffff;
    --primary-color: #6366f1;
    --secondary-color: #ec4899;
    --accent-1: #8b5cf6;
    --accent-2: #14b8a6;
    --accent-3: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(99, 102, 241, 0.2);
    --font-main: 'Poppins', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.08);
    --shadow-md: 0 4px 16px rgba(99, 102, 241, 0.12);
    --shadow-lg: 0 8px 32px rgba(99, 102, 241, 0.16);
    --shadow-xl: 0 16px 48px rgba(99, 102, 241, 0.2);
}

/* Dark Mode Color Palette */
[data-theme="dark"] {
    --bg-color: #0a0a0f;
    --bg-gradient-1: #0f0f1a;
    --bg-gradient-2: #1a0f1a;
    --surface-color: #1a1a2e;
    --primary-color: #818cf8;
    --secondary-color: #f472b6;
    --accent-1: #a78bfa;
    --accent-2: #2dd4bf;
    --accent-3: #fbbf24;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(26, 26, 46, 0.7);
    --glass-border: rgba(129, 140, 248, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--surface-color);
    border: 2px solid var(--glass-border);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    margin-left: 1rem;
}

.theme-toggle:hover {
    transform: rotate(20deg) scale(1.1);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.theme-toggle i {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

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

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

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

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

.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-1));
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 1.5rem auto 3rem;
    border-radius: 2px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: 0.4s;
    border-radius: 2px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 5rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    display: block;
    font-size: 2.8rem;
    font-weight: 400;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-1));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

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

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

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

.btn-outline:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-image::before {
    content: '';
    position: absolute;
    inset: -20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

.hero-image img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    box-shadow: var(--shadow-xl);
    animation: morph 8s ease-in-out infinite;
    position: relative;
    z-index: 1;
    border: 5px solid var(--surface-color);
}

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

/* About Section */
.section {
    padding: 6rem 0;
    position: relative;
}

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

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

.info-list {
    margin-top: 2rem;
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.info-item {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    min-width: 120px;
    font-weight: 700;
    color: var(--primary-color);
}

.info-value {
    color: var(--text-secondary);
}

/* Stats */
.stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.stat-item h3 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.stat-item p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

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

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

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 4px solid var(--surface-color);
    box-shadow: var(--shadow-md);
}

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

.timeline-item:nth-child(odd)::before {
    right: -10px;
}

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

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: left;
}

.timeline-content:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.timeline-date {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

.skill-card {
    background: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

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

.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.skill-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.skill-card:hover i {
    transform: scale(1.1);
}

.skill-name {
    margin-top: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.skill-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-gradient-1);
    border-radius: 10px;
    margin-top: 1rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    transition: width 1s ease-out;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: var(--surface-color);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-img {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.project-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(236, 72, 153, 0.95));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    padding: 2rem;
    text-align: center;
    z-index: 1;
}

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

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 700;
}

.project-category {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.project-info .project-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

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

.project-link {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.project-link.demo {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-1));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.project-link.demo:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-link.video {
    background: #ff0000;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.project-link.video:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Contact */
.contact-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-card {
    background: var(--surface-color);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    width: 280px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1);
}

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

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    background: var(--surface-color);
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .theme-toggle {
        margin-left: auto;
        margin-right: 1rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        text-align: center;
        padding: 2rem 0;
        border-bottom: 1px solid var(--glass-border);
        box-shadow: var(--shadow-lg);
    }

    [data-theme="dark"] .nav-links {
        background: rgba(26, 26, 46, 0.98);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 1rem 0;
        font-size: 1.1rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }

    .hero h1 span {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .hero-image img {
        width: 300px;
        height: 300px;
    }

    .hero-buttons {
        justify-content: center;
    }

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

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item::before {
        left: 11px !important;
    }

    .timeline-item:nth-child(even), .timeline-item:nth-child(odd) {
        left: 0;
    }

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

    .stats {
        flex-direction: column;
        gap: 1.5rem;
    }
}
