/* Fira Code: https://github.com/tonsky/FiraCode */
@import url('https://cdn.staticdelivr.com/gfonts/css2?family=Fira+Code:wght@300..700&display=swap');

/* fira-sans-latin-400-normal */
@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url(https://cdn.jsdelivr.net/fontsource/fonts/fira-sans@latest/latin-400-normal.woff2) format('woff2'),
        url(https://cdn.jsdelivr.net/fontsource/fonts/fira-sans@latest/latin-400-normal.woff) format('woff');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* roboto-mono-latin-wght-normal */
@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-display: swap;
    font-weight: 100 700;
    src: url(https://cdn.jsdelivr.net/fontsource/fonts/roboto-mono:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --background: #fafaf8;
    --foreground: #232333;
    --accent: #232333;
    --radius: 0;
    --font-size: 15px;
    --line-height: 1.54em;
}

html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Fira Sans", sans-serif;
    font-size: var(--font-size);
    font-weight: 400;
    line-height: var(--line-height);
    background-color: var(--background);
    color: var(--foreground);
    text-rendering: optimizeLegibility;
    font-variant-ligatures: contextual;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    margin: 0;
    padding: 0;
}

h1 {
    font-family: "Roboto Mono", monospace;
    font-size: 1.2rem;
    letter-spacing: 0;
}

h2 {
    font-size: calc(var(--font-size) * 1.35);
    letter-spacing: 0;
}

h3 {
    font-size: calc(var(--font-size) * 1.15);
    letter-spacing: 0;
}

h4,
h5,
h6 {
    font-size: calc(var(--font-size) * 1);
    letter-spacing: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
img,
figure,
video,
table {
    margin: 25px 0;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Roboto Mono", monospace;
}

body {
    font-family: "Fira Sans", sans-serif;
}

button {
    position: relative;
    font: inherit;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    background: transparent;
    color: var(--accent);
    padding: 5px 18px;
    border: 4px solid var(--accent);
    border-radius: var(--radius);
    transition: background 0.15s linear;
    appearance: none;
    cursor: pointer;
    outline: none;
}

button:hover {
    background: color-mix(in srgb, var(--accent) 15%, transparent);
}

button:focus-visible,
a:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

fieldset {
    display: inline-block;
    border: 2px solid var(--foreground);
    border-radius: calc(var(--radius) * 1.6);
    padding: 10px;
}

fieldset *:first-child {
    margin-top: 0;
}

fieldset input,
fieldset select,
fieldset textarea,
fieldset label,
fieldset button {
    margin-top: calc(var(--line-height) * 0.5);
    width: 100%;
}

label {
    display: inline-block;
}

label input {
    margin-top: 0;
}

input,
textarea,
select {
    background: transparent;
    color: var(--foreground);
    border: 1px solid var(--foreground);
    border-radius: var(--radius);
    padding: 10px;
    font: inherit;
    appearance: none;
}

input[type="checkbox"] {
    width: auto;
}

input:focus-visible,
input:active,
textarea:focus-visible,
textarea:active,
select:focus-visible,
select:active {
    border-color: var(--accent);
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

input:active,
textarea:active,
select:active {
    box-shadow: none;
}

select {
    background-image: linear-gradient(45deg,
            transparent 50%,
            var(--foreground) 50%),
        linear-gradient(135deg, var(--foreground) 50%, transparent 50%);
    background-position: calc(100% - 20px), calc(100% - 15px);
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

select option {
    background: var(--background);
}

input[type="checkbox"],
input[type="radio"] {
    vertical-align: middle;
    padding: 10px;
    box-shadow: inset 0 0 0 3px var(--background);
}

input[type="radio"] {
    display: inline-block;
    width: 10px !important;
    height: 10px !important;
    border-radius: 20px;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--accent);
}

img {
    display: block;
    max-width: 100%;
    border: 8px solid var(--accent);
    border-radius: var(--radius);
    padding: 8px;
    overflow: hidden;
}

figure img,
figure video {
    margin-bottom: 0;
}

figure figcaption {
    background: var(--accent);
    color: var(--background);
    text-align: center;
    font-size: 1em;
    font-weight: normal;
    margin-top: -8px;
    border-radius: 0 0 var(--radius) var(--radius);
}

ul,
ol {
    margin-left: 4ch;
    padding: 0;
}

ul ul,
ul ol,
ol ul,
ol ol {
    margin-top: 0;
}

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

ul li,
ol li {
    position: relative;
}

code,
kbd {
    font-family:
        "Fira Code",
        "JetBrains Mono",
        Monaco,
        Consolas,
        Ubuntu Mono,
        monospace !important;
    font-feature-settings: normal;
    background: color-mix(in srgb, var(--foreground) 5%, transparent);
    color: color-mix(in srgb, var(--foreground) 5%, var(--accent));
    padding: 0 6px;
    margin: 0 2px;
    font-size: 0.95em;
}

code {
    border: 1px solid color-mix(in srgb, var(--foreground) 25%, transparent);
}

kbd {
    border-top: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
    border-left: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
    border-bottom: 4px solid var(--accent);
    border-radius: 4px;
}

code code {
    background: transparent;
    padding: 0;
    margin: 0;
}

pre {
    tab-size: 4;
    background: color-mix(in srgb, var(--foreground) 5%, transparent) !important;
    color: color-mix(in srgb, var(--foreground) 5%, var(--accent));
    padding: 20px 10px;
    font-size: 0.95em !important;
    overflow: auto;
    border-radius: var(--radius);
    border: 1px solid color-mix(in srgb, var(--foreground) 25%, transparent);
}

pre code {
    background: none !important;
    margin: 0;
    padding: 0;
    font-size: inherit;
    border: none;
}

sup {
    line-height: 0;
}

abbr {
    position: relative;
    text-decoration-style: wavy;
    text-decoration-color: var(--accent);
    cursor: help;
}

sub {
    bottom: -0.25em;
}

sup {
    top: -0.25em;
}

mark {
    background: color-mix(in srgb, var(--accent) 45%, transparent);
    color: var(--foreground);
}

blockquote {
    position: relative;
    border-top: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    margin: 0;
    padding: 25px;
}

blockquote:before {
    content: ">";
    display: block;
    position: absolute;
    left: 0;
    color: var(--accent);
}

blockquote p:first-child {
    margin-top: 0;
}

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

table {
    table-layout: auto;
    border-collapse: collapse;
}

table,
th,
td {
    border: 2px solid var(--foreground);
    padding: 10px;
}

th {
    border-style: solid;
    color: var(--foreground);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

hr {
    width: 100%;
    border: none;
    background: var(--accent);
    height: 2px;
}

/* Bold elements */

h1,
h2,
h3,
h4,
h5,
h6,
b,
strong,
th,
button {
    font-weight: 600;
}

/* ── Logo ── */

.logo {
    background: var(--background);
    color: var(--foreground);
    padding: 0;
    font-weight: bold;
    font-size: 18px;
    display: inline-block;
    border-right: none;
}

.logo a {
    text-decoration: none;
}

.logo:hover {
    background: var(--foreground);
    color: var(--background);
}

.logo__cursor {
    display: none;
}

/* ── Post ── */

.post-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-title::after {
    display: none;
}

.post-tags {
    display: none;
}

/* ── Header ── */

header.custom-header {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin: 1em 0;
    line-height: 2.5em;
    width: 100%;
}

header.custom-header .main {
    display: flex;
    flex-direction: column;
}

header.custom-header nav {
    display: flex;
    align-items: center;
    align-self: flex-start;
    padding-top: 0.5em;
}

header.custom-header nav a+a {
    margin-left: 1em;
}

header.custom-header .main a,
header.custom-header nav a {
    text-decoration: none;
    padding: 0.2em 0.4em;
    transition: background 0.2s, color 0.2s;
}

header.custom-header nav a:hover {
    background-color: black;
    color: white;
}

header.custom-header .main .subtitle {
    margin: 0;
    font-size: 0.85em;
    line-height: 1.4;
    opacity: 0.7;
}

header.custom-header .main a {
    padding: 0;
    font-size: 20px;
}

.footer {
    padding: 10px 0 !important;
}

.footer .copyright {
    font-size: 15px;
    color: var(--foreground);
    justify-content: start;
}

.list-item .title {
    font-size: var(--font-size);
    font-weight: 600;
    margin: 0 0 0.2em 0;
}

.list-item .title::before,
.list-item .title a::before,
.list-item .title::after,
.list-item .title a::after {
    content: none !important;
}

.list-item time {
    display: block;
    margin: 0;
    font-size: 0.85em;
    opacity: 0.6;
}

.list-item .description {
    margin: 0.2em 0 0.4em;
}

.list-item {
    margin-bottom: 2.5em;
}

.post-content {
    margin-top: 10px;
}

.post-content p {
    margin: 12px 0;
}

.post-title {
    margin-bottom: 0 !important;
}

blockquote::before {
    content: "" !important;
}

blockquote {
    border-top: none !important;
    border-bottom: none !important;
    border-left: 3px solid var(--accent) !important;
    padding: 0 0 0 1.5rem !important;
    margin: 0 !important;
    color: #737373 !important;
}

blockquote ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.post-content img {
    max-width: 40%;
}

.pagination {
    display: none !important;
}

.terms ul li:not(:empty)::before {
    content: "🏷 " !important;
    position: absolute;
    left: -20px;
    color: var(--accent);
}

.terms ul li a {
    text-decoration: none;
}

.post-tags {
    display: block !important;
    visibility: visible !important;
}

.posts .post-tags {
    display: none !important;
}
