* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --link-color: #000000;
    --link-underline: #000000;
}

@media (prefers-color-scheme: dark) {
    :root:not(:has(#theme-light:checked)):not(:has(#theme-dark:checked)) {
        --bg-color: #000000;
        --text-color: #ffffff;
        --link-color: #ffffff;
        --link-underline: #ffffff;
    }
}

:root:has(#theme-light:checked) {
    --bg-color: #ffffff;
    --text-color: #000000;
    --link-color: #000000;
    --link-underline: #000000;
}

:root:has(#theme-dark:checked) {
    --bg-color: #000000;
    --text-color: #ffffff;
    --link-color: #ffffff;
    --link-underline: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root:has(#theme-system:checked) {
        --bg-color: #000000;
        --text-color: #ffffff;
        --link-color: #ffffff;
        --link-underline: #ffffff;
    }
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: 'Fira Code', 'Source Code Pro', 'IBM Plex Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    background-color: var(--bg-color);
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

header {
    margin-bottom: 3rem;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 1rem;
}

.theme-toggle input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.theme-toggle label {
    cursor: pointer;
    text-decoration: underline;
    color: var(--link-color);
    text-decoration-color: var(--link-underline);
    text-underline-offset: 4px;
}

.theme-toggle label:hover {
    text-decoration-thickness: 2px;
}

.theme-toggle input[type="radio"]:checked + label {
    text-decoration-thickness: 2px;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-underline-offset: 4px;
}

nav a:hover {
    text-decoration-thickness: 2px;
}

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

main {
    margin-bottom: 3rem;
}

section {
    margin-bottom: 3rem;
}

hr {
    border: none;
    border-top: 1px solid var(--text-color);
    margin: 3rem 0;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    line-height: 1.3;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

ul {
    list-style: none;
    margin-bottom: 1.5rem;
    margin-left: 0;
}

li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

li::before {
    content: '•';
    position: absolute;
    left: 0;
}

article {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--text-color);
}

article:last-child {
    border-bottom: none;
}

strong {
    font-weight: 600;
}

a {
    color: var(--link-color);
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-underline-offset: 4px;
}

a:hover {
    text-decoration-thickness: 2px;
}

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

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--text-color);
    font-size: 0.875rem;
}

footer p {
    margin-bottom: 0.5rem;
}

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

footer a {
    color: var(--link-color);
}

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    h3 {
        font-size: 1rem;
    }
}

