/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 a {
    color: white;
    text-decoration: none;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Navigation */
nav {
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu a:hover,
.menu a.active {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    /* Mantenha seus estilos de padding e background */
    padding: 4rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);

    /* Adicione estas propriedades para forçar a largura total */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #5a6c7d;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* Page Hero */
.page-hero {
    /* Mantenha seus estilos de padding, background e text-align */
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;

    /* Adicione estas propriedades para forçar a largura total */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.page-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 4rem 0;
}

.about-section {
    background: white;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.about-text a:hover {
    text-decoration: underline;
}

/* Featured Projects */
.featured-projects {
    background: #f8f9fa;
}

.featured-projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

.project-content {
    padding: 1.5rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-content h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.project-category,
.category {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.project-description {
    color: #5a6c7d;
    margin-bottom: 1rem;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.project-link:hover {
    text-decoration: underline;
}

.section-footer {
    text-align: center;
}

/* Skills Section */
.skills-section {
    background: white;
}

.skills-category {
    margin-bottom: 4rem;
}

.skills-category h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.skill-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
}

.skill-percentage {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.skill-description {
    margin-bottom: 1rem;
}

.skill-description p {
    color: #5a6c7d;
    font-size: 0.9rem;
}

.progress-bar {
    background: #e9ecef;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Filters */
.filters-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filters-container {
    text-align: center;
}

.filters-container h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #667eea;
    border-radius: 25px;
    text-decoration: none;
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Projects Section */
.projects-section {
    background: #f8f9fa;
}

.no-projects {
    text-align: center;
    padding: 4rem 0;
}

.no-projects h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-projects p {
    color: #5a6c7d;
    margin-bottom: 2rem;
}

/* Contact Section */
.contact-section {
    background: white;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-form-container h2,
.contact-info h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.contact-method a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.contact-method a:hover {
    text-decoration: underline;
}

.response-time {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.response-time h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.response-time p {
    color: #5a6c7d;
    margin: 0;
}

/* Messages */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-bottom: 2rem;
}

.success-message h3 {
    margin-bottom: 0.5rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin-bottom: 2rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
    
    /* Adicione estas propriedades para forçar a largura total */
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.cta-content {
    /* Limita a largura do conteúdo interno e o centraliza */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1;
}

.close-modal:hover {
    color: #000;
}

.modal-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px 0 0 15px;
}

.modal-info {
    padding: 2rem;
}

.modal-info h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-category {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block;
}

.modal-description {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

footer p {
    margin: 0;
    opacity: 0.9;
}

/* =================================
   Experience Section (Timeline Style)
==================================== */
.experience-section {
    background: white; /* Fundo branco para maior contraste e leitura */
}

.experience-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

/* A linha vertical da timeline */
.experience-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: #e9ecef; /* Cor suave para a linha */
    border-radius: 2px;
}

.experience-card {
    padding: 1.5rem 2rem;
    padding-left: 4rem; /* Espaço para o ícone e a linha */
    margin-bottom: 2rem;
    position: relative;
    background: none; /* Remove o fundo do card, a seção já é branca */
    box-shadow: none; /* Remove a sombra, para um look mais limpo */
    border: none; /* Remove a borda, o layout já define a estrutura */
    transition: all 0.3s ease;
}

/* O círculo ("nó") na linha do tempo */
.experience-card::before {
    content: '';
    position: absolute;
    top: 28px; /* Alinha verticalmente com o título */
    left: 10px; /* Posiciona sobre a linha vertical */
    height: 20px;
    width: 20px;
    background: white;
    border: 4px solid #667eea;
    border-radius: 50%;
    z-index: 1; /* Garante que o círculo fique sobre a linha */
    transition: all 0.3s ease;
}

.experience-card:hover::before {
    background: #667eea; /* Muda a cor do círculo no hover */
    transform: scale(1.1);
}

.experience-meta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #764ba2; /* Cor de destaque para a data */
    margin-bottom: 0.5rem;
    display: block; /* Garante que ocupe uma linha */
}

.experience-header {
    display: flex;
    flex-direction: column; /* Coloca o título acima da empresa */
    margin-bottom: 1rem;
}

.experience-header h3 {
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 700; /* Mais destaque para o cargo */
    line-height: 1.3;
    margin: 0;
}

.experience-company {
    background: none; /* Remove o fundo da "pílula" */
    color: #5a6c7d;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0;
    margin-top: 0.25rem;
}

.experience-description p {
    color: #5a6c7d;
    line-height: 1.8; /* Melhora a legibilidade do texto */
    margin: 0;
}

/* Remove a última margem para um espaçamento perfeito no final */
.experience-card:last-child {
    margin-bottom: 0;
}

/* =================================
   O MELHOR DESIGN RESPONSIVO
==================================== */

/* Para Tablets & Laptops Pequenos (até 992px)
 * Este breakpoint garante que o layout se ajuste bem em telas
 * intermediárias, antes de se tornar um layout totalmente mobile.
*/
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr; /* Muda para coluna única */
        text-align: center;
        gap: 2rem;
    }

    .hero-text {
        order: 2; /* Coloca o texto abaixo da imagem */
    }

    .hero-image {
        order: 1; /* Coloca a imagem acima do texto */
        margin: 0 auto 2rem auto;
    }

    .hero-buttons {
        justify-content: center; /* Centraliza os botões */
    }

    .hero-image img {
        max-width: 400px; /* Limita o tamanho da imagem */
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .modal-project {
        grid-template-columns: 1fr;
    }
 
    .modal-image {
        border-radius: 15px 15px 0 0;
        height: 250px; /* Altura ajustada para o modal em coluna única */
    }
}


/* Para Tablets em modo Retrato & Celulares Maiores (até 768px)
 * O principal breakpoint para a transformação em layout mobile.
*/
@media (max-width: 768px) {
    /* --- Header & Navegação Mobile --- */
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .logo {
        text-align: center;
    }

    .menu-toggle {
        display: block; /* Mostra o botão do menu hamburguer */
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%); /* Alinhamento vertical perfeito */
    }

    nav {
        width: 100%;
    }
    
    .menu {
        display: none;
        position: absolute;
        top: calc(100% + 1rem); /* Posição abaixo do header */
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(44, 62, 80, 0.98); /* Fundo mais escuro para contraste */
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
    
    .menu.active {
        display: flex; /* Mostra o menu quando ativo */
    }
    
    .menu a {
        padding: 1rem;
        border-radius: 0;
    }

    .menu a:hover, .menu a.active {
        background-color: rgba(102, 126, 234, 1);
        transform: none;
    }
    
    /* --- Tipografia e Espaçamento Geral --- */
    section {
        padding: 3rem 0;
    }

    .hero, .page-hero, .cta-section {
        padding: 3rem 0;
    }

    .about-section h2, .featured-projects h2 {
        font-size: 2rem;
    }

    .hero-text h2, .page-hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    /* --- Layouts de Grid --- */
    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr; /* Força uma única coluna */
        gap: 1.5rem;
    }
    
    /* --- Seção de Experiência (Timeline) --- */
    .experience-container::before {
        left: 10px;
    }
    .experience-card {
        padding-left: 3rem;
    }
    .experience-card::before {
        left: 0;
        height: 18px;
        width: 18px;
    }
    .experience-header h3 {
        font-size: 1.4rem;
    }
    .experience-company {
        font-size: 1rem;
    }

    /* --- Filtros com Rolagem Otimizada --- */
    .filter-buttons {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch; /* Melhora a rolagem em iOS */
        scrollbar-width: none; /* Esconde a barra de rolagem (Firefox) */
    }
    .filter-buttons::-webkit-scrollbar {
        display: none; /* Esconde a barra de rolagem (Chrome, Safari) */
    }
}

/* Para Celulares Pequenos (até 480px)
 * Ajustes finos para as menores telas.
*/
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    section, .hero, .page-hero, .cta-section {
        padding: 2.5rem 0; /* Reduz ainda mais o padding */
    }
    
    .hero-text h2, .page-hero h1 {
        font-size: 1.8rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .hero-text p, .page-hero p, .cta-content p {
        font-size: 1rem;
    }

    .btn {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
        width: 100%; /* Botões ocupam a largura total para fácil clique */
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }

    .logo h1 a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        right: 15px;
    }

    .experience-header h3 {
        font-size: 1.2rem;
    }

    .modal-info {
        padding: 1.5rem; /* Menos padding no modal */
    }
}