* {
    box-sizing: border-box;
    transition: background 500ms ease;
}

html:not(.transitions-enabled) * {
    transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

html {
    font-size: 18px;
}

body {
    display: flex;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--var-text-color);
    background: var(--var-page-background);
}

.theme-toggle {
    position: fixed;
    left: 2rem;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: linear-gradient(
            to bottom,
            #040404 50%,
            #fff 50%
    ) padding-box,
    linear-gradient(
            to bottom,
            #444444 50%,
            #e5e5e5 50%
    ) border-box;
    border: 2px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    transition: transform 500ms ease;
}

.theme-toggle .icon {
    width: 2rem;
    height: 4rem;
}

.sun {
    fill: #f5b700;
}

.moon {
    fill: #ddd;
}

.moon-cutout {
    fill: #040404;
}

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

.post-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: var(--var-meta-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.more-posts {
    margin-top: 1rem;
}

.page {
    min-height: 100vh;
    padding: 1rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    margin: auto;
}

nav {
    font-size: medium;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    background: var(--var-container-background);
    max-width: 42rem;
    width: 100%;
    padding: 2.5rem 2.75rem;
    border: 1px solid var(--var-container-border-color);
    border-radius: 0.5rem;
}

article h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
    line-height: 1.25;
}

article h2 {
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    line-height: 1.3;
}

article h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

article p {
    margin: 1rem 0;
}

article p:has(img) {
    display: flex;
    flex-direction: row;
    gap: 1em;
}

article ul,
article ol {
    padding-left: 1.5rem;
}

article li {
    margin: 0.5rem 0;
}

.meta {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--var-meta-color);
}

.meta span[title] {
    cursor: default;
    text-decoration: underline;
    text-decoration-style: dashed;
}

article pre {
    background: var(--var-code-background);
    padding: 1rem;
    overflow-x: auto;
    border-radius: 0.25rem;
}

article code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}

article img {
    max-width: 100%;
    min-width: 0;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

.post-nav {
    display: flex;
    justify-content: space-between;
}

.post-nav a {
    max-width: 45%;
    text-decoration: none;
}

.post-nav a:hover {
    text-decoration: underline;
}

.post-nav .prev {
    text-align: left;
}

.post-nav .next {
    text-align: right;
}

@media (max-width: 600px) {
    html {
        font-size: 17px;
    }

    article {
        padding: 1.5rem;
    }
}
