@import url("reset.css");

@font-face {
    font-family: "Kode Mono";
    src: url("/fonts/KodeMono-Regular-subset.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Kode Mono";
    src: url("/fonts/KodeMono-Bold-subset.woff2") format("woff2");
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: "Mindset";
    src: url("/fonts/Web437_Mindset.woff") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Mindset-2x";
    src: url("/fonts/Web437_Mindset-2x.woff") format("woff2");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "Mindset-2y";
    src: url("/fonts/Web437_Mindset-2y.woff") format("woff2");
    font-weight: normal;
    font-style: normal;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

@media (prefers-color-scheme: light) {
    :root {
        --mid: #aaa;

        --content-foreground: #222;
        --content-background: #eee;

        --header-background: #222;
        --header-foreground: #eee;

        --content-link-foreground: #0089e4;
        --content-link-background: transparent;
        --content-link-foreground-hover: #222;
        --content-link-background-hover: #ededed;

        --sidebar-background: #222;
        --sidebar-link-background: transparent;
        --sidebar-link-foreground: #eee;
        --sidebar-link-background-active: #eee;
        --sidebar-link-foreground-active: #222;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --mid: #aaa;

        --content-foreground: #e8e6e3;
        --content-background: #181a1b;

        --header-background: #141414;
        --header-foreground: #eee;

        --content-link-foreground: #00b7ff;
        --content-link-background: transparent;
        --content-link-foreground-hover: #ededed;
        --content-link-background-hover: #222;

        --sidebar-background: #141414;
        --sidebar-link-background: transparent;
        --sidebar-link-foreground: #eee;
        --sidebar-link-background-active: #eee;
        --sidebar-link-foreground-active: #1a1a1a;
    }
}

p {
    line-height: 1.4;
}

.blog-post-snippet {
    width: auto;
    outline: 1px dashed var(--mid);
    margin-bottom: 8px;
}

h1,
h2,
h3 {
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
    font-smooth: never;
    text-rendering: optimizeSpeed;
}

h1 {
    font-size: 16px;
    font-family: "Mindset-2x", "Kode Mono", monospace;
    /* text-transform: uppercase; */
    width: auto;
    text-align: center;
    background-color: var(--header-background);
    color: var(--header-foreground);
    padding: 8px 0px 6px 0px;
    margin-bottom: 12px;
    display: flow-root;
}

h2 {
    font-size: 24px;
    font-family: "Mindset-2x", "Kode Mono", monospace;
}

h3 {
    font-size: 24px;
    font-family: "Mindset-2y", "Kode Mono", monospace;
}

.content > p {
    margin-bottom: 12px;
}

em {
    font-style: italic;
    color: var(--mid);
}

hr {
    margin-block: 16px;
    border: none;
    border-top: 1px solid var(--mid);
}

.image-button {
    display: inline-block;
    cursor: crosshair;
}

.image-button:hover {
    outline: 0 transparent;
}

.image-button img {
    display: block;
    width: 100%;
    height: auto;
}

body {
    display: grid;
    grid-template-columns: 144px auto;
    font-family: "Kode Mono", monospace;
    margin: 0;
    font-size: 14px;
    background: var(--content-background);
    color: var(--content-foreground);
}

.sidebar {
    background: var(--sidebar-background);
    min-height: 100vh;
    padding: 16px;
    min-width: 144px;
}

.sidebar a {
    display: flex;
    align-items: center;
    width: fit-content;
    height: 24px;
    margin-bottom: 4px;
    text-decoration: none;
    color: var(--sidebar-link-foreground);
    background: var(--sidebar-link-background);
    font-weight: bold;
    font-size: 14px;
    padding: 0 4px; /* 0px top and bottom, 4px left and right */
    cursor: crosshair;
}

p > a {
    cursor: crosshair;
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    color: var(--content-link-foreground);
    background: var(--content-link-background);
}

p > a:hover {
    color: var(--content-link-foreground-hover);
    background: var(--content-link-background-hover);
    outline: dashed 2px var(--mid);
    outline-offset: -1px;
    text-decoration: none;
}

p > a:focus {
    outline: 2px solid var(--sidebar-link-foreground);
    outline-offset: -1px;
}

/* if active, aka we are on this page */
.sidebar a.active {
    background: var(--sidebar-link-background-active);
    color: var(--sidebar-link-foreground-active);
    font-family: "Mindset";
    font-weight: normal;
    font-size: 16px;
    padding: 0 2px; /* 0px top and bottom, 4px left and right */
}

.sidebar a.active:hover {
    padding-inline: 0px;
    border-color: var(--sidebar-background);
}

/* if focused, but NOT active */
.sidebar a:focus:not(.active) {
    border: 2px solid var(--sidebar-link-foreground);
    padding-inline: 2px;
}

.content {
    padding: 16px;
    max-width: 640px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.game-card {
    border: 1px solid var(--mid);
    padding: 10px;
    text-align: center;
}

.sidebar a:hover {
    border: dashed 2px var(--sidebar-link-foreground);
    padding-inline: 2px;
}

@media (max-width: 784px) {
    .sidebar {
        position: fixed;
    }

    body {
        display: block;
        width: 100%;
    }

    .content {
        max-width: 640px;
        margin: 0 auto;
    }
}
