:root {
    color-scheme: light dark;
    --text-primary: oklch(0.3 0 0);
    --bg-primary: oklch(0.95 0 0);
}

[data-theme="dark"] {
    --text-primary: oklch(0.7 0 0);
    --bg-primary: oklch(0.05 0 0);
}

body {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;

    font-family: system-ui, sans-serif;

    color: var(--text-primary);
    background-color: var(--bg-primary);

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

    a:visited {
        color: var(--text-primary);
    }

    a:hover {
        color: var(--text-primary);
    }
}

header {
    h1 {
        margin: 0;
    }

    p {
        margin: 0;

        font-family: 'Brush Script MT', cursive;
        font-size: 1.25rem;
    }

    div {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    button {
        display: grid;
        place-items: center;

        inline-size: 2rem;
        block-size: 2rem;
        padding: 0;

        line-height: 1;

        border: 0;
        border-radius: 50%;
        background: transparent;

        cursor: pointer;
        transition: transform 150ms ease;

        @media (prefers-reduced-motion: no-preference) {
            &:hover {
                transform: rotate(20deg);
            }
        }

        &:focus-visible {
            outline: 1px solid var(--text-primary);
            outline-offset: 3px;
        }
    }
}

main {
    section h2 {
        text-transform: uppercase;
    }

    section:last-of-type {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
    }

    @media (max-width: 600px) {
        section:last-of-type {
            grid-template-columns: 1fr;
        }
    }

    section:last-of-type h2 {
        grid-column: 1 / -1;
    }

    section:last-of-type h3 {
        margin-block-start: 0;
    }
}

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;

    margin-block-start: 2rem;
    padding-block-start: 1rem;

    border-top: 1px solid var(--text-primary);
}
