/* =================================================== */
/* 1. VARIÁVEIS E CONFIGURAÇÃO (ROOT)                  */
/* =================================================== */

:root {
    --primary: #a78bfa; 
    --primary-dark: #7c3aed;
    --bg: #1e1b4b; 
    --dark: #1e1b4b;
    --light: #f3e8ff;
    --nav-bg: rgba(29, 22, 53, 0.95);
    --text: #e0d6ff;
    --transition: 0.3s ease;
}

body.dark-mode {
    --bg: #0a0a0c;
    --nav-bg: rgba(0, 0, 0, 0.98);
    --text: #ffffff;
    --dark: #000000;
}

/* =================================================== */
/* 2. LIMPEZA E ESTILOS BASE                           */
/* =================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

/* =================================================== */
/* 3. NAVBAR E ESTRUTURA FIXA                          */
/* =================================================== */
.navbar-fixa {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1050; 
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); /* Safari */
    border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 65px;
}

.logo-texto {
    display: flex;
    flex-direction: column;
    color: var(--text);
}

.logo-title { 
    font-size: 26px; 
    font-weight: 700; 
    line-height: 1.1;
    color: var(--primary); 
}

.logo-subtitle { 
    font-size: 14px;
    opacity: 0.9;
}

.esquilo-animado {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 65px;
    height: auto;
    z-index: 15;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4));
    animation: correr 3.5s infinite ease-in-out;
}

@keyframes correr {
    
    0%   { transform: translateY(-50%) translateX(-100px); opacity: 0; }
    20%  { opacity: 1; }
    40%  { transform: translateY(-50%) translateX(10px); }
    60%  { transform: translateY(-50%) translateX(0px); }
    80%  { transform: translateY(-55%) translateX(0px); } 
    100% { transform: translateY(-50%) translateX(0px); }
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    margin-left: 20px; 
    padding: 8px 15px;
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0; 
    height: 2px; 
    bottom: 0;
    left: 15px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: calc(100% - 30px);
    color: var(--primary)
}

/* =================================================== */
/* 4. BOTÃO DARK MODE (UIVERSE)                        */
/* =================================================== */

.dark-mode-wrapper {
    display: flex;
    align-items: center;
    margin-left: 25px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px; 
    height: 22px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-color: var(--dark); 
    border: 1px solid rgba(167, 139, 250, 0.3);
    transition: var(--transition);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; 
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.switch input:focus-visible + .slider {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

input:checked + .slider { 
    background-color: var(--primary-dark); 
}

input:checked + .slider:before { 
    transform: translateX(22px); 
    background-color: #fff;
}

.slider:hover {
    filter: brightness(1.2);
}

/* =================================================== */
/* 5. SECÇÃO GIRO E BOTÕES                             */
/* =================================================== */
.giro {
    height: 100vh;
    height: 100dvh; /* Altura dinâmica para browsers modernos em 2025 */
    display: flex;
    align-items: center; 
    justify-content: center;
    /* Adicionado um linear-gradient para garantir que o texto seja legível sobre a imagem */
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                url("assets/img/TIMSteam.jpg") no-repeat center center/cover;
    position: relative;
}

.giro .btn {
    position: relative;
    display: inline-block;
    padding: 14px 38px;
    background: var(--primary);
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    
    /* Animação */
    opacity: 0;
    animation: fadeInBtn 1s forwards 1s;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.giro .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(124, 58, 237, 0.4);
    color: #fff !important;
}

@keyframes fadeInBtn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* =================================================== */
/* 6. SECÇÃO SOBRE MIM.                                */
/* =================================================== */
.about-section {
    
    background: var(--bg); 
    padding: 100px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    transition: background var(--transition);
}

.about-img img {
    width: 100%;
    display: block;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    max-height: 500px; 
    object-fit: cover;
    transition: transform var(--transition), box-shadow var(--transition);
}

.about-img img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.about-text h2 {
    
    font-size: clamp(2rem, 5vw, 3rem); 
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 20px;
    opacity: 0.95;
}

/* =================================================== */
/* 7. SECÇÃO UFCDS                                     */
/* =================================================== */
.ufcds-section {
    padding: 100px 0;
    background: var(--bg);
    min-height: 100vh;
    transition: background var(--transition);
}

.ufcds-section h2 {
    text-align: center; 
    margin-bottom: 60px;
    color: var(--primary); 
    font-weight: 800;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.ufcd-card { 
    background: var(--dark);
    padding: 30px; 
    border-radius: 20px; 
    border: 1px solid rgba(167, 139, 250, 0.1);
    height: 100%; 
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow var(--transition), 
                border-color var(--transition);
}

.ufcd-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.ufcd-card h3 {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.15);
    min-height: 4rem; 
    display: flex;
    align-items: center; 
    line-height: 1.3;
}

.ufcd-card p {
    color: var(--text); 
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Botões internos */
.ufcd-card .btn-sm-custom {
    margin-top: auto; 
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary);
    color: #fff !important;
    border-radius: 8px;
    align-self: flex-start;
    border: none;
    transition: var(--transition);
}

.ufcd-card .btn-sm-custom:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* =================================================== */
/* 8. SECÇÃO CONTACTOS                                 */
/* =================================================== */

.contact-section {
    
    scroll-margin-top: 80px; 
    padding: 100px 0 60px;
    background: var(--bg);
}

.titulo-pagina-wrapper {
    overflow: hidden; 
    width: 100%;
}

.titulo-pagina {
    display: inline-block;
    white-space: nowrap;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    animation: scroll-text 20s linear infinite;
}

@keyframes scroll-text {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* =================================================== */
/* 9. SECÇÃO PORTFÓLIO                                */
/* =================================================== */
.portfolio-section { 
    background: var(--bg); 
    padding: 100px 0; 
    min-height: 100vh;
    transition: background var(--transition);
}

.portfolio-section h2 { 
    text-align: center; 
    font-size: clamp(2rem, 4vw, 2.8rem); 
    margin-bottom: 60px; 
    color: var(--primary);
    font-weight: 800;
}

/* CARDS DE PROJETO */
.project {
    background: var(--dark);
    border-radius: 20px; 
    overflow: hidden;
    border: 1px solid rgba(167, 139, 250, 0.1);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.project:hover {
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary);
}

.img-container {
    overflow: hidden;
    width: 100%;
}

.project img {
    height: 250px; 
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project:hover img {
    transform: scale(1.1);
}

.highlight-card img {
    height: 400px; 
}

.project-info { 
    padding: 25px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.project-info h3 { 
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 1.25rem;
}

.project-info p {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* TAGS DOS PROJETOS */
.project-tag {
    margin-top: auto; 
    color: var(--primary);
    background: rgba(167, 139, 250, 0.1);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

/* =================================================== */
/* 10. RESPONSIVIDADE (768px)                          */
/* =================================================== */

@media (max-width: 768px) {
    /* Ajustes de Espaçamento */
    .about-section, .portfolio-section, .ufcds-section {
        padding: 60px 0;
    }

    /* Imagens de Projetos */
    .project img, .highlight-card img {
        height: 250px;
    }

    /* UFCDs */
    .ufcd-card h3 {
        min-height: auto;
        margin-bottom: 10px;
    }

    /* Sobre Mim */
    .about-text {
        text-align: center;
        margin-top: 40px;
    }

    /* MENU MOBILE - SISTEMA DE NAVEGAÇÃO */
    .menu-mobile {
        display: block; /* Só aparece no mobile */
        font-size: 28px;
        cursor: pointer;
        color: var(--primary);
        z-index: 1100;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: 0;
        background: var(--nav-bg);
        backdrop-filter: blur(20px);
        overflow: hidden;
        transition: height 0.4s ease-in-out;
        text-align: center;
        padding: 0;
    }

    .nav-links.active {
        height: 300px;
        padding: 30px 0;
        border-bottom: 1px solid rgba(167, 139, 250, 0.2);
    }

    .nav-links a {
        margin: 15px 0;
        font-size: 1.2rem;
        display: block;
    }

    .nav-links a::after {
        display: none;
    }
}

/* =================================================== */
/* 11. AJUSTES GLOBAIS MENU MOBILE                     */
/* =================================================== */
.menu-mobile {
    display: none;
    line-height: 1;
    transition: var(--transition);
}

.menu-mobile:hover {
    color: var(--primary);
}


