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

:root {
    --bg: #ffffff;
    --fg: #000000;
    --fg-muted: #555555;
    --border: #cccccc;
    --accent: #0000ee;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --fg: #ffffff;
        --fg-muted: #aaaaaa;
        --border: #444444;
        --accent: #6699ff;
    }
}

@media (prefers-color-scheme: light) {
    :root:has(#theme-toggle:checked) {
        --bg: #000000;
        --fg: #ffffff;
        --fg-muted: #aaaaaa;
        --border: #444444;
        --accent: #6699ff;
    }
}

@media (prefers-color-scheme: dark) {
    :root:has(#theme-toggle:checked) {
        --bg: #ffffff;
        --fg: #000000;
        --fg-muted: #555555;
        --border: #cccccc;
        --accent: #0000ee;
    }
}

html {
    background: var(--bg);
}

body {
    font-family: monospace;
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--fg);
    padding: 20px;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle {
    display: none;
}

.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    cursor: pointer;
    font-size: 18px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--fg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.theme-switch:hover {
    border-color: var(--fg);
}

.theme-switch::before {
    content: "\263E";
}

@media (prefers-color-scheme: dark) {
    .theme-switch::before {
        content: "\2600";
    }
}

#theme-toggle:checked ~ .theme-switch::before {
    content: "\2600";
}

@media (prefers-color-scheme: dark) {
    #theme-toggle:checked ~ .theme-switch::before {
        content: "\263E";
    }
}

main {
    text-align: center;
    max-width: 440px;
}

h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.intro {
    color: var(--fg-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

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

a:hover {
    text-decoration: underline;
}

nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

@media (max-width: 600px) {
    body {
        font-size: 14px;
        padding: 30px 15px;
    }

    h1 {
        font-size: 18px;
    }

    .theme-switch {
        top: 10px;
        right: 10px;
    }
}

@media print {
    .theme-switch {
        display: none;
    }
}
