html,
body {
    margin: 0;
    padding: 0;
}
* {
    box-sizing: border-box;
}
body {
    background-color: #0d1016;
    color: #fff;
    font-family: system-ui, sans-serif;
}
a {
    color: inherit;
}
header,
main,
footer {
    max-width: 1024px;
    margin: 0 auto;
}

header {
    background-color: #000;
    padding: 1.5em 2em;
    border-bottom-left-radius: 1em;
    border-bottom-right-radius: 1em;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
}
header p.site {
    font-size: 1.5em;
    margin-bottom: 0.2em;
}
header p.site span {
    color: #96d636;
}
header p {
    margin: 0;
}
nav {
    display: flex;
    gap: 1em;
}

main {
    padding: 1.5em 2em;
    line-height: 1.5;
}
main p {
    margin: 0.8em 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 1.5em 0 0 0;
    line-height: 1.2;
}
main :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
}
h1 {
    font-size: 1.9em;
}
h2 {
    font-size: 1.45em;
}
h3 {
    font-size: 1.2em;
}
h4,
h5,
h6 {
    font-size: 1em;
}

main a {
    color: #96d636;
    text-decoration: none;
}
main a:hover {
    text-decoration: underline;
}

/* Markdown elements */
strong {
    font-weight: 600;
}
em {
    font-style: italic;
}
small {
    font-size: 0.85em;
}

ul,
ol {
    margin: 0.8em 0;
    padding-left: 1.5em;
}
li {
    margin: 0.3em 0;
}
li > ul,
li > ol {
    margin: 0.3em 0;
}

blockquote {
    margin: 1em 0;
    padding: 0.2em 1em;
    border-left: 3px solid #96d636;
    background-color: #161b22;
    color: #c8d1da;
    border-radius: 0 0.4em 0.4em 0;
}
blockquote p {
    margin: 0.5em 0;
}

code {
    font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    font-size: 0.9em;
    background-color: #000;
    padding: 0.15em 0.4em;
    border-radius: 0.3em;
}
pre {
    background-color: #000;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    line-height: 1.4;
    border: 1px solid #21262d;
    font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
    font-size: 0.85em;
}
pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}
/* default colour for tokens the highlighter does not classify */
pre.codeblock code {
    color: #d3d0c8;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5em;
}

hr {
    border: none;
    border-top: 1px solid #21262d;
    margin: 2em 0;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    font-size: 0.95em;
}
th,
td {
    border: 1px solid #21262d;
    padding: 0.5em 0.8em;
    text-align: left;
}
th {
    background-color: #161b22;
}

/* Article header (single article page) */
.article-header {
    margin-top: -1.5rem;
    margin-bottom: 2em;
    padding-bottom: 1.2em;
    border-bottom: 1px solid #21262d;
}
.article-header h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 650;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.dates {
    margin: 0.7em 0 0 0;
    font-size: 0.8em;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6e7681;
}
.dates .date {
    display: block;
}
.dates .date + .date {
    margin-top: 0.25em;
}

/* Articles overview list */
.article-list {
    list-style: none;
    padding: 0;
    margin: 2em 0 0 0;
}
.article-list li {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 1em;
    padding: 1em 0;
    border-top: 1px solid #21262d;
}
.article-list li:last-child {
    border-bottom: 1px solid #21262d;
}
.article-list a {
    font-size: 1.15em;
    font-weight: 550;
    color: #e8edf2;
}
.article-list a:hover {
    color: #96d636;
    text-decoration: none;
}
.article-list .date {
    white-space: nowrap;
    font-size: 0.78em;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6e7681;
}

figure {
    margin: 1.5em auto;
    width: auto;
}
figure video,
figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.5em;
}
figcaption {
    margin-top: 0.5em;
    font-size: 0.9em;
    color: #8b949e;
    text-align: center;
}

@media (max-width: 600px) {
    .article-list li {
        flex-direction: column;
        gap: 0.25em;
    }
}

.date {
    color: #6e7681;
}

footer {
    padding: 2em;
    background-color: #000;
    border-radius: 1em;
    font-size: 0.9em;
}
footer a {
    display: inline-flex;
    flex-direction: row;
    gap: 0.1em;
}
footer a img {
    width: 1.1em;
    aspect-ratio: 1;
}

@media (max-width: 1024px) {
    header {
        border-radius: 0;
        flex-direction: column;
        align-items: flex-start;
        padding: 1.2em 1.5em;
    }
    main {
        padding: 1em 1.5em;
    }
    footer {
        padding: 1.2em 1.5em;
        font-size: 0.8em;
    }
    header p.subtitle {
        font-size: 0.8em;
    }
    header.article-header {
        margin-top: -1rem;
    }
    header.article-header h1 {
        font-size: 1.7rem;
    }
    nav {
        margin-top: 0.5em;
    }

    footer {
        border-radius: 0;
    }
}
