/* =========================================
   1. VARIÁVEIS E TEMAS
   ========================================= */
:root {
    /* Paleta Principal - O "BPSO Blue" */
    --brand-blue: #2563eb;       /* Azul Royal Vibrante */
    --brand-dark: #1e40af;       /* Azul Escuro (Hover) */
    --brand-light: #60a5fa;      /* Azul Claro (Brilhos) */
    
    /* Fundos Dark Mode (Padrão) */
    --bg-dark: #0f172a;          /* Slate 900 */
    --bg-card: #1e293b;          /* Slate 800 */

    /* Texto Dark Mode */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    /* Efeitos Dark Mode */
    --glass: rgba(15, 23, 42, 0.7);
    --border: rgba(255, 255, 255, 0.08); /* Borda sutil */
    --card-shadow: 0 15px 30px -10px rgba(0,0,0,0.5);
    
    --font-head: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* --- TEMA LIGHT (Sobrescrita de Variáveis) --- */
[data-theme="light"] {
    /* Fundo Claro */
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;

    /* Texto Escuro */
    --text-main: #0f172a;
    --text-muted: #475569;
    
    /* Efeitos Light */
    --glass: rgba(255, 255, 255, 0.8);
    --border: rgba(37, 99, 235, 0.15);
    --card-shadow: 0 10px 40px -10px rgba(148, 163, 184, 0.4);
}

/* =========================================
   2. RESET E ESTILOS GLOBAIS
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    /* Gradiente de fundo sutil com leve ruído visual para profundidade */
    background-image: radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.08), transparent 25%), 
                      radial-gradient(circle at 85% 30%, rgba(37, 99, 235, 0.05), transparent 25%);
}

/* Tipografia "Tight" para visual moderno */
h1, h2, h3, h4, h5, h6 { 
    font-family: var(--font-head); 
    letter-spacing: -1px; /* Títulos mais compactos */
}

/* Limite de leitura para melhor UX (evita linhas muito longas) */
p { max-width: 65ch; }

/* Scrollbar Personalizada */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-blue); }

/* Texto Destaque Global */
.highlight-text { color: var(--brand-blue); position: relative; }
.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 5px; left: 0; width: 100%; height: 8px;
    background: var(--brand-blue);
    opacity: 0.2;
    z-index: -1;
    transform: skewX(-15deg);
}

/* =========================================
   3. COMPONENTES GLOBAIS (Botões, Badges)
   ========================================= */
/* Botão Primário */
.btn-primary {
    background: var(--brand-blue);
    color: white;
    padding: 1rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    transition: 0.3s;
    box-shadow: 0 10px 30px -5px rgba(37, 99, 235, 0.4);
    border: none; cursor: pointer;
}
.btn-primary:hover { transform: translateY(-3px); background: var(--brand-dark); }

/* Botão Secundário */
.btn-secondary {
    background: transparent;
    color: var(--text-main);
    padding: 1rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    transition: 0.3s;
}
/* No Dark Mode, borda mais visível no hover */
.btn-secondary:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: rgba(37,99,235,0.05); }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-blue);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
}
.pulse { 
    width: 8px; height: 8px; background: var(--brand-blue); 
    border-radius: 50%; 
    animation: pulse-blue 2s infinite; 
}

/* Badge Pequeno (Carreira) */
.badge-sm {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    padding: 8px 16px; 
    border-radius: 25px;
    font-size: 0.85rem; 
    font-weight: 700;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* =========================================
   4. NAVBAR & MENU
   ========================================= */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.2rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.5px; color: var(--text-main); }
.dot { color: var(--brand-blue); font-size: 2rem; line-height: 0; position: relative; top: 4px; }

.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.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(--brand-blue); }

.nav-actions { display: flex; align-items: center; gap: 15px; }

.btn-nav {
    border: 1px solid rgba(37, 99, 235, 0.3);
    color: var(--brand-blue);
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    display: flex; align-items: center; gap: 8px;
}
.btn-nav:hover { background: var(--brand-blue); color: white; border-color: var(--brand-blue); box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}
.theme-btn:hover { background: rgba(37, 99, 235, 0.1); color: var(--brand-blue); transform: rotate(15deg); }

[data-theme="light"] .theme-btn {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background-color: rgba(37, 99, 235, 0.05);
}
[data-theme="light"] .theme-btn:hover { background-color: var(--brand-blue); color: white; }

[data-theme="light"] .ri-sun-line { display: none; }
:not([data-theme="light"]) .ri-moon-line { display: none; }
[data-theme="light"] .ri-moon-line { display: block !important; }

/* =========================================
   5. SEÇÃO HERO (INÍCIO)
   ========================================= */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    padding: 0 10%;
    padding-top: 80px;
    position: relative;
}

.hero h1 { font-size: 3.8rem; line-height: 1.1; margin-bottom: 1.5rem; font-weight: 800; letter-spacing: -2px; }
.hero p { color: var(--text-muted); font-size: 1.15rem; margin-bottom: 2.5rem; max-width: 90%; font-weight: 300; }

.hero-btns { display: flex; gap: 1rem; margin-bottom: 4rem; }

.stats-container {
    display: flex; gap: 3rem;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}
.stat-box h3 { font-size: 2rem; font-weight: 800; color: var(--text-main); line-height: 1; margin-bottom: 5px; }
.stat-box p { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* Elementos Visuais Hero */
.hero-visual {
    position: relative;
    display: flex; justify-content: center; align-items: center;
    height: 100%;
}

.hero-blob {
    position: absolute;
    width: 450px; height: 450px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-dark));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    opacity: 0.25; z-index: 1;
    animation: morph 8s ease-in-out infinite;
}
[data-theme="light"] .hero-blob { opacity: 0.15; filter: blur(60px); }

.illustration {
    position: relative; z-index: 2; width: 100%; max-width: 480px;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.4));
}

/* Card de Código Flutuante (Efeito Vidro Premium) */
.code-card {
    position: absolute;
    bottom: 50px; right: 125px; 
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Borda superior e esquerda mais claras para simular luz */
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 3;
    font-family: 'Consolas', 'Monaco', monospace;
    min-width: 400px;
    animation: float 6s ease-in-out infinite alternate-reverse;
}
[data-theme="light"] .code-card { color: #e2e8f0; }

.code-header { display: flex; gap: 8px; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.code-header .dot { width: 10px; height: 10px; border-radius: 50%; display: block; top: 0; }
.red { background: #ef4444; } .yellow { background: #f59e0b; } .green { background: #22c55e; }

.code-card pre code { font-size: 0.9rem; color: #e2e8f0; line-height: 1.5; }
.kwd { color: #c084fc; font-weight: bold; }
.str { color: #86efac; }
.bool { color: #fca5a5; }

/* =========================================
   6. SEÇÃO SOBRE MIM (TABS)
   ========================================= */
.about-section { padding: 100px 1.5rem; position: relative; }
.container-tabs { max-width: 1100px; margin: 0 auto; }
.about-header { text-align: center; margin-bottom: 40px; }

/* Navegação das Tabs */
.tabs-header { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }

.tab-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.3s ease;
}
.tab-btn:hover { background: rgba(37, 99, 235, 0.1); color: var(--brand-blue); border-color: var(--brand-blue); }
.tab-btn.active {
    background: var(--brand-blue); color: white;
    border-color: var(--brand-blue);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Área de Conteúdo das Tabs (Efeito Vidro Premium) */
.tabs-content-wrapper {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Luz superior */
    border-left: 1px solid rgba(255, 255, 255, 0.1); /* Luz esquerda */
    border-radius: 24px;
    padding: 3.5rem;
    min-height: 450px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}
[data-theme="light"] .tabs-content-wrapper {
    background: #ffffff;
    box-shadow: var(--card-shadow);
    border-color: rgba(0,0,0,0.05);
}

.tab-content { display: none; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }

/* --- Aba 1: Jornada (Foto Grande) --- */
.content-flex { display: flex; gap: 50px; align-items: center; }
.text-area { flex: 1.2; }
.text-area h3 { font-size: 2rem; margin-bottom: 1.2rem; color: var(--text-main); font-weight: 700; }
.text-area p { margin-bottom: 1.2rem; color: var(--text-muted); line-height: 1.7; font-size: 1.05rem; }

.image-area { flex: 1; display: flex; justify-content: center; align-items: center; padding: 20px; }
.photo-container {
    position: relative; width: 100%; max-width: 500px; height: 500px;
    display: flex; justify-content: center; align-items: center; border-radius: 20px;
}

/* Foto sem borda sólida, visual mais orgânico */
.journey-photo {
    object-fit: contain;
    width: 100%; height: 100%; object-fit: cover;
    border-radius: 24px; position: relative; z-index: 2;
    /* Sombra colorida difusa */
    box-shadow: 0 20px 60px -10px rgba(37, 99, 235, 0.4);
    transform: rotate(-2deg); /* Leve inclinação para estilo */
    transition: transform 0.4s ease;
}
.journey-photo:hover { transform: rotate(0deg) scale(1.02); }

.photo-blob {
    position: absolute; width: 500px; height: 500px;
    background: linear-gradient(135deg, var(--brand-light), var(--brand-blue));
    border-radius: 60% 40% 40% 60% / 60% 30% 70% 40%;
    opacity: 0.3; filter: blur(60px); z-index: 1;
    animation: morph 8s ease-in-out infinite alternate;
}

/* --- Aba 2: Formação (Timeline) --- */
.timeline {
    border-left: 3px solid var(--brand-blue);
    padding-left: 40px;
    max-width: 700px; margin: 0 auto;
}
.timeline-item { position: relative; margin-bottom: 40px; padding-left: 10px; }
.timeline-item::before {
    content: ''; position: absolute;
    left: -50px; top: 8px;
    width: 16px; height: 16px;
    background: var(--brand-blue); border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.2);
    border: 3px solid var(--bg-dark);
}
[data-theme="light"] .timeline-item::before { border-color: #ffffff; }

.timeline-item .year {
    font-size: 0.9rem; color: var(--brand-blue); font-weight: 700;
    display: block; margin-bottom: 8px; text-transform: uppercase;
}
.timeline-item h4 { font-size: 1.3rem; color: var(--text-main); margin-bottom: 5px; font-weight: 700; }
.timeline-item p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

/* --- Aba 3: Carreira --- */
.career-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 20px; padding: 2.5rem;
    max-width: 800px; margin: 0 auto;
}
.company-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.icon-company {
    width: 60px; height: 60px; background: rgba(37, 99, 235, 0.15);
    color: var(--brand-blue); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.company-info { flex: 1; }
.company-header h4 { font-size: 1.4rem; color: var(--text-main); font-weight: 700; margin: 0 0 5px 0; }
.tech-used { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.tech-used span {
    font-size: 0.85rem; background: rgba(37, 99, 235, 0.1);
    padding: 8px 14px; border-radius: 6px;
    color: var(--brand-blue); border: 1px solid rgba(37, 99, 235, 0.2);
    font-weight: 600;
}

/* =========================================
   7. SEÇÃO EXPERTISE / SERVIÇOS
   ========================================= */
.expertise-section { padding: 120px 10%; position: relative; z-index: 10; }

.bg-blur-side {
    position: absolute; top: 30%; right: -100px;
    width: 400px; height: 400px;
    background: var(--brand-blue); filter: blur(150px);
    opacity: 0.12; z-index: -1;
}

.expertise-container { display: flex; gap: 4rem; align-items: center; justify-content: space-between; }
.bio-column { flex: 1; max-width: 500px; }
.bio-text { color: var(--text-muted); font-size: 1rem; line-height: 1.7; margin-bottom: 1.5rem; }
.bio-text strong { color: var(--text-main); font-weight: 600; }

.services-column { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }

.mini-card {
    display: flex; align-items: flex-start; gap: 20px;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(30, 41, 59, 0.6));
    border: 1px solid var(--border);
    border-radius: 16px; transition: 0.3s;
}
[data-theme="light"] .mini-card {
    background: #ffffff; box-shadow: var(--card-shadow);
    border-color: rgba(0,0,0,0.05);
}

.mini-card:hover, .active-card { border-color: rgba(37, 99, 235, 0.4); transform: translateX(-10px); }
[data-theme="light"] .mini-card:hover { border-color: var(--brand-blue); }

.mini-card h3 { font-size: 1.1rem; color: var(--text-main); margin-bottom: 5px; font-weight: 600; }
.mini-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; margin: 0; }

.icon-box-small {
    min-width: 45px; height: 45px; background: rgba(37, 99, 235, 0.1);
    color: var(--brand-blue); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.mini-card:hover .icon-box-small { background: var(--brand-blue); color: white; }

/* =========================================
   8. SEÇÃO PROJETOS
   ========================================= */
.projects-section { padding: 100px 10%; background-color: transparent; position: relative; }
.section-header { text-align: center; margin-bottom: 60px; max-width: 600px; margin-left: auto; margin-right: auto; }
.section-header h2 { font-size: 2.5rem; color: var(--text-main); margin-top: 10px; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }

.project-card {
    background-color: #1e293b;
    border: 1px solid var(--border);
    border-radius: 20px; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .project-card {
    background-color: #ffffff; box-shadow: var(--card-shadow);
    border-color: rgba(0,0,0,0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--brand-blue);
    /* Sombra mais suave ao flutuar */
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.2);
}

[data-theme="light"] .project-links {
    background: none;
}

/* Efeito sutil no fundo ao passar o mouse (UX Feedback) */
[data-theme="light"] .project-card:hover { 
    background-color: #dce7fd; 
}

.project-image { height: 220px; position: relative; overflow: hidden; }
.img-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; color: rgba(255,255,255,0.05); transition: 0.5s;
}
[data-theme="light"] .img-placeholder { background: linear-gradient(135deg, #f1f5f9, #e2e8f0); color: rgba(0,0,0,0.1); }
.project-card:hover .img-placeholder { transform: scale(1.05); }

.project-links {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: flex; align-items: center; justify-content: center; gap: 15px;
    opacity: 0; transition: 0.3s;
}
.project-card:hover .project-links { opacity: 1; }

.link-btn {
    width: 50px; height: 50px; background: var(--brand-blue); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    text-decoration: none; font-size: 1.2rem; transition: 0.3s;
    transform: translateY(20px);
}
.project-card:hover .link-btn { transform: translateY(0); }
.link-btn:hover { background: white; color: var(--brand-blue); }

.project-content { padding: 25px; }
.project-content h3 { font-size: 1.4rem; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.project-content p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.5; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tech-tags span {
    font-size: 0.75rem; font-weight: 600; color: var(--brand-blue);
    background: rgba(37, 99, 235, 0.1);
    padding: 5px 12px; border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Garante que a imagem respeite o tamanho do card */
.img-placeholder img {
    width: 100%;
    height: 100%;
    
    /* OPÇÃO 1 (Recomendada): Preenche tudo, corta o excesso, foca no TOPO */
    object-fit: cover;
    object-position: top center; 
    
    /* OPÇÃO 2 (Alternativa): Mostra a imagem inteira, mas pode sobrar borda preta */
    /* object-fit: contain; */
    
    transition: transform 0.5s ease;
}

/* Quando passar o mouse, a imagem dá um leve zoom suave */
.project-card:hover .img-placeholder img {
    transform: scale(1.05);
}

/* Container do Botão "Ver Mais" */
.projects-action {
    margin-top: 60px;       /* Espaçamento generoso do grid */
    display: flex;
    justify-content: center; /* Centraliza o botão */
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Opcional: Efeito sutil no botão específico dessa área */
.projects-action .btn-secondary {
    padding: 0.8rem 2rem; /* Levemente mais compacto que o Hero */
    font-size: 0.95rem;
}

/* =========================================
   9. SEÇÃO CONTATO
   ========================================= */
.contact-section {
    position: relative; padding-top: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
}
.cta-wrapper { padding: 0 10%; margin-bottom: 80px; }

.cta-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 32px; padding: 4rem 2rem;
    text-align: center; position: relative; overflow: hidden;
    max-width: 900px; margin: 0 auto; box-shadow: var(--card-shadow);
}
[data-theme="light"] .cta-card { background: #ffffff; border-color: rgba(37, 99, 235, 0.2); }

.glow-effect {
    position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
    width: 60%; height: 60%; background: var(--brand-blue);
    filter: blur(120px); opacity: 0.2; z-index: -1; border-radius: 50%;
}

.cta-card h2 { font-size: 2.8rem; color: var(--text-main); margin-bottom: 1.5rem; line-height: 1.2; }
.cta-card p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 2.5rem auto; }
.cta-buttons { display: flex; justify-content: center; gap: 20px; margin-bottom: 3rem; flex-wrap: wrap; }
.btn-large { padding: 1.2rem 3rem; font-size: 1.1rem; }

.status-indicator {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.85rem; color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border);
}
[data-theme="light"] .status-indicator { background: rgba(0,0,0,0.03); }

.dot-status {
    width: 8px; height: 8px; background-color: #22c55e;
    border-radius: 50%; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-green 2s infinite;
}

/* =========================================
   10. FOOTER
   ========================================= */
.main-footer {
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.95);
    padding: 60px 10% 30px 10%;
}
[data-theme="light"] .main-footer { background: #f1f5f9; }

.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 2rem; }
.footer-logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--text-main); }

.footer-links { list-style: none; display: flex; gap: 2rem; }
.footer-links a { text-decoration: none; color: var(--text-muted); font-size: 0.95rem; transition: 0.3s; }
.footer-links a:hover { color: var(--brand-blue); }

.social-links { display: flex; gap: 1rem; }
.social-links a {
    width: 40px; height: 40px; background: rgba(255,255,255,0.05);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; color: var(--text-main); text-decoration: none;
    transition: 0.3s; font-size: 1.2rem;
}
[data-theme="light"] .social-links a { background: rgba(0,0,0,0.05); }
.social-links a:hover { background: var(--brand-blue); transform: translateY(-3px); color: white; }

.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 30px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem; color: #64748b; flex-wrap: wrap; gap: 1rem;
}

/* =========================================
   11. WIDGET DE CHAT (BPSO AI)
   ========================================= */
.chat-widget { position: fixed; bottom: 30px; right: 30px; z-index: 9999; font-family: var(--font-body); }

.chat-toggle-btn {
    width: 60px; height: 60px;
    background: var(--brand-blue); border-radius: 50%; border: none;
    color: white; font-size: 1.8rem; cursor: pointer;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; justify-content: center;
}
.chat-toggle-btn:hover { transform: scale(1.1) rotate(10deg); }

.notification-dot {
    position: absolute; top: 12px; right: 12px;
    width: 10px; height: 10px; background: #22c55e;
    border: 2px solid var(--bg-dark); border-radius: 50%;
}

.chat-window {
    position: absolute; bottom: 80px; right: 0;
    width: 350px; height: 500px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    display: flex; flex-direction: column; overflow: hidden;
    transform-origin: bottom right; transform: scale(0); opacity: 0;
    transition: all 0.3s ease; pointer-events: none;
}
.chat-window.open { transform: scale(1); opacity: 1; pointer-events: all; }

.chat-header {
    background: var(--brand-blue); padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center; color: white;
}
.chat-title { display: flex; align-items: center; gap: 10px; }
.chat-title h4 { font-size: 1rem; margin: 0; font-weight: 600; }
.chat-title span { font-size: 0.75rem; opacity: 0.9; }
.chat-close-btn { background: transparent; border: none; color: white; font-size: 1.2rem; cursor: pointer; }

.chat-messages {
    flex: 1; padding: 20px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 15px;
    background: rgba(0,0,0,0.02);
}
.message {
    max-width: 80%; padding: 10px 15px;
    border-radius: 12px; font-size: 0.9rem; line-height: 1.4; word-wrap: break-word;
}
.message.bot {
    background: rgba(37, 99, 235, 0.1); color: var(--text-main);
    border-bottom-left-radius: 2px; align-self: flex-start;
    border: 1px solid var(--border);
}
.message.user {
    background: var(--brand-blue); color: white;
    border-bottom-right-radius: 2px; align-self: flex-end;
}

.chat-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chat-chips button {
    background: transparent; border: 1px solid var(--brand-blue);
    color: var(--brand-blue); padding: 5px 10px; border-radius: 15px;
    font-size: 0.75rem; cursor: pointer; transition: 0.2s;
}
.chat-chips button:hover { background: var(--brand-blue); color: white; }

.chat-input-area {
    padding: 15px; border-top: 1px solid var(--border);
    display: flex; gap: 10px; background: var(--bg-card);
}
#chat-input {
    flex: 1; background: rgba(255,255,255,0.05);
    border: 1px solid var(--border); padding: 10px; border-radius: 8px;
    color: var(--text-main); outline: none;
}
#chat-send {
    background: var(--brand-blue); border: none; color: white;
    width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
}

/* =========================================
   12. ANIMAÇÕES (KEYFRAMES)
   ========================================= */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(37,99,235, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(37,99,235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37,99,235, 0); }
}
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
@keyframes morph {
    0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg); }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; transform: rotate(5deg); }
    100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg); }
}
@keyframes float { 
    0% { transform: translateY(0px); } 
    100% { transform: translateY(-15px); } 
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   13. RESPONSIVIDADE (MEDIA QUERIES)
   ========================================= */
@media (max-width: 968px) {
    body, html { overflow-x: hidden; }

    /* Navbar */
    .nav-links { display: none; }
    
    /* Hero */
    .hero { 
        grid-template-columns: 1fr; 
        text-align: center; 
        
        /* CORREÇÃO DO ALINHAMENTO: */
        /* Reduzimos o padding lateral de 10% (do desktop) para 5% (igual a navbar) */
        padding: 120px 5% 60px 5% !important; 
        
        gap: 1.5rem;
    }
    .hero-visual { 
        order: 1; margin-bottom: 120px; position: relative; width: 100%;
        display: flex; justify-content: center;
    }
    .hero-content { order: 2; margin: 0 auto; padding: 0 1rem; }
    .hero-content h1 {font-size: 55px;}
    .hero-btns { justify-content: center; flex-wrap: wrap; }
    .stats-container { justify-content: center; flex-wrap: wrap; gap: 1.5rem; }
    .hero-blob {
        width: 260px; height: 260px; position: absolute; top: 20px;
        left: 0; right: 0; margin: 0 auto; transform: none;
    }
    .illustration { max-width: 300px; display: block; margin: 0 auto; }
    
    /* Hero - Code Card */
    .code-card {
        position: absolute; bottom: -80px; left: -20px; right: 0; margin: 0 auto;
        transform: none; min-width: 0; width: 90%; max-width: 340px; padding: 1rem;
    }
    .code-card pre { white-space: pre-wrap; word-wrap: break-word; font-size: 0.75rem; text-align: left; }
    .code-header { margin-bottom: 8px; justify-content: flex-start; }

    /* Tabs (Sobre Mim) */
    .tabs-content-wrapper { padding: 1.5rem 1rem; min-height: auto; }
    .tabs-header { flex-direction: column; width: 100%; }
    .tab-btn { width: 100%; justify-content: center; }
    .image-area { display: none; }
    .content-flex { flex-direction: column; text-align: center; }
    
    /* Timeline */
    .timeline { padding-left: 20px; margin-left: 5px; }
    .timeline-item::before { left: -26px; }

    /* Career Card */
    .career-card {
        background: transparent !important; border: none !important;
        padding: 0 !important; box-shadow: none !important;
        border-radius: 0 !important; width: 100%; max-width: 100%; margin: 0;
    }
    .career-card p { word-break: break-word; }
    .company-header { flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; }
    .company-header h4, .company-header span { word-break: break-word; }
    .company-header .badge-sm { margin-left: 0 !important; white-space: nowrap; }

    /* Expertise */
    .expertise-container { flex-direction: column; gap: 3rem; }
    .mini-card:hover { transform: translateY(-5px); }

    /* Footer & CTA */
    .cta-card h2 { font-size: 2rem; }
    .cta-card { padding: 3rem 1.5rem; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { flex-direction: column; gap: 1rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
    /* UX Melhorado: Tabs com Scroll Horizontal no Mobile */
    .tabs-header {
        flex-direction: row; /* Força linha */
        flex-wrap: nowrap;   /* Não quebra */
        overflow-x: auto;    /* Scroll lateral */
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        /* Máscara de fade para indicar que tem mais conteúdo */
        mask-image: linear-gradient(to right, black 90%, transparent 100%);
    }
    .tab-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Ajustes Finos do Chat */
    .chat-widget { right: 10px !important; bottom: 10px !important; }
    .chat-toggle-btn { right: 25px; bottom: 30px; }
    
    .chat-window {
        position: fixed !important; 
        width: 90% !important; 
        left: 5% !important; right: 5% !important;
        bottom: 100px !important; 
        height: 60vh !important; max-height: 600px !important;
        margin: 0 !important;
        transform-origin: bottom center !important; 
    }
}

/* =========================================
   BOTÃO DE COMANDO (DESKTOP ONLY)
   ========================================= */

/* Comportamento Padrão (PC/Telas Grandes): VISÍVEL */
.desktop-only {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-right: 5px !important; /* Espaço para não grudar no botão de tema */
}

/* Quando a tela for menor que 768px (Celular): ESCONDE */
@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }
}

/* =========================================
   SELEÇÃO DE TEXTO PERSONALIZADA
   ========================================= */
::selection {
    background: var(--brand-blue); /* Fundo Azul BPSO */
    color: #ffffff; /* Texto Branco */
    text-shadow: none;
}

/* Firefox */
::-moz-selection {
    background: var(--brand-blue);
    color: #ffffff;
}


/* =========================================
   SCROLL ANIMATIONS (Reveal)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(50px); /* Começa 50px para baixo */
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); /* Suavização premium */
    will-change: opacity, transform; /* Otimização de performance */
}

/* Quando o JS adicionar a classe 'active' */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Opcional: Delay para elementos em sequência (ex: cards) */
.reveal.delay-100 { transition-delay: 0.1s; }
.reveal.delay-200 { transition-delay: 0.2s; }
.reveal.delay-300 { transition-delay: 0.3s; }
