* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100%;
    width: 100%;
    background: black;
    display: flex;
    flex-direction: column;
}

nav {
    height: 100px;
    background: #333;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1 {
    color: #fff;
    font-size: 3em;
    font-family: sans-serif;
}

ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    grid-auto-rows: 200px;
    grid-auto-flow: dense;
    grid-gap: 1em;
    margin: 1em; 
}

li {
    height: 100%;
    border: 5px solid white;
}

li:nth-child(1) {
    grid-column: span 2;
}

li:nth-child(2) {
    grid-row: span 2;
}

li:nth-child(4) {
    grid-row: span 2;
    grid-column: span 2;
}

li:nth-child(5) {
    grid-row: span 3;
}

li:nth-child(6) {
    grid-column: span 3;
}

li:nth-child(8) {
    grid-row: span 2;
}

li:nth-child(10) {
    grid-row: span 2;
}

li:nth-child(11) {
    grid-column: span 2;
}

li:nth-child(12) {
    grid-row: span 3;
}

li:nth-child(14) {
    grid-row: span 2;
    grid-column: span 2;
}

li:nth-child(16) {
    grid-row: span 3;
}

li:nth-child(18) {
    grid-row: span 2;
    grid-column: span 2;
}

li:nth-child(19) {
    grid-row: span 3;
}

li:nth-child(22) {
    grid-row: span 2;
}

li:nth-child(23) {
    grid-column: span 2;
}

img {
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

@media handheld, only screen and (max-width: 668px) {
    li:nth-child(1) {
        grid-column: span 1;
    }
    
    li:nth-child(2) {
        grid-row: span 1;
    }
    
    li:nth-child(4) {
        grid-row: span 1;
        grid-column: span 1;
    }
    
    li:nth-child(5) {
        grid-row: span 1;
    }
    
    li:nth-child(6) {
        grid-column: span 1;
    }
    
    li:nth-child(8) {
        grid-row: span 1;
    }

    li:nth-child(10) {
        grid-row: span 1;
    }
    
    li:nth-child(11) {
        grid-column: span 1;
    }
    
    li:nth-child(12) {
        grid-row: span 1;
    }

    li:nth-child(14) {
        grid-row: span 1;
        grid-column: span 1;
    }

    li:nth-child(16) {
        grid-row: span 1;
    }

    li:nth-child(18) {
        grid-row: span 1;
        grid-column: span 1;
    }
    
    li:nth-child(19) {
        grid-row: span 1;
    }

    li:nth-child(22) {
        grid-row: span 1;
    }
    
    li:nth-child(23) {
        grid-column: span 1;
    }
}