:root {
    --font-family: -apple-system, system-ui, sans-serif;
    --font-family-monospace: Liberation Mono, DejaVu Sans Mono, Lucida Console, monospace;
}

:root {
    --background-color: #94B1FF;
    --text-color: #000000;
    --text-color-link: #ffcccc;
    --text-color-link-active: #ff3366;
    --text-color-link-visited: #003399;
    --line-color: #ffffff;
    --syntax-tab-size: 2;
}

* {
    box-sizing: border-box;
}

@view-transition {
    navigation: auto;
}

html,
body {
    padding: 0;
    margin: 0 auto;
    font-family: var(--font-family);
    font-size: 1.125rem;
    color: var(--text-color);
    background-color: var(--background-color);
}

html {
    overflow-y: scroll;
}

body {
    max-width: min(50rem, 100vw - 2rem);
    margin: auto;
}

/* Header */

.main-header {
    display: flex;
    border-bottom: 1px dashed var(--line-color);
    gap: 1em;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1em;
}

.home-link {
    font-size: 1.25em;
    flex-grow: 1;
    font-weight: 700;
}

a:active.home-link,
a:visited.home-link {
    color: var(--text-color);
}

.nav {
    display: flex;
    gap: .5em 1em;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-item {
    display: inline-block;
}

.nav a[aria-current="page"] {
    text-decoration: underline;
}

/* Main */

main {
    padding: 1rem;
    margin-top: 1rem;
}

main :first-child {
    margin-top: 0;
}

/* Footer */

.main-footer {
    padding: 1rem;
    margin: 1rem;
}

.main-footer p {
    font-size: 0.75rem;
    color: var(--line-color);
    text-align: center;
    margin: 0.5em 0;
}

/* Content */

p:last-child {
    margin-bottom: 0;
}

p {
    line-height: 1.5;
}

li {
    line-height: 1.5;
}

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

a:visited {
    color: var(--text-color-link-visited);
}

a:hover,
a:active {
    color: var(--text-color-link-active);
    text-decoration: underline;
}

table {
    margin: 1em 0;
}

table td,
table th {
    padding-right: 1em;
}

pre,
code {
    font-family: var(--font-family-monospace);
}

pre:not([class*="language-"]) {
    margin: .5em 0;
    line-height: 1.375;
    -moz-tab-size: var(--syntax-tab-size);
    -o-tab-size: var(--syntax-tab-size);
    tab-size: var(--syntax-tab-size);
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;
    direction: ltr;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    overflow-x: auto;
}

code {
    word-break: break-all;
}

hr {
    border-width: 1px 0 0 0;
    border-color: var(--line-color);
    border-style: dashed;
}

blockquote {
    border-left: 1px dashed var(--line-color);
    padding-left: 1em;
    margin-left: 1em;
    margin-right: 2em;
    font-style: italic;
}

/* Posts */

.post-header {
    margin-bottom: 2em;
}

.post-title {
    margin-bottom: 0.25em;
}

.post-date {
    margin-top: 0;
    font-style: italic;
}

.post-list {
    list-style: none;
}

.post-list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    margin: 0.5em;
}

.post-list-item time {
    font-size: 0.8em;
    margin-right: 1em;
    text-wrap-mode: nowrap;
    font-style: italic;
}

.post-list-item a {
    font-size: 1em;
    font-weight: 700;
    text-underline-position: from-font;
    text-underline-offset: 0;
    text-decoration-thickness: 1px;
}

.post-footer {
    margin-top: 2em;
}

/* Tags */

.post-tags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .5em;
    list-style: none;
    padding: 0;
    margin-top: 2em;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.post-tag::before {
    content: "#";
}

/* Syntax highlighting based on prism.js tomorrow theme */

code[class*="language-"],
pre[class*="language-"] {
    color: #ccc;
    background: none;
    font-family: var(--font-family-monospace);
    font-size: 0.9em;
    text-align: left;
    white-space: pre;
    word-spacing: normal;
    word-break: normal;
    word-wrap: normal;
    line-height: 1.5;

    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;

    -webkit-hyphens: none;
    -moz-hyphens: none;
    -ms-hyphens: none;
    hyphens: none;

}

pre[class*="language-"] {
    padding: 1em;
    margin: .5em 0;
    overflow: auto;
}

:not(pre)>code[class*="language-"],
pre[class*="language-"] {
    background: #2d2d2d;
}

:not(pre)>code[class*="language-"] {
    padding: .1em;
    border-radius: .3em;
    white-space: normal;
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #999;
}

.token.punctuation {
    color: #ccc;
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
    color: #e2777a;
}

.token.function-name {
    color: #6196cc;
}

.token.boolean,
.token.number,
.token.function {
    color: #f08d49;
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
    color: #f8c555;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
    color: #cc99cd;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
    color: #7ec699;
}

.token.operator,
.token.entity,
.token.url {
    color: #67cdcc;
}

.token.important,
.token.bold {
    font-weight: bold;
}

.token.italic {
    font-style: italic;
}

.token.entity {
    cursor: help;
}

.token.inserted {
    color: green;
}