/* ------------------------------------------------------------------- */
/* 1. SETUP GLOBAL Y TIPOGRAFÍA (MODERNA) */
/* ------------------------------------------------------------------- */

/* Importamos fuentes: Poppins para texto general y Impact para el nombre principal */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Impact&display=swap');

:root {
    --bg-dark: #37002f; /* Fondo principal oscuro */
    --card-dark: #4d0043; /* Fondo de tarjetas */
    --accent-blue: #ff00ff; /* Azul Eléctrico para acentos y enlaces */
    --text-light: #e1b7e1; /* Texto principal claro */
    --text-secondary: #a0a0a0; /* Texto secundario/suave */
    --shadow-color: rgba(0, 0, 0, 0.4);
    --font-primary: 'Poppins', sans-serif;
    --font-impact: 'Impact', sans-serif; /* Nueva variable para Impact */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    padding: 20px 10px;
    min-height: 100vh;
    transition: background-color 0.5s;
    /* Animación sutil de fondo de degradado */
    background-image: linear-gradient(135deg, var(--bg-dark) 0%, #2a162a 100%);
    animation: gradient-shift 15s ease infinite alternate;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* ------------------------------------------------------------------- */
/* 2. ESTRUCTURA Y PERFIL PRINCIPAL */
/* ------------------------------------------------------------------- */

.perfil-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 20px;
    display: grid;
    gap: 30px;
}

/* Estilo para el nombre con tipografía IMPACT y mayúsculas */
.nombre-completo {
    text-align: center;
    font-family: var(--font-impact); /* Aplicamos Impact */
    text-transform: uppercase; /* Todo en mayúsculas */
    font-size: 3.5em; /* Ligeramente más grande para Impact */
    font-weight: 600;
    color: var(--text-light);
    margin: 10px 0 5px;
    /* Sombra de texto dramática */
    text-shadow: 4px 4px 0px #111111, 0 0 20px rgb(247, 0, 255);
    transition: transform 0.3s;
    letter-spacing: 2px; /* Espaciado extra para mejor lectura en Impact */
}

@media (min-width: 768px) {
    .nombre-completo {
        font-size: 5em; /* Aún más grande en escritorio */
    }
}


.nombre-completo:hover {
    transform: scale(1.02);
}

.info {
    text-align: center;
    font-size: 1.1em;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Foto de Perfil (Avatar.jpg) */
.foto-perfil {
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 2rem auto;;
    border: 5px solid var(--accent-blue);
    object-fit: cover;
    /* Animación de giro sutil en el borde */
    box-shadow: 0 0 20px var(--accent-blue);
    animation: pulse-glow 3s infinite alternate;
    transition: transform 0.3s;
}

.foto-perfil:hover {
    transform: scale(1.05) rotate(5deg);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 10px var(--accent-blue); }
    100% { box-shadow: 0 0 25px var(--accent-blue), 0 0 5px rgba(0, 173, 181, 0.8); }
}

/* ------------------------------------------------------------------- */
/* 3. SECCIONES (CARDS) */
/* ------------------------------------------------------------------- */

section h3 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.foja-academica, .datos-institucionales, .info-personal {
    background-color: var(--card-dark);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--shadow-color);
    border: 1px solid rgba(181, 0, 163, 0.2);
    transition: all 0.4s ease;
}

.foja-academica:hover, .datos-institucionales:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 173, 181, 0.2);
}

.datos-academico p {
    margin: 5px 0;
    font-size: 1.05em;
}

.tema-elegido {
    color: var(--accent-blue);
    font-style: italic;
    font-size: 1.3em;
    text-align: center;
    padding: 10px 0;
}

/* ------------------------------------------------------------------- */
/* 4. MENÚS DE NAVEGACIÓN Y ENLACES */
/* ------------------------------------------------------------------- */

.header-institucional {
    background-color: var(--card-dark);
    padding: 10px 0;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.nav-institucional, .nav-equipo {
    text-align: center;
}

.nav-institucional ul, .nav-equipo ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
    transform-origin: right;
}

.nav-link:hover {
    color: var(--accent-blue);
    background-color: rgba(0, 173, 181, 0.1);
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* ------------------------------------------------------------------- */
/* 5. SECCIÓN DE MATERIAS (DETAILS) - Diseño Colapsible Moderno */
/* ------------------------------------------------------------------- */

section details {
    background-color: #512c4e; /* Un tono ligeramente diferente para contenedores */
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: background-color 0.3s;
}

section details:hover {
    background-color: #633561;
}

summary {
    cursor: pointer;
    padding: 15px 20px;
    background-color: var(--accent-blue);
    color: var(--bg-dark); /* Texto oscuro sobre el acento */
    font-weight: 700;
    list-style: none; /* Oculta el triángulo predeterminado */
    position: relative;
    transition: background-color 0.3s;
}

/* Custom icon para el estado (Cerrado/Abierto) */
summary::before {
    content: '+';
    font-size: 1.2em;
    margin-right: 10px;
    transition: transform 0.2s;
}

details[open] summary::before {
    content: '—';
    transform: rotate(180deg);
}

section details ul {
    list-style: none;
    padding: 10px 20px 20px 20px;
}

section details li {
    background-color: rgba(178, 0, 181, 0.05); /* Ítem sutil */
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    border-left: 3px solid var(--accent-blue);
    font-weight: 300;
    transition: background-color 0.2s;
}

section details li:hover {
    background-color: rgba(0, 173, 181, 0.15);
}

/* ------------------------------------------------------------------- */
/* 6. PIE DE PÁGINA */
/* ------------------------------------------------------------------- */

.footer-institucional {
    text-align: center;
    padding: 30px 20px;
    margin-top: 30px;
    border-top: 1px solid var(--card-dark);
    color: var(--text-secondary);
}

.footer-institucional p {
    margin-bottom: 10px;
    font-size: 0.9em;
}

.info-legal {
    font-size: 0.75em;
    line-height: 1.4;
    max-width: 700px;
    margin: 0 auto;
}

/* ------------------------------------------------------------------- */
/* 7. MEDIA QUERIES (RESPONSIVE) */
/* ------------------------------------------------------------------- */

@media (min-width: 768px) {
    /* En escritorio, usamos un layout de dos columnas para las secciones */
    .perfil-container {
        grid-template-columns: 2fr 1fr; /* Columna principal (Foja) y Columna lateral (Datos Cátedra) */
        grid-template-areas: 
            "personal personal"
            "foja catedra"
            "niveles catedra"
            "materias catedra";
    }

    .info-personal { grid-area: personal; }
    .foja-academica { grid-area: foja; }
    .datos-institucionales { grid-area: catedra; }
    
    /* Agrupando las secciones de Nivel y Materias en Curso */
    .foja-academica + section {
        grid-area: niveles;
        /* Estilo para el contenedor de los detalles */
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}
