:root {
    --bg-color: #d1d2d6;
    --section-color: white;

    --body-bg: url("/img/bg/sparklybackground.gif");
    --header-bg: url("/img/bg/pattern_524.gif");
    --aside-bg: url("/img/bg/waterani.gif");
    --main-bg: url("/img/bg/backgd155.gif");
    --footer-bg: url("/img/bg/tile_aniBlobz.gif");

    --header-font: Brush Script MT, cursive;
    --font: Verdana, sans-serif;

    --gap: 0.8em;
    --padding: 1em;
    --margin: 1em
}

html, 
body {
    margin: 0;
    height: 100%;
}

body {
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--padding);
    height: 100vh;
    box-sizing: border-box;
    background-image: var(--body-bg);
    background-color: rgb(118, 218, 176);
}

/* LAYOUT */

.layout {
    grid-area: layout;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: 
    "header header header header header"
    "aside main main main main"
    "footer footer footer footer footer";
    gap: var(--gap);
    height: 100%;
    max-width: 800px;
    width: 800px;
}

#layout-page {
    grid-template-areas: 
    "header header header header header"
    "main main main main main"
    "footer footer footer footer footer";
}

/* HEADER FOOTER ASIDE MAIN */

header, 
aside, 
main, 
footer {
    background-color: var(--section-color);
    border: 7px outset rgb(255, 255, 255);
    padding: var(--padding);
}

aside, 
main {
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}

@keyframes checker-slide {
    0% { background-position: 0 0; }
    100% { background-position: 8px 8px; }
}

header {
    grid-area: header;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-around;
    padding: 0.7em;
    font-family: var(--header-font);
    background-image: var(--header-bg);
}

header img { 
  min-width: 0;
  max-width: 70%;
}

aside {
    grid-area: aside;
    background-image: var(--aside-bg);
    padding: 0.5em;
}

.navigation {
    display: flex;
    flex-direction: column;
}

.navigation a {
    text-decoration: none;
    color: black;
    text-shadow: 1px 1px 2px black;
}

.navigation img {
    max-width: 20px;
}

/* MAIN */

main {
    grid-area: main;
    background-image: var(--main-bg);
}

main > p:first-child, 
main > b:first-child,
main > h1:first-child,
main > h2:first-child,
main > h3:first-child {
    margin-top: 0;
}

main p:last-of-type {
    margin-bottom: 0;
}

.title {
    text-align: center;
}

.page-item {
    display: grid;
    justify-content: center;
    justify-items: center;
}

.page-item h1:first-of-type {
    margin-bottom: 0;
}

.page-item a {
    text-decoration: none;
    text-shadow: 2px 2px 2px black;
}

.page-item b {
    text-align: center;
}

.yt-vid {
    aspect-ratio: 16 / 9;
    width: 100%;
    border: 5px inset white;
}

.guestbook {
    margin-top: 0.8em;
    height: 85%;
    width: 100%;
    border: 5px inset white;
}

footer {
    grid-area: footer;
    background-image: var(--footer-bg);
}

@media (max-width: 800px) {
    body {
        font-size: 20px;
    }

    .layout {
        display: flex;
        flex-direction: column;
    }

    .guestbook {
        aspect-ratio: 3 / 4;
    }

    aside, 
    main {
    overflow-y: visible;
    height: auto;
}
}