body > header,
body > footer {
    display: flex;
    flex-direction: row;
    padding: 0.5rem 1rem;
    align-items: center;
    font-family: var(--font-monospace);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 32px;
    gap: 2rem;
}

/* Match the content column while the header background spans the viewport. */
body > header {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 4rem;
    flex-shrink: 0;
    padding: 0.75rem max(2rem, calc((100% - 1200px) / 2 + 2rem));
    background-color: #131313;
    border-bottom: 1px solid #353535;
}

body > header > .name {
    font-family: var(--font-wordmark);
    font-weight: 400;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

/* Identical text copies offset behind the unaltered hairline lettering. */
body > header > .name > a {
    position: relative;
    display: inline-block;
    isolation: isolate;
    font-family: var(--font-wordmark);
    font-weight: 400;
    font-synthesis: none;
    text-shadow: none;
    -webkit-text-stroke: 0;
}

body > header > .name .name-label {
    position: relative;
    z-index: 1;
}

body > header > .name .name-copy {
    position: absolute;
    inset: 0;
    font: inherit;
    letter-spacing: inherit;
    pointer-events: none;
    opacity: 0.65;
}

body > header > .name .cyan {
    color: #54d6ff;
    transform: translate(-3px, -1px);
}

body > header > .name .magenta {
    color: #ff4d8d;
    transform: translate(3px, 1px);
}

@media (prefers-reduced-motion: no-preference) {
    body > header > .name .cyan {
        animation: name-cyan-flicker 7s steps(1, end) infinite;
    }

    body > header > .name .magenta {
        animation: name-magenta-flicker 7s steps(1, end) infinite;
    }
}

@keyframes name-cyan-flicker {
    0%, 38%, 41%, 78%, 81%, 100% { transform: translate(-3px, -1px); }
    39%, 79% { transform: translate(-5px, -2px); }
    40%, 80% { transform: translate(-2px, 1px); }
}

@keyframes name-magenta-flicker {
    0%, 38%, 41%, 78%, 81%, 100% { transform: translate(3px, 1px); }
    39%, 79% { transform: translate(5px, 2px); }
    40%, 80% { transform: translate(2px, -1px); }
}

body > header > ul {
    list-style-type: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    color: var(--color-monospace);
}

body > header > ul > li {
    padding-left: 0;
}

body > header > ul a {
    display: inline-block;
    padding: 0.25rem 0;
    line-height: 1.5;
}

body > header > ul a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
    text-underline-offset: 0.375rem;
}

body > header img,
body > footer img {
    height: 32px;
}

body > header > .name {
    font-size: 2rem;
    /*line-height: 2.5rem;*/
    /*padding-top: 0;*/
}

body > header > *,
body > footer > * {
    /*flex-grow: 0;*/
    /*padding: 4px 4px;*/
}

body > header > *:first-child {
    flex-grow: 1;
}

body > header > .connect {
    color: var(--color-contrast);
    background-color: var(--color-background-contrast);
    font-family: var(--font-monospace), monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
}

body > footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    margin-top: 4rem;
    padding: 2rem max(2rem, calc((100% - 1200px) / 2 + 2rem));
    border-top: 1px solid #353535;
    background-color: #0e0e0e;
    color: var(--color-monospace-dim);
    font-family: var(--font-monospace), monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

body > footer > .copyright {
    font-weight: normal;
    flex-grow: 1;
}

body > footer > ul {
    flex-grow: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
}

body > footer > ul > li {
    padding-left: 0;
}

body > footer a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
    text-decoration-color: var(--color-intense);
    text-underline-offset: 0.25rem;
}

body > header > .connect {
    border: 1px solid var(--color-background-contrast);
}

body > header > .connect:hover {
    background-color: var(--color-secondary);
}

body > header a:focus-visible,
body > footer a:focus-visible {
    outline: 2px solid var(--color-intense);
    outline-offset: 4px;
}

@media (max-width: 767px) {
    body > header > .left.name {
        font-size: 1.75rem;
        line-height: 1.2;
        padding-left: 0;
    }

    body > header {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }

    body > header > .connect {
        padding-inline: 0.75rem;
    }

    body > header > ul {
        display: none;
    }

    html body > footer {
        flex-direction: column;
        font-size: 0.875rem;
        gap: 1rem;
        padding: 2rem 1rem;
        text-align: center;
    }

    body > footer > .copyright {
        flex-grow: 0;
    }

    body > footer > ul {
        justify-content: center;
    }
}
