/* =========================================
   1. FONTES E CONFIGURAÇÕES GERAIS
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Space+Mono:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #fafafa;
    background-image: 
        linear-gradient(#e0e0e0 1px, transparent 1px),
        linear-gradient(90deg, #e0e0e0 1px, transparent 1px);
    background-size: 25px 25px;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #000;
    line-height: 1.6;
    overflow-x: hidden; 
}

h1, h2, h3, .mono {
    font-family: 'Space Mono', monospace;
    text-transform: uppercase;
}

/* =========================================
   2. NAVBAR INTELIGENTE E BOTÕES
   ========================================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 3px solid #000;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
}

.navbar-escondida {
    transform: translateY(-100%);
}

.nav-links {
    display: flex;
    gap: 20px;
}

/* Estilo base dos links da Navbar */
.nav-links a {
    text-decoration: none;
    color: #000;
    font-weight: 600;
    padding: 5px 12px;
    border: 2px solid transparent; /* Mantém o tamanho para não empurrar os itens no hover */
    transition: all 0.2s ease;
}

/* O estilo Neo-Brutalista para o Hover e para a aba Ativa */
.nav-links a:hover,
.nav-links a.ativo {
    background-color: #ffffff;
    color: #000;
    border: 2px solid #000;
    box-shadow: 4px 4px 0px #000;
}

/* =========================================
   3. ESTRUTURA DAS SEÇÕES E CARTÕES
   ========================================= */
section {
    min-height: 85vh; 
    padding: 120px 20px 40px; 
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.titulo-secao {
    font-size: 2rem;
    margin-bottom: 40px;
    border-bottom: 3px solid #000;
    display: inline-block;
    padding-bottom: 10px;
}

.card {
    background-color: #ffffff;
    border: 3px solid #000;
    box-shadow: 6px 6px 0px #000;
    padding: 40px;
    border-radius: 4px;
    width: 100%;
}

.card-projeto {
    padding: 0;
    overflow: hidden;
}

.projeto-imagem {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid #000;
}

.projeto-imagem--github {
    object-fit: contain;
    object-position: center;
    background-color: #0d1117;
}

.projeto-conteudo {
    padding: 30px;
}


/* =========================================
   JANELA ESTILO macOS (card principal)
   ========================================= */
#sobre {
    max-width: 1180px;
}

.janela-mac {
    background-color: #ffffff;
    border: 3px solid #000;
    box-shadow: 10px 10px 0px #000;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
}

.janela-barra {
    position: relative;
    display: flex;
    align-items: center;
    height: 46px;
    padding: 0 18px;
    background: linear-gradient(180deg, #f6f6f6, #e4e4e4);
    border-bottom: 3px solid #000;
}

.janela-botoes {
    display: flex;
    gap: 9px;
    z-index: 1;
}

.janela-botoes span {
    display: grid;
    place-items: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid #0006;
    font: 700 10px/1 'Space Mono', monospace;
    color: transparent;
    user-select: none;
    transition: color 0.15s ease;
}

.janela-botoes .fechar   { background: #ff5f57; }
.janela-botoes .minimizar { background: #febc2e; }
.janela-botoes .expandir { background: #28c840; }

/* Ícones (×, −, +) aparecem ao passar o mouse, como no macOS */
.janela-botoes:hover span { color: #000a; }

.janela-titulo {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.janela-corpo {
    padding: 60px 56px;
    background-color: #fff;
}

#sobre .sobre-grid {
    grid-template-columns: 320px 1fr;
    gap: 56px;
}

#sobre h1 { font-size: 2.6rem; line-height: 1.15; }
#sobre .texto-sobre > p:not(.mono) { font-size: 1.2rem; }

/* =========================================
   4. COMPONENTES ESPECÍFICOS (FOTO)
   ========================================= */
.foto-placeholder {
    width: 100%;
    aspect-ratio: 1/1; 
    background-color: #000;
    border: 3px solid #000;
    border-radius: 4px;
    overflow: hidden;
}

.foto-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: bottom; 
}

/* =========================================
   5. ANIMAÇÕES & KEYFRAMES
   ========================================= */
.animar {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.mostrar {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* =========================================
   6. LAYOUTS INTERNOS E RODAPÉ
   ========================================= */
.sobre-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    align-items: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 30px;
}

footer {
    background-color: #000;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    border-top: 5px solid #000;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap; 
}

footer a {
    color: #fff; 
    text-decoration: underline;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 5px 10px; 
    transition: all 0.2s ease;
}

footer a:hover {
    background-color: #fff;
    color: #000;
    text-decoration: none;
}

/* =========================================
   7. RESPONSIVIDADE
   ========================================= */
@media (max-width: 768px) {
    .sobre-grid, .cards-grid {
        grid-template-columns: 1fr; 
    }
    section {
        min-height: auto; 
        padding-top: 100px;
    }
    .janela-corpo { padding: 32px 24px; }
    #sobre .sobre-grid { grid-template-columns: 1fr; gap: 32px; }
    #sobre h1 { font-size: 2rem; }
}

@media (max-width: 480px) {
    nav {
        padding: 10px 15px; 
    }

    .logo {
        font-size: 0.9rem; 
    }

    .nav-links {
        gap: 5px; 
    }

    .nav-links a {
        padding: 5px 8px;
        font-size: 0.85rem; 
    }

    /* Reduz a sombra do botão ativo/hover em telas pequenas */
    .nav-links a:hover,
    .nav-links a.ativo {
        box-shadow: 2px 2px 0px #000; 
    }

    .janela-mac { box-shadow: 5px 5px 0px #000; }
    .janela-corpo { padding: 24px 16px; }
    .janela-titulo { font-size: 0.7rem; }

    .card {
        padding: 20px; 
        box-shadow: 4px 4px 0px #000; 
    }

    .titulo-secao {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
}
