:root {
    --main-color: #2563eb; /* Un azul más corporativo */
    --bg-color: #ffffff;
    --card-bg: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #475569;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Hero: Más sobrio y minimalista */
.hero-section {
    /* Quitamos el degradado a negro y usamos el color del usuario */
    background-color: var(--main-color);
    
    /* Aplicamos un sutil degradado de la misma gama para que no sea plano */
    background-image: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.1) 100%);
    
    color: white;
    padding: 100px 0;
    border-bottom: 4px solid rgba(0,0,0,0.1); /* Sombra para dar peso */
    transition: all 0.5s ease;
}

/* Para que el texto siempre sea legible sobre el azul */
.hero-section h1 {
    font-weight: 800;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.profile-img {
    width: 130px;
    height: 130px;
    border: 2px solid var(--main-color);
    padding: 3px;
    border-radius: 50%;
    filter: grayscale(20%); /* Un toque más serio */
}

/* Bento Grid: Ordenado y equilibrado */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-top: -50px; /* Sube las tarjetas sobre el hero */
}

.bento-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.main-info { grid-column: span 8; }
.skills-box { grid-column: span 4; }
.contact-box { grid-column: span 4; }
.status-box { grid-column: span 8; }

/* Skills: Estilo etiquetas ejecutivas */
.skill-badge {
    background: #f1f5f9;
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* Botón: Llamado a la acción claro */
.btn-custom {
    background: var(--main-color);
    color: white;
    border-radius: 8px;
    padding: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-custom:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* Responsive */
@media (max-width: 992px) {
    .main-info, .skills-box, .contact-box, .status-box {
        grid-column: span 12;
    }
    .bento-grid { margin-top: 20px; }
}

/* Animación individual para cada skill al cargar */
#user-skills span {
    display: inline-block;
    animation: fadeInScale 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Interacción al pasar el mouse */
.skill-badge {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.skill-badge:hover {
    background-color: var(--main-color) !important;
    color: white !important;
    border-color: var(--main-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2);
}

.btn-custom {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    z-index: 1;
}

/* Efecto de brillo que pasa por el botón */
.btn-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.5s;
    z-index: -1;
}

.btn-custom:hover::before {
    left: 100%;
}

.btn-custom:active {
    transform: scale(0.95); /* Efecto de que se hunde al hacer clic */
}


/* Estilo del botón PDF (Visual) */
#btn-pdf {
    border-radius: 8px;
    font-weight: 500;
    transition: 0.3s;
}

/* --- MAGIA PARA EL PDF --- */
@media print {
    /* Ocultamos lo que no queremos en el papel */
    .hero-section {
    /* Usamos la variable --main-color que viene del JSON */
    background: linear-gradient(135deg, #0f172a 0%, var(--main-color) 100%);
    color: white;
    padding: 100px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: background 0.5s ease; /* Para que el cambio de color sea suave */
}
    
    #btn-ws, #btn-pdf, .status-box {
        display: none !important; /* No queremos botones en el papel */
    }

    body {
        background: white !important;
    }

    .bento-grid {
        display: block !important; /* En papel, mejor uno debajo de otro */
    }

    .bento-item {
        border: none !important;
        box-shadow: none !important;
        padding: 10px 0 !important;
    }

    .skill-badge {
        border: 1px solid #ccc !important;
        color: black !important;
    }
}

/* Animación del punto de status */
.status-dot {
    width: 12px;
    height: 12px;
    background-color: #2ecc71; /* Verde esmeralda */
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.status-dot::after {
    content: '';
    width: 100%;
    height: 100%;
    background-color: #2ecc71;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

#user-sobremi {
    position: relative;
    padding-left: 20px;
    border-left: 4px solid var(--main-color);
    font-style: italic;
}

/* Contenedor principal */
.bento-grid {
    display: grid;
    /* Creamos 3 columnas del mismo tamaño */
    grid-template-columns: repeat(3, 1fr);
    /* Definimos las filas automáticas */
    grid-auto-rows: minmax(150px, auto);
    gap: 20px;
}

/* 1. La caja de Perfil: que ocupe 2 columnas de ancho */
.main-info {
    grid-column: span 2;
}

/* 2. La caja de Contacto: que ocupe 1 columna a la derecha */
.contact-box {
    grid-column: span 1;
}

/* 3. Experiencia y Educación: cada una ocupa 1.5 columnas (se reparten a la mitad) */
.experience-box, .education-box {
    grid-column: span 1;
}

/* 4. Habilidades y Status: al final */
.skills-box {
    grid-column: span 2;
}
.status-box {
    grid-column: span 1;
}

/* Estilo para que el texto se vea bien */
.bento-item {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

/* Responsive para celulares */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Todo en una sola columna */
    }
    .main-info, .contact-box, .experience-box, .education-box, .skills-box, .status-box {
        grid-column: span 1;
    }
}

/* --- ESTILOS EXCLUSIVOS PARA EL PDF --- */
@media print {
    .bento-grid {
        display: block !important; /* Desactiva la grilla y pone una cosa bajo la otra */
    }
    .bento-item {
        border: none !important;
        box-shadow: none !important;
        margin-bottom: 20px !important;
    }
    body {
        background: white !important;
    }
}


/* ... (Todo tu CSS anterior se mantiene igual) ... */

.badge-skill {
    display: inline-block !important;
    background: #eff6ff !important;
    color: #3b82f6 !important;
    padding: 4px 10px !important;
    border-radius: 50px !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    margin: 2px !important;
    border: 1px solid #dbeafe !important;
}

/* Modal Estilo Nexus Premium */
.modal-legal {
    display: none; 
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000; /* Prioridad máxima */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content-legal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

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

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
}

.legal-link {
    color: #9ca3af;
    text-decoration: none;
    transition: 0.3s;
}

.legal-link:hover {
    color: #00d2ff;
}