@font-face {
    font-family: FiraSans;
    font-style: normal;
    font-display: swap;
    font-weight: normal;
    src: url(../fonts/FiraSans-Regular.woff2);
}

@font-face {
    font-family: FiraSans;
    font-style: normal;
    font-display: swap;    
    font-weight: bold;
    src: url(../fonts/FiraSans-Bold.woff2);
}

@font-face {
    font-family: FiraCode;
    font-style: normal;
    font-display: swap;
    font-weight: normal;
    src: url(../fonts/FiraCode-Regular.woff2);
}

@font-face {
    font-family: FiraCode;
    font-style: normal;
    font-display: swap;
    font-weight: bold;
    src: url(../fonts/FiraCode-Bold.woff2);
}

:root {
    --fg: #222;
    --bg: #fdfcfa;
    --accent: #7f5ab6;
    --accent-alt: #f2eff8;
    --grey: #aaa;
    --border-radius: 4px;
    --font-main: FiraSans, sans-serif;
    --font-mono: FiraCode, monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fg: #aaa;
        --bg: #000;
        --accent-alt: #2c1f40;
    }
    h1, h2 {
        color: #fff;
    }
}

::selection {
    color: var(--bg);
    background-color: #b9a4d7;
}

html {
    font-family: var(--font-main);
    font-size: 12pt;
    line-height: 1.6;
}

body {
    max-width: 44em;
    margin: 0 auto;
    padding: 0 1.6em 6em;
    color: var(--fg);
    background-color: var(--bg);
}

h1, h2 {
    font-family: var(--font-mono);
    font-weight: normal;
    margin: 2.5em 0 0.25em 0;
    line-height: 1.4;
}

h1 {
    font-size: 2.2em;
}

h2 {
    font-size: 1.5em;
}

.date {
    font-family: var(--font-mono);
    color: var(--accent);
    padding: 0.5em 0 3em 0;
    line-height: 0;
}

header {
    margin: 0 auto;
    padding: 1em 0;
    position: sticky;
    top: 0;
    background-color: var(--bg);

}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
}

nav li {
    display: inline;
    margin: 0 0.1em;
}

nav li a {
    display: inline-block;
    width: 3.5em;
    padding: 0.2em 0.75em;    
    color: var(--fg);
    background-color: var(--accent-alt);
    border: 1px solid var(--accent);
    border-radius: var(--border-radius);
}

nav li a:hover {
    color: var(--bg);
    background-color: var(--accent);    
}

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

a:hover {
    color: var(--bg);
    background-color: var(--accent);
}

ul {
    list-style: '◉ ';
    margin: 0;
    padding-left: 1.5em;
}

ul.no-bullets {
    list-style: none;
    padding-left: 0;
    line-height: 1.8;
}

ul.no-bullets time {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--fg);
}

ul.no-bullets time::after {
    content: " – ";
}

ul.no-bullets a:hover time {
    color: inherit;
}

ul li::marker,
ol li::marker {
    color: var(--grey);
}

pre, p code{
    background-color: var(--accent-alt);
    border: 1px solid var(--accent);
    border-radius: var(--border-radius);
}

pre {
    padding: 1em 1.5em;
    overflow-x: scroll;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

p code {
    padding: 0 0.15em;
    margin: 0 0.15em;
}

img {
    width: 100%;
}

figure {
    margin: 0;
}

figcaption {
    width: 67%;
    margin-bottom: 3em;
    color: var(--grey);
}

.table-container {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--accent);
    border-radius: var(--border-radius);
}

table {
    border-collapse: collapse;
}

td, th {
    text-align: left;
    white-space: nowrap;
    padding: 0.15em 0.5em;
    border: 1px solid var(--accent);
}

tr:nth-child(even) {
    background-color: var(--accent-alt);
}

/* Border yank */
table tr:first-child th {
  border-top: 0;
}
table tr:last-child td {
  border-bottom: 0;
}
table tr td:first-child,
table tr th:first-child {
  border-left: 0;
}
table tr td:last-child,
table tr th:last-child {
  border-right: 0;
}
