/* Cores, fontes e animações gerais */
:root {
    --bg-color: #07090f;
    --surface-color: rgba(16, 21, 36, 0.65);
    --surface-border: rgba(255, 255, 255, 0.06);
    --primary-color: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.35);
    --primary-hover: #38bdf8;
    --secondary-color: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --terminal-bg: #090e17;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Reset básico do CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar - Estiliza a barra de rolagem nos navegadores desktop */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.4);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Fundo interativo gerado pelo canvas com aceleração GPU */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
}

/* Estilo "Glassmorphism" (vidro) pros cards otimizado */
.glass-card {
    background: var(--surface-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2.2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px) translateZ(0);
    border-color: rgba(14, 165, 233, 0.4);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.55), 0 0 20px var(--primary-glow);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Estilos do menu superior e barra de navegação */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    background: rgba(7, 9, 15, 0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--surface-border);
    transition: padding 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    transform: translateZ(0);
}

nav.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
}

.cursor {
    color: var(--primary-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-glow);
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-main);
}

.hamburger i {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.hamburger i.fa-times {
    transform: rotate(180deg) scale(1.1);
    color: var(--primary-color);
}

/* Layout principal e seções do site */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 6%;
}

.section {
    padding: 7rem 0;
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1), transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.section.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.section-title .line {
    height: 1px;
    flex-grow: 1;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    opacity: 0.4;
}

/* Seção Hero - Primeira tela que o visitante vê */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem;
    padding-bottom: 2rem;
}

.hero-content {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.subtitle {
    font-family: var(--font-mono);
    color: var(--primary-color);
    font-size: 1.15rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Estilo do título principal, utilizando clamp para responsividade fluída do tamanho da fonte */
.hero h1 {
    text-align: center;
    font-size: clamp(1.2rem, 5.5vw, 4.5rem);
    white-space: nowrap; /* Em telas maiores, mantém o texto em uma única linha */
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    text-shadow: 0 0 40px rgba(255,255,255,0.1);
}

.role {
    text-align: center;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

/* Design do terminal falso (caixinha preta estilo bash) */
.terminal-box {
    background: var(--terminal-bg);
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    font-family: var(--font-mono);
    width: 100%;
    text-align: left;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.8rem 1.25rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
}

.dots {
    display: flex;
    gap: 0.4rem;
}

.dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    color: #64748b;
    font-size: 0.85rem;
}

.terminal-body {
    padding: 1.5rem;
    color: #a7f3d0;
    font-size: 1rem;
    min-height: 120px;
    line-height: 1.6;
}

/* Estilo e hover dos botões da tela inicial */
.hero-cta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 0.9rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-family: var(--font-sans);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary-hover);
    border: 1px solid var(--primary-color);
}

.primary-btn:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

.secondary-btn {
    color: var(--text-main);
    border: 1px solid var(--surface-border);
    background: rgba(255,255,255,0.02);
}

.secondary-btn:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* Grid da seção sobre mim */
.about-grid {
    display: grid;
    /* Ajuste do grid em 3 colunas: Foto / Resumo / Soft Skills */
    grid-template-columns: 0.8fr 1.3fr 1fr;
    gap: 2rem;
}

/* Container redondinho onde vai ficar a foto de perfil */
.about-photo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.photo-placeholder {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: var(--surface-border);
    position: relative;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ajusta a foto certinho dentro do círculo */
.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.photo-overlay {
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    gap: 0.5rem;
    z-index: 0;
}

.photo-overlay i {
    font-size: 2rem;
    color: var(--primary-hover);
}

.icon-header {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-hover);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.about-text strong {
    color: var(--text-main);
    font-weight: 600;
}

.soft-skills-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.soft-skills-list li {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.skill-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--secondary-color);
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.skill-details strong {
    display: block;
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.skill-details span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Cards das habilidades (Skills Gerais e Linguagens) e tags com os ícones */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category h3 {
    margin-bottom: 1.75rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.2rem;
}

.skill-category h3 i {
    color: var(--primary-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

.tag {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid var(--surface-border);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.tag:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
    background: rgba(14, 165, 233, 0.15);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
}

.tag.highlight {
    background: rgba(139, 92, 246, 0.1);
    color: #ddd6fe;
    border-color: rgba(139, 92, 246, 0.4);
}

/* --- SEÇÃO DE PROJETOS --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2.2rem;
}

.project-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.folder-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.project-links a {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-left: 1rem;
    transition: var(--transition);
}

.project-links a:hover {
    color: var(--primary-hover);
    transform: translateY(-2px);
}

.project-title {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.project-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1; /* Faz a descrição crescer para preencher o card e empurrar as tags para o fundo */
}

.project-techs {
    margin-top: auto; 
}

.project-techs .tag {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

/* Formatação da linha do tempo pra faculdade/cursos lá de Educação */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 17px;
    height: 100%;
    width: 2px;
    background: var(--surface-border);
}

.timeline-item {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 28px;
    width: 14px;
    height: 14px;
    background: var(--bg-color);
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--primary-glow);
    z-index: 2;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timeline-header .date {
    font-family: var(--font-mono);
    color: var(--primary-hover);
    font-size: 0.9rem;
}

.timeline-header .badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.timeline-content h3 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.timeline-content .institution {
    color: var(--text-muted);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.certs-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}
.certs-grid > * {
    flex: 1 1 220px;
    max-width: 320px;
}

.cert-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.cert-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    color: var(--text-main);
}

.cert-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Configuração dos cards de contato (e-mail, redes sociais) que flutuam ao passar o mouse */
.contact-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    text-align: center;
}

.contact-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    flex: 1 1 240px;
    max-width: 320px;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.contact-card:hover .icon-wrapper {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px var(--primary-glow);
    transform: scale(1.05);
}

.contact-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    color: var(--text-main);
}

.contact-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    transition: var(--transition);
}

.contact-card:hover p {
    color: var(--primary-hover);
}

/* Rodapé e menção às tecnologias do site */
footer {
    padding: 3.5rem 0;
    margin-top: 5rem;
    border-top: 1px solid var(--surface-border);
    background: rgba(7, 9, 15, 0.5);
    backdrop-filter: blur(5px);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 6%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    color: var(--text-muted);
}

.footer-content .logo {
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.footer-tech {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Ajustes de responsividade pro site ficar bom no celular / tablet */
@media (max-width: 900px) {
    .about-grid {
        /* Transforma o grid numa coluna só (ficar de cima pra baixo) pra caber no celular */
        grid-template-columns: 1fr;
    }
    
    .about-photo {
        /* Joga a foto pro topo na tela menor */
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: flex; /* Mudamos de none pra flex p/ facilitar a animação */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(7, 9, 15, 0.98);
        padding: 2.5rem;
        text-align: center;
        border-bottom: 1px solid var(--surface-border);
        /* Animação suave no menu modal descendo */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: var(--transition);
        z-index: -1;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .hamburger {
        display: block;
    }
    
    /* Ajustes específicos pro título principal no celular */
    .hero h1 {
        font-size: 2.5rem; /* Reduz o tamanho da fonte */
        white-space: normal; /* Permite que o nome quebre em várias linhas, evitando corte na tela */
        word-wrap: break-word; /* Evita vazamento de palavras muito extensas no limite da tela */
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .section {
        padding: 5rem 0;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
}
