* {
    margin: 0; padding: 0; border: 0; box-sizing: border-box;
}

body {
    background-color: #3655bb;
    
}

h1 {
    position: absolute;
    top: 160px;
    right: 40px;
    font-size: 14pt;
    font-weight: normal;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: white;
}

nav {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;
    padding-top: 8px;
    gap: 12px;
    margin-left: 8px;
    margin-right: 8px;
}

nav a {
    
    background-color:#6f36ba;;
    color: #36adba;
    padding: 12px 16px;
    flex: 1 0 auto;
    font-size: 14pt;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    

}

main {
    
    position: absolute;
    top: 50%;
    width: 100%;
    /* transform: translateY(-50%);  vertically center */
    display: flex;
    flex-flow: row wrap;
    justify-content: space-evenly;

}

main div {
   flex: 0 0 30%;
   background-color: #6f36ba ;
   aspect-ratio: 1;
   border-radius: 4px;
    
}

#featured {
    background-color:#3655bb;
    position: relative;
   
   
}

#featured  div {
    background: #36adba;
    width: 45%;
    height: 45%;
    position: absolute;
    border-radius: 4px;
    
}

#featured div:nth-child(1) {
    top: 0; left: 0;

}

#featured div:nth-child(2) {
    top: 0; right: 0;

}

#featured div:nth-child(3) {
    bottom: 0; left: 0;

}

#featured div:nth-child(4) {
    bottom: 0; right: 0;

}

/* style for mobile */
/* everything you remove will stay the same because of original css rulesets */
@media screen and (max-width: 750px) {
    nav a {
        flex: 0 0 20%;
    }

    main {
    
        position: static; /* have to counteract the original position: absolute */
        transform: translateY(0%);
        padding-top: 40px;
    
    }
    
    main div {
        flex: 0 0 85%;
        margin-bottom: 20px;
        
        
    }
    
    #featured {
        background-color:#3655bb;
        position: relative;
       
       
    }
    
    #featured  div {
        background: #36adba;
        width: 45%;
        height: 45%;
        position: absolute;
        border-radius: 4px;
        
    }
    
    #featured div:nth-child(1) {
        top: 0; left: 0;
    
    }
    
    #featured div:nth-child(2) {
        top: 0; right: 0;
    
    }
    
    #featured div:nth-child(3) {
        bottom: 0; left: 0;
    
    }
    
    #featured div:nth-child(4) {
        bottom: 0; right: 0;
    
    }

}