/* ==========================================================================
   1. Variáveis Globais e Estilos de Reset
   ========================================================================== */

:root {
    --bg-dark: #111827;
    --bg-light-dark: #1F2937;
    --text-light: #F9FAFB;
    --accent-blue: #38BDF8;
    --text-gray: #D1D5DB;
}

/* Reset básico e estilos de corpo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

/* ==========================================================================
   2. Estilos de Componentes e Seções
   ========================================================================== */

/* Estilo geral para todas as seções de conteúdo */
.content-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    font-size: 2.5rem;
    color: var(--accent-blue);
    text-align: center;
    margin-bottom: 50px;
    font-weight: 600;
}

.section-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-gray);
}

/* --- Seção Hero (Cabeçalho) --- */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeIn 2s ease-in-out;
}

.hero-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--accent-blue);
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-align: left;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-top: 10px;
    font-weight: 400;
    text-align: left;
}

.hero-links {
    margin-top: 30px;
    justify-content: flex-start;
}

.hero-links a {
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    margin: 0 15px 0 0;
    transition: background-color 0.3s, color 0.3s;
}

.hero-links a:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--bg-dark);
}

.scroll-down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-down-arrow svg {
    width: 30px;
    height: 30px;
    color: var(--text-light);
}

/* --- Seção de Habilidades --- */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.skill-card {
    background-color: var(--bg-light-dark);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

/* --- Seção de Projetos --- */
.projects-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
}

.project-card {
    background-color: var(--bg-light-dark);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}

.project-card h3 {
    font-size: 1.5rem;
    color: var(--accent-blue);
    font-weight: 600;
}

.project-card p {
    margin: 15px 0;
    color: var(--text-gray);
    flex-grow: 1;
}

.project-links a {
    color: var(--text-light);
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--accent-blue);
    padding: 8px 15px;
    border-radius: 5px;
    margin-right: 10px;
    transition: background-color 0.3s;
    display: inline-block;
    margin-top: 10px;
}

.project-links a:hover {
    background-color: var(--accent-blue);
    color: var(--bg-dark);
}

.project-links a.disabled-link {
    border-color: #4B5563;
    color: #4B5563;
    pointer-events: none;
}

/* --- Seção de Experiência (Linha do Tempo) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--bg-light-dark);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 30px;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 30px;
    text-align: left;
}

.timeline-dot {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: var(--accent-blue);
    border: 3px solid var(--bg-dark);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -7.5px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -7.5px;
}

.timeline-date {
    font-weight: 500;
    color: var(--accent-blue);
}

.timeline-content {
    background-color: var(--bg-light-dark);
    padding: 20px;
    border-radius: 8px;
    margin-top: 10px;
}

.timeline-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-light);
}

.timeline-content h4 {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
}


/* --- Rodapé --- */
footer {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--bg-light-dark);
}

footer h2 {
    margin-bottom: 20px;
}

footer p {
    max-width: 600px;
    margin: 0 auto 20px auto;
    color: var(--text-gray);
}

.contact-info {
    margin: 30px 0;
}

.contact-info a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    margin: 0 10px;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--accent-blue);
}

.contact-info span {
    color: var(--text-gray);
}

.footer-social-links a {
    color: var(--text-light);
    text-decoration: none;
    border: 1px solid var(--text-gray);
    padding: 8px 15px;
    border-radius: 5px;
    margin: 0 10px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.footer-social-links a:hover {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
    color: var(--bg-dark);
}

.footer-copy {
    margin-top: 40px;
    font-size: 0.9rem;
    color: var(--text-gray);
}


/* ==========================================================================
   3. Animações Keyframes
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


/* ==========================================================================
   4. Media Queries (Estilos Responsivos)
   ========================================================================== */

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column-reverse;
        gap: 30px;
    }

    .hero-text, .hero-title, .hero-subtitle {
        text-align: center;
    }

    .hero-links {
        justify-content: center;
    }

    .hero-links a {
        margin: 0 10px;
    }

    .hero-image img {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   5. Media Queries para Responsividade Adicional
   ========================================================================== */

@media (max-width: 768px) {

    /* --- Ajuste da Timeline para uma única coluna --- */

    /* Centraliza a linha guia da timeline à esquerda */
    .timeline::after {
        left: 30px;
    }

    /* Faz cada item da timeline ocupar 100% da largura */
    .timeline-item {
        width: 100%;
        padding-left: 70px; /* Abre espaço para o conteúdo */
        padding-right: 15px;
    }

    /* Remove o posicionamento alternado (esquerda/direita) */
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
        text-align: left; /* Alinha todo o texto à esquerda */
    }
    
    /* Alinha o ponto decorativo com a nova linha */
    .timeline-dot {
        left: 22.5px;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 22.5px;
    }
}