/* --- RESET BÁSICO E VARIÁVEIS GLOBAIS --- */
:root {
    --primary-color: #000000;
    --secondary-color: #F8F9FA;
    --text-color: #343A40;
    --text-light: #6C757D;
    --background-color: #FFFFFF;
    --border-color: #DEE2E6;
    --accent-color: #28a745; /* Verde do botão flutuante */
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3 {
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}
.section-header h2 {
    font-weight: 700;
}
.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

/* --- BOTÕES --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.btn--primary {
    background-color: var(--primary-color);
    color: var(--background-color);
}
.btn--primary:hover {
    background-color: #333;
}
.btn--dark {
    background-color: #212529;
    color: var(--background-color);
}
.btn--dark:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn--link {
    background-color: transparent;
    color: var(--primary-color);
    font-weight: 600;
}
.btn--link:hover {
    text-decoration: underline;
}

/* --- CABEÇALHO --- */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}
.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
}
.header__nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}
.header__nav a {
    font-weight: 500;
    color: var(--text-color);
}
.header__nav a:hover {
    color: var(--primary-color);
}

/* --- SEÇÃO HERO --- */
.hero {
    padding-top: 120px;
    padding-bottom: 120px;
}
.hero__container {
    display: flex;
    align-items: center;
    gap: 60px;
}
.hero__text {
    flex: 1;
}
.hero__text h2 {
    font-size: 1.7rem;
    font-weight: 400;
    color: var(--text-light);
}
.hero__text p {
    font-size: 1.1rem;
    margin: 20px 0 30px;
}
.hero__buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}
.hero__buttons .btn i {
    margin-left: 8px;
}
.hero__socials a {
    font-size: 1.8rem;
    margin-right: 20px;
    color: var(--text-light);
}
.hero__socials a:hover {
    color: var(--primary-color);
}

.hero__image-wrapper {
    flex-shrink: 0;
    position: relative;
    width: 350px;
    height: 350px;
}
.hero__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 10px solid var(--background-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- SEÇÃO PROJETOS --- */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 8px 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.projects__grid, .blog__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.project-card, .blog-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}
.project-card:hover, .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.project-card__image-placeholder, .blog-card__image-placeholder {
    height: 180px;
    background: var(--secondary-color);
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-color);
    font-size: 3rem;
}
/* Ensure images within placeholders scale correctly */
.project-card__image-placeholder img,
.blog-card__image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, cropping if necessary */
    border-radius: 8px; /* Match parent border-radius */
}

.project-card { position: relative; }
.project-card__tag {
    position: absolute;
    top: 35px;
    right: 35px;
    background: rgba(255,255,255,0.9);
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}
.project-card h3 { font-size: 1.3rem; }
.project-card p {
    flex-grow: 1;
    margin-bottom: 20px;
}
.project-card__tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.project-card__tech span {
    background: var(--secondary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
}
.project-card__link {
    font-weight: 600;
}
.project-card__link i {
    margin-left: 5px;
}

/* --- SEÇÃO PROJETOS (CORES INVERTIDAS) --- */
/* The HTML uses class="projects" for the section */
.projects { /* Changed from .projects-section to .projects */
    background-color: var(--primary-color); /* Fundo preto */
    color: var(--background-color); /* Texto branco para a seção */
}
.projects .section-header h2, /* Changed from .projects-section to .projects */
.projects .section-header p { /* Changed from .projects-section to .projects */
    color: var(--background-color); /* Garante que o título e parágrafo do cabeçalho sejam brancos */
}

.projects .filter-btn { /* Changed from .projects-section to .projects */
    background: var(--background-color); /* Fundo dos botões de filtro branco */
    color: var(--primary-color); /* Texto dos botões de filtro preto */
    border-color: var(--text-light); /* Borda dos botões de filtro */
}
.projects .filter-btn.active, /* Changed from .projects-section to .projects */
.projects .filter-btn:hover { /* Changed from .projects-section to .projects */
    background: var(--secondary-color); /* Fundo ativo/hover cinza claro */
    color: var(--primary-color); /* Texto ativo/hover preto */
    border-color: var(--secondary-color);
}

.projects .project-card { /* Changed from .projects-section to .projects */
    background: var(--background-color); /* Fundo do card de projeto branco */
    border-color: var(--border-color); /* Borda do card de projeto */
}
.projects .project-card h3, /* Changed from .projects-section to .projects */
.projects .project-card p, /* Changed from .projects-section to .projects */
.projects .project-card__tech span, /* Changed from .projects-section to .projects */
.projects .project-card__link { /* Changed from .projects-section to .projects */
    color: var(--primary-color); /* Texto do card de projeto preto */
}
.projects .project-card__tech span { /* Changed from .projects-section to .projects */
    background: var(--secondary-color); /* Fundo das tags de tecnologia cinza claro */
}
.projects .project-card__link { /* Changed from .projects-section to .projects */
    color: var(--primary-color); /* Cor do link no card de projeto */
}


/* --- SEÇÃO LINHA DO TEMPO --- */
.timeline-section {
    background-color: var(--secondary-color);
}
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}
.timeline__item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}
.timeline__item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 3px solid var(--border-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}
.timeline__item--left {
    left: 0;
}
.timeline__item--right {
    left: 50%;
}
.timeline__item--left::after {
    right: -10px;
}
.timeline__item--right::after {
    left: -10px;
}
.timeline__content {
    padding: 20px 30px;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    position: relative;
}
.timeline__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.timeline__year {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
}
.timeline__tag {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 5px;
    color: #fff;
}
.timeline__tag--carreira { background-color: #343A40; }
.timeline__tag--educacao { background-color: #007BFF; }
.timeline__content h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}
.timeline__content p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* --- SEÇÃO BLOG --- */
.blog-card { position: relative; }
.blog-card__tag {
    position: absolute;
    top: 35px;
    left: 35px;
    background: rgba(255,255,255,0.9);
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}
.blog-card h3 {
    font-size: 1.3rem;
}
.blog-card__meta {
    display: flex;
    gap: 15px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.blog-card__meta i {
    margin-right: 5px;
}
.blog-card p {
    flex-grow: 1;
    font-size: 1rem;
    margin-bottom: 20px;
}
.blog-card__link {
    font-weight: 600;
}
.blog-card__link i {
    margin-left: 5px;
}

/* --- RODAPÉ --- */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    background-color: var(--secondary-color);
}
.footer__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer p {
    margin: 0;
    color: var(--text-light);
}
.footer a {
    font-weight: 600;
}

/* --- BOTÃO FLUTUANTE --- */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 999;
}
.floating-btn:hover {
    background-color: #218838;
}

/* --- RESPONSIVIDADE --- */
/* Versão mobile (< 768px) */
@media (max-width: 768px) {
    /* 1 - Remover o menu na versão mobile */
    .header__nav { /* Correctly targets the navigation menu */
      display: none;
    }

    /* Adjust main section padding for mobile */
    section {
        padding: 40px 0; /* Reduced padding for mobile sections */
    }

    /* Ensure .hero section specific padding is adjusted */
    .hero {
        padding-top: 40px;
        padding-bottom: 40px;
    }
  
    /* Restructure hero section for mobile to place image at top */
    .hero__container {
        flex-direction: column; /* Stack elements vertically */
        align-items: center; /* Center horizontally */
        gap: 0; /* Remove gap from desktop version */
    }
    
    /* 1 - Na versão mobile, deixe a foto no topo, com 25% do tamanho original. */
    .hero__image-wrapper {
        display: block; /* Ensure the image wrapper is visible */
        order: 1; /* Place the image wrapper first */
        width: calc(350px * 0.50); /* 25% of original 350px */
        height: calc(350px * 0.50); /* 25% of original 350px */
        margin-bottom: 20px; /* Space below the image */
    }

    .hero__image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%; /* Keep it circular */
    }

    .hero__text {
        order: 2; /* Place the text block after the image */
        margin-top: 0; /* Remove top margin, as gap is handled by image wrapper's margin-bottom */
        width: 100%; /* Ensure text block uses full width */
        text-align: center; /* Center align text content */
        /* Flexbox for inner elements to handle centering of h1, h2, p, buttons, socials */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Adjustments for h1 and h2 under the image */
    h1 {
        font-size: 2rem; /* Adjusted for mobile readability */
        margin-bottom: 0.5rem; /* Reduce margin */
        white-space: nowrap; /* Prevent line breaks */
        overflow: hidden; /* Hide overflowing text */
        text-overflow: ellipsis; /* Add ellipsis for overflow */
    }
    h2 {
        font-size: 1.4rem; /* Adjusted for mobile readability */
        margin-bottom: 1rem; /* Reduce margin */
        color: var(--text-color); /* Ensure visibility if original h2 was text-light */
        white-space: nowrap; /* Prevent line breaks */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 4 - Centralizar parágrafo, botões e botões de rede social. */
    .hero__text p {
        text-align: center;
        padding: 0 15px; /* Add horizontal padding to prevent text from touching edges */
        margin-bottom: 20px; /* Space before buttons */
    }

    .hero__buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px; /* Space between stacked buttons */
        align-items: center; /* Center buttons horizontally */
        margin-bottom: 20px; /* Space before social icons */
    }

    /* 3 - Não mostrar o botão dos projetos. */
    /* Based on HTML: the second 'a' tag in .hero__buttons is "Ver projetos" */
    .hero__buttons a:nth-child(2) {
        display: none;
    }

    .hero__socials {
        display: flex;
        gap: 20px;
        justify-content: center; /* Center social icons horizontally */
        margin-bottom: 20px; /* Space below social icons */
    }

    /* Projects section specific adjustments for mobile layout */
    .projects__grid,
    .blog__grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px; /* Adjust gap for mobile */
    }

    /* Timeline adjustments for mobile */
    .timeline::after {
        left: 31px; /* Adjust vertical line position */
    }
    .timeline__item {
        width: 100%; /* Full width for timeline items */
        padding-left: 70px;
        padding-right: 15px;
    }
    .timeline__item--left,
    .timeline__item--right {
        left: 0; /* Both items align to the left */
    }
    .timeline__item::after {
        left: 21px; /* Position circular marker on the left line */
        right: auto; /* Remove right positioning */
    }

    /* 3 - Na versão mobile, centralize todos os itens do rodapé. */
    .footer__container {
      flex-direction: column; /* Stack footer items vertically */
      gap: 10px; /* Space between stacked items */
      align-items: center; /* Center items horizontally */
      text-align: center; /* Center text within items */
    }
    .footer p, .footer a {
        text-align: center; /* Ensure individual text and links are centered */
    }
}