:root {
    --radius: 14px;
    --shadow: 0 10px 30px rgba(0,0,0,.15);
    --transition: 200ms ease;
}

/* Tema MODERNO (dark): fundo azul-petróleo escuro + acento ciano, primária dourado */
[data-theme="moderno"] {
    color-scheme: dark;
    --primary: #d4af37;            /* Dourado destaque */
    --accent: #22d3ee;             /* Ciano moderno */
    --bg: #0b0e12;                 /* Fundo profundo */
    --bg-2: #10141a;               /* Superfície */
    --text: #e5e7eb;               /* Texto principal */
    --muted: #9ca3af;              /* Texto secundário */
    --border: #1f2937;             /* Bordas discretas */
    --ring: rgba(212,175,55,.35);  /* Glow dourado */
    --particle-color: #d4af37;
}

/* Tema LUXUOSO (claro): branco e cinza, dourado quente */
[data-theme="luxo"] {
    color-scheme: light;
    --primary: #d4af37;            /* Dourado destaque */
    --accent: #b08d57;             /* Latão suave */
    --bg: #ffffff;                 /* Fundo branco */
    --bg-2: #f9f9f9;               /* Superfície */
    --text: #1a1a1a;               /* Texto principal */
    --muted: #4b5563;              /* Texto secundário */
    --border: #e5e7eb;             /* Bordas suaves */
    --ring: rgba(212,175,55,.4);   /* Glow dourado */
    --particle-color: #000000;
}

html{
    scroll-behavior: smooth;
    font-size: 16px;
}

body{
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(600px 600px at 10% 5%, color-mix(in oklab, var(--primary) 10%, transparent), transparent 55%),
        radial-gradient(800px 800px at 90% 20%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 60%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
    position: relative;
}

*{
    box-sizing: border-box;
}

/* ---------------------- PARTICLES ---------------------- */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ---------------------- HEADER ---------------------- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    background: color-mix(in srgb, var(--bg) 70%, transparent 30%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.1rem; 
    letter-spacing: .5px; 
    font-weight: 600;
    color: var(--text);
}

/* ---------------------- NAV ---------------------- */
nav a {
    margin: 0 .8rem; 
    text-decoration: none; 
    color: var(--muted); 
    font-weight: 500;
    padding: .4rem .2rem; 
    border-radius: 8px; 
    transition: color var(--transition), background var(--transition);
}

nav a:hover { 
    color: var(--primary); 
}

/* ---------------------- THEME TOGGLE ---------------------- */
.theme-toggle { 
    display: inline-block; 
    gap: .5rem; 
    margin: auto;
}

.btn-theme {
    appearance: none; 
    border: 1px solid var(--border); 
    border-radius: 999px;
    padding: .4rem .9rem; 
    background: var(--bg-2); 
    color: var(--text);
    cursor: pointer; 
    transition: all var(--transition);
}
.btn-theme:hover { 
    background: var(--accent); 
    color: var(--bg);
}
.btn-theme.is-active { 
    background: var(--primary);
    color: var(--bg);
    border-color: var(--primary);
}

/* ---------------------- HAMBURGER MENU ---------------------- */
#hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

#hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text); /* antes era fixo branco */
    border-radius: 2px;
    transition: all 0.3s ease;
}

#hamburger-menu:hover span {
    background-color: var(--primary);
}

/* ---------------------- MENU RESPONSIVO ---------------------- */
@media (max-width: 875px) {
    #menu {
        display: none;
        flex-direction: column;
        background: color-mix(in srgb, var(--bg) 90%, transparent 10%);
        position: absolute;
        top: 77px;
        left: 0;
        width: 100%;
        padding: 10px;
        border-radius: 0 0 8px 8px;
        border-top: 1px solid var(--border);
        backdrop-filter: blur(6px);
    }

    #menu.active {
        display: flex; 
    }

    .navItem{
        text-align: center;
        padding: .6rem;
    }

    .navItem:hover {
        background: color-mix(in srgb, var(--accent) 15%, transparent);
        color: var(--primary);
    }

    #hamburger-menu {
        display: flex;
    }
}

/* ---------------------- HERO ---------------------- */
.hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: 100vh;
}

@media (max-width: 768px){
    .hero{
        flex-direction: column;
    }

    .hero img{
        margin-top: 100px;
    }
}

.hero img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
    box-shadow: var(--shadow);
}

.hero-text {
    max-width: 600px;
}

.hero-text h2 {
    font-size: 2rem;
    margin-bottom: .6rem;
    color: var(--primary);
}

.hero-text p {
    line-height: 1.6;
    color: var(--muted);
    text-align: justify;
}

/* ---------------------- SOCIAL ICONS ---------------------- */
.social-icons {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.social-icons a {
    color: var(--muted);
    font-size: 1.3rem;
    transition: color var(--transition), transform var(--transition);
}
.social-icons a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* ---------------------- GRID SECTIONS ---------------------- */
.skills-grid,
.lang-grid,
.projects-grid {
    display: grid;
    gap: 1.5rem;
}

.skills-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.lang-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.projects-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

/* ---------------------- CARDS ---------------------- */
.card {
    background: color-mix(in srgb, var(--bg-2) 85%, transparent 15%);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.card p {
    color: var(--muted);
    margin: .5rem 0 0;
    font-size: .95rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,.25);
    border-color: var(--primary);
}

/* ---------------------- PROJECT CARDS ---------------------- */
.projects-grid .card img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    object-fit: cover;
    max-height: 180px;
}

section {
    padding: 80px 10%;
    position: relative;
    z-index: 1;
}

section h2 {
    font-size: 1.8rem; margin-bottom: 1.2rem; color: var(--text);
    border-left: 6px solid var(--primary); padding-left: 12px;
    text-shadow: 0 0 12px color-mix(in oklab, var(--primary) 25%, transparent);
}

/* ---------------------- FOOTER ---------------------- */
footer {
    padding: 2rem 10%;
    text-align: center;
    background: color-mix(in srgb, var(--bg) 85%, transparent 15%);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(6px);
    font-size: .9rem;
    color: var(--muted);
}

footer p:first-child {
    margin-bottom: .5rem;
    color: var(--text);
}
