:root {
    --color2: rgb(139, 122, 235);
    --color-texto: rgb(32, 42, 68);
    --color-fondo1: rgb(248, 246, 241);
    --color-fondo2: rgb(255, 255, 255);
    --color-extra1: rgb(242, 140, 140);
    --color-extra2: rgb(168, 195, 176);

    --opacidad-fondo:35%;

    --fuente-titulo: "DM Serif Display", serif;
    --fuente-texto: "Inter", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--fuente-texto);
    background-color: var(--color-fondo2);
    color: var(--color-texto);
    line-height: 1.6;
}


.seccion{
    width: 100%;
    padding-left: 30px;
    padding-right: 25px;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

h2{
    font-style: var(--fuente-texto);
    color: var(--color-texto);
}

h3{
    color: var(--color-texto);
    font-size: 25px;
    font-style: var(--fuente-texto);
    margin-right: 10px;
    margin-bottom: 0px;
}

h4{
    color: var(--color-texto);
    font-size: 20px;
    font-style: var(--fuente-texto);
    margin-right: 10px;
    margin-top: 0px;
}

p{
    color: var(--color-texto);
    font-size: 18px;
    font-style: var(--fuente-texto);
}


/* PRESENTACIÓN */

#presentacion {
    display: flex;
    flex-direction: row;
    padding-bottom: 25px;
    background-color: var(--color-fondo1);
    height: fit-content;
    margin-top: 0px;
}

#nombre h1 {
    font-family: var(--fuente-titulo);
    font-size: 60px;
    font-weight: 400;
    color: var(--color-texto);
    line-height: 1;
    margin: 0;
    margin-bottom: 25px;
}

#nombre h1 span {
    font-family: var(--fuente-titulo);
    font-size: 45px;
    color: var(--color2);
    vertical-align: middle;
    margin-left: 15px;
}

#i_pre {
    width: 55%;
    background-color: var(--color-fondo1);
    padding-right: 10px;
}

#d_pre {
    width: 45%;
    background-color: var(--color-fondo1);

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    min-width: 0;
}

a {
    display: inline-block;
}

#presentacion a {
    margin-right: 15px;
    margin-top: 50px;
    padding: 10px 18px;
    border: 1px solid var(--color2);
    border-radius: 35px;
    width: 170px;
    text-align: center;
    text-decoration: none;
}

.boton_color{
    background-color: var(--color2);
    color: var(--color-fondo2);
    font-weight: bold;
    border: none;
}

.boton_blanco{
    background-color: var(--color-fondo2);
    color: var(--color2);
    font-weight: bold;
}


#foto_cv {
    position: absolute;

    width: 48%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;

    object-fit: cover;
    border-radius: 50%;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 2;
}

#fondo1 {
    position: absolute;

    width: 100%;
    height: auto;

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 1;
}


/* PROYECTOS */

#caja {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.div_proyecto {
    background-color: var(--color-fondo1);
    padding-left: 15px;
    border-radius: 15px;
    height: 100%;
}
.lista_circulos{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 0;
}

.lista_circulos li {
    list-style: none;
    background-color: var(--color2);
    border: 1px solid var(--color2);
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-fondo1);
    width: fit-content;
    padding: 4px 9px 4px 9px;
}

.boton_pro{
    margin-bottom: 10px;
    color: var(--color2);
}

.div_proyecto button{
    border: 0px;
    font-size: 18px;
    background-color: transparent;
    text-decoration: underline;
    color: var(--color2);
}

.div_proyecto {
    position: relative;
    min-width: 0;
    padding: 16px;
    overflow: hidden;
}

.img_p {
    float: right;
    width: 200px;
    height: auto;
    margin-left: 8px;
}

/* POP UP */
.popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    padding: 20px;
    background: rgba(32, 42, 68, 0.65);
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.popup_contenido {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    border-radius: 22px;
    border-color: var(--color2);
    background: var(--color-fondo2);
    color: var(--color-texto);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.popup_etiqueta {
    color: var(--color2);
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;

}

.popup_contenido h2 {
    font-style: var(--fuente-titulo);
    font-size: 26px;
}

.popup_contenido h3 {
    font-size: 20px;
    margin-top: 22px;
}

.popup_contenido li {
    font-size: 18px;
}

.popup_contenido li p {
    font-size: 18px;
    font-weight: bold;
}

.popup_contenido p{
    font-size: 18px;
    margin-bottom: 0px;
}

.div_img{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.div_img img{
    width: 80%;
    height: auto;
}


.popup_cerrar {
    position: absolute;
    top: 10px;
    right: 16px;
    border: none;
    background: transparent;
    color: var(--color-texto);
    font-size: 32px;
    cursor: pointer;
}

.popup_acciones {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e7e5ee;
}

.boton-popup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--color2);
    border-radius: 30px;
    font-family: var(--fuente-texto);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.boton-cerrar {
    background: var(--color-fondo2);
    color: var(--color2);
}

.boton-codigo {
    background: var(--color2);
    color: white;
}

.boton-popup:hover {
    opacity: 0.85;
}



/* FORMACION */

#formacion{
    display: flex;
    flex-direction: column;
}

.div_f{
    padding-left: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
}

#f3{
    background-color: color-mix(
        in srgb,
        var(--color2) var(--opacidad-fondo),
        transparent
    );
}

#f2 {
    background-color: color-mix(
        in srgb,
        var(--color-extra2) var(--opacidad-fondo),
        transparent
    );
}

#f1{
    background-color: color-mix(
        in srgb,
        var(--color-extra1) var(--opacidad-fondo),
        transparent
    );
}


/* HABILIDADES */

.div_h{
    display: flex;
    flex-direction: row;
    margin-bottom: 12px;
    height: 80px;
    border-radius: 15px;
}

#h_p{
    background-color: color-mix(
        in srgb,
        var(--color2) var(--opacidad-fondo),
        transparent
    );
}

#h_d{
    background-color: color-mix(
        in srgb,
        var(--color-extra2) var(--opacidad-fondo),
        transparent
    );
}

#h_w{
    background-color: color-mix(
        in srgb,
        var(--color-extra1) var(--opacidad-fondo),
        transparent
    );
}
#h_o{
    background-color: color-mix(
        in srgb,
        var(--color2) var(--opacidad-fondo),
        transparent
    );
}

#div_icono1{
    height: 60px;
    width: 60px;
    margin-left: 18px;
    margin-right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100px;
    margin-top: 10px;
    margin-bottom: 10px;
}
.div_h img{
    width: auto;
    height: 60%;
    display: block;
    align-items: center;
}

.lista_h {
    padding: 0;

}

.div_h h3 {
    font-size: 18px;
    margin-top: 5px;
}

.div_h ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin-top: 10px;
    margin-left: 15px;
    
}

.div_h li {
    list-style: none;
    color: var(--color-texto);
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    width: fit-content;
    padding: 4px 9px 4px 9px;
}

#h_p li{
    background-color: var(--color2);
    border: 1px solid var(--color2);
}

#h_d li{
    background-color: var(--color-extra2);

}

#h_w li{
    background-color: var(--color-extra1);

}

#h_o li{
    background-color: var(--color2);

}

/* CONTACTO */

#botones_contacto {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    margin-top:0px;
}

#contacto a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 120px;
    height: 45px;
    padding: 8px 11px;
    background-color: var(--color-fondo2);
    color: var(--color-texto);
    border: 2px solid var(--color2);
    border-radius: 5px;
    font-size: 16px;
    font-style: var(--fuente-texto);
    text-decoration: none;
}

#contacto img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}



/* ==========================
   DISEÑO PARA MÓVILES
   ========================== */

@media (max-width: 700px) {

    .seccion {
        padding-left: 18px;
        padding-right: 18px;
        margin-top: 12px;
    }

    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    h4 {
        font-size: 14px;
    }

    p {
        font-size: 14px;
        margin-right: 0;
    }


    /* PRESENTACIÓN */
    #presentacion {
        flex-direction: column-reverse;
        height: auto;
        padding-top: 0px;
        gap: 0px;
    }

    #i_pre,
    #d_pre {
        width: 100%;
        padding-right: 0;
    }

    #d_pre {
        position: relative;
        width: 100%;
        height: 280px;
        aspect-ratio: auto;
        overflow: hidden;
        margin-bottom: 0px;
        margin: 0px;
        padding: 0px;
    }

    #fondo1 {
        position: absolute;
        width: 100%;
        height: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1;
        margin: 0px;
        padding: 0px;
    }

    #foto_cv {
        position: absolute;
        width: 45%;
        max-width: 180px;
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 50%;

        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);

        z-index: 2;
    }


    #nombre h1 {
        font-size: clamp(36px, 9vw, 48px);
        line-height: 1.1;
        overflow-wrap: anywhere;
        margin-bottom: 20px;
    }

    #nombre h1 span {
        font-size: 30px;
        margin-left: 5px;
    }

    #presentacion a {
        margin-top: 10px;
        margin-right: 5px;
        padding: 10px 12px;
        width: auto;
        min-width: 0;
        font-size: 13px;
    }


    /* PROYECTOS */
    #caja {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .div_proyecto {
        position: relative;
        min-width: 0;
        padding: 16px;
        overflow: hidden;
        overflow-wrap: anywhere;
    }

    .div_proyecto {
        position: relative;
    }

    .img_p {
        position: absolute;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
        opacity: 0.04;
    }


    .div_proyecto li {
        font-size: 12px;
    }

    .div_proyecto h3,
    .div_proyecto h4,
    .div_proyecto p,
    .div_proyecto ul,
    .div_proyecto button {
        position: relative;
        z-index: 1;
    }

    /* POP UP */
    .popup {
        padding: 12px;
    }

    .popup_contenido {
        padding: 30px 20px;
    }

    .popup_acciones {
        flex-direction: column-reverse;
    }

    .boton-popup {
        width: 100%;
    }

    

    /* FORMACIÓN */
    .div_f {
        padding: 12px 15px;
    }


    /* HABILIDADES */
    .div_h {
        height: auto;
        min-height: 80px;
        padding: 12px;
        align-items: center;
        gap: 12px;
    }

    #div_icono1 {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin: 0;
    }

    .div_h img {
        max-width: 100%;
        max-height: 60%;
        height: auto;
    }

    .lista_h {
        flex: 1;
        min-width: 0;
    }

    .div_h h3 {
        font-size: 16px;
        margin: 0;
        overflow-wrap: anywhere;
    }

    .div_h ul {
        gap: 6px;
        margin: 8px 0 0;
    }

    .div_h li {
        font-size: 11px;
        padding: 4px 8px;
    }


    /* CONTACTO */
    #botones_contacto {
        flex-wrap: wrap;
        gap: 8px;
    }

    #contacto a {
        width: 115px;
        height: 42px;
        gap: 7px;
        padding: 6px 8px;
        font-size: 14px;
    }
}
