/* =========================
 *  Fonts
 * ========================= */

@font-face {
    font-family: Atkinson;
    src: local("Atkinson-Hyperlegible-Regular-102a.woff2"),
    url("/fonts/Atkinson-Hyperlegible-Regular-102a.woff2") format("woff2");
}

@font-face {
    font-family: Atkinson;
    src: local("Atkinson-Hyperlegible-Bold-102a.woff2"),
    url("/fonts/Atkinson-Hyperlegible-Bold-102a.woff2") format("woff2");
    font-weight: 700;
}

@font-face {
    font-family: Atkinson;
    src: local("Atkinson-Hyperlegible-Italic-102a.woff2"),
    url("/fonts/Atkinson-Hyperlegible-Italic-102a.woff2") format("woff2");
    font-style: italic;
}

@font-face {
    font-family: Atkinson;
    src: local("Atkinson-Hyperlegible-BoldItalic-102a.woff2"),
    url("/fonts/Atkinson-Hyperlegible-BoldItalic-102a.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
}


/* =========================
 *  Reset / Base
 * ========================= */

* {
    box-sizing: border-box;
}

* html body {
    width: 800px;
    margin: 0 auto;
}

body {
    font-family: Atkinson, Geneva, Verdana, Helvetica, sans-serif;
    line-height: 1.6;
    margin: 0;
}


/* =========================
 *  Layout
 * ========================= */

.page-wrap { 
	max-width: 1280px; 
	display: grid;
	grid-template-columns: minmax(10px, 1fr) minmax(10px, 3fr);
	grid-template-rows: min-content min-content 1fr min-content; 
	gap: 1px; 
	
	@media (max-width: 1068px) { 
		grid-template-columns: 100%; grid-template-rows: auto; 
		aside { order: 98; } 
		footer { order: 99; } 
		> * { grid-column: 1 / -1 !important; grid-row: auto !important; }
	} 
	
	> header { grid-column: 1 / -1; } 
	> aside { grid-column: 1 / 2; grid-row: 2 / 4; } 
	> main > nav { grid-column: 2 / 3; } 
	main { grid-column: 2 / 3; } 
	> footer { grid-column: 1 / -1; }
}

#index-page aside {
	order: initial;
	margin-bottom: 1.5rem;
}

aside {
    margin: 0 1rem;
    position: relative;

    h2 {
        margin-top: 0;
    }

    > img {
        position: absolute;
        top: -232px;
    }

    > div {
        border: 1px solid;
        border-radius: 5px;
        background: honeydew;
        padding: 1rem;
    }

    img {
        width: 21.5rem;
    }
}

main {
    margin-right: 1rem;

		@media (min-width: 1068px) { 
			display: flex;
		}

		.games {
			@media (min-width: 1068px) { 
				min-width: 255px;
			}

			iframe {
				margin-top: 0;
			}
		}

		.recent-posts {
			margin-right: 1rem;
		}
}

/* =========================
 *  Article
 * ========================= */

article {
    width: 100%;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.recent-posts article {
    background-color: cornsilk;
    border: 1px solid;
    border-radius: 5px;
    padding: 1rem .5rem;
}

article header {
    text-align: left;

    h1 {
        font-size: xx-large;
    }

    h2 {
        margin: 0;
        margin-bottom: .5rem;
        padding-bottom: .5rem;
        line-height: 1.1;
    }
}

article header time {
    display: block;
    font-weight: bold;
    margin-bottom: 1rem;
}

article a {
    text-decoration: underline;
}

article h1 a,
article h2 a {
    text-decoration: none;
}

article figure {
    margin-bottom: 1rem;
}


/* =========================
 *  Typography
 * ========================= */

h2 {
    font-family: "trebuchet MS", Helvetica, serif;
    border-bottom: 1px solid;
    font-weight: 600;
    font-size: x-large;
}

h2[itemprop="headline"] {
    font-size: x-large;
    line-height: 1.1;
    padding-bottom: .5rem;
    margin-bottom: .5rem;


    @media screen and (min-width: 600px) {
        font-size: xx-large;
    }
}

h2 a:link,
h2 a:visited {
    color: black;
}

h2 a:hover {
    text-decoration: none;
}

h2 time {
    display: inline;
}

section > h2:first-child {
    font-family: inherit;
    font-size: x-large;
    border: 0;
    margin-top: 0;
    margin-bottom: 1.5rem;
    line-height: 1;

    @media screen and (min-width: 1100px) {
        font-size: xx-large;
    }
}

p {
    margin: 0 0 1rem;
    padding: 0;
}

strong {
    font-weight: 700;
}

blockquote {
    border-left: 5px;
    background: cornsilk;
    padding: 1rem;
    font-style: italic;
    border-style: double;
}

blockquote::before {
    content: "\"";
    font-size: xx-large;
    line-height: 0;
}

code {
    line-height: 1;
    font-family: "Courier New", Courier, mono, serif;
}

pre {
    font-family: Geneva, Verdana, Helvetica, sans-serif;
    text-align: left;
    margin-bottom: 1rem;

    background: cornsilk;
    border: 1px solid;
    border-radius: 5px;
    padding: 1rem .5rem;
    overflow: auto;
}

figcaption {
    font-style: italic;
    text-align: center;
}


/* =========================
 *  Links
 * ========================= */

a {
    text-decoration: underline;
    font-weight: 600;
}

a.more-link {
    display: block;
    margin-top: 1rem;
    text-align: center;
}


/* =========================
 *  Lists
 * ========================= */

main ul,
main ol {
    margin-left: 1rem;
    padding-left: 1rem;
}


/* =========================
 *  Media
 * ========================= */

img {
    border: 0 none;
    max-width: 90%;
    height: auto;
}

embed,
iframe {
    margin-top: 1em;
}

iframe {
    max-width: 100%;
}

pre,
iframe {
    margin-bottom: 1rem;
}


/* =========================
 *  Tables
 * ========================= */

table {
    border: 1px solid;
    margin-bottom: 1rem;
    width: 100%;
}

th {
    background: cornsilk;
}

td {
    border: 1px solid;
    text-align: center;
}


/* =========================
 *  Components
 * ========================= */

magpie-trinket {
    background: lightcyan;
    display: block;
    border-radius: 5px;
    border: 1px solid;
    padding: 1.5rem 1rem;
    position: relative;
    padding-left: 90px;
}

magpie-trinket::before {
    content: "";
    display: block;
    width: 80px;
    height: 75px;

    background-image: url("/images/magpie_white_small.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: scaleX(-1);
    position: absolute;
    left: 5px;
    top: 0;
}

p:has(magpie-replies) {
    text-align: right;
}

magpie-replies {
    background: lightcyan;
    display: inline-block;
    border-radius: 5px;
    border: 1px solid;
    padding: 1.5rem 1rem;
    position: relative;
    padding-right: 90px;
    width: fit-content;
    margin-bottom: 1rem;
}

magpie-replies::before {
    content: "";
    display: block;
    width: 80px;
    height: 75px;

    background-image: url("/images/magpie_white_small.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    right: 5px;
    top: 0;
}

chicken-asks {
    background: papayawhip;
    display: block;
    border-radius: 5px;
    border: 1px solid;
    padding: 1.5rem 1rem;
    position: relative;
    padding-left: 90px;
    width: fit-content;
    margin-bottom: 1rem;
}

chicken-asks::before {
    content: "";
    display: block;
    width: 80px;
    height: 75px;

    background-image: url("/images/chicken_white_small.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    left: 5px;
    top: 0;
}

.site-header {
    padding: 1rem;
		margin-bottom: 1.5rem;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    h1 {
        margin: 0;
        text-decoration: none;
        font-family: Atkinson, Geneva, Verdana, Helvetica, sans-serif;
        font-size: 2.8rem;
        line-height: 1;
        display: block;
        max-width: 50%;

        @media screen and (min-width: 510px) {
            font-size: 3.5rem;
        }

        @media screen and (min-width: 610px) {
            font-size: 4.5rem;
        }

        @media screen and (min-width: 790px) {
            font-size: 6rem;
        }

        @media screen and (min-width: 970px) {
            font-size: 8.5rem;
        }

        @media screen and (min-width: 1100px) {
            font-size: 10.5rem;
        }
    }

    a {
        color: black;
        text-decoration: none;

        :visited {
            color: black;
        }
    }

    > div {
        display: flex;
        align-items: flex-end;
        flex: 25%;
        max-width: 400px;
        min-width: 180px;

        img {
            width: 50%;
        }
    }
}

.site-footer {
    padding: 1rem;
    background: cornsilk;
    border: 1px solid;
    border-radius: 5px;
    margin: 2rem 1rem;
    font-size: small;
    text-align: center;
    font-family: "Courier New", Courier, mono, serif;

    p {
        margin: 0;
    }
}

.header-chicken {}
.header-magpie {}


/* =========================
 *  Responsive
 * ========================= */

@media screen and (max-width: 1100px) {
    body {
        float: none;
        display: flex;
        flex-direction: column;
        padding: 0;
        margin: 0;
    }

    aside {
        margin: 0;
        padding: 0 1rem;
        width: auto;
    }

    main {
        margin: 0 0 1rem 0;
        padding: 0 1rem;
    }
}
