:root {
    /* Light Theme */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #ec4899;
    --bg-1: #f8fafc;
    --bg-2: #e2e8f0;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-hover: rgba(255, 255, 255, 0.9);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(255, 255, 255, 0.5);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary: #818cf8;
    --primary-dark: #6366f1;
    --secondary: #f472b6;
    --bg-1: #0f172a;
    --bg-2: #1e293b;
    --surface: rgba(30, 41, 59, 0.7);
    --surface-hover: rgba(30, 41, 59, 0.9);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(-45deg, var(--bg-1), var(--bg-2), #1e1b4b, #312e81);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: color 0.5s ease;
    position: relative;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Ambient Background shapes */
.ambient-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate;
    will-change: transform;
}

/* Custom cursor */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2000;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.6);
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0.75;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.35), 0 0 40px rgba(236, 72, 153, 0.2);
    transition: opacity 0.2s ease;
}

.cursor-dot.is-active {
    background: var(--secondary);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
}

.cursor-ring.is-active {
    border-color: var(--secondary);
    box-shadow: 0 0 24px rgba(236, 72, 153, 0.45), 0 0 48px rgba(79, 70, 229, 0.25);
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.3s ease;
}

nav.scrolled {
    background: var(--surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

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

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

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.4rem 2.2rem 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='currentColor'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 14px;
}

.lang-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.lang-select:hover {
    transform: translateY(-1px);
    border-color: rgba(79, 70, 229, 0.5);
}

.menu-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
    transform: translateY(-1px);
    background: var(--surface-hover);
}

.lang-select option {
    background: #0f172a;
    color: #e2e8f0;
}

[data-theme="dark"] .lang-select option {
    background: #0b1220;
    color: #e2e8f0;
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* Sections General */
section {
    padding: 6rem 0;
    min-height: 80vh;
    /* Changed from 100vh to ensure content flows better */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
    align-self: center;
}

/* Hero Section */
#home {
    min-height: 100vh;
    padding-top: 5rem;
    text-align: center;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

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

.hero-img {
    display: flex;
    justify-content: center;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.cursor {
    display: inline-block;
    margin-left: 2px;
    color: var(--primary);
    animation: cursorBlink 1s steps(2, start) infinite;
}

@keyframes cursorBlink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.avatar-container {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    position: relative;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    padding: 5px;
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.4);
    animation: pulse 3s infinite;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-1);
    background-color: var(--bg-1);
}

/* Placeholder for User Image */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--bg-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-muted);
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(79, 70, 229, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 2rem;
    min-height: 1.5em;
}

.bio {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px -5px var(--primary);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px var(--primary);
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--text-main);
    color: var(--bg-1);
    transform: translateY(-3px);
}

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

.skill-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    background: var(--surface-hover);
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.skill-bar {
    height: 8px;
    background: var(--bg-2);
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0;
    /* Animated with JS */
    transition: width 1.5s ease-out;
}

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

.project-card {
    background: var(--surface);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.project-img {
    height: 200px;
    background: var(--bg-2);
    position: relative;
    overflow: hidden;
}

.project-img div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    transition: transform 0.5s ease;
}

/* Gradients for project placeholders */
.p-grad-1 {
    background: linear-gradient(135deg, #FF6B6B, #556270);
}

.p-grad-2 {
    background: linear-gradient(135deg, #4ECDC4, #556270);
}

.p-grad-3 {
    background: linear-gradient(135deg, #A83279, #D38312);
}

.project-card:hover .project-img div {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-info p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

.project-link:hover {
    color: var(--secondary);
}

/* Project Detail Pages */
.project-hero {
    padding: 8rem 0 4rem;
    text-align: center;
}

.project-showcase {
    background: var(--surface);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.1));
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--surface);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--bg-1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.social-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

label {
    font-weight: 500;
    font-size: 0.9rem;
}

input,
textarea {
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-1);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.react-badge {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
}

.react-badge__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.react-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #61dafb;
    box-shadow: 0 0 10px rgba(97, 218, 251, 0.6);
}

/* Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

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

    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin-top: 0.75rem;
        flex-direction: column;
        gap: 1rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

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

    .nav-actions {
        gap: 0.5rem;
    }

    .lang-select {
        font-size: 0.75rem;
        padding: 0.35rem 2rem 0.35rem 0.75rem;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .btn-group {
        flex-direction: column;
        align-items: center;
    }

    .hero-img > div {
        font-size: 9rem !important;
    }

    section {
        padding: 4rem 0;
    }

    /* Simplified for mobile, ideally would be a hamburger menu */
}

@media (hover: none), (prefers-reduced-motion: reduce) {
    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}