@import url("https://fonts.googleapis.com/css?family=Roboto:100,300,100italic,300italic");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", Helvetica, sans-serif;
}

:root {
    --color-principal: #1c1d26;
    --color-secundario: #e44c65;
}

html, body {
    background: var(--color-principal);
    color: rgba(255, 255, 255, 0.75);
    scroll-behavior: smooth; /* suavizar el scroll*/
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 3em;
    background-color: #1c1d26;
    z-index: 999;
    /* menú fijo */
        position: sticky; 
        right: 0;
        top: 0;
    /**/
}

a {
    text-decoration: none;
}

p {
    text-align: justify;
}

#next {
    display: flex;
    margin: 2em auto;
    font-size: 3em;
    width: 1em;
    color: #9e9b9b;
    justify-content: center;
}

#logo {
    width: 4em;
    transition: transform .3s;
    border-radius: 50%;
}

    #logo:hover {
        transform: rotate(-45deg);
        transition: transform .3s;
        -webkit-transform: rotate(-45deg);
        -moz-transform: rotate(-45deg);
        -o-transform: rotate(-45deg);
    }

.nav-list {
    list-style-type: none;
    display: flex;
    gap: 1rem;
}

.nav-list li a {
    text-decoration: none;
    color: #ececec;
}

    .nav-list a:hover, .sub-nav a:hover {
        color: var(--color-secundario);
    }

#space {
    padding-right: 0.2em;
}

#whatsapp:hover {
    background: none;
}

/* Desplegable*/
    .sub-nav{
    	position: absolute;
    	display: none;
    	list-style: none;
    	width: auto;
        margin-top: 0.1em;
    	background: rgba(0, 0, 0, .5);
    }

        .nav-list li:hover .sub-nav{
        	display: block;
        }

        .sub-nav li:hover{
        	background-color: black;
        }

    .sub-nav li a{
    	display: block;
    	color: white;
    	text-decoration: none;
    	padding: 0.5em;
    }
/*____________*/

    .abrir-menu, .cerrar-menu {
        display: none;
        text-decoration: none;
    }

    #cerrar {
        background: var(--color-secundario);
        border: solid 1px #ececec;
        border-radius: 3px;
    }

    .bi-list {
        color: var(--color-principal);
    }

    header button {
        text-decoration: none;
    }

    .lang-button {
        background: transparent;
        border: none;
        cursor: pointer;
    }

    #leyenda {
        display: none;
    }

    main {
        margin: 3em;
        text-align: justify;
    }

    #sub-contacto {
        font-size: small;
    }

/* Banner */
    .banner {
        height:100vh;
        z-index: 1;
    }

    .container-banner {
        margin: 1em auto;
        padding-top: 12em;
        align-items: center;
        justify-content: space-around;
        display: grid;
        grid-template-columns: 55% 45%;
        grid-template-rows: auto;
        text-align: center;
        justify-content: space-around;
    }

    .container {
        display: grid;
        grid-template-columns: repeat(3, 1);
        grid-template-rows: auto;
        grid-gap: 0.5em;
        width: 90%;
        margin: 0 auto;
    }

    #container2 {
        text-align: start;
    }

    .item {
        text-align: end;
    }

    #item1 {
        font-size: 2em;
        color: #ececec;
    }

    #foto-perfil {
        width: 18em;
        height: 18em;
        border-radius: 50%;
        background: #ececec;
        transition: all 1s ease;
        -webkit-transition: all 1s ease;
        -moz-transition: all 1s ease;
        -o-transition: all 1s ease;
        filter: saturate(80%);
    }
        #foto-perfil:hover {
            width: 20em;
            height: 20em;
        }

/* Sobre mí */
.sobre-mi {
    background: url("images/fondo-sm.jpg");
    background-position: center center;
    background-size: cover;
    height: 100vh;
    width: 100%;
    position: relative;
}

.container-sm {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr;
    grid-template-rows: auto;
    gap: 2em;
    padding: 4em;
    border-top: solid 0.3em var(--color-secundario);
    background: var(--color-principal);
    opacity: 90%;
    bottom: 0;
    right: 0;
    position: absolute;
}

.sobre-mi h2 {
    font-size: 2em;
}

#sm {
    text-align: center;
}

/* Experiencia */
.experiencia {
    background: url("images/fondo-xp.png");
    background-position: center center;
    background-size: cover;
    height: 100vh;
    width: 100%;
    position: relative;
}

.container-xp {
    display: block;
    padding: 4em;
    border-left: solid 0.3em #469ada;
    background: #1c1d26;
    opacity: 90%;
    right: 0;
    position: absolute;
    width: 30%;
    height: 100%;
}

.item-xp {
    margin: 2em 0;
}

.experiencia h2 {
    font-size: 2em;
}

.experiencia h3 {
    margin-bottom: 0.5em;
}

#time-xp {
    margin-bottom: 1.5em;
    margin-left: 1em;
}

/* Formación académica */
.formacion {
    background: url("images/fondo-fa.jpg");
    background-position: center center;
    background-size: cover;
    height: 100vh;
    width: 100%;
    position: relative;
    box-shadow: 14px 14px 20px 0 rgba(20, 20, 20, 0.3);
    z-index: 5;
}

.container-fa {
    display: block;
    padding: 4em;
    border-right: solid 0.3em #46daa4;
    background: var(--color-principal);
    opacity: 90%;
    left: 0;
    position: absolute;
    width: 40%;
    height: 100%;
    padding: 1em auto;
}

.item-fa {
    margin: 2em 0;
}

.formacion h2 {
    font-size: 2em;
}

.formacion h3 {
    margin-bottom: 0.5em;
}

#time-fa {
    margin-bottom: 1.5em;
    margin-left: 1em;
}

/* Proyectos */
.proyectos {
    background-position: center center;
    background-size: cover;
    width: 100%;
    height: 100vh;
    position: relative;
    text-align: center;
    border-top: solid 0.3em var(--color-secundario);
    box-shadow: 14px 14px 20px 0 rgba(20, 20, 20, 0.3);
    z-index: 4;
}

.proyectos h2 {
    padding: 2em 0 0 0;
    font-size: 2em;
}

.proyectos img {
    display: block;
    width: 100%;
    height: 13em;
    border-radius: 10px 10px 0 0;
}

.proyectos svg {
    width: 1.5em;
    height: 1.5em;
}

.container-proy {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto;
    padding: 3em;
    gap: 2em;
}

.item-proy {
    position: relative;
    background: #ececec;
    padding: 0.5em;
    border-radius: 10px;
    color: var(--color-principal);
}

    .item-proy:hover {
        opacity: 80%;
        background: var(--color-secundario);
    }

#tech {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
    align-items: center;
}

#texto {
    font-size: 1.5em;
    font-weight: bold;
}

/* Idiomas y cursos (last) */
.last {
    display: block;
    width: 100%;
    position: relative;
    text-align: center;
    z-index: 3;
    background: var(--color-secundario);
    padding: 2em 0 3em 0;
}

.last h2 {
    font-size: 2em;
}

.item-last {
    margin-top: 1em;
}

#bold {
    font-weight: bold;
}

/* PDF */
/* Estilos del modal */
.contenedor-pdf {
    height: auto;
    z-index: 998;
    background: #e44c65;
    text-align: center;
    padding-bottom: 2em;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 5;
    opacity: 100%;
}

.modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.contenedor-pdf button {
    padding: 1em;
    border-radius: 10px;
    border-style: none;
    background: #1c1d26;
    color: #ececec;
    cursor: pointer;
    font-weight: bold;
}

    .contenedor-pdf button:hover {
        background: #ececec;
        color: var(--color-secundario);
    }

.modal-actions button {
    padding: 1em;
    border-radius: 10px;
    border-style: none;
    background: var(--color-secundario);
    color: #ececec;
    cursor: pointer;
    font-weight: bold;
}

    .modal-actions button:hover {
        background: #1c1d26;
        color: #ececec;
    }

#pdf-viewer {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    margin-top: 4em;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* Formulario */
.formulario {
    display: block;
    text-align: center;
    justify-content: center;
    margin-top: 4em;
}

.formulario h2 {
    margin-bottom: 2em;
}

.form {
    display: flex;
    flex-direction: column;
    width: 80%;
    margin: 1em auto;
    gap: 1em;
}

.item-form ::placeholder {
    padding-left: .5em;
    font-family: "Roboto", Helvetica, sans-serif;
    font-size: 1em;
}

.form input, textarea {
    border: solid 1px var(--color-secundario);
    border-radius: 5px;
    width: 100%;
    height: 4em;
    font-size: 1em;
    font-family: "Roboto", Helvetica, sans-serif;
    background-color: #ececec;
    padding: 1em;
}
        .form input:hover, textarea:hover {
            border: solid 1px #128c7e;
        }

.form textarea {
    height: 13em;
}

.datos {
    display: flex;
    gap: 1em;
}

#name, #email {
    width: 100%;
}

.form button {
    font-size: 1em;
    padding: 1em;
    border-radius: 10px;
    border-style: none;
    background: var(--color-secundario);
    color: #ececec;
    cursor: pointer;
    font-weight: bold;
}
        .form button:hover {
            background-color: #128c7e;
        }

/* Footer */
    footer {
        background: #1c1d26;
        text-align: center;
        padding: 2em 0 3em 0;
        position: relative;
    }

    .redes-sociales {
        display: flex;
        text-decoration: none;
        list-style: none;
        font-size: 2em;
        gap: 0.6em;
        margin:  1em auto;
        text-align: center;
        justify-content: center;
    }

    .redes-sociales .bi {
        color: #1c1d26;
        background: #9e9b9b;
        padding: 0.3em;
        border-radius: 10px;
    }
        .bi-telephone-fill:hover {
            background-color: #128c7e;
            color: #ececec;
        }
        .bi-whatsapp:hover {
            background-color: #25d366;
            color: #ececec;
        }
        .bi-telegram:hover {
            background-color: #0088cc;
            color: #ececec;
        }
        .bi-linkedin:hover {
            background-color: #0e76a8;
            color: #ececec;
        }
        .bi-envelope-at-fill:hover {
            background-color: #8a90c7;
            color: #ececec;
        }

/* @ media queries */

@media screen and (max-width: 1247px) {
    .container-fa {
        width: 50%;
    }

    #texto {
        font-size: 1.2em;
        font-weight: bold;
    }
}

@media screen and (max-width: 1100px) {
    .container-fa {
        width: 60%;
    }

    .container-xp {
        width: 50%;
    }

    #texto {
        font-size: 1em;
        font-weight: bold;
    }
} 

@media screen and (max-width: 1015px) {
    .proyectos {
        height: auto;
    }
    
    .container-proy {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        padding: 3em;
        gap: 2em;
    }

    #texto {
        font-size: 1em;
        font-weight: bold;
    }
} 

@media screen and (max-width: 900px) {
    
    .abrir-menu,
    .cerrar-menu {
        display: block;
        border: 0;
        font-size: 1.25rem;
        background-color: transparent;
        cursor: pointer;
    }

    .abrir-menu {
        background: #ececec;
        border: solid 1px var(--color-principal);
        border-radius: 3px;
        width: 2em;
        height: 2em;
    }

    .cerrar-menu {
        color: #ececec;
    }

    .nav {
        opacity: 0;
        visibility: hidden;
        display: flex;
        flex-direction: column;
        align-items: end;
        gap: 1rem;
        position: fixed; /* ojo */
        top: 0;
        right: 0;
        bottom: 0;
        background-color: #1c1c1c;
        padding: 2rem;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5);
    }

    .nav.visible {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: end;
        text-align: end;
    }

        .nav-list a:hover {
            color: var(--color-secundario);
        }

    .nav-list li a, .nav-list li {
        color: #ecececec;
    }

    .sub-nav{
        position: relative;
        display: block;
        background: none;
        align-items: end;
        text-align: end;
        flex-direction: column;
        width: auto;
        margin: 1em 0 0 0;
    }

    .sub-nav li a {
        color: #9e9b9b;
    }

        .sub-nav li:hover{
            background-color: transparent;
        }

        .sub-nav a:hover, #leyenda:hover {
            color: var(--color-secundario);
        }

        #cerrar:hover {
            transform: rotate(20deg);
        }

    #leyenda {
        display: inline-block;
        padding-right: 0.5em;
        color: #ececec;
    }

    .container-banner {
        grid-template-columns: 1fr;
        gap: 2em;
        font-size: small;
    }

    .item {
        text-align: center;
    }

    #foto-perfil:hover {
        width: 17em;
        height: 17em;
        margin-left: 0;
    }

    #container2 {
        text-align: center;
    }

    .container-sm {
        grid-template-columns: 1fr;
    }

    .item-sm h2 {
        text-align: center;
    }

    .container-xp {
        width: 50%;
    }
}

@media screen and (max-width: 790px) { /*__________________________*/
    body {
        font-size: 0.8em;
    }

/* Sobre mí*/
    .sobre-mi {
        height: auto;
    }
    
    .container-sm { 
        display: block;
        position: relative;
    }

    .item-sm {
        padding-top: 1em;
    }

/* Experiencia */
    .experiencia {
        height: auto;
        text-align: center;
    }

    .container-xp {
        display: block;
        padding: 4em;
        border-top: solid 0.3em #469ada;
        border-left: none;
        opacity: 90%;
        position: relative;
        width: 100%;
        height: 100%;
    }

    #time-xp {
        text-align: center;
    }

/* Formación Académica */    
    .formacion {
        height: auto;
        text-align: center;
    }
    
    .container-fa {
        display: block;
        border-top: solid 0.3em #46daa4;
        border-right: none;
        opacity: 90%;
        position: relative;
        width: 100%;
        height: 100%;
    }

/* Idiomas y cursos (last) */
    .last {
        padding: 2em 2em 3em 2em;
    }

    .item-last {
        margin-top: 2em;
    }
    
    #bold {
        font-weight: bold;
        display: block;
        padding-bottom: 1em;
    }

    #avoid {
        display: none;
    }
}

@media screen and (max-width: 620px) {
    .proyectos {
        justify-content: center;
    }
    
    .container-proy {
        display: block;
        padding: 3em;
        gap: 2em;
    }

    .item-proy {
        margin-bottom: 2em;
        width: 80%;
        margin: 0 auto 2em auto;
    }
}

@media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Smartphones*/
    body, #leyenda {
        font-size: 16px;
    }

    .proyectos img {
        height: 8em;
    }

    .redes-sociales {
        font-size: 1.5em;
    }

    .datos {
        flex-direction: column;
    }
}