/* =====================================================
    VARIÁVEIS DE TEMAS
=====================================================*/

/* Tema Claro (padrão) */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --header-bg: #f4f4f4;
    --primary-color: #007bff;
    --card-bg: #f9f9f9;
    --card-text-color: #333333;
    --card-btn-bg: #00c3ff;
    --card-btn-text: black;
}

/* Tema Escuro */
body.dark-mode {
    --bg-color: #1a1a1a;
    --text-color: #f4f4f4;
    --header-bg: #333333;
    --primary-color: #3793ff;
    --card-bg: #2d2d2d;
    --card-text-color: #f4f4f4;
    --card-btn-bg: #00c6ff;
    --card-btn-text: white;
}

/* =====================================================
    RESET E CONFIGURAÇÕES GERAIS
=====================================================*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
    CABEÇALHO E NAVEGAÇÃO
=====================================================*/
header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Estilização da Logo */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px; /* Altura ideal para um header padrão */
    width: auto;  /* Mantém a proporção */
    border-radius: 50%;   
    transition: transform 0.3s ease; /* Efeito suave ao passar o mouse */
}

.logo img:hover {
    transform: scale(1.05); /* Pequeno zoom interativo */
}

/* =====================================================
    SEÇÕES E GRID DE PORTFÓLIO
=====================================================*/
.section {
    padding: 100px 0 60px 0;
    border-bottom: 1px solid #ddd;
}

.grid-portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* =====================================================
    ESTILIZAÇÃO DE LISTAS (FORMAÇÃO)
=====================================================*/
#formacao ul {
    list-style: none; /* Remove as bolinhas */
    padding: 0;      /* Remove o recuo da esquerda */
    margin-top: 15px;
}

#formacao li {
    margin-bottom: 10px; /* Dá um espaçamento entre os cursos */
    position: relative;
}

#formacao li::before {
    content: "▹"; /* Um triângulo discreto */
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 8px;
}

/* =====================================================
    ESTILO DA SEÇÃO SOBRE MIM (COM FOTO)
=====================================================*/
.sobre-mim-conteudo {
    display: flex;
    align-items: center; /* Centraliza verticalmente a foto com o texto */
    gap: 40px;           /* Espaço entre a foto e o texto */
    margin-top: 20px;
}

.foto-perfil {
    width: 250px;        /* Tamanho da imagem */
    height: 250px;
    border-radius: 50%;  /* Deixa redonda */
    object-fit: cover;   /* Não distorce a imagem */
    border: 5px solid var(--primary-color); /* Usa a cor do header como borda */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;      /* Impede que a foto "encolha" se o texto for grande */
}

.texto-perfil {
    flex: 1;
}

.texto-perfil h1 {
    margin-bottom: 20px;
}

/* =====================================================
    AJUSTE DE RESPONSIVIDADE (MOBILE)
=====================================================*/
@media (max-width: 768px) {
    .sobre-mim-conteudo {
        flex-direction: column; /* Empilha a foto em cima do texto no celular */
        text-align: center;
    }

    .foto-perfil {
        width: 180px;  /* Foto um pouco menor no celular */
        height: 180px;
    }
}

@media (max-width: 768px) {
    .logo img {
        height: 35px; /* Reduz um pouco o tamanho da Logo no mobile */
    }
}

/* =====================================================
    CARD DE PORTFÓLIO
=====================================================*/
.card {
    background: var(--card-bg);
    color: var(--card-text-color);
    padding: 20px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, background 0.3s, color 0.3s;
}

.card:hover {
    transform: translateY(-8px);
}

.card-img-container {
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.card-img-container:hover img {
    transform: scale(1.1);
}

.card h3 {
    margin-bottom: 10px;
}

.card p {
    font-size: 14px;
    margin-bottom: 15px;
}

.card a {
    display: flex;
    padding: 8px 15px;
    background: var(--card-btn-bg);
    color: var(--card-btn-text);
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

.card a:hover {
    background: var(--primary-color);
    color: var(--card-btn-text);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.btn-projeto {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--card-btn-bg), var(--primary-color));
    color: var(--card-btn-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-top: auto;
}

.btn-projeto:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, var(--primary-color), #0055cc);
}

/* =====================================================
    FORMULÁRIO DE CONTATO
=====================================================*/
#contact-form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
}

.field {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: var(--card-bg);
    color: var(--card-text-color);
    transition: background 0.3s, color 0.3s;
}

button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    opacity: 0.9;
}

/* =====================================================
    RODAPÉ DA PÁGINA
=====================================================*/
footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.9rem;
}

/* =====================================================
    RESPONSIVIDADE E MENU MOBILE
=====================================================*/
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    transition: 0.3s;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 15px 0;
    }

    nav ul li a {
        margin-left: 0;
        font-size: 1.2rem;
    }

    .grid-portfolio {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0 40px 0;
    }
}