:root {
    /* Base Colors - Light Mode */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    /* Brand Colors */
    --primary-color: #4c1d95;
    /* Deep Elegant Purple */
    --primary-hover: #3b0764;
    --secondary-color: #d97706;
    /* Gold/Amber */
    --action-color: #25d366;
    /* WhatsApp */
    --white: #ffffff;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --primary-color: #a78bfa;
    /* Lighter Purple for dark mode */
    --primary-hover: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: background-color 0.3s, color 0.3s;
    /* Smooth theme switch */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-whatsapp {
    background-color: var(--action-color);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp:hover {
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
    transform: scale(1.05);
}

/* Utilities */
.text-center {
    text-align: center;
}

.section {
    padding: 4rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Card Hover */
.project-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Developer Colors (Dynamic Classes) */
.dev-border-cury {
    border-top: 4px solid #0056b3;
}

.dev-border-trisul {
    border-top: 4px solid #003366;
}

.dev-border-econ {
    border-top: 4px solid #ed1c24;
}

.dev-border-tiberio {
    border-top: 4px solid #d4af37;
}

/* ===========================
   MOBILE RESPONSIVE
   =========================== */

/* Hamburger button - hidden on desktop */
.hamburger {
    display: none;
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}
.hamburger:hover {
    border-color: var(--primary-color);
}

/* Mobile nav overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.mobile-nav.open {
    display: block;
}
.mobile-nav-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: var(--bg-card);
    padding: 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mobile-nav-panel a {
    display: block;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}
.mobile-nav-panel a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.mobile-nav-close {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 8px;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    /* Header */
    .desktop-nav {
        display: none !important;
    }
    .hamburger {
        display: block;
    }

    /* Details page - stack sidebar below content */
    .detail-grid {
        grid-template-columns: 1fr !important;
    }
    .detail-sidebar {
        position: static !important;
        top: auto !important;
    }

    /* Hero text */
    .hero-section h1 {
        font-size: 1.8rem !important;
    }

    /* Cards grid */
    #projects-grid, #featured-projects {
        grid-template-columns: 1fr !important;
    }

    /* Footer grid */
    footer .container {
        grid-template-columns: 1fr !important;
    }

    /* Contact form */
    .form-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding: 24px 16px !important;
        border-radius: 12px !important;
    }
    .page-title {
        font-size: 1.8rem !important;
    }
}