body {
    min-height: 100vh;      /* body is at least as tall as the window */
    min-height: 100dvh;     /* mobile-friendly version, where supported */
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;                /* main grows to fill spare space, pushing footer down */
}

footer {
    text-align: center;
}
