/* Modern Reset & Base Styles */
:root {
    /* Color Palette - Light Mode */
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --secondary: #ec4899;
    --bg: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text: #1e293b;
    --text-muted: #64748b;
    --border: rgba(148, 163, 184, 0.2);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -10px rgba(79, 70, 229, 0.2);

    /* Layout & Spacing */
    --container-width: 1000px;
    --header-height: 80px;
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Color Palette - Dark Mode */
    --primary: #818cf8;
    --primary-glow: rgba(129, 140, 248, 0.4);
    --secondary: #f472b6;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --shadow-hover: 0 20px 40px -10px rgba(129, 140, 248, 0.25);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 20%);
    background-attachment: fixed;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

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

ul {
    list-style: none;
}

/* Layout Util */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header / Hero */
.header {
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--header-height);
    margin-bottom: 80px;
    position: relative;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    order: 1;
}

.hero-image-container {
    order: 2;
    position: relative;
}

.header img {
    width: 320px;
    height: 320px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    object-fit: cover;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
    animation: morph 8s ease-in-out infinite, float 6s ease-in-out infinite;
    transition: var(--transition);
}

.header h1 {
    margin-bottom: 24px;
}

.header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

/* Navigation - Floating Pill */
.main-nav {
    display: flex;
    gap: 8px;
    background: var(--card-bg);
    padding: 8px;
    border-radius: 50px;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    width: fit-content;
}

.main-nav a {
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
    z-index: 100;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: grid;
    place-items: center;
}

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

/* Sections */
section {
    padding: 80px 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.section-header::after {
    content: '';
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0.5;
}

/* Cards & Grid */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

/* Skills - Tag Cloud */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.skill-tag {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
}

.skill-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Projects */
.project-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.project-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Education */
.edu-block {
    margin-bottom: 24px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
}

.edu-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

.edu-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 4px 0 8px;
}

/* Contact */
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: var(--transition);
    color: var(--text);
}

.contact-item:hover {
    border-color: var(--primary);
    transform: translateX(8px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes morph {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        order: 2;
    }

    .hero-image-container {
        order: 1;
        display: flex;
        justify-content: center;
    }

    .header p {
        margin: 0 auto 30px;
    }

    .main-nav {
        margin: 0 auto;
        flex-wrap: wrap;
        justify-content: center;
    }

    h1 {
        font-size: 2.5rem;
    }
}
