/* Importação da Fonte Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

/* Variáveis CSS para Cores e Fontes */
:root {
    --primary-color: #00bcd4; /* Ciano vibrante para destaque */
    --secondary-color: #bbbbbb; /* Cinza claro para texto secundário */
    --text-color: #e0e0e0; /* Texto principal mais claro */
    --background-dark: #212121; /* Fundo principal escuro */
    --background-light: #2b2b2b; /* Fundo levemente mais claro para seções alternadas */
    --card-bg: #333333; /* Fundo dos cards (projetos, habilidades, certificações) */
    --border-color: #424242; /* Borda sutil */
    --shadow-color: rgba(0, 0, 0, 0.4); /* Sombra mais visível no tema escuro */
    --white-text-color: #ffffff; /* Texto branco puro */

    --font-family-base: 'Roboto', sans-serif;
    --font-size-base: 1rem;
    --spacing-unit: 1rem; /* Unidade base para espaçamento */
}

/* Reset Básico e Box-Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* Rolagem suave para os links de navegação */
}

body {
    font-family: var(--font-family-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-dark); /* Fundo escuro padrão */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Títulos Globais */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; } /* h3 global, pode ser sobrescrito localmente */

p {
    margin-bottom: var(--spacing-unit);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0097a7; /* Ciano mais escuro ao hover */
}

ul {
    list-style: none;
}

/* Botões */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease, border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--background-dark);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #0097a7;
    border-color: #0097a7;
    transform: translateY(-2px);
    color: var(--white-text-color);
}

.btn-secondary {
    background-color: var(--primary-color);
    color: var(--background-dark);
    border: 2px solid var(--primary-color);
    margin-left: var(--spacing-unit); /* Espaçamento entre botões */
}

.btn-secondary:hover {
    background-color: #0097a7;
    border-color: #0097a7;
    transform: translateY(-2px);
    color: var(--white-text-color);
}

/* Header (Navegação) */
header {
    background-color: var(--background-light);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-color) 0px 2px 4px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px; /* Espaço para o underline */
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease-in-out;
}

nav ul li a:hover::after {
    width: 100%;
}

/* Indicador de seção ativa no menu */
nav ul li a.active {
    color: var(--primary-color);
    font-weight: 700;
}

nav ul li a.active::after {
    width: 100%;
}

/* Seções Gerais */
.section {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--background-dark); /* Fundo padrão para seções sem .bg-light */
}

.section.bg-light {
    background-color: var(--background-light); /* Fundo claro para seções alternadas */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--background-dark) 0%, #1a1a1a 100%);
    color: var(--white-text-color);
    padding: 6rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* Ocupa pelo menos 80% da altura da viewport */
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    color: var(--white-text-color);
    margin-bottom: 1rem;
    font-size: 3.5rem;
}

.hero-content .tagline {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.social-links {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.social-links a {
    color: var(--white-text-color);
    font-size: 2rem;
    margin: 0 1rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem; /* Espaço entre os botões */
    margin-top: 2rem;
}

.hero-buttons .btn-secondary {
    margin-left: 0; /* Anula margem se houver apenas um botão em mobile */
}

/* Títulos de Seção com Underline */
.section h2 {
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    color: var(--primary-color);
}

.section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Certificações */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.certification-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-color) 0px 4px 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza logo e texto */
    text-align: center; /* Centraliza o texto */
    height: 100%; /* Garante altura uniforme */
}

.certification-item:hover {
    transform: translateY(-5px);
    box-shadow: rgba(0, 188, 212, 0.4) 0px 8px 15px;
}

.certification-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
    background-color: #ffffff; /* Fundo branco para logos (se precisar de contraste) */
    border-radius: 50%;
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 5px;
}

.certification-item h3 {
    color: var(--white-text-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.certification-item p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Experiência Profissional */
.experience-item {
    text-align: left;
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-item h3 {
    margin-bottom: 0.5rem;
    color: var(--white-text-color);
    font-size: 1.5rem;
}

.experience-item h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 400;
}

.experience-item .period {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.experience-item ul {
    list-style: disc;
    margin-left: 1.5rem;
    text-align: left;
}

.experience-item ul li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Seção de Educação */
.education-grid {
    display: grid;
    /* Aumentado o minmax para dar mais espaço e evitar quebras de linha */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Aumentado para 320px */
    gap: 2rem;
    margin-top: 3rem;
}

.education-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-color) 0px 4px 10px;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 220px; /* Altura fixa para o card de educação para padronização */
    flex-grow: 0; /* Impede que ele estique, mantendo a altura fixa */
    justify-content: space-between; /* Distribui o espaço entre os elementos */
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: rgba(0, 188, 212, 0.4) 0px 8px 15px;
}

.education-header { /* A "caixa superior" do logo e título do curso */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centraliza logo e título horizontalmente */
    justify-content: center; /* Centraliza logo e título verticalmente */
    padding: 1.5rem 1rem 1rem 1rem; /* Reduzido o padding lateral para 1rem */
    border-bottom: 2px solid var(--primary-color);
    height: 120px; /* Aumentado a altura fixa para dar mais espaço ao título e logo */
    flex-shrink: 0;
    overflow: hidden;
    text-align: center;
}

.education-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.5rem;
    background-color: #ffffff;
    border-radius: 50%; /* Faz o contêiner do logo ser redondo */
    border: 2px solid var(--primary-color); /* Adiciona uma borda na cor primária para o círculo externo do logo */
    padding: 0; /* Remove padding interno da imagem */
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px;
    flex-shrink: 0;
    display: flex; /* Para centralizar a imagem dentro do círculo */
    align-items: center;
    justify-content: center;
}

.education-item h3 {
    color: var(--white-text-color);
    font-size: 1.1rem; /* Reduzido o tamanho da fonte para 1.1rem para garantir que caiba em uma linha */
    text-align: center; /* Centralizar texto do título */
    margin: 0;
    padding: 0;
    line-height: 1.2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal; /* Permite que o texto quebre, mas vamos evitar isso com a largura extra e font-size */
    word-break: break-word; /* Para palavras muito longas */
    hyphens: auto; /* Permite hifenização para palavras longas */
}

.education-details { /* A "caixa inferior" para instituição e período */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.5rem 1rem 1.5rem 1rem; /* Reduzido o padding lateral para 1rem */
}

.education-item h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 0.5rem;
    display: flex; /* Adicionado para centralizar o texto */
    align-items: center;
    justify-content: center;
    height: 100%; /* Garante que ocupe todo o espaço disponível para centralização */
}

.education-item .period {
    color: var(--secondary-color);
    font-size: 0.95rem;
    font-style: italic;
    text-align: center;
    margin-bottom: 0;
    display: flex; /* Adicionado para centralizar o texto */
    align-items: center;
    justify-content: center;
    height: 100%; /* Garante que ocupe todo o espaço disponível para centralização */
}

/* Projetos */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-color)  0px 4px 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-card h3 {
    margin: 1.5rem 1.5rem 0.5rem;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.project-card p {
    padding: 0 1.5rem 1rem;
    font-size: 0.95rem;
    color: var(--text-color);
    flex-grow: 1;
}

.project-links {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-start;
}

/* Estilo para botão único centralizado */
.project-links.single-button {
    justify-content: center;
}

.project-links .btn-primary {
    margin-left: 0;
    margin-right: 0;
}

.project-links .btn-secondary {
    margin-left: 0;
    margin-right: 0.8rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Habilidades */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Mantido em 260px */
    gap: 2rem;
    text-align: left;
    margin-top: 3rem;
}

.skill-category {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-color) 0px 2px 5px;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: rgba(0, 188, 212, 0.4) 0px 8px 15px;
}

.skill-category h3 {
    color: var(--white-text-color);
    font-size: 1.5rem;
    margin-bottom: 0;
    padding: 1.5rem 1rem 0.8rem 1rem;
    border-bottom: 2px solid var(--primary-color);
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 5.5rem;
    flex-shrink: 0;
}

/* Estilos para os Chips de Habilidades (Skills Tags) */
.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 1.5rem 2rem 1.5rem 2rem;
    justify-content: center;
    flex-grow: 1;
    align-content: flex-start;
    min-height: 180px;
}

.skill-tag {
    background-color: var(--primary-color);
    color: var(--background-dark);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: default;
    line-height: 1.2;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.skill-tag:hover {
    background-color: #0097a7;
    transform: translateY(-2px);
}

/* Contato */
.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    text-align: left;
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-color) 0px 4px 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-family-base);
    background-color: var(--background-dark);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 188, 212, 0.25);
}

.contact-form button {
    width: auto;
    margin-top: 1rem;
}

.contact-info {
    margin-top: 2rem;
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.contact-info p i {
    margin-right: 0.8rem;
    color: var(--primary-color);
    width: 25px;
    text-align: center;
}


/* Footer */
footer {
    background-color: var(--background-dark);
    color: var(--white-text-color);
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-social-links a {
    color: var(--white-text-color);
    font-size: 1.5rem;
    margin: 0 0.8rem;
    transition: color 0.3s ease;
}

.footer-social-links a:hover {
    color: var(--primary-color);
}

/* ===========================
    Responsividade (Media Queries)
    =========================== */

/* Para telas menores que 768px (tablets e smartphones) */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }

    /* Navegação */
    nav {
        flex-direction: column;
        text-align: center;
    }

    nav .logo {
        margin-bottom: 1rem;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin: 0.5rem 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 0.5rem 0;
    }

    nav ul li a::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-section {
        padding: 4rem 0;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content .tagline {
        font-size: 1.2rem;
    }

    .social-links a {
        font-size: 1.8rem;
        margin: 0 0.8rem;
    }

    .hero-buttons {
        flex-direction: column; /* Botões em coluna em telas pequenas */
        gap: 1rem;
    }

    .hero-buttons .btn-secondary {
        margin-left: 0; /* Remover margin-left aqui também */
    }

    .section {
        padding: 3rem 0;
    }

    .projects-grid,
    .skills-grid,
    .certifications-grid,
    .education-grid { /* Adicionado para responsividade das certificações */
        grid-template-columns: 1fr;
    }

    .project-links {
        justify-content: center;
    }

    .contact-form {
        padding: 1.5rem;
    }

    footer .container {
        flex-direction: column;
    }

    footer p {
        margin-bottom: 1rem;
    }
}

/* Para telas menores que 480px (smartphones) */
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content .tagline {
        font-size: 1rem;
    }

    .btn-primary, .btn-secondary {
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
    }

    .social-links a {
        font-size: 1.5rem;
        margin: 0 0.6rem;
    }

    .project-links .btn-secondary {
        margin-right: 0.5rem;
    }
}