:root {
    --bg-color: #111625;
    --card-bg: #1a2236;
    --primary: #109010;
    --timeline-accent: #109010; /* verde destaque; alternativa suave: #e07a7a (coral) */
    --text-main: #ffffff;
    --text-sec: #a0a0a0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* Contêiner principal: sem height fixo para não bloquear o scroll da janela */
.home-wrapper {
    display: flex;
    flex-direction: column;
}

/* --- Navbar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(17, 22, 37, 0.95);
    z-index: 1000;
}

.logo { font-size: 1.5rem; font-weight: 700; }
.logo span { color: var(--primary); }

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-links a:hover { color: var(--primary); }
.menu-icon { display: none; cursor: pointer; font-size: 1.5rem; }

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 120px 10% 50px;
    min-height: 90vh;
}

.hero-text h4 { color: var(--primary); font-weight: 600; }
.hero-text h1 { font-size: 3.5rem; margin: 10px 0; }
.hero-text h3 { font-size: 2rem; margin-bottom: 20px; }
.hero-text h3 span { color: var(--text-sec); }
.hero-text p { color: var(--text-sec); max-width: 500px; margin-bottom: 30px; }

.hero-buttons { display: flex; gap: 20px; }

.btn {
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { opacity: 0.9; }
.btn.secondary { border: 2px solid var(--text-sec); color: var(--text-main); }
.btn.secondary:hover { border-color: var(--primary); color: var(--primary); }

/* Hero Image */
.hero-img-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.glow-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
    animation: pulse 3s infinite;
}

.hero-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    border: 5px solid var(--bg-color);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* --- Tech Bar --- */
.tech-bar {
    background: #0d111c;
    padding: 20px 10%;
    display: flex;
    justify-content: space-between;
    color: #4a5568;
    font-weight: 600;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

/* --- About Section: duas colunas (Timeline | Texto) --- */
.about {
    padding: 100px 10%;
    margin-top: 7rem;
    margin-bottom: 5rem;
    display: flex;
    flex-direction: row;
    gap: 5rem;
    align-items: stretch;
}

/* Coluna da Esquerda: estica para ter a mesma altura da coluna de texto */
.about-services {
    flex: 0 0 auto;
    width: 300px;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    position: relative;
    padding-left: 0;
}

/* Linha vertical verde: ocupa 100% da altura da coluna (até o fim do último parágrafo) */
.about-services::before {
    content: '';
    position: absolute;
    left: 13px;
    top: 0;
    bottom: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    z-index: 0;
}

.service-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.5rem 0;
    color: var(--text-main);
    z-index: 1;
}

/* Coluna do nó (bolinha verde) sobre a linha — fica à esquerda */
.service-item-line-node {
    width: 28px;
    flex-shrink: 0;
    position: relative;
}

.service-item-line-node::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg-color);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Ícones da timeline: tamanho padronizado (originais 512x512) */
.service-item-icon {
    width: 45px;
    height: auto;
    max-height: 45px;
    object-fit: contain;
    flex-shrink: 0;
}

.service-item span {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
}

/* Coluna da Direita: título + parágrafos (sem estatísticas) */
.about-text {
    flex: 1;
    min-width: 0;
    padding-left: 0;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    text-align: left;
}

.about-text p {
    color: #e0e0e0;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    text-align: justify;
}

/* --- Projects Section --- */
.projects { padding: 80px 10%; }
.projects h2 { text-align: center; margin-bottom: 50px; font-size: 2.5rem; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 60px 30px;
    justify-content: center;
}

.project-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px; /* Bordas mais arredondadas */
    display: flex;
    justify-content: space-between;
    gap: 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
    margin-bottom: 40px;
}

.project-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border-color: rgba(255, 107, 107, 0.3);
}

.project-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.project-info h3 { margin-bottom: 15px; font-size: 1.4rem; }
.tags { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.tags span {
    background: rgba(255, 107, 107, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}
.project-info p { color: var(--text-sec); font-size: 0.9rem; margin-bottom: 25px; line-height: 1.6; }

.project-links { display: flex; align-items: center; gap: 20px; }
.btn-sm {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}
.btn-sm:hover { opacity: 0.9; }
.link-arrow { color: var(--text-main); text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: 0.3s;}
.link-arrow:hover { color: var(--primary); }

/* Preview do Projeto (Estilo Notebook/Paisagem) */
.project-preview {
    width: 100%;
    max-width: 320px;
    height: 200px;
    background: #0d111c;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #252e42;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s;
}
.project-card:hover .project-preview img { transform: scale(1.03); }

/* --- Contact Section --- */
.contact {
    padding: 100px 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 50px;
}

.contact-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.contact-main h2 { font-size: 2rem; color: var(--text-sec); margin: 0; }
.contact-main h3 { font-size: 3rem; margin: 0; }

.contact-socials {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 6rem;
}

.contact-socials a {
    color: var(--text-sec);
    font-size: 2.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.contact-socials a:hover {
    color: var(--primary);
    transform: translateY(-5px);
}

footer {
    text-align: center;
    padding: 25px;
    color: var(--text-sec);
    font-size: 0.9rem;
    border-top: 1px solid #252e42;
    background: #0d111c;
}

/* =============================
   RESPONSIVIDADE (MOBILE)
============================= */
@media (max-width: 768px) {
    .navbar { padding: 20px 5%; }
    .menu-icon { display: block; }
    .logo { font-size: 1.3rem; }
    
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(17, 22, 37, 0.98);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 25px;
        display: none;
        border-bottom: 1px solid var(--card-bg);
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav-links.active { display: flex; }

    /* Hero Mobile */
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 100px 5% 60px; /* Mais padding lateral */
        gap: 50px;
    }
    .hero-img-container { width: 260px; height: 260px; }
    .hero-img { width: 220px; height: 220px; }
    .hero-text h1 { font-size: 2.5rem; }
    .hero-text h3 { font-size: 1.5rem; }
    .hero-buttons { justify-content: center; }

    /* Tech Bar Mobile */
    .tech-bar { justify-content: center; gap: 15px; padding: 20px 5%; }

    /* --- ABOUT SECTION MOBILE --- */
    .about {
        flex-direction: column;
        padding: 2rem 1.25rem;
        gap: 2.5rem;
    }

    #about {
        scroll-margin-top: 80px;
    }

    .about-services {
        order: 2;
        width: 100%;
        max-width: 100%;
        padding-left: 0;
        height: auto;
        justify-content: flex-start;
    }

    .about-services::before {
        left: 13px;
        top: 0.6rem;
        bottom: 0.6rem;
        width: 2px;
        height: auto;
    }

    .service-item {
        padding: 1.25rem 0;
    }

    .service-item-line-node::before {
        width: 10px;
        height: 10px;
        border-width: 1px;
    }

    .service-item-icon {
        width: 40px;
        max-height: 40px;
    }

    .service-item span { font-size: 0.95rem; }

    .about-text {
        order: 1;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    /* Projects Mobile */
    .projects { padding: 60px 5%; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card {
        flex-direction: column; /* Imagem vai para baixo do texto */
        padding: 25px;
        gap: 25px;
    }
    .project-preview {
        width: 100%;
        max-width: 100%; /* Ocupa toda a largura */
        height: auto;
        aspect-ratio: 16/9; /* Mantém proporção de vídeo */
    }
    .tags { justify-content: flex-start; } /* Tags alinhadas à esquerda no card */

    /* Contact Mobile */
    .contact { padding: 60px 5%; gap: 40px; }
    .contact-main h3 { font-size: 2.2rem; }
}

/* Compensa a altura da navbar fixa no scroll para todas as seções */
section[id] {
    scroll-margin-top: 180px;
}

/* Exceção para a seção Home não ser afetada e ficar no topo */
#home {
    scroll-margin-top: 0;
}