/* ========================================= */
/* 1. CONFIGURAÇÃO DOS TEMAS (COPIADO DA PÁGINA PRINCIPAL) */
/* OBS: O tema inicial desta página é ESCURO, então definimos ele como padrão */
/* ========================================= */

:root {
    --fundo-principal: #1a1a1a; /* Fundo geral do site (Escuro) */
    --fundo-secundario: #222; /* Fundo do cabeçalho (Escuro) */
    --cor-texto-principal: #f0f0f0; /* Texto principal (Claro) */
    --cor-texto-secundario: #ccc; /* Texto secundário (Cinza Claro) */
    --cor-acento: #3498db; 
    --cor-acento-hover: #2980b9;
    --cor-sombra: rgba(255, 255, 255, 0.1);
    --cor-borda: #444;
    --cor-svg-icon-claro: #fff; /* Ícone CLARO no tema ESCURO */
    --cor-svg-icon-escuro: #222; 
}

/* Variáveis para Light Mode (Tema Claro) */
body.light-mode {
    --fundo-principal: #f4f4f9; /* Fundo geral claro */
    --fundo-secundario: #ffffff; /* Fundo do cabeçalho claro */
    --cor-texto-principal: #222; 
    --cor-texto-secundario: #555; 
    --cor-acento: #3498db; 
    --cor-acento-hover: #2980b9;
    --cor-sombra: rgba(0, 0, 0, 0.1);
    --cor-borda: #bdc3c7;
    --cor-svg-icon-claro: #222; /* Ícone ESCURO no tema CLARO */
    --cor-svg-icon-escuro: #fff;
}


/* --- Base Styles --- */
body {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    background-color: var(--fundo-principal);
    color: var(--cor-texto-secundario);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 0.5px solid var(--cor-borda);
    padding-bottom: 15px;
    background-color: var(--fundo-secundario);
}

.header-name {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--cor-texto-principal);
    margin: 0;
}

.header-projects {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--cor-texto-secundario);
    margin: 0;
}

.main-content {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.header-button {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 1.2em;
    color: var(--cor-texto-secundario);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid var(--cor-borda);
    border-radius: 5px;
    transition: all 0.3s ease;
    display: inline-block; 
    margin-bottom: 40px; 
}

.header-button:hover {
    background-color: var(--cor-borda); 
    color: var(--cor-texto-principal);
    border-color: var(--cor-texto-principal);
}

/* ===================================== */
/* --- CONTROLES (TEMA E IDIOMA) --- */
/* ===================================== */

.header-controls {
    position: fixed;
    top: 125px; /* CORREÇÃO FINAL: Desce os controles para não cobrir o título (Desktop) */
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 15px; 
}


/* --- Theme Switcher Styles --- */
.theme-switcher {
    display: flex; 
    align-items: center;
}

.theme-toggle-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    color: var(--cor-svg-icon-claro); 
    transition: all 0.2s ease;
}

.theme-toggle-button svg {
    width: 30px; 
    height: 30px;
    fill: currentColor; 
    stroke: currentColor;
}

.theme-toggle-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}


/* --- Language Selector Styles --- */
.language-selector {
    position: static; 
    z-index: 1000;
    font-family: 'Outfit', sans-serif;
    color: var(--cor-svg-icon-claro); 
}

.language-selector .globe-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* AJUSTE PARA FORÇAR A HERANÇA DE COR CORRETA NO BOTÃO */
    color: var(--cor-svg-icon-claro); 
}

.language-selector .globe-button svg {
    width: 35px;
    height: 35px;
    transition: transform 0.2s ease-in-out;
}

/* ESTA REGRA É CRUCIAL PARA FAZER O GLOBO E OS OUTROS ÍCONES SEGUIR A VARIÁVEL DE TEMA */
.language-selector .globe-button svg path,
.language-selector .globe-button svg circle,
.language-selector .globe-button svg line {
    fill: none;
    stroke: currentColor; 
    transition: stroke 0.3s ease;
}

.language-selector .globe-button:hover svg path,
.language-selector .globe-button:hover svg circle,
.language-selector .globe-button:hover svg line {
    stroke: var(--cor-texto-secundario);
}


.language-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background-color: rgba(0, 0, 0, 0.75);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    min-width: 130px;
    z-index: 1001;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.language-dropdown.open {
    display: block;
}

.language-dropdown button {
    background: none;
    border: none;
    color: white;
    padding: 8px 12px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.language-dropdown button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-dropdown button.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

.language-dropdown button img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}


/* ===================================== */
/* --- Responsividade do Seletor de Idioma e Tema --- */
/* ===================================== */

@media (max-width: 768px) {
    .header-controls {
        top: 80px; /* Ajuste para o tablet */
        right: 15px;
    }
}

@media (max-width: 480px) {
    .header-controls {
        top: 182px; /* Ajuste para smartphones */
        right: 25px;
        gap: 10px;
    }
    
    .theme-toggle-button svg {
        width: 28px;
        height: 28px;
    }

    .language-selector .globe-button svg {
        width: 30px;
        height: 30px;
    }
}