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

/* ============= PAGE SETUP ============= */
/* Removed @page for compatibility with html2canvas rendering */

/* ============= BODY ============= */
body {
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    line-height: 1.1 !important;
    background-color: white;
    margin: 0;
    padding: 0;
}

/* ============= WRAPPER ============= */
.cv-wrapper {
    width: 210mm;
    max-width: 210mm;
    height: auto;
    margin: 0 auto;
    background-color: white;
    box-shadow: none;
    display: block;
}

/* ============= HEADER COMPACTO ============= */
.pdf-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 3px solid #0044FF;
    margin-bottom: 20px;
    gap: 15px;
}

.pdf-header-photo {
    width: 50px;
    height: 50px;
    border: 2px solid #0044FF;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.pdf-header-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-header-info {
    flex-grow: 1;
}

.pdf-header-name {
    font-size: 18pt;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.pdf-header-title {
    font-size: 8pt;
    font-weight: 400;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.3px;
}

/* ============= LAYOUT DOS COLUMNAS ============= */
.cv-container {
    display: flex;
    gap: 20px;
    padding: 0 20px 20px 20px;
}

/* COLUMNA IZQUIERDA (35%) */
.cv-sidebar {
    width: 35%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-photo {
    width: 100%;
    aspect-ratio: 1;
    border: 3px solid #0044FF;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* COLUMNA DERECHA (65%) */
.cv-content {
    width: 65%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============= SECCIONES ============= */
.cv-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.section-title {
    font-size: 10pt;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0044FF;
    margin-bottom: 8px;
}

.section-title-sidebar {
    font-size: 10pt;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    letter-spacing: 0.5px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0044FF;
    margin-bottom: 8px;
}

/* ============= ITEMS (EXPERIENCIA, EDUCACIÓN, ETC) ============= */
.cv-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 10px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.item-title {
    font-size: 9.5pt;
    font-weight: 700;
    color: #000;
    flex-grow: 1;
}

.item-date {
    font-size: 9pt;
    font-weight: 400;
    color: #999;
    text-align: right;
    flex-shrink: 0;
}

.item-subtitle {
    font-size: 9pt;
    font-weight: 400;
    color: #555;
    font-style: italic;
}

.item-description {
    font-size: 9pt !important;
    font-weight: 400 !important;
    color: #444 !important;
    line-height: 1.1 !important;
    margin-top: 3px !important;
}

.item-description p {
    margin: 0 !important;
    padding: 0 !important;
}

/* ============= SOBRE MÍ ============= */
.about-text {
    font-size: 8.5pt !important;
    font-weight: 400 !important;
    color: #333 !important;
    line-height: 1.1 !important;
}

/* ============= CONTACTO ============= */
.contact-item {
    font-size: 8.5pt;
    font-weight: 400;
    color: #333;
    margin-bottom: 4px;
}

.contact-label {
    font-weight: 600;
    color: #000;
}

/* ============= APTITUDES ============= */
.skills-group {
    margin-bottom: 10px;
}

.skills-category {
    font-size: 9pt;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
}

.skills-list {
    font-size: 9pt !important;
    font-weight: 400 !important;
    color: #333 !important;
    line-height: 1.1 !important;
}

/* ============= PROYECTOS ============= */
.project-title {
    font-size: 9.5pt;
    font-weight: 700;
    color: #000;
    margin-bottom: 2px;
}

.project-description {
    font-size: 9pt !important;
    font-weight: 400 !important;
    color: #444 !important;
    line-height: 1.1 !important;
    margin-bottom: 4px !important;
}

.project-links {
    font-size: 8.5pt;
    font-weight: 400;
    color: #555;
    word-break: break-word;
}

/* ============= SALTOS DE PÁGINA ============= */
.page-break {
    page-break-after: always;
}

/* ============= MEDIA SCREEN (INTERFAZ) ============= */
@media screen {
    .download-button {
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1000;
        background-color: #0044FF;
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 68, 255, 0.3);
        transition: all 0.3s ease;
    }

    .download-button:hover {
        background-color: #0033CC;
        box-shadow: 0 4px 12px rgba(0, 68, 255, 0.4);
    }

    .download-button:active {
        transform: scale(0.98);
    }
}
