.blogs-shell {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(1100px 480px at 12% -5%, rgba(6, 182, 212, 0.2), transparent 58%),
        radial-gradient(900px 420px at 88% 8%, rgba(37, 99, 235, 0.2), transparent 62%),
        radial-gradient(850px 400px at 65% 80%, rgba(109, 40, 217, 0.12), transparent 70%),
        linear-gradient(180deg, #04060d 0%, #070b14 45%, #03050b 100%);
}

.blogs-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

.blogs-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.1), transparent 36%);
}

.blog-hero {
    position: relative;
    z-index: 4;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    box-shadow:
        0 28px 70px -42px rgba(56, 189, 248, 0.65),
        0 26px 60px -48px rgba(109, 40, 217, 0.5);
}

.blog-hero-media {
    position: absolute;
    inset: 0;
}

.blog-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.blog-hero-overlay {
    position: absolute;
    inset: 0;
    background:
    linear-gradient(108deg, rgba(2, 6, 23, 0.97) 8%, rgba(2, 6, 23, 0.82) 52%, rgba(2, 6, 23, 0.94) 100%),
        radial-gradient(circle at 78% 12%, rgba(56, 189, 248, 0.26), transparent 48%);
}

.blog-hero-content {
    position: relative;
    z-index: 1;
}

.blog-kicker {
    letter-spacing: 0.26em;
    color: #7dd3fc;
}

.blog-title {
    color: #f8fafc;
    letter-spacing: -0.03em;
    line-height: 0.95;
}

.blog-lead {
    color: #b7c0ce;
    line-height: 1.75;
}

.blog-chip {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(255, 255, 255, 0.06);
    color: #dbe7f5;
    backdrop-filter: blur(10px);
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.blog-list-wrap {
    position: relative;
    z-index: 2;
    padding-top: 0.35rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 1280px) {
    .bento-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        grid-template-areas:
            "a a a b b c c"
            "d d d e e f f";
    }

    .card-a {
        grid-area: a;
    }

    .card-b {
        grid-area: b;
    }

    .card-c {
        grid-area: c;
    }

    .card-d {
        grid-area: d;
    }

    .card-e {
        grid-area: e;
    }

    .card-f {
        grid-area: f;
    }
}

.blog-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(14px);
    box-shadow:
        0 26px 52px -44px rgba(56, 189, 248, 0.6),
        0 28px 50px -44px rgba(109, 40, 217, 0.45);
    transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
    text-decoration: none;
}

a.blog-card {
    display: flex;
    color: inherit;
}

.blog-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.34), rgba(99, 102, 241, 0.06), rgba(168, 85, 247, 0.34));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    transition: opacity 280ms ease;
}

.blog-card-media {
    height: 170px;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    margin-bottom: 1rem;
}

.blog-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.blog-card:hover,
.blog-card.is-hovered {
    transform: translateY(0) scale(1.01);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow:
        0 30px 62px -40px rgba(56, 189, 248, 0.9),
        0 34px 65px -48px rgba(109, 40, 217, 0.68);
}

.blog-card:hover::before,
.blog-card.is-hovered::before {
    opacity: 0.95;
}

.blog-card:hover .blog-card-media img,
.blog-card.is-hovered .blog-card-media img {
    transform: scale(1.08);
}

.meta-pill {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: rgba(255, 255, 255, 0.06);
    color: #d6dfec;
    backdrop-filter: blur(8px);
}

.meta-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    box-shadow: 0 0 10px currentColor;
}

.dot-zwcad {
    color: #22d3ee;
}

.dot-d5 {
    color: #60a5fa;
}

.dot-ops {
    color: #818cf8;
}

.dot-impl {
    color: #a78bfa;
}

.dot-hw {
    color: #38bdf8;
}

.dot-best {
    color: #8b5cf6;
}

.blog-card-title {
    color: #f8fafc;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.blog-card-copy {
    color: #aeb8c8;
    line-height: 1.75;
}

.blog-card-date {
    margin-top: auto;
    padding-top: 1rem;
    color: #7d8696;
}

.blog-cta {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    backdrop-filter: blur(12px);
}

.blog-cta::before {
    content: "";
    position: absolute;
    inset: -35% auto auto 10%;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.24), transparent 65%);
    pointer-events: none;
}

.blog-button {
    background: #ffffff;
    color: #020617;
    box-shadow: 0 18px 30px -18px rgba(56, 189, 248, 0.88);
}

.blog-button:hover {
    background: #e5e7eb;
    box-shadow: 0 22px 36px -15px rgba(56, 189, 248, 0.98);
}

.blog-content-area {
    color: #d1d5db;
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-content-area h2 {
    color: #f8fafc;
    font-size: 2rem;
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.blog-content-area h3 {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-content-area p {
    margin-bottom: 1.5rem;
}

.blog-content-area ul,
.blog-content-area ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-content-area li {
    margin-bottom: 0.5rem;
    list-style-type: disc;
}

.blog-content-area strong {
    color: #fff;
    font-weight: 600;
}

/* Skeleton states for blog-post.html */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: blogShimmer 1.5s infinite;
    border-radius: 0.5rem;
}

@keyframes blogShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

#error-state,
#loading-state {
    display: none;
}

.is-loading #loading-state {
    display: block;
}

.is-error #error-state {
    display: block;
}

.is-loaded #post-container {
    display: block;
}

#post-container {
    display: none;
}
