
html {
    height: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--menu-height);
}

body {
    font-family: var(--font-family-main);
    font-size: var(--font-size);
    font-weight: 400;
    line-height: 1.55;
    color: var(--color-text);
    background: var(--color-bg);
    padding: 0;
    margin: 0;
    height: max-content;
    -webkit-font-smoothing: antialiased;
}

/* An element that keeps its own theme paints its own colors */
body [data-theme] {
    color: var(--color-text);
    background: var(--color-bg);
}

h1, h2, h3, h4 {
    font-family: var(--font-family-main);
    line-height: 1.1;
    font-weight: var(--titles-font-weight);
    letter-spacing: var(--titles-letter-spacing);
    color: var(--color-text-strong);
    margin: 0;
}

h1 {
    font-size: clamp(44px, 6.6vw, 92px);
    line-height: .95;
    letter-spacing: var(--titles-font-big-letter-spacing);
    text-wrap: balance;
}

h2 {
    font-size: clamp(30px, 3.6vw, 48px);
    line-height: 1.02;
    text-wrap: balance;
}

h3 {
    font-size: 24px;
    letter-spacing: -0.02em;
}

a {
    color: currentColor;
    transition: color var(--transition-animation-ms);
    text-underline-position: under;
    text-decoration-thickness: 1px;

    &:hover {
        color: var(--color-accent-text);
    }
}

b {
    font-weight: 600;
    color: var(--color-text-strong);
}

ul {
    margin: 0;
    list-style-type: "- ";

    > li {
        margin-bottom: .5em;
    }
}

ol {
    padding-left: 4em;

    @media all and (max-width: 600px) {
        padding-left: 2em;
    }

    > li {
        margin-bottom: .5em;
    }
}

ul.plain {
    padding: 0;
    list-style-type: none;
}

ul.blocks {
    > li {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    > li:not(:last-child) {
        margin-bottom: 1.5em;
    }

    &.noIndent,
    &.noIndent > li {
        margin-left: 0;
        padding-left: 0;
    }
}

:focus-visible {
    outline: solid 2px var(--color-accent);
    outline-offset: 2px;
}

::selection {
    background: var(--color-accent);
    color: var(--color-on-accent);
}

picture {
    image-rendering: -webkit-optimize-contrast;
}

hr {
    width: 100%;
    margin: 0;
    border: none;
    border-top: solid var(--color-border-subtle) 1px;
    height: 0px;
}

.small {
    font-size: var(--font-size-small);
    color: var(--color-text-faint);
}
