.articles-page-head,
.article-detail-head {
    padding-bottom: 64px;
}

.article-categories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 44px;
}

.article-category-link {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    background: var(--bg);
    font-size: 14px;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.article-category-link span:last-child {
    color: var(--accent);
    font-family: "JetBrains Mono", monospace;
}

.article-category-link:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--bg);
}

.article-category-link:hover span:last-child {
    color: var(--bg);
}

.article-category-description {
    margin: 0 0 44px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 38px 24px;
}

.article-card {
    min-width: 0;
}

.article-card__image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-tint);
}

.article-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.article-card:hover .article-card__image img {
    transform: scale(1.025);
}

.article-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #edeffc 0%, #f4f2ea 50%, #e8e6f8 100%);
}

.article-card__placeholder span {
    font-family: "Unbounded", sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.article-card__placeholder small,
.article-card__label {
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.article-card__placeholder small {
    color: var(--ink-soft);
}

.article-card__body {
    padding-top: 16px;
}

.article-card__label {
    color: var(--accent);
    margin-bottom: 9px;
}

.article-card h2 {
    font-family: "Unbounded", sans-serif;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -.01em;
    font-weight: 500;
}

.article-card h2 a {
    transition: color .15s ease;
}

.article-card h2 a:hover {
    color: var(--accent);
}

.article-card p {
    margin-top: 12px;
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.65;
}

.article-card__more {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--ink);
    font-size: 13px;
    transition: color .15s ease, border-color .15s ease;
}

.article-card__more span {
    color: var(--accent);
}

.article-card__more:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.articles-empty {
    grid-column: 1 / -1;
    padding: 28px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

.article-detail-head h1 {
    max-width: 1040px;
    font-size: clamp(34px, 4.5vw, 58px);
}

.article-detail-lead {
    max-width: 760px;
    margin-top: 26px;
    color: var(--ink-soft);
    font-size: 18px;
    line-height: 1.65;
}

.article-detail-lead p + p {
    margin-top: .8em;
}

.article-reading {
    max-width: 920px;
    margin: 0 auto;
}

.article-hero-image {
    width: 100%;
    margin: 0 0 50px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-tint);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
}

.article-prose {
    max-width: 800px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.78;
}

.article-prose h2 {
    margin-top: 2.15em;
}

.article-prose h3 {
    margin-top: 1.8em;
}

.article-detail-back {
    max-width: 800px;
    margin: 54px auto 0;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.article-detail-back a {
    display: inline-block;
    font-size: 14px;
    border-bottom: 1px solid var(--ink);
    transition: color .15s ease, border-color .15s ease;
}

.article-detail-back a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 900px) {
    .article-categories,
    .articles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-reading {
        max-width: 100%;
    }
}

@media (max-width: 620px) {
    .articles-page-head,
    .article-detail-head {
        padding-bottom: 48px;
    }

    .article-categories,
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-categories {
        margin-bottom: 34px;
    }

    .articles-grid {
        gap: 34px;
    }

    .article-detail-lead {
        font-size: 16.5px;
    }

    .article-hero-image {
        margin-bottom: 36px;
    }

    .article-prose {
        font-size: 16px;
        line-height: 1.72;
    }
}
