@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("https://cdn.jsdelivr.net/npm/@ibm/plex-mono@2.5.0/fonts/split/woff2/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
}

@font-face {
    font-family: "IBM Plex Mono";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("https://cdn.jsdelivr.net/npm/@ibm/plex-mono@2.5.0/fonts/split/woff2/IBMPlexMono-Medium-Latin1.woff2") format("woff2");
}

:root {
    --primary-type-size: clamp(0.9375rem, 1.25vw, 1.125rem);

    color-scheme: dark;
    background: #000;
    color: #fff;
    font-family:
        "IBM Plex Mono",
        ui-monospace,
        "SFMono-Regular",
        "Cascadia Code",
        "Roboto Mono",
        "Liberation Mono",
        Menlo,
        Consolas,
        monospace;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #000;
}

body {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: #000;
    color: #fff;
}

main {
    display: block;
    width: min(100% - 4rem, 88rem);
    min-height: 0;
    margin-inline: auto;
    padding-block: clamp(2rem, 5vw, 4.5rem);
}

header {
    width: 100%;
    max-width: 100%;
}

h1 {
    margin: 0;
    color: #fff;
    font-size: var(--primary-type-size);
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

section {
    margin-top: clamp(7rem, 18vh, 12rem);
    padding-top: 0;
}

h2 {
    margin: 0 0 1rem;
    color: rgb(255 255 255 / 48%);
    font-size: var(--primary-type-size);
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

nav a {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 4.5rem;
    padding-inline: 0;
    color: inherit;
    font-size: var(--primary-type-size);
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background-color 120ms ease,
        color 120ms ease,
        padding 120ms ease;
}

.project-index,
.project-meta,
.project-marker {
    color: rgb(255 255 255 / 48%);
    font-size: inherit;
    letter-spacing: 0.12em;
}

.project-name,
.project-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

nav a:hover,
nav a:focus-visible {
    padding-inline: 1rem;
    background: #fff;
    color: #000;
}

nav a:hover span,
nav a:focus-visible span {
    color: inherit;
}

nav a:hover .project-brand,
nav a:focus-visible .project-brand {
    color: #dc2323;
}

a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.site-footer {
    display: flex;
    justify-content: flex-start;
    width: min(100% - 4rem, 88rem);
    margin-inline: auto;
    padding-block: 0 clamp(2rem, 3vw, 3rem);
}

.site-footer a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 4.5rem;
    color: inherit;
    font-size: var(--primary-type-size);
    font-weight: 500;
    letter-spacing: 0.12em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background-color 120ms ease,
        color 120ms ease,
        padding 120ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    padding-inline: 1rem;
    background: #fff;
    color: #000;
}

@media (max-width: 700px) {
    main {
        display: block;
        width: min(100% - 2rem, 96rem);
        padding-block: 1.5rem;
    }

    header {
        padding: 0;
        border: 0;
    }

    section {
        margin-top: clamp(6rem, 16vh, 8rem);
        padding-top: 0;
    }

    nav a {
        grid-template-areas:
            "index name marker"
            ". meta meta";
        grid-template-columns: 2.5rem minmax(0, 1fr) auto;
        row-gap: 0.75rem;
        min-height: 6rem;
        padding-block: 1rem;
    }

    .project-index {
        grid-area: index;
    }

    .project-name {
        grid-area: name;
    }

    .project-meta {
        grid-area: meta;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.5;
    }

    .project-marker {
        grid-area: marker;
    }

    .site-footer {
        width: min(100% - 2rem, 96rem);
        padding-bottom: 1.5rem;
    }

    .site-footer a {
        min-height: 4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    nav a,
    .site-footer a {
        transition: none;
    }
}
