@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;
    --string: #d09a9d;
    --boolean: #b09bc2;
    --number: #a8b5c2;
}

[data-theme="light"] {
    --background: #f4f3f1;
    --surface: #ffffff;
    --surface-hover: #eceae7;
    --text: #202020;
    --muted: #77736e;
    --accent: #a44950;
    --string: #a45156;
    --boolean: #806692;
    --number: #617485;
}

* {
    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(1080px, calc(100% - 48px));
    flex: 1;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero {
    width: 100%;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 70px;
    padding: 35px 0 60px;
}

.hero-content {
    max-width: 480px;
}

h1 {
    margin-bottom: 22px;
    font-size: clamp(52px, 6vw, 76px);
    line-height: 0.94;
    letter-spacing: -0.065em;
}

h1 span {
    color: var(--muted);
}

.hero-content p {
    max-width: 430px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.buttons {
    display: flex;
    gap: 9px;
    margin-top: 30px;
}

.button {
    padding: 11px 18px;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.button:hover {
    background: var(--surface);
    color: var(--text);
}

.button.primary {
    background: var(--accent);
    color: #fff;
}

.button.primary:hover {
    background: #a95158;
}

.preview {
    background: var(--surface);
    border-radius: 10px;
    overflow: hidden;
}

.preview-header {
    height: 44px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font: 11px "DM Mono", monospace;
}

.preview-header span:last-child {
    opacity: 0.55;
}

pre {
    padding: 22px 24px 26px;
    color: var(--text);
    font: 13px/1.9 "DM Mono", monospace;
    overflow-x: auto;
}

.key {
    color: var(--text);
}

.string {
    color: var(--string);
}

.boolean {
    color: var(--boolean);
}

.number {
    color: var(--number);
}

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;
    }

    main {
        width: calc(100% - 36px);
        display: block;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 42px;
        padding: 55px 0 35px;
    }

    .hero-content {
        max-width: 600px;
    }

    h1 {
        font-size: clamp(48px, 12vw, 66px);
    }

    .preview {
        width: 100%;
    }

    footer {
        width: calc(100% - 36px);
        height: 65px;
    }
}

@media (max-width: 480px) {
    header {
        width: calc(100% - 28px);
        min-height: 54px;
        margin-top: 12px;
        padding: 4px 5px 4px 13px;
    }

    .header-right {
        gap: 0;
    }

    nav a {
        padding: 7px 9px;
        font-size: 10px;
    }

    nav a:nth-child(2) {
        display: none;
    }

    .theme-toggle {
        width: 30px;
        height: 30px;
    }

    main {
        width: calc(100% - 28px);
    }

    .hero {
        gap: 32px;
        padding: 42px 0 28px;
    }

    h1 {
        margin-bottom: 18px;
        font-size: 46px;
    }

    .hero-content p {
        font-size: 14px;
        line-height: 1.7;
    }

    .buttons {
        margin-top: 24px;
    }

    .button {
        flex: 1;
        text-align: center;
    }

    .preview-header {
        padding: 0 14px;
    }

    pre {
        padding: 18px 15px 21px;
        font-size: 11px;
        line-height: 1.8;
    }

    footer {
        width: calc(100% - 28px);
        height: 55px;
    }
}