*:before,
*:after {
    box-sizing: border-box;
}


body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 100vh;
    margin: 0;
    padding: 20px;
  }

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0px;
    padding: 0px
}

.container {
    width: 1400px;
    margin: 0 20px;
    display: grid;
    grid-gap: 10px;
    border-radius: 12px;
    padding: 20px;
}




@media screen and (min-width: 500px) {

    /* no grid support? */
    nav {
        float: left;
        width: 16%;
        line-height: 1.8;
    }

    main {
        float: right;
        width: 84%;
        padding: 0px;
        margin: 0px;
    }

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

    header {
        grid-column: 1 / -1;
        clear: both;
        text-align: center;
    }

    footer {
        grid-column: 1 / -1;
        clear: both;
        text-align: right;
    }
}

/* We need to set the widths used on floated items back to auto, and remove the bottom margin as when we have grid we have gaps. */
@supports (display: grid) {
    .container>* {
        width: auto;
        margin: 0;
    }
}