body {
    font-family: "Open Sans", sans-serif;
    background: #eaeaea;
}

a {
    text-decoration: none;
}



body > header {
    position: sticky;
    top: 0;
    z-index: 1;

    background-color: rgb(255 255 255);
    
    border-color: rgb(243 244 246 / 1);
    border-style: solid;
    border-bottom-width: 0.063rem;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    max-width: 76rem;
    margin-left: auto;
    margin-right: auto;

    padding-left: 1rem;
    padding-right: 1rem;
    height: 4rem;
}

header nav a {
    color: #828282;
    font-weight: 600;
}

header nav a.logo {
    line-height: 1rem;
    font-size: 1rem;
}

header nav a.home {
    margin-left: auto;
}

header nav a:not(.logo) {
    line-height: 1.25rem;
    font-size: 0.938rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

header nav a:not(.logo, .home) {
    margin-left: 0.125rem;
}

@media (min-width: 332px) {
    body > header {
        height: 4rem;
    }
}

@media (max-width: 331.98px) {
    body > header {
        display: block;
    }

    header nav {
        display: block;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    header nav a.logo {
        display: block;
        font-size: 1.125rem;

        margin-top: 0.438rem;
        margin-bottom: 0.938rem;
        padding-left: 0.25rem;
    }
}

@media (min-width: 640px) {
    header nav {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    header nav {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}



section {
    width: 100%;
    padding-left: 0.938rem;
    padding-right: 0.938rem;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;

    padding-top: 50px;
    margin-bottom: 10px;
}

@media (min-width: 576px) {
    section {
        /* max-width: 540px; */
        max-width: 570px;
    }
}

@media (min-width: 768px) {
    section {
        /* max-width: 720px; */
        max-width: 750px;
    }
}

@media (min-width: 992px) {
    section {
        /* max-width: 960px; */
        max-width: 990px;
    }
}

@media (min-width: 1200px) {
    section {
        /* max-width: 960px; */
        max-width: 990px;
    }
}

section > h4 {
    font-size: 40px; /* 2.5rem */
    line-height: 3rem;
    letter-spacing: -0.5px;
    font-weight: 700;
    color: #2f2f2f;
    font-style: normal;

    padding-left: 15px;
    padding-right: 15px;
    /* margin-left: -15px; */
    /* margin-right: -15px; */

    margin-top: 30px;
    margin-bottom: 50px;

    background-image: url(../media/line.jpg);
    background-repeat: no-repeat;
    /* background-position: bottom left; */
    background-position-x: 7px;
    background-position-y: bottom;
}



#about {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

@media (max-width: 991.98px) {
    #about {
        flex-direction: column-reverse;
    }
}

#about > div {
    /* flex: 0 0 65%; */
    flex: 0 0 60%;
}

#about > img {
    /* width: 50%; */
    /* width: 35%; */
    width: 40%;
    /* border-radius: 31.25rem; */
    /* border-radius: 3.5rem; */
    /* border-radius: 2rem; */
    /* border-radius: 8px; */
    border-radius: 1rem;
}

@media (max-width: 991.98px) {
    #about > img {
        width: 75%;
        margin-bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    #about > img {
        /* width: 80%; */
        width: 90%;
        border-radius: 8px;
        margin-bottom: 30px;
    }
}

#about h1 {
    font-size: 62px;
    font-weight: 700;
    letter-spacing: -0.8px;
    margin-bottom: 30px;
    line-height: 1.2;
}

#about h2 {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.5px;
    /* margin-bottom: 30px; */
    /* margin-bottom: 80px; */
    margin-bottom: 60px;
    line-height: 1.2;
}

#about p {
    font-size: 1.05rem;
    /* font-size: 15px; */
    /* line-height: 1.6; */
    line-height: 30px;
    color: #828282;
    margin-bottom: 3rem;
    max-width: 95%;    
}

#about ul li {
    display: inline-block;
}

#about ul li a {
    /* padding: 9px; */
    /* padding: 12px; */
    /* padding: 13px; */
    padding: 2px 13px 2px 13px;
    background-repeat: no-repeat;
    background-size: 100%;
}

#about ul li:not(:last-of-type) a {
    margin-right: 20px;
}

/* #about ul li a.github,
a.github 
{
    background-image: url(../media/github.svg);
}

#about ul li a.linkedin,
a.linkedin 
{
    background-image: url(../media/linkedin.svg);
} */



#about ul li a.github {
    background-image: url(../media/github-light.svg);
}
#about ul li a.github:hover {
    background-image: url(../media/github-blue.svg);
}
#about ul li a.linkedin {
    background-image: url(../media/linkedin-light.svg);
}
#about ul li a.linkedin:hover {
    background-image: url(../media/linkedin-blue.svg);
}



#blog {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    padding-right: 0;

    /* transform: translate3d(10%, 0, 0); */
    /* transition: transform 1s ease .3s, opacity .3s ease .3s; */
}

#blog > h4 {
    flex: 0 0 100%;
    box-sizing: border-box;
}

#blog > article {
    flex: 0 0 100%;
    max-width: 100%;

    /* width: 100%; */
    box-sizing: border-box;

    margin-bottom: 1.875rem;
    padding-left: 0.938rem; /* 15px */
    padding-right: 0.938rem; /* 15px */
}

@media (min-width: 576px) {
    #blog > article {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    #blog > article {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    #blog > article {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 1200px) {
    #blog > article {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

#blog figure > div {
    position: relative;
    overflow: hidden;
    background: #2f2f2f;
}

/* CHECK these transitions */
#blog figure div a img {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    transition: all 0.3s ease-out 0s;
    vertical-align: middle;

    overflow-clip-margin: content-box;
    overflow: clip;

    -webkit-transition: all 0.5s cubic-bezier(0,0,.2,1);
    -moz-transition: all 0.5s cubic-bezier(0, 0, .2, 1);
    -ms-transition: all 0.5s cubic-bezier(0, 0, .2, 1);
    transition: all 0.5s cubic-bezier(0,0,.2,1);
}

#blog figure:hover div a img {
    opacity: .4;
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    -moz-transform: scale3d(1.1, 1.1, 1.1);
    -ms-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
}

#blog figure > div > span {
    position: absolute;
    top: 23px;
    right: 23px; /* +15px */
    /* right: 38px; */
    font-size: 12px;
    font-weight: 600;
    line-height: 14px;
    background: #2f2f2f;
    color: #f7f7f7;
    text-transform: uppercase;
    padding: 6px 13px;
    cursor: default;

    transition: all .5s ease-in-out;
    -webkit-transition: all .5s ease-in-out;
    -moz-transition: all .5s ease-in-out;
    -ms-transition: all .5s ease-in-out;
    -o-transition: all .5s ease-in-out;
}

#blog figure:hover > div > span {
    background: #f7f7f7;
    color: #2f2f2f;
}

#blog figure figcaption {
    padding: 2.5rem 2.625rem;
    background-color: #f7f7f7;
}

#blog figure figcaption > div {
    display: flex;
    justify-content: space-between;

    line-height: 2.8125rem;
    margin-bottom: 26px;
    align-items: center;
}

#blog figure figcaption div h6 {
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;
}

#blog figure figcaption div h6 span {
    font-size: 15px;
    color: #828282;
    font-weight: 500;
    /* margin-right: 5px; */
}

#blog figure figcaption div time {
    color: #828282;
    font-size: 14px;
    font-weight: 400;
}

#blog figure figcaption h5 {
    font-size: 18px;
    font-weight: 600;
    /* color: #2f2f2f; */
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    line-height: 30px;
}

#blog figure figcaption h5 a {
    color: #2f2f2f;
}

#blog figure figcaption p {
    color: #828282;
    font-size: 15px;
    line-height: 30px;
}



/* MODAL */
body.modal {
    overflow-y: hidden;
}

#blog dialog {
    /* display: block; */
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    /* background: #2f2f2f; */
    /* opacity: .4; */

    /* background-color: rgba(70, 70, 70, 0.999); */
    /* background-color: rgba(70, 70, 70, 0.99); */

    /* background-color: rgba(47, 47, 47, 0.85); */
    background-color: rgba(47, 47, 47, 0.8);

    margin: 0;
    border: 0;
    padding: 0;
    width: auto;
    height: auto;

    display: flex;
    align-items: center;
}

#blog dialog .modal-content {
    max-width: 968px;
    background-color: #fff;
    margin: 3.3rem auto;
    /* height: 550px; */
    /* border: 1px solid rgba(0, 0, 0, .2); */
    border-radius: .3rem;

    /* overflow: hidden; */
    /* overflow-y: scroll; */


    /* height: 550px; */
    /* max-width: 968px; */
    /* height: 750px; */
    /* max-width: 1000px; */
    /* max-width: 1100px; */
    /* max-width: 1200px; */
    /* max-height: 80%; */

    height: 90vh;
    /* height: 85vh; */
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767.98px) {
    #blog dialog .modal-content {
        height: 80vh;
    }
}

@media (max-width: 991.98px) {
    #blog dialog .modal-content {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
}

#blog dialog .modal-content .modal-body {
    padding: 0px 80px 50px 80px;
    /* TODO: change 50px to vh -> On mobile there is too much white space at the end of the modal */

    /* height: 550px; */
    height: calc(550px - 133.2px);
    overflow-y: scroll;


    /* height: calc(750px - 133.2px); */
    /* height: calc(80% - 133.2px); */
    /* height: 80%; */

    /* height: calc(850px - 133.2px); */
    height: calc(90vh - 133.2px);
    /* height: calc(85vh - 133.2px); */
}

@media (max-width: 767.98px) {
    #blog dialog .modal-content .modal-body {
        /* height: calc(550px - 133.2px); */
        height: calc(80vh - 133.2px);
    }
}

@media (max-width: 991.98px) {
    #blog dialog .modal-content .modal-body {
        /* padding-left: 40px; */
        /* padding-right: 40px; */

        padding-bottom: 59px;
        padding-left: 30px;
        padding-right: 30px;
    }
}

#blog dialog img {
    width: 100%;
}

#blog .small-image {
    width: 49%;
}

#blog dialog .modal-body div {
    display: flex;
    justify-content: space-between;
    margin-top: 35px;
}

/* NOT USED */
#blog figure .modal-dialog, 
#blog figure dialog div.modal-content {
    width: 968px;
}

#blog dialog header {
    padding: 1.8rem;
    position: sticky;
    top: 0;
    /* background-color: #fff; */

    /* box-sizing: border-box; */
    border-bottom: none;
    text-align: right;
}

@media (max-width: 991.98px) {
    #blog dialog header {
        padding: 1.5rem;
    }
}

#blog dialog header a {
    /* box-sizing: border-box; */
    padding: 9.25px 20px;
    font-size: 26px;
    opacity: 1;
    background: #f7f7f7;
    border-radius: 5px;
    margin: -1rem -1rem -1rem auto;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 1px 0 #fff;
    color: #2f2f2f;
}

#blog dialog header a:hover {
    opacity: .75;
}

/* NOT USED */
#blog dialog .modal-body > div:nth-of-type(2) {
    display: flex;
    justify-content: space-between;
}

#blog dialog .modal-body h3 {
    font-weight: 600;
    /* text-transform: capitalize; */
    font-size: 20px;
    letter-spacing: -.5px;
    line-height: 1.2;
    margin-bottom: .5rem;
}

#blog dialog .modal-body div h5 {
    font-size: 15px;
    line-height: 22px;
    font-weight: 600;

    margin-bottom: calc(35px + 0.5rem);
}

#blog dialog .modal-body div h5 span {
    color: #828282;
    font-weight: 500;
    /* margin-right: 5px; */
    margin-right: 1px;
}

#blog dialog .modal-body div time {
    color: #828282;
    font-size: 14px;
}

#blog dialog .modal-body > span {
    display: block;
    font-size: 15px;
    color: #828282;
    margin-bottom: 35px;
}

#blog dialog .modal-body h4 {
    font-size: 16.5px;
    font-weight: 600;
    letter-spacing: -.5px;
    margin-top: 1.5rem;
    margin-bottom: .5rem;
}

#blog dialog .modal-body p {
    font-size: 15px;
    color: #828282;
    line-height: 30px;
    margin-bottom: 1rem;
    box-sizing: border-box;
    width: 100%;
}

#blog dialog .modal-body p.italic {
    padding: 20px;
    background: #f7f7f7;
    margin-bottom: 20px;
    margin-top: 10px;
}

#blog dialog .modal-body p a {
    color: #828282;
    font-weight: bold;
}

#blog dialog p a.check-out-github {
    display: inline-block;
    background-color: rgb(243 244 246 / 86%);
    padding: 0.95rem;
    border-radius: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #828282;
    font-weight: normal;
}

#blog dialog p a.check-out-github span {
    padding: 0.6rem 2.24rem;
    margin-left: 0.15rem;
    background-image: url(../media/check-out-github.webp);
    background-repeat: no-repeat;
    background-size: 100%;
}

#blog dialog p a.check-out-github {
    -webkit-transition: all 0.5s cubic-bezier(0, 0, .2, 1);
    -moz-transition: all 0.5s cubic-bezier(0, 0, .2, 1);
    -ms-transition: all 0.5s cubic-bezier(0, 0, .2, 1);
    transition: all 0.5s cubic-bezier(0, 0, .2, 1);
}

#blog dialog p a.check-out-github:hover {
    -webkit-transform: scale3d(1.1, 1.1, 1.1);
    -moz-transform: scale3d(1.1, 1.1, 1.1);
    -ms-transform: scale3d(1.1, 1.1, 1.1);
    transform: scale3d(1.1, 1.1, 1.1);
}

.mb-0 {
    margin-bottom: 0 !important;
}

#blog dialog ul {
    margin-bottom: 1rem;
}

#blog dialog ul li {
    color: #828282;
    line-height: 1.6rem;
    margin-left: 2rem;
    list-style: disc;
}



footer {
    text-align: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    background-color: #f7f7f7;
}

footer p {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5rem;
    color: #828282;
}

footer p a {
    color: #828282;
    font-weight: bold;
}



.hidden {
    display: none !important;
}

body.modal-open {
    /* overflow: hidden; */
    overflow-y: hidden;
}

::-webkit-scrollbar {
    width: 0.625rem;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 0.625rem;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

::-webkit-scrollbar-track {
    background: #f7f7f7;
    border-radius: .3rem;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}