/* Blog layout for Archive Rats — COM */

/* Compact blog cards used on the home pages */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 36px 0 72px;
}

.blog-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 280px;
    padding: 24px;
    border: 1px solid #111;
    background: #fffdf7;
    color: inherit;
    text-decoration: none;
    box-shadow: 8px 8px 0 rgba(43,62,255,.14);
    transition: transform .18s ease, box-shadow .18s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 10px 12px 0 rgba(43,62,255,.25);
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: 'Courier Prime', monospace;
    font-size: .78rem;
    color: #8c8279;
    border-bottom: 1px dashed #c9bda9;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.blog-card h2,
.blog-card h3 {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(1.35rem, 2.5vw, 2.2rem) !important;
    line-height: 1.05;
    letter-spacing: -.04em;
    margin: 0 0 14px;
    text-align: left;
}

.blog-card p {
    font-family: 'Victor Mono', monospace;
    font-size: .95rem;
    line-height: 1.35;
    margin: 0;
}

.blog-card-cta {
    margin-top: 22px;
    font-family: 'Courier Prime', monospace;
    font-size: .82rem;
    color: #2b3eff;
}

@media (max-width: 800px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-card {
        min-height: auto;
    }
}

/* Full blog index pages */
.blog-page {
    background: #f3f0e8;
}

.blog-shell {
    box-sizing: border-box;
    margin-left: 260px;
    padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 84px) 96px;
    max-width: 1480px;
}

.blog-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, .8fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: end;
    margin: 0 0 28px;
}

.blog-kicker {
    margin: 0 0 14px;
    font-family: 'Victor Mono', monospace;
    color: #8c8279;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
}

.blog-title {
    margin: 0;
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(3rem, 8vw, 8.2rem);
    line-height: .86;
    letter-spacing: -.075em;
    color: #15120f;
}

.blog-intro {
    max-width: 620px;
    margin: 0;
    font-family: 'Victor Mono', monospace;
    font-size: clamp(.92rem, 1.25vw, 1.08rem);
    line-height: 1.45;
    color: #403a35;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0 52px;
}

.blog-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    background: #e7e1d6;
    color: #302b27;
    font-family: 'Victor Mono', monospace;
    font-size: .76rem;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.blog-tags a:hover,
.blog-tags a.is-active {
    background: #2b3eff;
    color: #fffdf7;
    transform: translateY(-1px);
}

.blog-latest {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(22px, 3vw, 42px);
    align-items: start;
}

.blog-page .blog-card {
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #15120f;
    text-decoration: none;
}

.blog-page .blog-card:hover {
    transform: none;
    box-shadow: none;
}

.blog-card-muted {
    cursor: default;
}

.blog-card-muted .blog-card-cta {
    color: #8c8279;
}

.blog-card-featured {
    grid-column: span 2;
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    margin: 0 0 16px;
    aspect-ratio: 1.18 / 1;
    border-radius: 18px;
    background: #e5ded2;
}

.blog-card-featured .blog-card-image {
    aspect-ratio: 1.65 / 1;
}

.blog-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 55%, rgba(21,18,15,.10) 100%),
        radial-gradient(circle at 18% 12%, rgba(255,255,255,.22), rgba(255,255,255,0) 34%);
    mix-blend-mode: multiply;
}

.blog-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.86) contrast(.96) sepia(.08);
    transition: transform .45s ease, filter .45s ease;
}

.blog-page .blog-card:hover .blog-card-image img {
    transform: scale(1.035);
    filter: saturate(.98) contrast(1) sepia(.04);
}

.blog-card-body {
    padding: 0 2px;
}

.blog-page .blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
}

.blog-page .blog-card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 6px;
    background: #e9e3d8;
    color: #5f554c;
    font-family: 'Victor Mono', monospace;
    font-size: .68rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.blog-page .blog-card h2,
.blog-page .blog-card h3 {
    margin: 0;
    max-width: 760px;
    font-family: 'Inter', sans-serif !important;
    font-size: clamp(1.28rem, 2vw, 2.05rem) !important;
    font-weight: 740;
    line-height: 1.05;
    letter-spacing: -.045em;
    text-align: left;
    color: #15120f;
}

.blog-page .blog-card-featured h2 {
    font-family: 'EB Garamond', serif !important;
    font-size: clamp(2.5rem, 4.9vw, 5.4rem) !important;
    font-weight: 500;
    line-height: .92;
    letter-spacing: -.045em;
}

.blog-page .blog-card p {
    max-width: 680px;
    margin: 12px 0 0;
    font-family: 'Victor Mono', monospace;
    font-size: .9rem;
    line-height: 1.38;
    color: #554d45;
}

.blog-page .blog-card-cta {
    display: inline-flex;
    margin-top: 16px;
    font-family: 'Victor Mono', monospace;
    font-size: .78rem;
    color: #2b3eff;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.blog-editorial {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(280px, 1fr);
    gap: clamp(22px, 5vw, 80px);
    margin: 88px 0 0;
    padding: clamp(24px, 4vw, 42px);
    border-radius: 22px;
    background: #15120f;
    color: #fffdf7;
}

.blog-editorial h2 {
    margin: 0;
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(1.8rem, 4vw, 3.6rem) !important;
    line-height: .96;
    letter-spacing: -.06em;
    text-align: left;
    color: #fffdf7;
}

.blog-editorial .blog-kicker {
    color: #b9b0a5;
}

.blog-editorial p {
    margin: 0;
    font-family: 'Victor Mono', monospace;
    font-size: .95rem;
    line-height: 1.5;
    color: #e8e0d4;
}

.blog-template-links {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.blog-template-links a,
.blog-template-links span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: #fffdf7;
    font-family: 'Victor Mono', monospace;
    font-size: .78rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.blog-template-links a:hover {
    background: #2b3eff;
    border-color: #2b3eff;
}

/* Internal noindex article templates */
.blog-template {
    max-width: 860px;
    margin: 72px auto 80px;
    background: #fffdf7;
    border: 1px solid #111;
    padding: clamp(24px, 4vw, 56px);
    box-shadow: 12px 12px 0 rgba(0,0,0,.08);
}

.blog-template h1 {
    font-family: 'Dela Gothic One', cursive;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: .95;
    letter-spacing: -.05em;
}

.blog-template h2 {
    font-family: 'Dela Gothic One', cursive;
    font-size: 1.6rem !important;
    text-align: left;
    margin-top: 2em;
}

.blog-template p,
.blog-template li {
    font-family: 'Victor Mono', monospace;
    font-size: 1rem;
    line-height: 1.5;
}

.blog-template .note {
    border-left: 4px solid #2b3eff;
    padding-left: 16px;
    color: #4e463f;
}

.blog-template .toc {
    background: #ecebe6;
    padding: 18px 22px;
    margin: 24px 0;
}

@media (max-width: 1100px) {
    .blog-shell {
        margin-left: 0;
        padding: 44px 20px 72px;
    }

    .blog-hero,
    .blog-editorial {
        grid-template-columns: 1fr;
    }

    .blog-template-links {
        grid-column: auto;
    }
}

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

    .blog-card-featured {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .blog-latest {
        grid-template-columns: 1fr;
    }

    .blog-card-featured {
        grid-column: auto;
    }

    .blog-card-featured .blog-card-image,
    .blog-card-image {
        aspect-ratio: 1.18 / 1;
        border-radius: 14px;
    }

    .blog-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .blog-tags a {
        white-space: nowrap;
    }
}
