/* 
   HOJA DE ESTILOS (CSS) - VERSIÓN RELACIONAL v2 (SEGURA)
   ---------------------
   Controla colores, fuentes, espacios y animaciones.
   Estilo 'Classic Oxford Paper' (Papel Clásico).
*/

:root {
    /* Variable de Colores */
    --bg-body: #f3f3f3;       /* Fondo gris claro de la pantalla */
    --bg-paper: #ffffff;      /* Fondo blanco de la hoja */
    --text-primary: #111111;  /* Texto principal casi negro */
    --text-secondary: #555555;/* Texto secundario gris oscuro */
    --border-color: #dddddd;  /* Color de líneas divisorias */
    
    /* Fuentes Tipográficas */
    --font-heading: 'Georgia', serif;
    --font-body: 'Arial', sans-serif;
}

/* Configuración General del Cuerpo */
body {
    background-color: var(--bg-body);
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 40px 0;
    margin: 0;
}

/* El Contenedor "Hoja de Papel" */
.paper-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-paper);
    padding: 60px 80px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    min-height: 100vh;
}

/* ================= ENCABEZADO (HEADER) ================= */
header {
    margin-bottom: 30px;
    border-bottom: 3px solid #111;
    padding-bottom: 30px;
    text-align: center;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
}

.title-role {
    font-size: 1.2rem;
    color: #666;
    font-style: italic;
    margin-top: 5px;
    margin-bottom: 15px;
}

.contact-line {
    font-size: 0.95rem;
    color: #444;
    margin-bottom: 25px;
}
.contact-line span { margin-right: 15px; }
.contact-line i { margin-right: 5px; color: #666; }

.profile-summary {
    margin-bottom: 30px;
    text-align: justify;
    color: #444;
}

/* ================= BOTONES DE ACCIÓN ================= */
.action-buttons-container {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    border: 1px solid #111;
    background-color: transparent;
    color: #111;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.btn-action:hover {
    background-color: #111;
    color: #fff;
    transform: translateY(-1px);
}

/* ================= SECCIONES ================= */
.section-header {
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
    margin-top: 40px;
    margin-bottom: 25px;
    font-size: 1.3rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

/* ================= HISTORIAL (TRABAJOS) ================= */
.job-item { margin-bottom: 30px; }
.job-header { display: flex; justify-content: space-between; align-items: baseline; }
.job-role { font-weight: bold; font-size: 1.1rem; }
.job-company { margin-left: 10px; color: #555; font-style: italic; }
.job-details { list-style-type: square; padding-left: 20px; margin-top: 8px; color: #444; }
.job-details li { margin-bottom: 5px; font-size: 0.95rem; }

/* ================= HABILIDADES ================= */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.skill-group h3 {
    font-size: 1.05rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    border-left: 3px solid #111;
    padding-left: 8px;
}
.skill-list {
    font-size: 0.95rem;
    color: #333;
}

/* ================= PROYECTOS ================= */
.project-item {
    margin-bottom: 20px;
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.project-title {
    font-weight: bold;
    font-size: 1.1rem;
}
.project-tech {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}
.project-desc {
    margin-top: 5px;
    font-size: 0.95rem;
    color: #444;
}

/* ================= SLIDER DE CERTIFICACIONES ================= */
.slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    margin-top: 30px;
    padding: 15px 0;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.slider-track {
    display: flex;
    width: calc(150px * 20);
    animation: scroll 25s linear infinite;
}

.token-badge {
    height: 120px;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
}

.token-badge img {
    height: 100px;
    width: 100px;
    border-radius: 12px;
    object-fit: cover;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.token-badge img:hover {
    transform: scale(1.05);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-150px * 7)); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    .paper-container { padding: 30px; width: 100%; }
    .action-buttons-container { flex-direction: column; width: 100%; }
    .btn-action { width: 100%; justify-content: center; }
    .job-header, .project-header { flex-direction: column; }
    .skills-grid { grid-template-columns: 1fr; }
}

/* ================= IMPRESIÓN A PDF ================= */
@media print {
    @page {
        margin: 1.5cm 2cm;
        size: auto;
    }
    body {
        margin: 0;
        padding: 0;
        background: #fff;
        -webkit-print-color-adjust: exact;
    }
    .paper-container {
        padding: 0 !important;
        width: 100%;
        max-width: none;
        margin: 0;
        box-shadow: none;
        min-height: 0 !important;
        overflow: visible;
        display: block;
        border: none;
    }
    .job-item, .project-item, h2, h3 {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .action-buttons-container, 
    .slider-container { display: none !important; }
    a { text-decoration: none; color: #000; pointer-events: none; }
    h1 { font-size: 2.2rem; }
}
