:root {
    --color-background: #114B5F;
    --color-accent: #88D498;
    --color-header-bg: #1A936F;
    --color-text: #C6DABF;
    --color-link-text: #F3E9D2;
    --verticalspacing: 1.5em;
}

body {
    font-family: 'Avenir Next', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 100%;
    line-height: 135%;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
}

body>* {
	padding: 0 1rem;
}

a.current {
    pointer-events: none;
    color: var(--color-link-text);
}

p,h3,h4,ul {
    margin-top: var(--verticalspacing);
}

.next .videowrapper {
    position: relative;
    height: 0;
    padding-bottom: 56.25%;
}

.next iframe {
    width: 100%;
    position: absolute;
    height: 100%;
}

.gallery figure {
    width: 100%;
    margin: 0;
    position: relative;
}

.gallery figure img {
    width: 100%;
    /* height: 100%; */
}

.gallery figcaption {
    /* text-align: center; */
    position: relative;
    bottom: 0;
    margin: 0;
    width: 100%;
    padding: 0.5em 0 1em 2em;
}

header {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-header-bg);
    justify-content: space-between;
}

h1 {
    font-size: 1.5rem;
    background-color: #0006;
    margin: .5rem 0;
    padding: .2em;
    color: #ccc;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
}

ul.top-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
}

li.top-link {
    outline: 1px dotted #aaa;
    margin-right: 20px;
    width: 20%;
    margin-top: .5em;
    text-align: center;
    background-color: var(--color-accent);
    border-radius: 20px;
}

.top-links a {
    text-decoration: none;
    background-color: #363;
    text-align: center;
    color: #fff;
    display: block;
    padding: .2em .3em;
    border-radius: 4px;
}

main {
    padding: 0 1em;
}

@media screen and (min-width: 600px) {
    .home main {
        margin: 0 5em;
    }

    li.top-link {
        width: 30%;
    }

    .next main {
        display: flex;
        flex-direction: row;
        gap: 1rem;
    }

    .next main section:first-child {
        flex: 15;
    }

    .next main section:last-child {
        flex: 10;
    }

    .gallery main {
        display: inline-flex;
	    flex-direction: row;
	    flex-wrap: wrap;
	    gap: 2rem;
	    padding-top: 2rem;
    }

    .gallery main figure {
        width: 30%;
        /* backup color */
        background-color: var(--color-header-bg);
    }
}

@media screen and (prefers-color-scheme: dark) {
    body {
        background-color: var(--color-background);
    }
}