/* ==========================================================================
SISTEMA DE IDENTIDAD VISUAL: CONFIGURACIÓN Y VARIABLES DE INTERFAZ
   ========================================================================== */
:root {
    /* Colores de Fondo */
    --bg-main-dashboard: #0a0e1a;
    --bg-panel-surface: #13192b;
    --bg-token: #1b2238;
    
    /* Variables Cromáticas y Acentos */
    --accent-cyan: #adebb3;
    --accent-purple: #ae57bf;
    --text-pure: #f5f6f9;
    --text-muted: #8e9bb4;
    --footer-bg-gold: #cdecaa;
    
    /* Bordes y Efectos */
    --border-panel: rgba(255, 255, 255, 0.06);
    --glow-effect: rgba(174, 87, 191, 0.18);
    --shadow-base: 0 4px 20px rgba(0, 0, 0, 0.15);
    
    /* Configuración de Grilla y Layout */
    --grid-gap: 30px;
    --max-width: 1440px;
}

/* Reset y Configuración Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main-dashboard);
    color: var(--text-pure);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */
.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   CABECERA EN PERSPECTIVA DE PANEL (NAVBAR)
   ========================================================================== */
.navbar-dashboard {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 45px;
    background: var(--bg-panel-surface);
    border-bottom: 1px solid var(--border-panel);
    backdrop-filter: blur(8px);
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.team-badge {
    padding: 5px 12px;
    background: var(--accent-purple);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 1px;
}

.identity-text h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.identity-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.menu-dashboard ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.menu-dashboard a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.menu-dashboard a:hover {
    color: var(--accent-cyan);
}

/* ==========================================================================
   GRILLA MODULAR ASIMÉTRICA OPTIMIZADA (CSS GRID)
   ========================================================================== */
.dashboard-grid-container {
    display: grid;
    grid-template-columns: 1.3fr 0.85fr 0.85fr;
    gap: var(--grid-gap);
    width: 100%;
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 45px;
}

/* Estilo unificado de módulos (Tarjetas del Dashboard) */
.panel-card {
    position: relative;
    padding: 30px;
    background: var(--bg-panel-surface);
    border: 1px solid var(--border-panel);
    border-radius: 18px;
    box-shadow: var(--shadow-base);
    overflow: hidden;
}

/* Ubicación de áreas según jerarquía modular */
.area-profile       { grid-column: 1;     grid-row: 1; }
.area-tools         { grid-column: 2 / 4; grid-row: 1; }
.area-timeline      { grid-column: 1 / 4; grid-row: 2; }
.area-metrics       { grid-column: 1 / 4; grid-row: 3; }
.area-portfolio     { grid-column: 1 / 4; grid-row: 4; }
.area-team          { grid-column: 1;     grid-row: 5; }
.area-institutional { grid-column: 2 / 4; grid-row: 5; }

/* Títulos Generales de Paneles */
.panel-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.panel-subtitle {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ==========================================================================
   SECCIÓN PERFIL: COMPONENTE DETALLADO
   ========================================================================== */
.profile-layout-horizontal {
    display: flex;
    align-items: center;
    gap: 35px;
    height: 100%;
}

.avatar-rectangle-container-large {
    flex: 0 0 220px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px var(--glow-effect);
    overflow: hidden;
}

.avatar-rectangle-container-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-details-content-spacious {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 15px;
}

.role-tag {
    color: var(--accent-purple);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.headline-container h2 {
    margin-top: 4px;
    margin-bottom: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.25;
}

.highlight-quote {
    margin-bottom: 12px;
    color: var(--accent-cyan);
    font-size: 0.95rem;
    font-style: italic;
    line-height: 1.4;
}

.main-bio {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-dashboard-action {
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-pure);
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-dashboard-action:hover {
    background: rgba(174, 87, 191, 0.12);
    color: #ffffff;
    border-color: var(--accent-purple);
    transform: translateY(-2px);
}

/* ==========================================================================
   SECCIÓN: MIS HERRAMIENTAS
   ========================================================================== */
.tools-flex-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.tool-token {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    background: var(--bg-token);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 10px;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}

.token-ai { border-color: #ff9a00; color: #ff9a00; }
.token-ps { border-color: #00c8ff; color: #00c8ff; }
.token-pr { border-color: #ea77ff; color: #ea77ff; }
.token-figma { border-color: #adebb3; color: #adebb3; }

.tool-token:hover {
    background: rgba(255, 255, 254, 0.04);
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   HISTORIAL ACADÉMICO / TIMELINE
   ========================================================================== */
.timeline-header {
    margin-bottom: 22px;
}

.timeline-horizontal-scroll {
    display: flex;
    gap: 20px;
    padding-bottom: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.timeline-horizontal-scroll::-webkit-scrollbar {
    height: 6px;
}

.timeline-horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.timeline-node {
    flex: 0 0 290px;
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-panel);
    border-top: 3px solid var(--accent-purple);
    border-radius: 0 0 12px 12px;
    scroll-snap-align: start;
}

.timeline-node.stage-present {
    background: rgba(173, 235, 179, 0.02);
    border-top-color: var(--accent-cyan);
}

.node-year {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 800;
}

.timeline-node h4 {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.node-list {
    list-style: none;
}

.node-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.badge-check { 
    color: var(--accent-cyan); 
    font-weight: bold; 
}

.item-learning { 
    color: var(--accent-cyan) !important; 
    font-weight: 600; 
}

.item-pending { 
    opacity: 0.35; 
}

.badge-status { 
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08); 
    font-size: 0.65rem; 
    border-radius: 4px; 
}

.node-progress-container {
    width: 100%;
    height: 4px;
    margin-top: 15px;
    background: #1f283d;
    border-radius: 2px;
    overflow: hidden;
}

.node-progress-bar { 
    height: 100%; 
    background: var(--accent-cyan); 
}

/* ==========================================================================
   SECCIÓN: MÉTRICAS (PROGRESO ACADÉMICO)
   ========================================================================== */
.metrics-horizontal-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
}

.main-metric-display-spacious {
    flex: 1.5;
}

.radial-sim-percentage {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.big-number {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.big-number small {
    color: var(--accent-purple);
    font-size: 1.5rem;
}

.metric-label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.linear-progress-track {
    width: 100%;
    height: 8px;
    margin: 12px 0;
    background: #1f283d;
    border-radius: 10px;
    overflow: hidden;
}

.linear-progress-fill {
    width: 72.7%;
    height: 100%;
    background: var(--accent-cyan);
    box-shadow: 0 0 14px var(--accent-cyan);
}

.progress-context-title {
    color: var(--text-muted);
    font-size: 0.65rem;
    letter-spacing: 0.8px;
}

.sub-metrics-flex {
    display: flex;
    flex: 1;
    justify-content: flex-end;
    gap: 30px;
}

.sub-stat-box-row {
    min-width: 150px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    text-align: center;
}

.stat-value {
    display: block;
    color: var(--accent-cyan);
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ==========================================================================
   SECCIÓN DE PORTFOLIO EXPANDIDA
   ========================================================================== */
.portfolio-multiple-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.portfolio-preview-card {
    width: 100%;
    height: 160px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.portfolio-image-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.portfolio-thumbnail {
    width: 100%;
    height: 100%;
    background-color: var(--bg-token);
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    background: rgba(10, 14, 26, 0.85);
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-text {
    padding: 6px 12px;
    background: rgba(13, 21, 49, 0.6);
    color: var(--accent-cyan);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--accent-cyan);
    border-radius: 6px;
}

.portfolio-preview-card:hover .portfolio-thumbnail {
    transform: scale(1.06);
}

.portfolio-preview-card:hover .portfolio-overlay {
    opacity: 1;
}

/* ==========================================================================
   COMPONENTES INFERIORES: EQUIPO E INSTITUCIONAL
   ========================================================================== */
.team-members-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}

.member-row.active-member {
    background: rgba(174, 87, 191, 0.05);
    border-color: rgba(174, 87, 191, 0.3);
}

.member-bullet {
    user-select: none;
}

.member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.member-info strong { 
    font-size: 0.85rem; 
    font-weight: 500; 
}

.member-tag, 
.member-link-tag {
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.7rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.member-link-tag:hover { 
    background: rgba(173, 235, 179, 0.15);
    color: var(--accent-cyan); 
}

/* Tabla Modular Institucional */
.institutional-split-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.table-column h4 { 
    margin-bottom: 12px;
    color: var(--text-muted); 
    font-size: 0.8rem; 
    text-transform: uppercase; 
}

.table-column ul { 
    list-style: none; 
}

.table-column li { 
    margin-bottom: 8px;
    font-size: 0.85rem; 
}

/* ==========================================================================
   FOOTER (SISTEMA DE CIERRE)
   ========================================================================== */
.footer-dashboard {
    margin-top: auto; /* Empuja el footer al final si hay poca pantalla */
    padding: 35px 45px;
    background: var(--footer-bg-gold);
    color: #0d1531;
}

.footer-wrapper { 
    width: 100%;
    max-width: var(--max-width); 
    margin: 0 auto; 
}

.footer-meta-cols {
    display: flex; 
    justify-content: space-between; 
    padding-bottom: 15px; 
    margin-bottom: 15px; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
}

.meta-right { 
    text-align: right; 
}

.legal-clause { 
    color: #0d1531;
    font-size: 0.7rem; 
    line-height: 1.4; 
    opacity: 0.8; 
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================================================== */
@media (max-width: 1200px) {
    .dashboard-grid-container {
        grid-template-columns: 1fr 1fr;
        padding: 0 25px;
    }
    .area-profile       { grid-column: 1 / 3; grid-row: 1; }
    .area-tools         { grid-column: 1 / 3; grid-row: 2; }
    .area-timeline      { grid-column: 1 / 3; grid-row: 3; }
    .area-metrics       { grid-column: 1 / 3; grid-row: 4; }
    .area-portfolio     { grid-column: 1 / 3; grid-row: 5; }
    .area-team          { grid-column: 1 / 3; grid-row: 6; }
    .area-institutional { grid-column: 1 / 3; grid-row: 7; }
    
    .portfolio-multiple-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 768px) {
    .dashboard-grid-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 20px;
    }
    
    .area-profile, .area-tools, .area-portfolio, .area-metrics, .area-team, .area-timeline, .area-institutional {
        grid-column: 1;
        grid-row: auto;
    }
    
    .navbar-dashboard { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
    }
    
    .menu-dashboard ul { 
        justify-content: center;
        flex-wrap: wrap; 
        gap: 15px; 
    }
    
    .profile-layout-horizontal {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .profile-details-content-spacious { 
        padding-right: 0; 
    }
    
    .action-buttons { 
        justify-content: center; 
    }
    
    .metrics-horizontal-layout { 
        flex-direction: column; 
        gap: 20px; 
    }
    
    .sub-metrics-flex { 
        justify-content: center; 
        width: 100%; 
    }
    
    .portfolio-multiple-grid { 
        grid-template-columns: 1fr; 
    }
    
    .institutional-split-table { 
        grid-template-columns: 1fr; 
    }
    
    .footer-meta-cols { 
        flex-direction: column; 
        gap: 15px; 
    }
    
    .meta-right { 
        text-align: left; 
    }
}