@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --background: #181818;
    --surface: #222222;
    --surface-hover: #292929;
    --text: #eeeeee;
    --muted: #8d8d8d;
    --accent: #b85c62;
}

[data-theme="light"] {
    --background: #f4f3f1;
    --surface: #ffffff;
    --surface-hover: #eceae7;
    --text: #202020;
    --muted: #77736e;
    --accent: #a44950;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
    color: var(--text);
    font-family: "Plus Jakarta Sans", sans-serif;
    transition: background 0.2s, color 0.2s;
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    width: min(1080px, calc(100% - 48px));
    height: 40px;
    margin: 12px auto 0;
    padding: 3px 5px 3px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(14px);
}

.logo {
    font: 500 14px "DM Mono", monospace;
    letter-spacing: -0.04em;
}

.logo span {
    color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 3px;
}

nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

nav a {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--muted);
    font: 10px "DM Mono", monospace;
    transition: background 0.15s, color 0.15s;
}

nav a:hover {
    color: var(--text);
}

.theme-toggle {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.theme-toggle:hover {
    color: var(--text);
}

.theme-toggle svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.moon-icon {
    display: none;
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

main {
    width: min(900px, calc(100% - 48px));
    flex: 1;
    margin: 0 auto;
    padding: 65px 0 55px;
}

h1 {
    margin-bottom: 12px;
    font-size: clamp(40px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.description {
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

pre {
    padding: 24px;
    overflow-x: auto;
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    font: 11px/1.75 "DM Mono", monospace;
    white-space: pre-wrap;
}

footer {
    width: min(1080px, calc(100% - 48px));
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font: 10px "DM Mono", monospace;
    opacity: 0.65;
}

@media (max-width: 800px) {
    header {
        width: calc(100% - 36px);
    }

    nav a:nth-child(3),
    nav a:nth-child(4) {
        display: none;
    }
}

@media (max-width: 600px) {
    header,
    main,
    footer {
        width: calc(100% - 36px);
    }

    main {
        padding: 45px 0;
    }

    h1 {
        font-size: 42px;
    }

    pre {
        padding: 18px;
        font-size: 10px;
    }

    footer {
        height: 65px;
    }
}

@media (max-width: 480px) {
    header {
        width: calc(100% - 28px);
        height: 40px;
        margin-top: 12px;
        padding-left: 12px;
    }

    .header-right {
        gap: 0;
    }

    nav a {
        padding: 5px 8px;
        font-size: 9px;
    }

    nav a:nth-child(2) {
        display: none;
    }

    .theme-toggle {
        width: 28px;
        height: 28px;
    }

    main,
    footer {
        width: calc(100% - 28px);
    }
}