/* Variables CSS globales (:root) */
:root {
    --bg-color-light: #f4f4f9;
    --text-color-light: #333333;
    --primary-color: #0056b3;
    --secondary-color: #e0e0e0;
    --card-bg-light: #ffffff;
    --error-color: #dc3545;
    
    /* Variables para Dark Mode */
    --bg-color-dark: #121212;
    --text-color-dark: #e0e0e0;
    --card-bg-dark: #1e1e1e;
}

/* Reset básico (Modelo de caja) */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Tema Claro */
body.light-mode {
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
}

/* Tema Oscuro */
body.dark-mode {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}
body.dark-mode .project-card, 
body.dark-mode input, 
body.dark-mode textarea {
    background-color: var(--card-bg-dark);
    color: var(--text-color-dark);
    border-color: #333;
}

/* Header y Navegación (Flexbox) */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 10px;
}

nav ul {
    list-style-type: none;
    display: flex;
    flex-direction: column; /* Móvil por defecto */
    gap: 10px;
    margin-top: 15px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-hidden {
    display: none;
}

/* Estructura Principal */
main {
    padding: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--secondary-color);
}

.profile-img {
    width: 150px;
    border-radius: 50%;
    margin-bottom: 15px;
}

/* Listas */
ol {
    margin-left: 20px;
}

dl dt {
    font-weight: bold;
    margin-top: 10px;
    color: var(--primary-color);
}

dl dd {
    margin-left: 20px;
    margin-bottom: 10px;
}

/* Galería de Proyectos (CSS Grid) */
.projects-gallery {
    display: grid;
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 20px;
    margin-top: 20px;
}

.project-card {
    background-color: var(--card-bg-light);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Formularios */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s;
}

/* Estados :hover y :focus */
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 86, 179, 0.5);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #003d82;
}

#form-alerts {
    color: var(--error-color);
    font-weight: bold;
    margin-bottom: 15px;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
}

/* Media Queries (Escritorio/Tablet) */
@media (min-width: 768px) {
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .hamburger-btn {
        display: none; /* Ocultar botón hamburguesa en escritorio */
    }

    .nav-hidden {
        display: block; /* Mostrar nav siempre en escritorio */
    }

    nav ul {
        flex-direction: row;
        margin-top: 0;
        gap: 20px;
    }

    .projects-gallery {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en escritorio */
    }
}