:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #a855f7;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-light: #0f172a;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

.background-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 40%);
    filter: blur(80px);
}

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

/* Glassmorphism Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    transition: var(--transition);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

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

.theme-toggle {
    background: none;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 8rem 0;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-image img {
    width: 320px;
    height: 320px;
    border-radius: 2rem;
    object-fit: cover;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    transform: rotate(3deg);
    transition: var(--transition);
}

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

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 900;
}

.hero .gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* Project Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.project-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.skill-pill {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Contact */
.contact-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 4rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--text-main);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary);
    transform: scale(1.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        padding: 4rem 0;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

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