/* ============================================================
   RESET / BASE
   ============================================================ */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
    line-height: 1.6;
}


a {
    color: inherit;
    text-decoration: none;
}


/* ============================================================
   PÁGINA
   ============================================================ */

.page {
    max-width: 1100px;
    margin: 40px auto;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}


/* ============================================================
   CABECERA
   ============================================================ */

.header {
    position: relative;
    background: #172033;
    color: white;
    padding: 50px;
    display: flex;
    align-items: center;
    gap: 35px;
}


/* ============================================================
   SELECTOR DE IDIOMA
   ============================================================ */

.language-switcher {
    position: absolute;
    top: 20px;
    right: 25px;
    display: flex;
    gap: 10px;
    z-index: 10;
}


.language-switcher a {
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.2s ease;
}


.language-switcher a:hover {
    transform: scale(1.15);
}


/* ============================================================
   EXPORT PDF
   ============================================================ */
   
.cv-actions {
    position: absolute;
    top: 20px;
    left: 25px;
}


.pdf-button {
    display: inline-block;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 5px;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
    transition: background 0.2s ease;
}


.pdf-button:hover {
    background: rgba(255, 255, 255, 0.18);
}


@media print {

    .cv-actions {
        display: none;
    }

}


/* ============================================================
   FOTO
   ============================================================ */

.photo {
    width: 135px;
    height: 135px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid rgba(255, 255, 255, 0.15);
}


.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ============================================================
   DATOS CABECERA
   ============================================================ */

.header h1 {
    margin: 0 0 8px;
    font-size: 38px;
    letter-spacing: -1px;
}


.header .profession {
    font-size: 20px;
    color: #cbd5e1;
    margin-bottom: 18px;
}


.contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    color: #e2e8f0;
    font-size: 14px;
}


/* ============================================================
   CONTENIDO
   ============================================================ */

.content {
    display: grid;
    grid-template-columns: 2fr 1fr;
}


.main {
    padding: 45px;
}


.sidebar {
    padding: 45px 35px;
    background: #f8fafc;
    border-left: 1px solid #e5e7eb;
}


/* ============================================================
   SECCIONES
   ============================================================ */

section {
    margin-bottom: 40px;
}


section:last-child {
    margin-bottom: 0;
}


h2 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #172033;
    font-size: 21px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


h3 {
    margin: 0;
    font-size: 18px;
    color: #172033;
}


/* ============================================================
   PERFIL
   ============================================================ */

.intro {
    font-size: 16px;
    color: #4b5563;
}


/* ============================================================
   EXPERIENCIA PROFESIONAL
   ============================================================ */

.experience {
    position: relative;
    padding-left: 25px;
    margin-bottom: 30px;
    border-left: 2px solid #cbd5e1;
}


.experience:last-child {
    margin-bottom: 0;
}


.experience::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    background: #172033;
    border-radius: 50%;
}


.company {
    font-weight: bold;
    color: #475569;
    margin-top: 3px;
	font-size: 9.5pt;
}


.date {
    font-size: 13px;
    color: #64748b;
    margin: 5px 0 12px;
}


.experience ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.experience li {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
}


/* ============================================================
   FORMACIÓN
   ============================================================ */

.education {
    margin-bottom: 14px;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
}

.education-header h3 {
    margin: 0;
	font-size: 14px;
}

.education-header .date {
    flex-shrink: 0;
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.education .institution {
    color: #475569;
    margin-top: 1.5px;
	font-size: 9.5pt;
	color: #475569 !important;
}



.education:last-child {
    margin-bottom: 0;
}



.education p {
    color: #4b5563;
    margin-top: 10px;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar section {
    margin-bottom: 35px;
}


.sidebar section:last-child {
    margin-bottom: 0;
}


.sidebar h2 {
    font-size: 17px;
}


/* ============================================================
   SKILLS
   ============================================================ */

.skills {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


.skill-category {
    display: flex;
    flex-direction: column;
    gap: 7px;
}


.skill-parent {
    display: inline-block;
    align-self: flex-start;
    padding: 7px 11px;
    border-radius: 4px;
    color: white;
    background: var(--skill-color);
    font-size: 13px;
    font-weight: bold;
}


.skill-children {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-left: 12px;
}


.skill-child {
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--skill-soft);
    color: #374151;
    font-size: 13px;
}


/*
   Las subhabilidades utilizan el mismo color de la categoría
   pero con una indicación visual de jerarquía.
*/

.skill-subchild {
    border-left: 3px solid var(--skill-color);
}


/* ============================================================
   IDIOMAS
   ============================================================ */

.language {
    margin-bottom: 15px;
}


.language:last-child {
    margin-bottom: 0;
}


.language-name {
    font-weight: bold;
}


.language-level {
    font-size: 13px;
    color: #64748b;
}


.language-description {
    font-size: 13px;
    color: #64748b;
    margin-top: 2px;
}


/* ============================================================
   DATOS PERSONALES
   ============================================================ */

.personal-data {
    list-style: none;
    margin: 0;
    padding: 0;
}


.personal-data li {
    margin-bottom: 10px;
    font-size: 14px;
}


.personal-data li:last-child {
    margin-bottom: 0;
}


.personal-data strong {
    color: #374151;
}


/* ============================================================
   ENLACES
   ============================================================ */

.personal-data a {
    color: #2563eb;
    word-break: break-word;
}


.personal-data a:hover {
    text-decoration: underline;
}


/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    padding: 20px 45px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 750px) {

    .page {
        margin: 0;
    }


    .header {
        padding: 35px 25px;
        flex-direction: column;
        text-align: center;
    }


    .language-switcher {
        top: 15px;
        right: 15px;
    }


    .contact {
        justify-content: center;
    }


    .content {
        grid-template-columns: 1fr;
    }


    .sidebar {
        border-left: 0;
        border-top: 1px solid #e5e7eb;
    }


    .main,
    .sidebar {
        padding: 30px 25px;
    }


    .header h1 {
        font-size: 30px;
    }


    .header .profession {
        font-size: 18px;
    }


    .photo {
        width: 120px;
        height: 120px;
    }

}


/* ============================================================
   IMPRESIÓN / PDF
   ============================================================ */

@media print {

    body {
        background: white;
    }


    .page {
        margin: 0;
        box-shadow: none;
        max-width: none;
    }


    .header {
        background: #172033 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }


    .sidebar {
        background: #f8fafc !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }


    .language-switcher {
        display: none;
    }

}