/* ==========================================================================
   1. RESET & CONFIGURAÇÕES GERAIS (DARK MODE)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #121212; /* Fundo escuro principal */
    color: #e0e0e0;            /* Texto claro principal */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   2. LÓGICA DAS ABAS
   ========================================================================== */
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3. HEADER & MENU DE NAVEGAÇÃO (DARK MODE)
   ========================================================================== */
header {
    background-color: #1a1a1a; /* Fundo do topo ligeiramente mais claro que o geral */
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #2d2d2d;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #00e668; /* Um verde um pouco mais vivo para dar contraste no escuro */
    letter-spacing: 1px;
}

nav {
    width: 100%;
}

.nav-tabs {
    display: flex;
    justify-content: space-between;
    list-style: none;
    width: 100%;
    background-color: #2a2a2a; /* Fundo do menu de abas */
    padding: 5px;
    border-radius: 8px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 10px 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #a0a0a0;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Aba Selecionada no Modo Escuro */
.tab-item.active {
    background-color: #00e668; 
    color: #121212; /* Texto escuro na aba ativa para contraste perfeito */
}

/* ==========================================================================
   4. ESTILIZAÇÃO GERAL DAS SEÇÕES
   ========================================================================== */
main {
    padding: 30px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.hero-container {
    text-align: center;
    padding: 40px 0;
}

.hero-container h1 {
    font-size: 2.2rem;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-container p {
    font-size: 1.1rem;
    color: #a0a0a0;
}

/* ==========================================================================
   6. SEÇÃO DE PORTFÓLIO (CARDS DARK MODE)
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 35px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.section-header p {
    color: #a0a0a0;
    font-size: 0.95rem;
}

.portfolio-category {
    margin-bottom: 40px;
}

.portfolio-category h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 15px;
    border-left: 4px solid #00e668;
    padding-left: 10px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

/* Card Escuro */
.portfolio-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #2d2d2d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) {
    .portfolio-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 230, 104, 0.1); /* Brilho verde sutil no hover */
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.image-container {
    width: 100%;
    height: 200px;
    background-color: #222;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 15px;
}

.card-info h4 {
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 8px;
}

.card-info p {
    font-size: 0.9rem;
    color: #a0a0a0;
    line-height: 1.4;
}

.btn-project-link {
    display: inline-block;
    margin-top: 12px;
    color: #00e668;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.btn-project-link:hover {
    color: #00b451;
}

/* ==========================================================================
   8. SEÇÃO SOBRE (DARK MODE)
   ========================================================================== */
.about-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
}

.about-avatar {
    width: 100%;
    max-width: 280px; /* Controla o tamanho máximo do seu personagem */
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-avatar img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Adiciona um brilho sutil verde atrás do personagem para destacar no fundo escuro */
    filter: drop-shadow(0 10px 30px rgba(0, 230, 104, 0.15)); 
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.about-highlight {
    font-size: 1.1rem;
    color: #00e668; /* Seu verde de destaque */
    font-weight: 600;
    margin-bottom: 20px;
}

.about-text p {
    color: #a0a0a0;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Tags de habilidades */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.skills-tags span {
    background-color: #2a2a2a;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #3d3d3d;
}

/* ==========================================================================
   9. AJUSTE RESPONSIVO PARA O "SOBRE" (TELAS MAIORES)
   ========================================================================== */
@media (min-width: 768px) {
    .about-container {
        flex-direction: row; /* Coloca personagem e texto lado a lado */
        align-items: flex-start;
        gap: 50px;
        padding: 40px 0;
    }

    .about-avatar {
        max-width: 320px;
    }
    
    .about-text {
        padding-top: 10px;
    }
}

/* ==========================================================================
   10. BOTÃO FLUTUANTE DO WHATSAPP REFINADO
   ========================================================================== */
.whatsapp-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366; /* Verde oficial */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 999; /* Garante que fica por cima de tudo */
    transition: transform 0.3s ease;
    
    /* Cria a base para o efeito de pulsação */
    animation: pulse 2s infinite;
}

/* Efeito de hover/clique para dar feedback ao usuário */
.whatsapp-floating:active {
    transform: scale(0.9);
}

/* Animação de pulsação sutil nas bordas do botão */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Ajuste de margem para telas maiores (Desktop) */
@media (min-width: 768px) {
    .whatsapp-floating {
        bottom: 30px;
        right: 30px;
    }
    
    .whatsapp-floating:hover {
        transform: scale(1.08);
    }
}

/* ==========================================================================
   11. SEÇÃO DE CONTATO (DARK MODE REFINADO)
   ========================================================================== */
.contact-section {
    padding: 20px 0;
    text-align: center;
}

.contact-card {
    background-color: #1a1a1a;
    border: 1px solid #2d2d2d;
    padding: 35px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin: 30px 0;
}

.contact-card h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 12px;
}

.contact-card p {
    color: #a0a0a0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Botão de Destaque da Página de Contato */
.btn-contact-page {
    display: block;
    background-color: #00e668; /* Seu verde de destaque */
    color: #121212;            /* Texto escuro para contraste */
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 4px 20px rgba(0, 230, 104, 0.2);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.btn-contact-page:active {
    transform: scale(0.98);
}

/* Canais Alternativos */
.alt-contacts {
    margin-top: 40px;
}

.alt-contacts p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.alt-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.alt-link-item {
    color: #a0a0a0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.alt-link-item:hover {
    color: #00e668;
}

/* Ajustes Desktop para Contato */
@media (min-width: 768px) {
    .alt-links {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }
    
    .btn-contact-page {
        display: inline-block;
        padding: 16px 40px;
    }
}

/* ==========================================================================
   12. DOBRA PRINCIPAL COM PERSONAGEM (DARK MODE REFINADO)
   ========================================================================== */
.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 30px 0;
    text-align: center;
}

.hero-text {
    flex: 1;
}

.hero-container h1 {
    font-size: 2.4rem;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-container p {
    font-size: 1.1rem;
    color: #a0a0a0;
    margin-bottom: 30px;
}

/* Botão de chamada para ação na Home */
.btn-hero-cta {
    display: inline-block;
    background-color: transparent;
    color: #00e668;
    border: 2px solid #00e668;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-hero-cta:active {
    transform: scale(0.98);
}

/* Container do Avatar na Home */
.hero-avatar {
    width: 100%;
    max-width: 300px; /* Tamanho ideal para o celular */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-avatar img {
    width: 100%;
    height: auto;
    object-fit: contain;
    /* Brilho verde de fundo para harmonizar com a identidade dos Stories */
    filter: drop-shadow(0 15px 35px rgba(0, 230, 104, 0.2));
}

/* ==========================================================================
   13. AJUSTE RESPONSIVO PARA A HOME (DESKTOP)
   ========================================================================== */
@media (min-width: 768px) {
    .hero-container {
        flex-direction: row; /* Texto na esquerda e Personagem na direita */
        text-align: left;
        align-items: center;
        gap: 60px;
        padding: 60px 0;
    }
    
    .hero-avatar {
        max-width: 350px; /* Um pouco maior em telas grandes */
    }
    
    .btn-hero-cta:hover {
        background-color: #00e668;
        color: #121212;
        box-shadow: 0 5px 20px rgba(0, 230, 104, 0.3);
    }
}

/* ==========================================================================
   14. AJUSTES PARA FORMATO VERTICAL (9:16)
   ========================================================================== */

/* Altera a proporção do container de vídeo para 9:16 apenas quando tiver a classe .vertical */
.video-container.vertical {
    padding-bottom: 177.78%; /* Proporção matemática perfeita para 9:16 (16 / 9 * 100) */
    background-color: #0c0c0c;
}

/* Ajuste na Grid para o Reels não ficar gigante em telas maiores */
@media (min-width: 600px) {
    .portfolio-grid {
        align-items: start; /* Impede que o card do lado estique para acompanhar a altura do Reels */
    }
}