:root {
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    /* Light Theme (Default) */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --hero-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(99, 102, 241, 0.1);
    --accent: #F59E0B; /* Keep accent for now, it's not in the new root */
}

[data-theme="dark"] {
    --primary: #3B82F6; /* Re-add primary for dark theme */
    --primary-hover: #2563EB; /* Re-add primary-hover for dark theme */
    --bg-main: #0f172a;
    --bg-alt: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --nav-bg: rgba(15, 23, 42, 0.8);
    --card-bg: #1e293b;
    --card-border: #334155;
    --card-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    --hero-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(99, 102, 241, 0.2);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5); /* Re-add shadow for dark theme */
    --glass: rgba(30, 41, 59, 0.5); /* Re-add glass for dark theme */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    user-select: none; /* Complementary protection */
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    padding: 20px 0;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--card-border);
    transition: all 0.3s;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s;
    font-size: 0.95rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.btn-lg { padding: 16px 40px; font-size: 1.1rem; }

/* Hero */
.hero {
    padding: 160px 0 100px;
    background: var(--hero-gradient);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(99, 102, 241, 0.1), transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 20px;
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--text-main) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-btns {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.hero-image img {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid var(--card-border);
}

/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
    max-width: 600px;
    margin: 0 auto 70px;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.vertical-card {
    text-decoration: none;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
}

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

.card-image {
    height: 180px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-icon {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg-main) 100%);
}

.card-icon i {
    width: 48px;
    height: 48px;
    color: var(--primary);
}

.card-content {
    padding: 30px;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.card-content p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 20px;
}

.btn-sm {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Custom Section */
.custom {
    padding: 100px 0;
}

.custom-box {
    background: var(--card-bg);
    border-radius: 30px;
    border: 1px solid var(--card-border);
    padding: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.custom-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--text-main);
}

.custom-features {
    list-style: none;
    margin-bottom: 40px;
}

.custom-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.custom-list {
    display: flex;
    justify-content: center;
    gap: 40px;
    list-style: none;
    margin: 40px 0;
    flex-wrap: wrap;
}

.custom-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.custom-list i { color: var(--accent); }

/* Contact */
.contact { padding: 100px 0; }
.contact-card {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    padding: 80px;
    border-radius: 40px;
    text-align: center;
}

.contact-info h2 { font-size: 3.5rem; margin-bottom: 20px; }
.contact-info p { font-size: 1.2rem; margin-bottom: 40px; color: rgba(255,255,255,0.8); }

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-item {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 24px 40px;
    border-radius: 20px;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: background 0.3s;
    border: 1px solid rgba(255,255,255,0.2);
}

.contact-item:hover {
    background: rgba(255,255,255,0.2);
}

.contact-item i { width: 32px; height: 32px; color: white; }

footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-theme {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}

.btn-theme:hover {
    border-color: var(--primary);
    color: var(--primary);
}

@media (max-width: 968px) {
    .nav-links {
        display: none;
    }
    h1 { font-size: 3rem; }
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    .hero-btns {
        justify-content: center;
    }
    .hero-image { order: -1; }
    .custom-box {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }
    .custom-list { flex-direction: column; gap: 15px; align-items: center; }
    .mobile-toggle {
        display: block;
        color: var(--text-main);
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 3100;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 3005;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        display: flex; /* Always flex but hidden via right: -100% */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.5rem;
        padding: 15px;
        display: block;
        color: var(--text-main);
    }
}

.menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2500;
}

.menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

body.menu-open {
    overflow: hidden;
}
