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

html {
    background: #525659;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #2b2b2b;
    background: #525659;
    padding: 40px 0;
}

/* Hoja con proporciones A4, como un visor de PDF */
.page {
    width: 794px;
    min-height: 1123px;
    margin: 0 auto;
    background: #ffffff;
    padding: 60px 70px;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.35);
}

@media print {

    html,
    body {
        background: #fff;
        padding: 0;
    }

    .page {
        box-shadow: none;
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 10mm 14mm;
    }

    @page {
        size: A4;
        margin: 0;
    }

    /* Compactamos todo para que quepa en una sola hoja */

    .header {
        gap: 16px;
        padding-bottom: 10px;
    }

    .avatar {
        width: 64px;
        height: 64px;
    }

    .header-text h1 {
        font-size: 20px;
    }

    .header-text .role {
        font-size: 9px;
        letter-spacing: 1.5px;
        margin-top: 2px;
    }

    .header-text .bio {
        font-size: 10px;
        line-height: 1.3;
    }

    .contact {
        gap: 20px;
        padding: 8px 0 10px 0;
        font-size: 9.5px;
    }

    .contact img {
        width: 12px;
        height: 12px;
    }

    .section {
        grid-template-columns: 95px 1fr;
        gap: 12px;
        padding: 5px 0;
    }

    .section-label {
        font-size: 8.5px;
        letter-spacing: 1px;
    }

    .entry {
        margin-bottom: 8px;
    }

    .entry .meta {
        margin-bottom: 3px;
    }

    .entry .title {
        font-size: 10.5px;
    }

    .entry .date {
        font-size: 9px;
    }

    .entry .org {
        font-size: 9px;
        margin-bottom: 2px;
    }

    .entry p,
    .entry li {
        font-size: 9.5px;
        line-height: 1.25;
        margin-bottom: 0px;
    }

    .entry ul {
        margin-top: 2px;
        padding-left: 12px;
    }

    /* Formación más compacta */
    .formacion {
        padding: 6px 0;
    }

    .formacion .entry {
        margin-bottom: 3px;
    }

    .formacion .entry .meta {
        margin-bottom: 0px;
    }

    .formacion .org {
        margin-bottom: 0px;
    }

    .skills p {
        font-size: 9.5px;
        line-height: 1.25;
        margin-bottom: 3px;
    }

    .skills p:last-child {
        margin-bottom: 0;
    }
}

/* HEADER */
.header {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-bottom: 26px;
    border-bottom: 1px solid #e2e2e2;
}

.avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #d9d3c7, #b9ae9c);
}

.header-text h1 {
    font-size: 30px;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: #2b2b2b;
}

.header-text .role {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #9a9a9a;
    margin-top: 6px;
}
.header-text .bio {
    font-size: 14px;
    color: #616161;
}

/* CONTACT ROW */
.contact {
    display: flex;
    gap: 36px;
    padding: 18px 0 28px 0;
    font-size: 12.5px;
    color: #6f6f6f;
    border-bottom: 1px solid #e2e2e2;
}

.contact span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}


/* SECTIONS */
.section {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 10px 0; /*El valor era de 30px pero lo he cambiado a 10px para que al imprimir el documento entre todo el contenido*/
    border-bottom: 1px solid #e2e2e2;
}

.section:last-child {
    border-bottom: none;
}

.section-label {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #2b2b2b;
    font-weight: 600;
    padding-top: 2px;
}

.entry {
    margin-bottom: 26px;
}

.entry:last-child {
    margin-bottom: 0;
}

.entry .meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.entry .title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.entry .date {
    font-size: 11.5px;
    color: #9a9a9a;
    letter-spacing: 0.5px;
}

.entry .org {
    font-size: 11.5px;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.entry p {
    font-size: 12.5px;
    line-height: 1.6;
    color: #6f6f6f;
}

.entry ul {
    list-style: disc;
    padding-left: 18px;
    margin-top: 6px;
}

.entry li {
    font-size: 12.5px;
    line-height: 1.6;
    color: #6f6f6f;
    margin-bottom: 3px;
}

/* IDIOMAS */
.langs {
    font-size: 13px;
    color: #2b2b2b;
}

.langs .row {
    display: flex;
    justify-content: space-between;
    max-width: 260px;
    margin-bottom: 10px;
}

.langs .row span:last-child {
    color: #9a9a9a;
}

/* HABILIDADES */
.skills p {
    font-size: 12.5px;
    line-height: 1.6;
    color: #6f6f6f;
}

@media (max-width:600px) {
    .page {
        padding: 30px 22px;
    }

    .section {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .header {
        flex-direction: column;
        text-align: center;
    }

    .contact {
        flex-direction: column;
        gap: 8px;
    }
}