:root{
    --shadow: 5px 5px 5px -2px rgba(0,0,0,0.54);
    --blue: #0087ff;
    --green: #088a72;
    --grey-bold: rgba(0, 0, 0, 0.7);
}

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

html {
    font-size: 62.5%;
    background: #FFF;
}

body{
    font-family: 'Source Code Pro', monospace;
    font-size: 1.6rem;
    color: rgba(0, 0, 0, 0.7);
}

h2{
    font-size: 2.5rem;
}

h3{
    font-size: 1.6rem;
}

ul{
    list-style: none;
}

a{
    color: white;
    text-decoration: none;
}

.main-container{
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    display: grid;
    grid-template-rows: repeat(4, 1fr);
}

.section-container{
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template: repeat(10, 1fr) / repeat(10, 1fr);
    padding-top: 2rem;
}

.light{
    color: white;
}

.pointer{
    cursor: pointer;
}

.bold{
    font-weight: bold;
}
/* nav */
.nav{
    position: fixed;
    width: 100%;
    height: 50px;
    background-color: rgba(0, 0, 0, .7);
    z-index: 1;
}

.nav .nav-list{
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
}

.nav .nav-list li{
    padding: 1.4rem;
}

.nav ul{
    display: flex;
    /*justify-content: ;*/
}
/* End nav */

/* Home */
.home{
    background: url("./assets/images/background.jpg") no-repeat;
    background-size: cover;
    width: 100vw;
    height: 100vh;
    display: grid;
    place-content: center;
}

.home-article{
    text-align: center;
}

.avatar{
    border-radius: 50%;
    width: 200px;
}
/* End Home */

/* About */
.about-social-contact{
    font-size: 3rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.about-article-description{
    grid-column: 2 / 6;
    grid-row: 3 / 9;
    display: grid;
    grid-template-rows: 100px 1fr;
}

.about-article-card{
    grid-column: 6 / 10;
    grid-row: 2 / 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.about-aside-extra-info{
    grid-column: 2 / 10;
    grid-row: 10 / 10;
}

.aside-extra-info-list{
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 300px));
    font-size: 1rem;
    justify-content: center;
    padding: 2.5rem;
}

.card-image{
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    width: 300px;
}

.card-image img{
    width: 100%;
    height: 100%;
}

.card-download-cv{
    padding-top: 2rem;
}

.card-download-cv button{
    background: #A0CE4E;
    border-radius: 10px;
    color: white;
    border: solid #A0CE4E;
    width: 200px;
    height: 40px;
    font-size: 2rem;
}
/* End About */

/* Skills */
.titles{
    grid-column: 2 / 6;
    grid-row: 2 / 3;
}

.skills-section-items{
    padding-top: 2rem;
    grid-column: 2 / 10;
    grid-row: 4 / 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
    justify-content: space-around;
}

.skills-item{
    display: grid;
    grid-template-rows: repeat(auto-fill, minmax(60px, auto));
}

.skills-icon{
    position: relative;
}

.skills-icon span{
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    padding-left: 1.2rem;
}
/* End Skills */

/* Portfolio */
.section-container .portfolio{

}

.portfolio-article{
    display: grid;
    grid-template: repeat(10, 1fr) / repeat(3, minmax(200px, 1fr));
    grid-column: 2 / 10;
    grid-row: 3 / 11;
    grid-gap: 2rem;
}

.portfolio-article-item{
    box-shadow: var(--shadow);
    border-radius: 1rem;
    position: relative;
}

.portfolio-article-item .description{
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 100%;
    position: absolute;
    top: 100%;
    transform: translate(0, -100%);
    text-align: right;
    padding: 1rem;
    border-radius: 0 0 1rem 1rem;
}

.item-1{
    background: url("./assets/images/portfolio/government_digitalization_1.jpg");
    background-size: cover;
    grid-row: 1 / 5;
}

.item-2{
    background: url("./assets/images/portfolio/poder_judicial.jpg");
    background-size: cover;
    grid-row: 1 / 7;
}

.item-3{
    background: url("./assets/images/portfolio/government_digitalization_2.jpg");
    background-size: cover;
    grid-row: 1 / 5;
}

.item-4{
    background: url("./assets/images/portfolio/code.jpg");
    background-size: cover;
    grid-row: 5 / 10;
}

.item-5{
    background: url("./assets/images/portfolio/data_visualization.jpg");
    background-size: cover;
    grid-row: 5 / 10;
}

.item-6{
    background: url("./assets/images/portfolio/government_digitalization_3.jpg");
    background-size: cover;
    grid-row: 7 / 10;
}
/* End Portfolio */

/* Modal */
.modal-window {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

.modal-window:target {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.modal-window > div {
    width: 85%;
    height: 80vh;
    border-radius: 1rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 2em;
    background: white;
}

.modal-window header {
    font-weight: bold;
}

.modal-window h1 {
    font-size: 150%;
    margin: 0 0 15px;
}

.modal-close {
    color: var(--green);
    line-height: 50px;
    font-size: 80%;
    position: absolute;
    right: 0;
    text-align: center;
    top: 0;
    width: 70px;
    text-decoration: none;
}

.modal-close:hover {
    color: black;
}

.hide-element{
    display: none;
}

.modal-window div:not(:last-of-type) {
    margin-bottom: 15px;
}

small {
    color: lightgray;
}

.btn {
    background-color: white;
    padding: 1em 1.5em;
    border-radius: 1rem;
    text-decoration: none;
}

.btn i {
    padding-right: 0.3em;
}

.insert-modal-content{
    display: grid;
    grid-gap: 2rem;
}

.modal-image{
    width: 100%;
    display: grid;
    place-content: center;
    margin: 2rem 0;
    /*border: solid red 2px;*/
}

.modal-image img{
    width: 98%;
    box-shadow: var(--shadow);
}

.scrollable{
    overflow-y: scroll;
    height: 100%;
    scrollbar-width: none;
    width: 100%;
}

.modal-link small{
    color: var(--blue);
}
/* EndModal */

/* Loader */
.loader{
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
}

.lds-grid {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-grid div {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.49);
    animation: lds-grid 1.2s linear infinite;
}

.lds-grid div:nth-child(1) {
    top: 8px;
    left: 8px;
    animation-delay: 0s;
}

.lds-grid div:nth-child(2) {
    top: 8px;
    left: 32px;
    animation-delay: -0.4s;
}

.lds-grid div:nth-child(3) {
    top: 8px;
    left: 56px;
    animation-delay: -0.8s;
}

.lds-grid div:nth-child(4) {
    top: 32px;
    left: 8px;
    animation-delay: -0.4s;
}

.lds-grid div:nth-child(5) {
    top: 32px;
    left: 32px;
    animation-delay: -0.8s;
}

.lds-grid div:nth-child(6) {
    top: 32px;
    left: 56px;
    animation-delay: -1.2s;
}

.lds-grid div:nth-child(7) {
    top: 56px;
    left: 8px;
    animation-delay: -0.8s;
}

.lds-grid div:nth-child(8) {
    top: 56px;
    left: 32px;
    animation-delay: -1.2s;
}

.lds-grid div:nth-child(9) {
    top: 56px;
    left: 56px;
    animation-delay: -1.6s;
}

@keyframes lds-grid {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
/* End Loader */

/* Mobile */
@media screen and (min-width: 320px) and (max-width: 600px) and (orientation : portrait){
    .main-container{
        display: grid;
        grid-template-rows: repeat(4, 1fr);
    }

    .titles{
        grid-column: 1 / 7;
        grid-row: 2 / 3;
    }

    .adjust-padding-mobile{
        padding: 0 1rem;
    }

    .hide-element-mobile{
        display: none;
     }

    /* Home */
    .home-article img{
        width: 50%;
    }
    /* End Home */

    /* About */
    .section-container{
        display: grid;
        grid-template: repeat(12, minmax(60px, 1fr)) / repeat(6, 1fr);
        padding-top: 0;
    }

    .about-article-description{
        grid-column: 1 / 7;
        grid-row: 3 / 8;
        display: grid;
        grid-template-rows: repeat(2, minmax(50px, 100px))
    }

    .about-aside-extra-info{
        grid-column: 1 / 7;
        grid-row: 8 / 9;
    }

    .about-social-contact{
        font-size: inherit;
        padding: 1rem;
    }

    .about-article-card{
        grid-column: 1 / 7;
        grid-row: 9 / 11;
    }

    .aside-extra-info-list{
        padding: 2rem;
    }
    /* End About*/

    /* Skills */
    .skills-section-items{
        padding-top: 2rem;
        grid-column: 1 / 7;
        grid-row: 4 / 11;
        grid-template-columns: repeat(auto-fit, minmax(90px, 100px));
        font-size: 1.2rem;
    }
    /* End Skills */

    /* Portfolio */
    .portfolio-article{
        grid-column: 1 / 10;
        grid-template: repeat(6, minmax(200px, 300px)) / minmax(180px, 450px);
        justify-content: center;
        padding: 1rem;
    }

    .item-1{
        grid-row: 1 / 2;
    }

    .item-2{
        grid-row: 2 / 3;
    }

    .item-3{
        grid-row: 3 / 4;
    }

    .item-4{
        grid-row: 4 / 5;
    }

    .item-5{
        grid-row: 5 / 6;
    }

    .item-6{
        grid-row: 6 / 7;
    }
    /* End Portfolio */

    /* Modal */
    .insert-modal-content{
        font-size: 1.2rem;
        /*overflow-y: scroll;*/
    }

    .modal-title{
        font-size: 1.6rem;
    }

    .modal-subtitle{
        font-size: 1.4rem;
    }

    /*.scrollable{*/
    /*    overflow-y: scroll;*/
    /*    height: 100%;*/
    /*    scrollbar-width: none;*/
    /*    width: 100%;*/
    /*}*/
    /* End Modal */
}

/* Tablet */
@media screen and (min-width: 601px) and (max-width: 767px) {
    .padding-1rem{
        padding: 1rem;
    }

    .titles{
        grid-column: 2 / 10;
    }
    /* About */
    .card-image{
        width: 20rem;
        height: 22rem;
    }

    .about-article-description{
        grid-row: 3 / 9;
    }

    .about-aside-extra-info{
        grid-row: 10 / 10;
    }
    /*End About */

    /* Skills */
    .skills-section-items{
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        grid-column: 2 / 10;
        grid-row: 3 / 11;
        grid-gap: 1.5rem;
        font-size: 1.4rem;
    }
    /* End Skills */

    /* Portfolio */
    .portfolio-article{
        grid-template: repeat(auto-fill, minmax(100px, 150px)) / repeat(auto-fill, minmax(200px, 1fr))
    }

    .item-1{
        grid-row: unset;
    }

    .item-2{
        grid-row: unset;
    }

    .item-3{
        grid-row: unset;
    }

    .item-4{
        grid-row: unset;
    }

    .item-5{
        grid-row: unset;
    }

    .item-6{
        grid-row: unset;
    }
    /* End Portfolio */
}
