/* =========================================
   VARIABLES ACCESIBLES (SLATE & INDIGO)
   ========================================= */
:root {
    --fondo-oscuro: #0F172A;      /* Azul pizarra profundo */
    --fondo-secundario: #0B1120;  /* Para sidebars y áreas oscuras */
    --tarjeta-bg: #1E293B;        /* Color de las cards */
    --acento-indigo: #6366F1;     /* Color principal de acción */
    --acento-hover: #818CF8;      /* Color al pasar el mouse */
    --texto-blanco: #F8FAFC;      /* Blanco suave para lectura */
    --texto-gris: #94A3B8;        /* Gris para descripciones */
    --borde-suave: rgba(148, 163, 184, 0.1);
    --fuente-principal: 'Space Grotesk', sans-serif;
}

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

body {
    background-color: var(--fondo-oscuro);
    color: var(--texto-blanco);
    font-family: var(--fuente-principal);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   NAVEGACIÓN (SÓLIDA Y MODERNA)
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 8%;
    background-color: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px); /* Efecto cristalino */
    border-bottom: 1px solid var(--borde-suave);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 3000;
}

.logo a { font-size: 1.8rem; font-weight: 700; color: white; text-decoration: none; }
.logo span { color: var(--acento-indigo); }

.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a { text-decoration: none; color: var(--texto-blanco); transition: 0.3s; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--acento-indigo); }

/* --- CONTENEDOR GENERAL --- */
main {
    padding-top: 100px;
    min-height: 100vh;
}

/* =========================================
   SECCIÓN HERO (INICIO)
   ========================================= */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0 8%;
    height: calc(100vh - 100px);
}

.avatar-container {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 3px solid var(--acento-indigo);
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

.code-symbol { font-size: 4.5rem; color: var(--acento-indigo); font-weight: 700; }

.hero-content h1 { font-size: 5.5rem; line-height: 1; margin-bottom: 1rem; }
.dot { color: var(--acento-indigo); }

.typing-container { font-size: 1.8rem; color: var(--texto-gris); margin-bottom: 1.5rem; }
.cursor { color: var(--acento-indigo); animation: parpadeo 0.8s infinite; }

@keyframes parpadeo { 50% { opacity: 0; } }

/* =========================================
   SECCIÓN DE PRÁCTICAS (CARDS)
   ========================================= */
.section-container { padding: 50px 8%; }

.category-title {
    font-size: 2.8rem;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
}
.category-title span { color: var(--acento-indigo); }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 2rem;
}

.practice-card {
    background: var(--tarjeta-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--borde-suave);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: inherit;
    display: block;
}

.practice-card:hover {
    transform: translateY(-8px);
    border-color: var(--acento-indigo);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.card-image { position: relative; height: 190px; overflow: hidden; background: #000; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; opacity: 0.8; }
.practice-card:hover .card-image img { transform: scale(1.1); opacity: 1; }

.card-info { padding: 1.5rem; }
.card-tag { 
    color: var(--acento-indigo); 
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700; 
    font-size: 0.75rem; 
    text-transform: uppercase; 
}

/* =========================================
   ZONA ADMIN (DASHBOARD)
   ========================================= */
.diseno-admin { display: flex; min-height: 100vh; padding-top: 0 !important; }

.barra-lateral {
    width: 260px;
    background-color: var(--fondo-secundario);
    border-right: 1px solid var(--borde-suave);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 2500;
}

.encabezado-lateral { padding: 30px; border-bottom: 1px solid var(--borde-suave); }
.etiqueta-admin { color: var(--acento-indigo); font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; }

.navegacion-lateral ul { list-style: none; padding: 15px 0; }
.navegacion-lateral a {
    display: block; padding: 14px 25px; color: var(--texto-gris); text-decoration: none; transition: 0.3s;
}
.navegacion-lateral a.activo, .navegacion-lateral a:hover {
    color: var(--texto-blanco); background: rgba(99, 102, 241, 0.1); border-left: 4px solid var(--acento-indigo);
}

.contenido-principal { margin-left: 260px; flex-grow: 1; }

.barra-superior {
    height: 70px; background: var(--fondo-secundario); display: flex;
    justify-content: space-between; align-items: center; padding: 0 40px;
    border-bottom: 1px solid var(--borde-suave);
}

.tarjeta-dato { background: var(--tarjeta-bg); padding: 25px; border-radius: 12px; flex: 1; border: 1px solid var(--borde-suave); }

.tabla-admin { width: 100%; border-collapse: collapse; background: var(--fondo-secundario); border-radius: 10px; overflow: hidden; }
.tabla-admin th { background: rgba(255, 255, 255, 0.03); color: var(--acento-indigo); padding: 18px; text-align: left; }
.tabla-admin td { padding: 16px; border-bottom: 1px solid var(--borde-suave); }

/* =========================================
   GITHUB API (PORTAFOLIO DINÁMICO)
   ========================================= */
.layout-github {
    display: grid;
    grid-template-columns: 1fr 320px; 
    gap: 3rem;
    margin-top: 2rem;
}

.tarjeta-perfil-github {
    display: flex;
    align-items: center;
    background: var(--tarjeta-bg);
    padding: 35px;
    border-radius: 16px;
    border: 1px solid var(--borde-suave);
    border-bottom: 4px solid var(--acento-indigo);
}

.avatar-grande {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid var(--acento-indigo);
    margin-right: 35px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.seguidores-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--tarjeta-bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--borde-suave);
}

.foto-seguidor {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: 0.3s;
}

.foto-seguidor:hover { 
    transform: scale(1.15) translateY(-4px); 
    border-color: var(--acento-indigo); 
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

/* --- BOTONES --- */
.cta-buttons { display: flex; gap: 1.2rem; margin-top: 2.5rem; }
.btn {
    padding: 0.9rem 1.8rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: 0.3s;
    cursor: pointer;
}
.btn-primary { background: var(--acento-indigo); color: white; border: none; }
.btn-primary:hover { background: var(--acento-hover); box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }

.btn-outline { border: 2px solid var(--acento-indigo); color: var(--acento-indigo); }
.btn-outline:hover { background: var(--acento-indigo); color: white; }

/* --- FOOTER --- */
.main-footer { text-align: center; padding: 3rem; border-top: 1px solid var(--borde-suave); margin-top: 5rem; color: var(--texto-gris); font-size: 0.9rem; }

/* RESPONSIVE */
@media (max-width: 900px) {
    .hero-split { grid-template-columns: 1fr; text-align: center; height: auto; padding-top: 60px; }
    .hero-visual { margin-bottom: 3rem; }
    .hero-content h1 { font-size: 3.5rem; }
    .cta-buttons { justify-content: center; }
    .layout-github { grid-template-columns: 1fr; }
    .tarjeta-perfil-github { flex-direction: column; text-align: center; }
    .avatar-grande { margin-right: 0; margin-bottom: 20px; }
    .contenido-principal { margin-left: 0; }
    .barra-lateral { display: none; } /* En móvil se ocultaría la sidebar fija */
}