.article-page {
    --article-portrait-size: clamp(112px, calc(12.6vw + 16px), 180px);
    min-height: 100vh;
    background: var(--ideas);
}

.article-page .site-header {
    position: absolute;
}

.article-page .portrait-link {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    width: var(--article-portrait-size);
    height: var(--article-portrait-size);
    border-radius: 50%;
    pointer-events: auto;
    transition:
        width 300ms var(--motion-ease-out),
        height 300ms var(--motion-ease-out);
}

.article-page .portrait {
    position: static;
    width: 100%;
    height: 100%;
}

.article-shell {
    width: 100%;
    min-height: 100vh;
    padding: 193px 20px 40px;
}

.article-page #article {
    opacity: 1;
    transform: none;
    transition:
        opacity var(--motion-enter) var(--motion-ease-out),
        transform var(--motion-enter) var(--motion-ease-out);
}

.article-page #article[aria-busy="true"] {
    opacity: 0;
    transform: translateY(8px);
}

.article-hero,
.article-grid,
.article-footer {
    display: grid;
    width: min(1180px, calc(100vw - 40px));
    grid-template-columns: 279px minmax(0, 800px);
    column-gap: 101px;
}

.article-kicker {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 8px;
    font-size: 14px;
    line-height: 17px;
}

.article-kicker > a,
.article-footer a {
    color: inherit;
    text-decoration: none;
}

.back-link {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    width: fit-content;
    font-family: "Inter", Arial, sans-serif;
    font-weight: 500;
}

.back-link-arrow {
    font: inherit;
}

.back-link:hover .back-link-label,
.next-article:hover strong {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: rgb(0 0 0 / 50%);
}

.article-heading {
    min-width: 0;
    padding-right: 36px;
}

.article-heading h1 {
    max-width: 800px;
    margin: -9px 0 0;
    font-family: "Geist", Arial, sans-serif;
    font-size: 64px;
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -2.5px;
    overflow-wrap: anywhere;
}

.article-heading > p {
    max-width: 620px;
    margin: 34px 0 0;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.25px;
}

.article-grid {
    align-items: start;
    margin-top: 112px;
}

.article-aside {
    position: sticky;
    top: 20px;
    max-width: 220px;
    font-size: 14px;
    line-height: 17px;
}

.article-aside p {
    margin: 0;
    overflow-wrap: anywhere;
}

.article-body {
    width: min(100%, 700px);
    font-family: "Inter", Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 17px;
    letter-spacing: -0.18px;
}

.article-body > :first-child {
    margin-top: 0;
}

.article-body p {
    margin: 0 0 1.35em;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    margin: 3.4em 0 0.8em;
    font-family: inherit;
    font-weight: inherit;
    letter-spacing: -0.7px;
}

.article-body h2 {
    font-size: 36px;
    line-height: 1.03;
}

.article-body h3 {
    font-size: 25px;
    line-height: 1.08;
}

.article-body h4 {
    font-size: 20px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.5em;
    padding-left: 1.25em;
}

.article-body li + li {
    margin-top: 0.45em;
}

.article-body blockquote {
    margin: 2.2em 0;
    padding-left: 24px;
    border-left: 2px solid currentColor;
    font-family: inherit;
    font-size: 30px;
    line-height: 1.12;
    letter-spacing: -0.7px;
}

.article-body blockquote p {
    margin: 0;
}

.article-body hr {
    height: 1px;
    margin: 64px 0;
    border: 0;
    background: rgb(0 0 0 / 25%);
}

.article-body a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-body img {
    display: block;
    width: 100%;
    height: auto;
    margin: 2em 0;
}

.article-body code {
    padding: 0.1em 0.28em;
    background: rgb(0 0 0 / 8%);
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.82em;
    font-weight: 400;
}

.article-body pre {
    max-width: 100%;
    margin: 2em 0;
    overflow-x: auto;
    padding: 18px;
    background: #0a0a0a;
    color: #f4f4f4;
    font: 400 13px/1.55 "SFMono-Regular", Consolas, monospace;
}

.article-body pre code {
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.article-table-wrap {
    max-width: 100%;
    margin: 2em 0;
    overflow-x: auto;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.35;
}

.article-body th,
.article-body td {
    min-width: 120px;
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid rgb(0 0 0 / 25%);
    text-align: left;
    vertical-align: top;
}

.article-error {
    padding: 20px;
    border: 1px solid currentColor;
}

.article-footer {
    align-items: end;
    margin-top: 160px;
    padding-top: 24px;
    border-top: 1px solid rgb(0 0 0 / 30%);
    font-size: 14px;
    line-height: 17px;
}

.next-article {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.next-article span {
    color: rgb(0 0 0 / 50%);
}

.next-article strong {
    max-width: 760px;
    font-family: "Geist", Arial, sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.03;
    letter-spacing: -1px;
}

@media (max-width: 1100px) {
    .article-hero,
    .article-grid,
    .article-footer {
        grid-template-columns: clamp(210px, 23vw, 279px) minmax(0, 1fr);
        column-gap: clamp(44px, 7vw, 90px);
    }

}

@media (max-width: 760px) {
    .article-page .portrait-link {
        top: 64px;
        right: 16px;
    }

    .article-shell {
        padding: 216px 16px 32px;
    }

    .article-hero,
    .article-grid,
    .article-footer {
        display: flex;
        width: 100%;
        flex-direction: column;
    }

    .article-kicker {
        min-height: 0;
        gap: 24px;
        padding-bottom: 0;
    }

    .article-heading {
        margin-top: 42px;
        padding-right: 0;
    }

    .article-heading h1 {
        max-width: 100%;
        margin: 0;
        font-size: 56px;
        line-height: 54px;
        letter-spacing: -1.5px;
    }

    .article-heading > p {
        margin-top: 24px;
        font-size: 17px;
    }

    .article-grid {
        margin-top: 72px;
    }

    .article-aside {
        position: static;
        max-width: 280px;
        margin-bottom: 64px;
        color: rgb(0 0 0 / 55%);
    }

    .article-body {
        width: 100%;
        font-size: 14px;
        line-height: 17px;
    }

    .article-body h2 {
        font-size: 31px;
    }

    .article-body h3 {
        font-size: 23px;
    }

    .article-body blockquote {
        padding-left: 16px;
        font-size: 26px;
    }

    .article-body hr {
        margin: 48px 0;
    }

    .article-footer {
        align-items: flex-start;
        gap: 72px;
        margin-top: 42px;
    }

    .next-article strong {
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-page #article,
    .article-page #article[aria-busy="true"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
