body{
    font-family: 'Aleo', sans-serif;
    background-image: url('../images/background_image.jpg');
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: auto auto auto auto 10vh;
}

header{
    grid-area: 1/1/1/-1;
}

.logo{
    font-size: 35px;
    font-weight: 800;
    color:white;
    line-height: 40px;
    padding-top: 20px;
}

.logo span{
    position: relative;
    display: inline-block;
    animation: text_bounce 1.3s infinite;
    animation-delay: calc(0.1s * var(--i));
}

@keyframes text_bounce{
    0%,40%,100% {
        transform: translateY(0)
    }
    20% {
        transform: translateY(-10px)
    }
}

h1{
    font-size: 40px;
    font-weight: bold;
    margin: 20px 0;
    text-align: center;
}

h1 > span{
    background-color: #f6f6f6;
    padding: 10px;
    border-radius: 10px;
}

h2{
    font-size: 28px;
    font-weight: bold;
    padding: 15px 0;
    margin: 20px auto;
    text-align: center;
}

h3{
    font-size: 20px;
    font-weight: 600;
    margin: 15px 30px;
}

p{
    font-size: 16px;
    line-height: 2;
    padding: 10px;
    margin: 10px 20px;
    text-align: left;
}

img {
    width: 332px;
    height: 345px;
    padding: 18px;
    margin: 15px calc(50vw - 189px);
    border: 5px dashed #6274dd;
}

figcaption{
    text-align: center;
}

figcaption span{ 
    background-color: #f6f6f6;
    padding: 3px;
    border-radius: 5px;
}

img:hover {
    width: 365px;
    height: 378px;
    padding: 1px;
    border: 5px solid red;
    transition: 1s;
}

.current_page {
    font-weight: bolder;
    color: white;
    border-radius: 5px;
    background-color: blue;
    animation: slight_bling 4s infinite;
}

@keyframes slight_bling {
    0%{
        border: 0;
    }
    50%{
        border: 2px red dashed;
    }
    100%{
        border: 0;
    }
}

.inside_nav{
    display: flex;
    justify-content: center;
    margin: 10px auto;
    text-indent: 5px
}

.skip a{
    background: white;
    position: absolute;
    left: 41vw;
    top: -40px;
    padding: 6px;
    color: blue;
    border: 2px black;
    z-index: 1; 
}

.skip a:focus{
    top: 10px;
    -webkit-transition: top 1s ease-out;
    transition: top 1s ease-out;
}

/*Main*/
main{
    grid-area: 2/1/2/-1;
}

main a{
    color: black;
}

main li, aside li{
    margin: 10px 40px;
    list-style-type: disc;
}

section{
    background-color: #dbf3fa;
    border-radius: 25px;
    margin: 10px;
}

section h2{
    background-color: #b7e9f7;
    border-radius: 25px 25px 0 0;
}

.image_flex{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image_flex img{
    margin: 15px auto;
}

form{
    grid-area: 4/1/4/-1;
    padding: 5px;
    text-align: center;
    background-color: #bbbbbb;
    border-radius: 15px;
    margin: 10px;
    max-width: calc(100vw - 50px);
}

form span{
    font-size: 16px;
    font-weight: bold;
    color: black;
    line-height: 1.3;
}

#homepage_form input{
    width: 30vw;
    max-width: 50vw;
    font-size: 14px;
}

form textarea{
    width: 55vw;
    max-width: 65vw;
    height: 60px; 
    font-size: 14px;
}

form button{
    font-size: 13px;
    font-weight: bold;
}

#up, #up_two, #down, #down_two{
    display: none;
}

aside{
    grid-area: 3/1/3/-1;
    background-color: #fad4c8;
    border-radius: 25px;
    margin: 10px;
}

#backend_demo{
    grid-area: 2/1/4/-1;
    height: 60vh;
    width: 90vw;
    margin-left: 5vw;
}

#backend_intro{
    grid-area: 1/1/1/-1;
    height: fit-content;
    width: 90vw;
    margin-left: 5vw;
}

/*Footer*/
footer{
    grid-area: 5/1/5/-1;
    color: white;
    background-color: black;
}

/*Navigation*/
.navbar{
    width: 100%;
    background-color: black;
}
.menu{
    font-size: 18px;
    list-style: none;
    text-align: center;
}
.menu li{
    display: block;
    background: black;
    list-style: none;
}
.menu li:hover > .dropdown{
    visibility: visible;
    max-height: 100%;
}
.menu a{
    color: white;
    text-decoration: none;
    line-height: 40px;
}
.menu a:hover{
    background-color: red;
    border-radius: 5px;
}

.dropdown{
    visibility: hidden;
    max-height: 0;
    position: relative;
    z-index: 2;
}
.dropdown li{
    min-width: max-content;
}
.dropdown a{
    line-height: 40px;
}

@media (prefers-reduced-motion: reduce){
    .logo span{
        animation: none;
    }

    .current_page{
        animation: none;
    }

    .skip a{
        -webkit-transition: none;
        transition: none;
    }
}

/*Tablet*/
@media all and (min-width:491px){
    .menu{
        position: relative;
        text-align: left;
        margin-left: 3px;
    }
    .menu li{
        display: inline-block;
    }
    .menu a{
        padding: 2px;
        line-height: 60px;
    }
    .dropdown{
        visibility: hidden;
        position: absolute;
        top: 55px;
        font-size: 12.3px;
    }
    .dropdown li{
        position: relative;
        display: list-item;
    }
    .dropdown a{
        line-height: 50px;
    }

    .image_flex{
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    #homepage main{
        grid-row: 2/2;
        grid-column: 2/-1;
    }
    #homepage aside{
        grid-row: 2/2;
        grid-column: 1/span 1;
        margin-top: 100px;
    }
    #homepage img{
        margin: 0;
        position: absolute;
        left: calc(50vw - 189px);
        margin-top: 80px;
    }
    #homepage h1{
        text-align: unset;
        position: absolute;
        left: calc(50vw - 99px);
    }
    #homepage #section_one{
        margin-top: 100px;
    }

    #experiences main{
        display: grid;
        grid-template-columns: 380px 1fr;
        grid-template-rows: auto 1fr 1fr;
        align-items: center;
        row-gap: 20px;
    }
    #experiences h1{
        grid-area: 1/1/1/-1;
    }
    #experiences #fig_one{
        grid-area: 2/1/2/1;
        margin: 15px 10px;
    }
    #experiences #section_one{
        grid-area: 2/2/2/2;
        width: calc(100vw - 410px);
        justify-self: center;
        margin: 0;
    }
    #experiences #fig_two{
        grid-area: 3/1/3/1;
        margin: 15px 10px;
    }
    #experiences #section_two{
        grid-area: 3/2/3/2;
        width: calc(100vw - 410px);
        justify-self: center;
        margin: 0;
    }

    #projects main{
        grid-row: 2/2;
        grid-column: 2/-1;
    }
    #projects aside{
        margin-top: 80px;
        grid-row: 2/2;
        grid-column: 1/span 1;
    }
    #projects #section_one{
        margin-top: 80px;
    }
    #projects h1{
        text-align: unset;
        position: absolute;
        left: calc(50vw - 99px);
    }
}

/*Desktop*/
@media all and (min-width:780px){
    .menu{
        text-align: center;
    }
    .menu a{
        padding: 5px;
    }
    .dropdown{
        font-size: 14px;
    }

    .image_flex{
        justify-content: space-evenly;
    }

    #homepage main{
        grid-column: 1/span 2;
    }
    #homepage aside{
        grid-column: 3/-1;
    }

    #experiences main{
        grid-template-columns: 1fr 380px;
    }
    #experiences #fig_one{
        grid-area: 2/2/2/2;
    }
    #experiences #section_one{
        grid-area: 2/1/2/1;
    }
    #experiences #fig_two{
        grid-area: 3/2/3/2;
    }
    #experiences #section_two{
        grid-area: 3/1/3/1;
    }
    #experiences section{
        margin-left: 10px;
    }

    #projects main{
        grid-column: 1/span 2;
    }
    #projects aside{
        grid-column: 3/-1;
    }

    #gallery_form{
        position: fixed;
        bottom: 0;
        right: 0;
    }
    #gallery_form span{
        font-size: 18px;
    }
    #gallery_form textarea{
        width: 25vw;
    }
    #down, #down_two{
        display: initial;
    }
    
}


