/* =========================================
    VARIÁVEIS DE TEMA E CSS GERAL
    ========================================= */
:root {
    --bg-base: #f0f4f8; --bg-blob-1: rgba(59, 130, 246, 0.15); --bg-blob-2: rgba(139, 92, 246, 0.15); 
    --card-bg: rgba(255, 255, 255, 0.6); --card-border: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 8px 32px rgba(31, 38, 135, 0.07); --text-main: #0f172a; --text-muted: #475569;
    --primary: #2563eb; --primary-glow: rgba(37, 99, 235, 0.4); --accent: #8b5cf6;
    --timeline-line: #cbd5e1; --icon-fill: #334155; --modal-overlay: rgba(15, 23, 42, 0.6); 
    --modal-surface: #ffffff; --input-bg: #f8fafc; 
}
[data-theme="dark"] {
    --bg-base: #020617; --bg-blob-1: rgba(37, 99, 235, 0.15); --bg-blob-2: rgba(139, 92, 246, 0.1);
    --card-bg: rgba(30, 41, 59, 0.5); --card-border: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4); --text-main: #f8fafc; --text-muted: #94a3b8;
    --primary: #3b82f6; --primary-glow: rgba(59, 130, 246, 0.5); --accent: #a855f7;
    --timeline-line: #334155; --icon-fill: #cbd5e1; --modal-overlay: rgba(0, 0, 0, 0.8);
    --modal-surface: #0f172a; --input-bg: rgba(255, 255, 255, 0.05);
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; scroll-behavior: smooth; }
body { background-color: var(--bg-base); color: var(--text-main); line-height: 1.7; overflow-x: hidden; position: relative; transition: background-color 0.4s ease, color 0.4s ease; }
body::before, body::after { content: ''; position: fixed; border-radius: 50%; filter: blur(100px); z-index: -1; transition: background-color 0.4s ease; }
body::before { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--bg-blob-1); }
body::after { bottom: -10%; right: -10%; width: 50vw; height: 50vw; background: var(--bg-blob-2); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; display: flex; gap: 4rem; position: relative; z-index: 1; }

/* --- BOTÕES MELHORADOS --- */
.fixed-actions { position: fixed; top: 2rem; right: 2rem; display: flex; align-items: center; gap: 0.5rem; z-index: 100; }
.action-btn { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 50%; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-main); backdrop-filter: blur(10px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; font-weight: 800; font-size: 0.9rem; }
.action-btn:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.1) translateY(-2px); }
.action-btn:active { transform: scale(0.95); }
.action-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.action-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-glow { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border: none; padding: 12px 28px; border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 10px 20px -10px var(--primary-glow); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-glow:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 25px -8px var(--primary-glow); }
.btn-glow:active { transform: translateY(0) scale(0.98); box-shadow: 0 5px 10px -5px var(--primary-glow); }
.btn-glow:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.social-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; color: var(--text-main); font-weight: 600; text-decoration: none; backdrop-filter: blur(10px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.social-btn svg { width: 20px; height: 20px; fill: var(--icon-fill); transition: 0.3s; }
.social-btn:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.social-btn:hover svg { fill: var(--primary); }
.social-btn:active { transform: translateY(-1px); }
.social-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.btn-cv-secondary { text-decoration: none; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); border-bottom: 2px solid var(--timeline-line); padding-bottom: 2px; transition: all 0.3s ease; align-self: flex-start; }
.btn-cv-secondary:hover { color: var(--text-main); border-color: var(--primary); }
.btn-cv-secondary:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 2px; }

/* --- SIDEBAR & NAV --- */
.sidebar { position: sticky; top: 0; width: 40%; height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: 5rem 0; }
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.5rem; color: var(--text-main); letter-spacing: -0.03em; }
.hero-subtitle { font-size: 1.1rem; font-weight: 600; color: var(--text-main); margin-bottom: 1.5rem; letter-spacing: 1px; text-transform: uppercase; opacity: 0.9; }
.hero-desc { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; margin-bottom: 2rem; }

.nav-menu ul { list-style: none; padding: 0; margin: 3rem 0; }
.nav-menu li { margin-bottom: 0.8rem; }
.nav-menu a { display: block; text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 1rem; padding: 10px 20px; border-radius: 10px; transition: 0.3s; border-left: 3px solid transparent; }
.nav-menu a:hover { color: var(--text-main); background: rgba(255,255,255, 0.03); }
.nav-menu a.active { color: var(--primary); border-left-color: var(--primary); background: rgba(37, 99, 235, 0.05); }
[data-theme="light"] .nav-menu a:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .nav-menu a.active { background: rgba(37, 99, 235, 0.03); }

.badges-container { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-bottom: 3rem; }
.badges-container img { border-radius: 4px; height: 26px; }

.social-container { display: flex; flex-direction: column; gap: 1rem; margin-top: auto; }
.social-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- CONTEÚDO PRINCIPAL --- */
.main-content { width: 65%; padding: 5rem 0 2rem 0; display: flex; flex-direction: column; gap: 1.5rem; }
.top-cta { display: flex; justify-content: flex-end; margin-bottom: 1.5rem; } /* Ajuste de espaçamento feito aqui */
.glass-panel { background: var(--card-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--card-border); border-radius: 20px; box-shadow: var(--card-shadow); padding: 2.5rem; transition: background-color 0.4s ease, border-color 0.4s ease; }
.section-header { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; color: var(--text-main); }

/* --- TIMELINE --- */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--timeline-line); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 3.5rem; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: -2.4rem; top: 0.3rem; width: 14px; height: 14px; background: var(--bg-base); border: 3px solid var(--primary); border-radius: 50%; box-shadow: 0 0 0 4px var(--bg-base); transition: 0.3s; z-index: 2; }
.timeline-item:hover::before { background: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
.job-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; flex-wrap: wrap; gap: 1rem; }
.job-title-group { display: flex; flex-direction: column; }
.job-title { font-size: 1.3rem; font-weight: 700; color: var(--text-main); }
.job-company { color: var(--primary); font-weight: 600; font-size: 1rem; }
.job-date { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); background: var(--bg-base); padding: 5px 14px; border-radius: 30px; border: 1px solid var(--card-border); transition: background-color 0.4s ease; }
.job-desc { color: var(--text-muted); margin-top: 0.5rem; line-height: 1.6; max-width: 95%; }
.job-desc ul { margin-top: 0.8rem; list-style: none; }
.job-desc li { position: relative; padding-left: 1.2rem; margin-bottom: 0.4rem; }
.job-desc li::before { content: '→'; position: absolute; left: 0; color: var(--primary); font-weight: bold; }

/* --- CARROSSEL (DESKTOP) --- */
.carousel-container { 
    width: 100%; 
    overflow-x: auto; /* Permite scroll via JS */
    position: relative; 
    padding: 0.5rem 0; 
    scrollbar-width: none; 
    -ms-overflow-style: none;
    /* Máscara de fade mantida no desktop */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); 
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent); 
}
.carousel-container::-webkit-scrollbar { display: none; }
.carousel-track { display: flex; gap: 1.5rem; width: max-content; }
.project-card { width: 380px; flex-shrink: 0; padding: 1.8rem; border-radius: 16px; background: rgba(0,0,0,0.02); border: 1px solid var(--card-border); transition: 0.3s; display: flex; flex-direction: column; justify-content: space-between; }
[data-theme="dark"] .project-card { background: rgba(255,255,255,0.03); }
.project-card:hover { border-color: var(--primary); box-shadow: var(--card-shadow); }
.project-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
[data-theme="dark"] .project-card h3 { color: #ffffff; }
.project-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.2rem; line-height: 1.6; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; background: var(--primary-glow); color: var(--primary); padding: 4px 10px; border-radius: 6px; border: 1px solid var(--card-border); }

/* --- FOOTER & MODAL --- */
.site-footer { margin-top: 1rem; padding-top: 2rem; border-top: 1px solid var(--card-border); text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.site-footer strong { color: var(--text-main); }
.footer-sub { font-size: 0.8rem; margin-top: 0.5rem; opacity: 0.8; }

.modal { display: none; position: fixed; z-index: 1000; inset: 0; background: var(--modal-overlay); backdrop-filter: blur(8px); align-items: center; justify-content: center; transition: background 0.4s; }
.modal-content { background: var(--modal-surface); border: 1px solid var(--card-border); padding: 2.5rem; border-radius: 24px; width: 90%; max-width: 450px; box-shadow: var(--card-shadow); position: relative; max-height: 90vh; overflow-y: auto; transition: background 0.4s ease; }
.close-btn { position: absolute; top: 20px; right: 24px; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.close-btn:hover { color: var(--text-main); transform: scale(1.1); }
.form-title { text-align: center; font-weight: 800; font-size: 1.3rem; margin-bottom: 1.5rem; color: var(--text-main); }
.form-group { margin-bottom: 1.2rem; }
label { display: block; margin-bottom: 0.4rem; font-size: 0.85rem; font-weight: 700; color: var(--text-main); }
input { width: 100%; padding: 14px; background: var(--input-bg); border: 1px solid var(--timeline-line); color: var(--text-main); border-radius: 12px; font-size: 1rem; transition: 0.3s; }
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); background: transparent; }
.optional { font-weight: 400; color: var(--text-muted); font-size: 0.75rem; }

/* =========================================
    MODO MOBILE (RESPONSIVIDADE)
    ========================================= */
@media (max-width: 968px) {
    .container { flex-direction: column; gap: 2rem; padding: 1.5rem; }
    .fixed-actions { position: absolute; top: 1.5rem; right: 1.5rem; }
    .sidebar { position: relative; width: 100%; height: auto; padding: 5rem 0 1rem 0; }
    .sidebar .hero-desc, .sidebar .btn-cv-secondary { text-align: left;}
    .badges-container { justify-content: flex-start; margin-bottom: 1.5rem; }
    .nav-menu { display: none; }
    .main-content { width: 100%; padding: 1rem 0; gap: 2rem; }
    
    /* Top CTA ajustado para Mobile */
    .top-cta { 
        display: flex; 
        justify-content: center; 
        width: 100%;
        margin-bottom: 2rem;
    }
    .top-cta .btn-glow {
        width: 100%;
        justify-content: center;
    }

    .hero-title { font-size: 2.8rem; }
    .job-header { align-items: flex-start; flex-direction: column; gap: 0.5rem; }
    .job-desc { max-width: 100%; }
    
    /* Transformando o Carrossel em Lista Vertical */
    .carousel-container {
        overflow: visible; 
        mask-image: none; 
        -webkit-mask-image: none;
        padding: 0;
    }
    .carousel-track {
        flex-direction: column; 
        width: 100%; 
        gap: 1.5rem; 
    }
    .project-card {
        width: 100%; 
    }
}

input, textarea { 
    width: 100%; 
    padding: 14px; 
    background: var(--input-bg); 
    border: 1px solid var(--timeline-line); 
    color: var(--text-main); 
    border-radius: 12px; 
    font-size: 1rem; 
    transition: 0.3s; 
    font-family: inherit; /* Garante que use a Plus Jakarta Sans */
}

input:focus, textarea:focus { 
    outline: none; 
    border-color: var(--primary); 
    box-shadow: 0 0 0 4px var(--primary-glow); 
    background: transparent; 
}

textarea {
    resize: vertical; /* Impede o usuário de quebrar o layout horizontalmente */
    min-height: 120px;
}

.btn-cv-secondary:hover {
    color: var(--primary); /* Faz o texto brilhar na cor do seu tema */
    border-color: var(--primary);
    transform: translateX(5px); /* Um leve deslocamento para a direita ao passar o mouse */
}

.cv-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* Reduzido (antes era 36px) */
    height: 28px; /* Reduzido */
    border-radius: 6px;
    background: transparent; /* Removemos o fundo cinza para ficar mais "limpo" */
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cv-icon-btn svg {
    width: 15px; /* Ícone mais delicado */
    height: 15px;
    transition: transform 0.3s ease;
}

.cv-icon-btn:hover {
    color: var(--primary); /* Mantém a cor primária no texto e ícone */
    
    /* MODIFICAÇÃO: Um fundo mais presente e uma borda sutil no hover */
    background: var(--bg-blob-1); /* Um roxo/azul muito claro de fundo */
    border: 1px solid var(--primary-glow); /* Uma borda sutil brilhante */
    
    transform: translateY(-3px) scale(1.05); /* Sobe um pouco mais e aumenta levemente */
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.1); /* Sombra suave na cor primária */
}

.cv-icon-btn:active {
    transform: translateY(0);
}

/* Tratamento específico para Mobile */
@media (max-width: 768px) {
    .cv-action-group {
        margin-bottom: 1.5rem; /* Respiro balanceado para telas menores */
    }
}

/* Override exclusivo para Dark Mode (Contraste Corrigido) */
[data-theme="dark"] .tag {
    color: #ffffff; /* Fonte branca/gelo para saltar do fundo */
    background: rgba(59, 130, 246, 0.2); /* Reduz o alfa do fundo para 20% */
    border-color: rgba(59, 130, 246, 0.4); /* Borda sutil acompanhando a cor primária */
}