:root {
    color-scheme: light;
    --background: floralwhite;
    --text: darkslategrey;
    --muted: dimgrey;
    --emphasis: black;
    --border: var(--text);
    --divider: color-mix(in srgb, var(--border) 25%, transparent);
}
@media screen and (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --background: color-mix(in srgb, darkslategrey 65%, black);
        --text: floralwhite;
        --muted: color-mix(in srgb, var(--text) 75%, var(--background));
        --emphasis: white;
        --border: color-mix(in srgb, var(--text) 60%, var(--background));
    }
}

body {
    background-color: var(--background);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    max-width: 40rem;
    margin: auto;
    padding-inline: 1rem;
    color: var(--text);
}
hgroup {
    h1 {
        margin-bottom: 0;
        letter-spacing: 2px;
    }
    p {
        margin: 0;
        letter-spacing: 1.2px;
    }
}
nav {
    align-items: center;
    display: flex;
    gap: 1rem;
}

header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--divider);
}
main {
    display:flex;
    flex-direction: column;
    gap: 0.5rem;
}
a {
    color: var(--text);
}
a:visited {
    color: var(--muted);
}
a:hover {
    color: var(--emphasis);
}
a:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}
#projects ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
#projects li {
    position: relative;
    border: 0.5px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.4;
    a {
        font-weight: 600;
    }
    p {
        margin: 0.25rem 0 0;
        color: var(--muted);
        text-wrap: balance;
    }
    a::after {
        content: "";
        position: absolute;
        inset: 0;
    }
    &:hover {
        border-color: var(--emphasis);
    }
    &:has(a:focus-visible) {
        outline: 2px solid var(--text);
        outline-offset: 2px;
    }
    a:focus-visible {
        outline: none;
    }
}
#projects h2,
#who-i-watch h2 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: normal;
    letter-spacing: 1.2px;
}
#summary {
    margin-top: 0.75rem;
    p {
        margin: 0;
        letter-spacing: 1.2px;
        text-wrap: balance;
    }
}
#projects,
#who-i-watch {
    align-self: center;
    width: min(100%, 27rem);
    margin-top: 1.5rem;
}
#who-i-watch ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
}
.page-end {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding-bottom: 1.5rem;
    color: var(--divider);
    &::before,
    &::after {
        content: "";
        flex: 1;
        border-top: 1px solid currentColor;
    }
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
