/* Variáveis CSS para Cores e Fontes */
:root {
    --bg-dark: #ffffff; /* Fundo principal branco */
    --bg-light-section: #f0f0f0; /* Fundo para seções com contraste sutil (cinza muito claro) */
    --text-light: #333333; /* Cor de texto principal escura */
    --text-lighter: #222222; /* Cor de texto mais escura */
    --accent-blue: #0056b3; /* Azul de destaque */
    --accent-blue-light: #007bff; /* Azul de destaque mais claro */
    --accent-red: #dc3545; /* Vermelho para botões/destaque */
    --accent-red-dark: #c82333; /* Vermelho escuro */
    --border-light: #dddddd; /* Cor de borda clara */

    /* Variáveis para as cores e características dos losangos (controladas por JS) */
    --shape-r1: 255; /* R do RGBA para forma 1 */
    --shape-g1: 0;   /* G do RGBA para forma 1 */
    --shape-b1: 0;   /* B do RGBA para forma 1 */

    --shape-r2: 0;   /* R do RGBA para forma 2 */
    --shape-g2: 255; /* G do RGBA para forma 2 */
    --shape-b2: 0;   /* B do RGBA para forma 2 */

    --shape-opacity: 0.08; /* Opacidade translúcida para os losangos (ajuste para mais ou menos visibilidade) */
    --shape-thickness: 1px; /* Espessura da "borda" dos losangos */
    --shape-size: 80px; /* Tamanho da célula do padrão (influencia o tamanho do losango) */
}

/* Reset básico e tipografia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-dark); /* Fundo principal branco */
    color: var(--text-light); /* Cor de texto principal escura */
    overflow-x: hidden;
    position: relative; /* Necessário para o background animado */
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Background Animado com Losangos */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Garante que o background fique atrás do conteúdo */
    transition: background-position 0.1s ease-out; /* Para o efeito de parallax sutil */
    background-color: var(--bg-dark); /* Fundo base branco */

    /* Criando um padrão de losangos com múltiplos gradientes */
    background-image:
        /* Gradiente diagonal 1 */
        repeating-linear-gradient(45deg,
            rgba(var(--shape-r1), var(--shape-g1), var(--shape-b1), var(--shape-opacity)) 0,
            rgba(var(--shape-r1), var(--shape-g1), var(--shape-b1), var(--shape-opacity)) var(--shape-thickness),
            transparent var(--shape-thickness),
            transparent var(--shape-size)),
        /* Gradiente diagonal 2 */
        repeating-linear-gradient(-45deg,
            rgba(var(--shape-r2), var(--shape-g2), var(--shape-b2), var(--shape-opacity)) 0,
            rgba(var(--shape-r2), var(--shape-g2), var(--shape-b2), var(--shape-opacity)) var(--shape-thickness),
            transparent var(--shape-thickness),
            transparent var(--shape-size));

    background-size: var(--shape-size) var(--shape-size); /* Define o tamanho da "célula" do losango */
    background-position: 0 0; /* Posição inicial */
}

/* Seções Principais */
main {
    padding-top: 0px; /* Ajustado para 0px, pois não há cabeçalho fixo */
    position: relative;
    z-index: 1; /* Garante que o conteúdo fique acima do background animado */
}

section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--bg-light-section); /* Fundo cinza claro para seções */
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    border-radius: 10px; /* Bordas arredondadas para seções */
    margin: 20px auto; /* Centraliza e adiciona espaço entre elas */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); /* Sombra mais suave */
}

section:last-of-type {
    margin-bottom: 0;
    border-bottom: none;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-lighter); /* Títulos escuros */
    margin-bottom: 20px;
}

h2 {
    font-size: 2.8rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-red);
    border-radius: 2px;
}

p {
    line-height: 1.8;
    color: var(--text-light); /* Parágrafos em tom de cinza mais claro */
}

.section-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: var(--text-light);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin: 10px;
}

.btn-primary {
    background-color: var(--accent-red);
    color: var(--text-lighter);
    box-shadow: 0 4px 10px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(233, 69, 96, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
}

.btn-secondary:hover {
    background-color: var(--accent-red);
    color: var(--text-lighter);
    transform: translateY(-2px);
}

.btn-primary-small {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-top: 15px;
    background-color: var(--accent-blue-light);
    color: var(--text-lighter);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}
.btn-primary-small:hover {
    background-color: var(--accent-blue);
}


/* Hero Section */
.hero-section {
    background: transparent; /* A cor de fundo vem do animated-background */
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    box-shadow: none;
    margin: 0;
    border-radius: 0;
}

.hero-section .container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: left;
}

.hero-content {
    max-width: 600px;
    margin-right: 40px;
}

.hero-section h1 {
    font-size: 3.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-section .subtitle {
    font-size: 1.6rem;
    margin-bottom: 25px;
    color: var(--accent-blue-light);
    font-weight: 500;
}

.hero-section p {
    font-size: 1.2rem;
    max-width: 800px;
    margin-bottom: 30px;
}

.hero-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-red);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* Sombra suave para a imagem */
}

/* About Section */
.about-section {
    background-color: var(--bg-light-section);
    padding: 80px 0;
}

.about-section p {
    max-width: 900px;
    margin: 0 auto 20px auto;
    font-size: 1.1rem;
    text-align: justify;
}

/* Skills Section */
.skills-section {
    background-color: var(--bg-dark);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-category {
    background-color: var(--bg-light-section);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.skill-category h3 {
    font-size: 1.8rem;
    color: var(--accent-red);
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
}

.skill-category ul {
    list-style: none;
}

.skill-category ul li {
    font-size: 1.1rem;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-light);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-category ul li:last-child {
    border-bottom: none;
}

.skill-category ul li i {
    color: var(--accent-blue-light);
    font-size: 1.3rem;
    width: 25px; /* Para alinhar os ícones */
    text-align: center;
}


/* Projects Section */
.projects-section {
    background-color: var(--bg-light-section);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.project-card {
    background-color: var(--bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-light);
}

.project-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-info h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: var(--accent-blue-light);
}

.project-info p {
    font-size: 0.95rem;
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 20px;
}

.project-links {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background-color: var(--accent-red);
    color: var(--text-lighter);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-project:hover {
    background-color: var(--accent-red-dark);
    transform: translateY(-2px);
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-dark);
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-item {
    background-color: var(--bg-light-section);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.contact-item i {
    font-size: 3rem;
    color: var(--accent-red);
    margin-bottom: 20px;
}

.contact-item h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-lighter);
}

.contact-item p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 15px;
}


/* Footer */
.footer {
    background-color: var(--bg-light-section);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Responsividade */
@media (max-width: 768px) {
    .hero-section .container {
        flex-direction: column-reverse; /* Imagem acima do texto no mobile */
        text-align: center;
    }

    .hero-content {
        margin-right: 0;
        margin-top: 40px;
    }

    .hero-section h1 {
        font-size: 2.8rem;
    }

    .hero-section .subtitle {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .skills-grid, .project-grid, .contact-info-grid {
        grid-template-columns: 1fr;
    }

    .project-card img {
        height: 200px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-section .subtitle {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .skill-category h3 {
        font-size: 1.5rem;
    }

    .project-info h3, .contact-item h3 {
        font-size: 1.5rem;
    }

    section {
        padding: 60px 0;
    }
}