@font-face {
    font-family: "Fira Code VF";
    src: url("/assets/fonts/FiraCode-VF/FiraCode-VF.woff2") format("woff2-variations"), url("/assets/fonts/FiraCode-VF/FiraCode-VF.woff") format("woff-variations");
    font-weight: 200 700;
    font-style: normal;
}

/* This is going to be quite long */
@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-ExtraLight.woff2") format("woff2");
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-ExtraLightItalic.woff2") format("woff2");
    font-weight: 200;
    font-style: italic;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-Light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-LightItalic.woff2") format("woff2");
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-MediumItalic.woff2") format("woff2");
    font-weight: 500;
    font-style: italic;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-SemiBoldItalic.woff2") format("woff2");
    font-weight: 600;
    font-style: italic;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: "FiraGO";
    src: url("/assets/fonts/FiraGO/FiraGO-ExtraBoldItalic.woff2") format("woff2");
    font-weight: 800;
    font-style: italic;
}

:root {
    --accent: hsl(287, 50%, 59%);
    --accent-2: light-dark(hsl(287, 50%, 39%), hsl(287, 50%, 79%));
    --background: light-dark(hsl(302, 69%, 95%), hsl(302, 69%, 10%));
    --background-2: light-dark(hsl(302, 69%, 90%), hsl(302, 69%, 5%));
    --foreground: light-dark(hsl(302, 69%, 10%), hsl(302, 69%, 95%));
    --success: hsl(110, 50%, 59%);
    --warn: hsl(30, 50%, 59%);
    --error: hsl(0, 50%, 59%);

    --radius: 12px;
}

body {
    color-scheme: light dark;

    /* Display */
    margin: 0;
    padding: 0;

    /* Colors */
    background-color: var(--background);
    color: var(--foreground);

    font-family: "FiraGO", sans-serif;
}

article:first-of-type,
main:first-of-type {
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
    max-width: 768px;
}

nav {
    margin-left: auto;
    margin-right: auto;
    max-width: 768px;
}

nav .links {
    font-size: small;
}

h1 {
    font-size: xx-large;
    font-weight: bolder;
}

h2 {
    font-size: x-large;
    font-weight: bold;
}

h3 {
    font-size: large;
    font-weight: bold;
}

h4 {
    font-size: medium;
    font-weight: bold;
}

h5 {
    font-size: medium;
    font-weight: bold;
}

h6 {
    font-size: medium;
    font-weight: bold;
}

article {
    counter-reset: h2 0;
}

/*article h2 {*/
/*    counter-increment: h2 1;*/
/*    counter-reset: h3 0;*/
/*}*/

/*article h2::before {*/
/*    content: counter(h2) ". ";*/
/*}*/

/*article h3 {*/
/*    counter-increment: h3 1;*/
/*    counter-reset: h4 0;*/
/*}*/

/*article h3::before {*/
/*    content: counter(h2) "." counter(h3) ". ";*/
/*}*/

/*article h4 {*/
/*    counter-increment: h4 1;*/
/*    counter-reset: h5 0;*/
/*}*/

/*article h4::before {*/
/*    content: counter(h2) "." counter(h3) "." counter(h4) ". ";*/
/*}*/

/*article h5 {*/
/*    counter-increment: h5 1;*/
/*    counter-reset: h6 0;*/
/*}*/

/*article h5::before {*/
/*    content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". ";*/
/*}*/

/*article h6 {*/
/*    counter-increment: h6 1;*/
/*}*/

/*article h6::before {*/
/*    content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "." counter(h6) ". ";*/
/*}*/

a {
    padding-left: 0.15em;
    padding-right: 0.15em;
    color: var(--accent);
    text-underline-offset: 0.15rem;
}

a[target="_blank"]:not(:has(>img))::after {
    content: "↗";
    display: inline-block;
}

a:visited {
    color: var(--accent-2);
}

a:not(:has(>img)):hover {
    background-color: var(--accent);
    color: var(--background);
    text-decoration: none;
}

a:not(:has(>img)):visited:hover {
    background-color: var(--accent-2);
}

dt::after {
    content: ": ";
}

img,
video {
    max-width: 100%;
    height: auto;
}

blockquote>:not(footer):first-of-type::before {
    content: open-quote;
    color: var(--accent);
    font-weight: 800;
}

blockquote>:not(footer):last-of-type::after {
    content: close-quote;
    color: var(--accent);
    font-weight: 800;
}

blockquote footer::before {
    content: "— ";
}

code {
    padding-left: 0.15em;
    padding-right: 0.15em;
    background-color: var(--background-2);
    font-family: "Fira Code VF", monospace;
}

pre code {
    display: block;
    width: 100%;
    padding: 0.5rem;
    overflow-x: scroll;

    background-color: #1a1b26;
    color: #c0caf5;
    border: 1px solid #c0caf5;
}

/* Code highlighting */
.language-html,
.language-md {
    color: #9aa5ce;
}

.token.keyword,
.token.tag {
    color: #f7768e;
}

.token.boolean,
.token.number {
    color: #ff9e64;
}

.token.parameter,
.regex-source {
    color: #e0af68;
}

.token.string,
.token.selector {
    color: #9ece6a;
}

.token.property,
.token.regex-flags,
.token.title {
    color: #7dcfff;
}

.token.literal-property,
.token.url {
    color: #73daca;
}

.token.function {
    color: #7aa2f7;
}

.token.operator,
.token.attr-name {
    color: #bb9af7;
}

.token.constant,
.token.environment,
.token.class-name {
    color: #c0caf5;
}

.token.comment {
    color: #565f89;
    font-style: italic;
}

details {
    border-left: 2px solid var(--accent-2);
}

details[open] {
    padding-bottom: 1px;
}

details+details {
    margin-top: 0.5em;
}

details>* {
    margin-left: 2em;
}

details>summary {
    margin-left: 0;
    padding: 0.5em;
    width: fit-content;
    cursor: pointer;

    background-color: var(--accent-2);
    color: var(--background);
}

kbd {
    padding-left: 0.5em;
    padding-right: 0.5em;

    background-color: var(--background-2);
    border-radius: var(--radius);
}

mark {
    padding-left: 0.25em;
    padding-right: 0.25em;

    background-color: var(--accent);
    color: var(--background);
}

button,
input[type="submit"] {
    padding: 0.5em 1em;

    background-color: var(--accent-2);
    color: var(--background);
    border: none;
    border-radius: var(--radius);
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

button[disabled],
input[type="submit"][disabled] {
    opacity: 0.6;
}

input[type="text"] {
    padding: 0.5em;

    outline: none;
    background-color: var(--background-2);
    color: var(--foreground);
    border: 1px solid var(--foreground);
    border-radius: var(--radius);
}

input[type="text"]:focus {
    border-color: var(--accent);
}

td,
th {
    padding: 0.25em;
}

table {
    display: block;
    max-width: 100%;
    overflow-x: scroll;
}

table.rows tbody tr {
    background-color: var(--background-2);
}

table.rows tbody tr:nth-child(2n) {
    background-color: transparent;
}

.table-y {
    background-color: var(--success);
    color: black;
}

.table-p {
    background-color: var(--warn);
    color: black;
}

.table-n {
    background-color: var(--error);
    color: black;
}

.icon-link>a,
.icon-link>span {
    padding-left: 0.15rem;
    line-height: 2em;
}

.icon-link>img {
    display: inline-block;
    width: 2em;
    max-height: 2em;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.notice {
    display: block;
    padding: 0.5rem;

    border: 2px dashed var(--warn);
}

.notice::before {
    content: "🛈 Notice";
    color: var(--warn);
    font-size: larger;
    font-weight: bolder;
}

.notice>p:first-child {
    margin-top: 0;
}

.notice>p:last-child {
    margin-bottom: 0;
}

.upper {
    text-transform: uppercase;
}

::selection {
    background-color: var(--accent);
    color: var(--background);
}

@media (prefers-color-scheme: dark) {
    .icon-link>img.invert {
        filter: hue-rotate(180deg) invert();
    }
}