@charset "UTF-8";

:root {
    --page: #fff;
    --shadow: #bbb;
    --ink: #222;
    --highlight: #000;

    --accent-red: oklch(63.7% 0.237 25.331);
}

html {
    font-size: 16px;
    background: var(--page);
    text-rendering: optimizelegibility;
    font-variant-ligatures: common-ligatures;
    
    scrollbar-width: thin;
}

body {
    margin: auto;
    padding: 1rem 1rem 0.25rem;
    
    margin-left: auto;
    margin-right: auto;

    font-family: "Dover Sans Text", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;

    max-width: 72ch;
    font-size: 1rem;
    line-height: 1.5;

    text-wrap: pretty;
    hanging-punctuation: first last;

    color: var(--ink);
    background: var(--page);
}

/* -----------------------------------------------------------------------------
 * Markdown Format Miscelany
 */

strong {
    color: var(--highlight);
}

ul, p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

a {
    color: var(--ink);
    text-decoration-thickness: 2px;
}

a:hover {
    text-decoration-color: var(--accent-red);
}

code {
    font-size: 85%;
    font-family: "Ibm Plex Mono", monospace;
    font-weight: 400; 
    font-style: normal;
    color: var(--ink);
}

blockquote {
    font-style: italic;
}

/* -----------------------------------------------------------------------------
 * The Header
 */

header {
    display: block;
    height: 7rem;
}

header h1 {
    position: absolute;
    top: 5rem;
    font-size: 3.5rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: -0.03em;
}

header a {
    color: var(--highlight);
    text-decoration: none;
}

nav a {
    height: 1.75rem;
    padding: .1rem .5rem 0;
        
    font-size: 14px;
    font-family: "Ibm Plex Mono", monospace;
    font-weight: 400; 
    font-style: normal;
}

nav a:hover {
    background-color: var(--accent-red);
    color: var(--page);
    font-weight: 600;
}

header ul {
    margin: auto;
    float: right;
}

header li {
    display: inline;
    list-style: none;
}

header h1 a {
    color: var(--accent-red);
    text-shadow: 2px 2px 0px var(--highlight);
}

@media (prefers-color-scheme: dark) {    
    header h1 a {
        color: var(--accent-red);
        text-shadow: none;
    }
}

/* -----------------------------------------------------------------------------
 * Headings & Rules
 */
    
h1, h2, h3, h4, h5, h6 {
    
    color: var(--highlight);
    display: inline-block;
    font-family: "Vollkorn", sans-serif;
    font-weight: 700;
    font-style: italic;
    margin: 0;
    letter-spacing: 0.02em;
}

h2 {
    margin-top: 1rem;
}

h3 {
    margin-top: 0.5rem;
}

hr {
    margin: 0;
    border-top: none;
    border-right: none;
    border-bottom: 1px solid var(--ink);
}

/* -----------------------------------------------------------------------------
 * Lists
 */

li::marker {
    color: var(--accent-red);
}

/* -----------------------------------------------------------------------------
 * Code blocks
 */

pre.z-code {
    page-break-inside: avoid;
    background-color: transparent;
}

pre.z-code code {
    border-collapse: collapse;
    border: 1px solid var(--ink);
    box-shadow: 2px 2px var(--shadow);

    font-weight: 500;
    font-size: 12px;
    line-height: 1.5;

    padding: 1rem;
    display: block;

    overflow: scroll;
}

pre.z-code table {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

pre.z-code tbody {
    border: none;
    font-size: 12px;
}

pre.z-code td {
    border: none;
}



/* -----------------------------------------------------------------------------
 * Figures
 */

figure {
    margin: 0px;
    white-space: nowrap;
    margin-bottom: 1rem;
}

.figure-content {
    display: block;
    overflow-y: scroll;
    scrollbar-width: none;
    overscroll-behavior: none;
    margin-left: 0rem;
    margin-right: 0rem;

    box-shadow: 2px 2px var(--shadow);
}

figcaption {
    text-align: center;
    font-style: italic;
    padding-top: 0.2rem;
    font-size: 0.9rem;
}

/* -----------------------------------------------------------------------------
 * Tables
 */

table {
    width: 100%;
    text-align: left;

    font-size: 14px;
    font-family: "Ibm Plex Mono", monospace;
    font-weight: 400; 
    font-style: normal;
    
    border-collapse: collapse;
    border: 1px solid var(--ink);
    border-left: 6px solid var(--ink);
    box-shadow: 2px 2px var(--shadow);
}

th {
    overflow: hidden;
    padding: .2rem .4rem 0;

    white-space: nowrap;

    border-bottom: 2px solid var(--ink);
    border-left: 1px solid var(--ink);
}

td {
    overflow: hidden;
    height: 1.5rem;
    padding: .2rem .4rem 0;

    border-bottom: 1px solid var(--ink);
    border-right: 1px solid var(--ink);
}

/* -----------------------------------------------------------------------------
 * Footnotes
 */

sup {
    vertical-align: baseline;
    position: relative;
    top: -0.4rem;
    font-weight: 600;
}

.footnote-reference a {
    text-decoration: none;
    color: var(--accent-red);
    font-family: "Ibm Plex Mono", monospace;
    font-size: 10px;
}

.footnotes {
    border-top: 1px solid var(--ink);
}

.footnotes a {
    color: var(--accent-red);
    text-decoration: none;
}

/* -----------------------------------------------------------------------------
 * The Footer
 */

.copyright {
    text-align: center;

    margin-top: 1rem;
    
    font-size: 10px;
    font-family: "Ibm Plex Mono", monospace;
    font-weight: 400; 
    font-style: normal;
    line-height: 1.1;

    color: var(--ink);
}

/* -----------------------------------------------------------------------------
 * Error Box
 */

.error {
    width: 200px;
    height: 100px;

    display: grid;
    align-items: center;
    margin: auto;
    text-align: center;
    
    font-size: 16px;
    font-family: "Ibm Plex Mono", monospace;
    font-weight: 400; 
    font-style: normal;

    color: rgb(252, 252, 252);
    border: 1px solid rgb(252, 252, 252);
}

.error-container {
    width: 220px;
    height: 120px;

    display: grid;
    align-items: center;

    margin: auto;
    margin-top: 1.5rem;
    
    background: var(--accent-red);
    box-shadow: 2px 2px var(--shadow);
}

/* -----------------------------------------------------------------------------
 * Media Display Customizations
 */

/* Hide the nav buttons for print media. */
@media print {
    body {
        font-size: 16px;
    }
    
    nav {
        display: none;
    }
}

/* -----------------------------------------------------------------------------
 * Dark Theme
 */

@media (prefers-color-scheme: dark) {
    :root {
        --page: #000;
        --shadow: #000;
        --ink: #ccc;
        --highlight: #fff;
    }
}
