/* 
   ========================================================================
   SISTEMA DE DISEÑO - ING. FRANCISCO DÍAZ 
   "Colores de Aprendizaje, Tecnología y Gamificación"
   ========================================================================
*/

:root {
    /* Fondo oscuro principal (Concentración, Profundidad tech, STEM) */
    --bg-main: #0F172A;
    /* Azul noche profundo */
    --bg-secondary: #1E293B;
    /* Azul pizarra oscuro (para tarjetas) */
    --bg-light: #F8FAFC;
    /* Contraste para secciones claras */

    /* Acentos (Gamificación, Creatividad, Innovación Educativa) */
    --accent-cyan: #06B6D4;
    /* Claridad mental, Tecnología, "Amanecer del aprendizaje" */
    --accent-purple: #8B5CF6;
    /* Imaginación, Pensamiento lateral, Multimedia */
    --accent-amber: #F59E0B;
    /* Energía, Recompensas gamificadas, Calidez docente */

    /* Tipografía y Textos */
    --text-primary: #F1F5F9;
    /* Texto de alto contraste en dark mode */
    --text-muted: #94A3B8;
    /* Textos secundarios */
    --text-dark: #334155;
    /* Texto para secciones claras */

    /* Fuentes */
    --font-heading: 'Outfit', sans-serif;
    /* Moderna geométrica (Matemáticas) */
    --font-body: 'Inter', sans-serif;
    /* Legibilidad máxima */

    /* Glassmorphism / Efectos visuales */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 15px rgba(6, 182, 212, 0.5);
    --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.4);

    /* Espaciado */
    --container-w: 1200px;
    --section-y: 6rem;

    /* Transiciones */
    --transition: all 0.3s ease;
}

/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Tipografía Básica */
h1,
h2,
h3,
h4,
.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Contenedores Universales */
.container {
    width: 90%;
    max-width: var(--container-w);
    margin: 0 auto;
}

.section {
    padding: var(--section-y) 0;
}

.bg-light {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.bg-light h2.section-title,
.bg-light h3,
.bg-light .feature-card h3 {
    color: var(--bg-secondary);
}

.bg-light p {
    color: var(--text-dark);
}

.text-center {
    text-align: center;
}

.mb-large {
    margin-bottom: 4rem;
}

/* 
   ========================
   COMPONENTE: HEADER & NAV
   ========================
*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    display: flex;
    align-items: baseline;
}

.logo-text {
    font-weight: 400;
}

.logo-accent {
    font-weight: 800;
}

.logo-dot {
    color: var(--accent-cyan);
    font-size: 2rem;
    line-height: 0;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 
   ========================
   BOTONES Y LLAMADOS ACCION
   ========================
*/
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-cyan);
    color: #fff;
    box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
    background-color: #0891b2;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent-purple);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #7c3aed;
    transform: translateY(-2px);
}

.btn-accent {
    background-color: var(--accent-amber);
    color: #000;
}

.btn-accent:hover {
    background-color: #d97706;
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--glass-border);
    backdrop-filter: blur(5px);
}

.btn-outline:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* 
   ========================
   SECCIÓN: HERO (INICIO)
   ========================
*/
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    overflow: hidden;
}

.hero-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    top: -100px;
    right: -50px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    bottom: -50px;
    left: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 40px) scale(1.2);
    }
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span:last-child {
    background: linear-gradient(135deg, var(--accent-amber), #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-prompt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Glass Profile Card (Hero Visual) */
.profile-glass {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.profile-glass:hover {
    transform: perspective(1000px) rotateY(0deg) translateY(-10px);
    box-shadow: var(--shadow-glow-cyan);
}

.profile-image-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-cyan);
    position: relative;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 2px solid var(--accent-cyan);
    animation: animate-pulse 2s cubic-bezier(0.21, 0.53, 0.56, 0.8) infinite;
    z-index: 1;
}

@keyframes animate-pulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 140%;
        height: 140%;
        opacity: 0;
    }
}

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stat-icon {
    color: var(--accent-amber);
    font-size: 1.2rem;
}

/* 
   ========================
   SECCIÓN: EL MEDIADOR (GRID)
   ========================
*/
.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-header .section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header .section-title span {
    color: var(--accent-cyan);
}

.section-header .section-desc {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #fff;
    /* En modo claro */
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--accent-purple);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    color: var(--accent-purple);
    margin-bottom: 1.5rem;
}

/* 
   ========================
   SECCIÓN: PROYECTOS (CARDS)
   ========================
*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

.project-img-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.overlay-icon {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.8);
}

.project-content {
    padding: 2rem;
}

.project-tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tag-smithsonian {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-amber);
}

.tag-app {
    background: rgba(139, 92, 246, 0.2);
    color: var(--accent-purple);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-desc {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.project-link {
    color: var(--accent-cyan);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    gap: 0.8rem;
}

/* Efecto de flecha moviendose */

/* 
   ========================
   SECCIÓN: METODOLOGÍA Y PARADIGMAS
   ========================
*/
.bg-gradient-dark {
    background: linear-gradient(to right, #0F172A, #1e1b4b);
}

.row-v-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.methodology-list {
    margin-top: 3rem;
}

.methodology-list li {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.method-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-amber);
    flex-shrink: 0;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.methodology-list h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.methodology-list p {
    color: var(--text-muted);
}

/* Visual flotante de metodologia */
.floating-elements {
    position: relative;
    height: 400px;
}

.float-box {
    position: absolute;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-weight: 600;
    font-family: var(--font-heading);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: bounce-slow 6s infinite alternate;
}

.fb-1 {
    top: 20%;
    left: 0%;
    color: var(--accent-cyan);
}

.fb-2 {
    top: 50%;
    right: 0%;
    color: var(--accent-purple);
    animation-delay: -2s;
}

.fb-3 {
    bottom: 0%;
    left: 20%;
    color: var(--accent-amber);
    animation-delay: -4s;
}

@keyframes bounce-slow {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-20px);
    }
}

/* 
   ========================
   FOOTER
   ========================
*/
.footer {
    background: var(--bg-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    color: var(--text-muted);
}

.footer-links ul li a:hover {
    color: var(--accent-cyan);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.social-icons a:hover {
    background: var(--accent-cyan);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

/* 
   ========================
   SISTEMA DE GAMIFICACIÓN (TOASTS E INSIGNIAS)
   ========================
*/
.achievement-toast {
    position: fixed;
    bottom: 20px;
    right: -450px;
    width: 350px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-amber);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.achievement-toast.show {
    transform: translateX(-470px);
}

.toast-icon {
    font-size: 2.5rem;
    background: rgba(245, 158, 11, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(245, 158, 11, 0.3);
    flex-shrink: 0;
}

.toast-content h4 {
    color: var(--accent-amber);
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.toast-content p {
    color: #fff;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.toast-content small {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.2;
    display: block;
}

/* Contenedor de insignias en la barra de navegación */
.gamification-badges {
    display: flex;
    gap: 0.5rem;
    margin-right: 1.5rem;
}

.badge-icon {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: help;
    transition: var(--transition);
}

.badge-icon:hover {
    background: var(--accent-amber);
    border-color: var(--accent-amber);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

/* 
   ========================
   DISEÑOS SECUNDARIOS (RECURSOS, IA, BLOG)
   ========================
*/
.page-hero {
    padding: 10rem 0 5rem;
    text-align: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--glass-border);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tool-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-glow-cyan);
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.tool-link {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    align-self: flex-start;
    border-bottom: 1px solid var(--accent-cyan);
    padding-bottom: 2px;
}

.tool-link:hover {
    color: var(--accent-cyan);
}


/* 
   ========================
   MEDIA QUERIES (RESPONSIVE)
   ========================
*/
@media (max-width: 992px) {

    .hero-container,
    .row-v-center {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
    }

    .cta-buttons {
        justify-content: center;
    }

    .profile-glass {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Ocultar para mobile, aquí iría el menú hamburguesa que configuramos en JS */
    }

    .mobile-menu-btn {
        display: block;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 1rem auto;
    }

    .social-icons {
        justify-content: center;
    }
}