.blog-index-hero {
    min-height: 54vh;
}

.blog-index-heading {
    display: grid;
    margin-bottom: 46px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
    align-items: center;
    gap: 18px 54px;
}

.blog-index-heading .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.blog-index-heading h2 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(2.35rem, 4vw, 4rem);
    letter-spacing: -.055em;
    line-height: 1;
    text-wrap: balance;
}

.blog-index-heading > p:last-child {
    max-width: 440px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.blog-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.blog-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .035);
    transition: border-color 220ms ease, transform 220ms ease, background 220ms ease;
}

.blog-card:hover {
    border-color: rgba(79, 140, 255, .55);
    background: rgba(255, 255, 255, .06);
    transform: translateY(-5px);
}

.blog-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.blog-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #1d1d1d;
}

.blog-card-image::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(20, 20, 20, .22), transparent 55%);
    pointer-events: none;
}

.blog-card-image-empty {
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 79, 135, .35), transparent 34%),
        radial-gradient(circle at 24% 74%, rgba(79, 140, 255, .42), transparent 38%),
        #202020;
}

.blog-card-image-empty::before {
    position: absolute;
    right: 24px;
    bottom: 18px;
    content: "FriQ.dev";
    color: rgba(255, 255, 255, .2);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -.05em;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.035);
}

.blog-card-body {
    display: flex;
    min-height: 330px;
    padding: 28px;
    flex: 1;
    flex-direction: column;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.blog-tags span {
    display: inline-flex;
    padding: 5px 9px;
    color: #9fc0ff;
    border: 1px solid rgba(79, 140, 255, .27);
    border-radius: 999px;
    background: rgba(79, 140, 255, .08);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.blog-card-meta,
.blog-post-meta {
    display: flex;
    margin-top: 22px;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #777;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.blog-card h2 {
    margin: 22px 0 13px;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    letter-spacing: -.035em;
    line-height: 1.12;
}

.blog-card-body > p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-card-more {
    display: flex;
    margin-top: auto;
    padding-top: 30px;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.blog-card-more b {
    color: var(--accent);
    font-size: 18px;
    transition: transform 180ms ease;
}

.blog-card:hover .blog-card-more b {
    transform: translate(3px, -3px);
}

.blog-empty {
    padding: 80px 28px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.blog-empty > span {
    color: var(--accent);
    font-size: 32px;
}

.blog-empty h2 {
    margin: 18px 0 8px;
    font-size: 28px;
}

.blog-empty p {
    max-width: 540px;
    margin: 0 auto;
    color: var(--muted);
}

.blog-pagination {
    display: grid;
    margin-top: 44px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.blog-pagination .button:first-child {
    justify-self: start;
}

.blog-pagination .button:last-child {
    justify-self: end;
}

.blog-pagination > span {
    color: #777;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
}

.home-blog {
    background:
        radial-gradient(circle at 88% 16%, rgba(79, 140, 255, .08), transparent 28rem),
        rgba(0, 0, 0, .12);
}

.home-blog-heading {
    display: grid;
    margin-bottom: 46px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px 48px;
}

.home-blog-heading .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: 0;
}

.home-blog-heading h2 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.35rem, 4.6vw, 4.5rem);
    letter-spacing: -.06em;
    line-height: .98;
    text-wrap: balance;
}

.home-blog-heading > div > p {
    max-width: 650px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.home-blog-heading .button {
    margin-bottom: 4px;
    white-space: nowrap;
}

.blog-post-hero {
    display: flex;
    min-height: min(760px, calc(100vh - 78px));
    align-items: flex-end;
    overflow: hidden;
    isolation: isolate;
}

.blog-post-hero-image,
.blog-post-hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.blog-post-hero-image {
    z-index: -3;
    object-fit: cover;
}

.blog-post-hero-shade {
    z-index: -2;
    background:
        linear-gradient(to top, rgba(20, 20, 20, .98) 4%, rgba(20, 20, 20, .63) 52%, rgba(20, 20, 20, .35)),
        linear-gradient(to right, rgba(20, 20, 20, .78), transparent 72%);
}

.blog-post-hero-empty {
    background:
        radial-gradient(circle at 80% 24%, rgba(255, 79, 135, .21), transparent 34rem),
        radial-gradient(circle at 18% 72%, rgba(79, 140, 255, .24), transparent 38rem),
        #171717;
}

.blog-post-hero-content {
    width: min(calc(100% - 48px), 1040px);
    padding-top: 80px;
}

.blog-back-link {
    display: inline-flex;
    margin-bottom: 44px;
    color: #ccc;
    font-size: 13px;
    font-weight: 700;
}

.blog-back-link:hover {
    color: var(--accent);
}

.blog-post-hero .blog-tags {
    margin-bottom: 24px;
}

.blog-post-hero h1 {
    max-width: 980px;
    margin: 0;
    font-size: clamp(2.8rem, 5.8vw, 5.7rem);
    letter-spacing: -.07em;
    line-height: .92;
    text-wrap: balance;
}

.blog-post-lead {
    max-width: 760px;
    margin: 30px 0 0;
    color: #c4c4c4;
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.65;
}

.blog-post-meta {
    margin-top: 34px;
    color: #aaa;
}

.blog-post-layout {
    display: grid;
    width: min(calc(100% - 48px), 1040px);
    grid-template-columns: 190px minmax(0, 720px);
    align-items: start;
    justify-content: space-between;
    gap: 60px;
}

.blog-post-aside {
    position: sticky;
    top: 118px;
    padding-top: 9px;
}

.blog-post-aside > span {
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.blog-post-aside p {
    margin: 16px 0 28px;
    color: #777;
    font-size: 12px;
    line-height: 1.7;
}

.blog-post-aside a {
    color: #ccc;
    font-size: 12px;
    font-weight: 700;
}

.blog-post-aside a:hover {
    color: var(--accent);
}

.blog-post-content {
    min-width: 0;
    color: #d0d0d0;
    font-size: 18px;
    line-height: 1.85;
}

.blog-post-content > :first-child {
    margin-top: 0;
}

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5 {
    color: #fff;
    letter-spacing: -.035em;
    line-height: 1.15;
}

.blog-post-content h2 {
    margin: 2em 0 .7em;
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
}

.blog-post-content h3 {
    margin: 1.8em 0 .65em;
    font-size: clamp(1.4rem, 2.5vw, 1.95rem);
}

.blog-post-content h4,
.blog-post-content h5 {
    margin: 1.7em 0 .6em;
    font-size: 1.2rem;
}

.blog-post-content p,
.blog-post-content ul,
.blog-post-content ol,
.blog-post-content blockquote,
.blog-post-content pre,
.blog-post-content table {
    margin: 0 0 1.5em;
}

.blog-post-content ul,
.blog-post-content ol {
    padding-left: 1.35em;
}

.blog-post-content li {
    margin-bottom: .45em;
    padding-left: .25em;
}

.blog-post-content strong {
    color: #fff;
}

.blog-post-content a {
    color: #8eb4ff;
    text-decoration: underline;
    text-decoration-color: rgba(142, 180, 255, .45);
    text-underline-offset: 3px;
}

.blog-post-content blockquote {
    padding: 22px 26px;
    color: #c8d8f6;
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: rgba(79, 140, 255, .08);
    font-size: 1.08em;
}

.blog-post-content pre {
    max-width: 100%;
    padding: 22px;
    overflow-x: auto;
    color: #dce8ff;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0d0d0d;
    font-size: 14px;
    line-height: 1.65;
}

.blog-post-content code {
    color: #dce8ff;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.blog-post-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.blog-post-content th,
.blog-post-content td {
    min-width: 130px;
    padding: 12px 14px;
    text-align: left;
    border: 1px solid var(--line);
}

.blog-post-content th {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.blog-post-content hr {
    margin: 3em 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.blog-post-footer-inner {
    display: flex;
    padding: clamp(34px, 6vw, 70px);
    align-items: end;
    justify-content: space-between;
    gap: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 90% 0, rgba(255, 79, 135, .18), transparent 40%),
        radial-gradient(circle at 10% 100%, rgba(79, 140, 255, .18), transparent 42%),
        var(--surface);
}

.blog-post-footer h2 {
    max-width: 680px;
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    letter-spacing: -.06em;
    line-height: .98;
}

.blog-post-footer-inner > div > p:last-child {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
}

@media (max-width: 980px) {
    .blog-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .blog-index-heading { max-width: 760px; grid-template-columns: 1fr; }
    .blog-index-heading .eyebrow { grid-column: auto; }
    .blog-post-layout { grid-template-columns: 1fr; gap: 40px; }
    .blog-post-aside { position: static; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
    .blog-index-grid { grid-template-columns: 1fr; }
    .blog-index-heading { margin-bottom: 38px; }
    .blog-index-heading h2 { font-size: clamp(2.2rem, 11vw, 3.15rem); }
    .home-blog-heading { grid-template-columns: 1fr; }
    .home-blog-heading .eyebrow { grid-column: auto; }
    .home-blog-heading .button { width: 100%; margin-top: 8px; }
    .blog-card-body { min-height: 300px; padding: 23px; }
    .blog-pagination { grid-template-columns: 1fr 1fr; }
    .blog-pagination > span { grid-row: 2; grid-column: 1 / -1; justify-self: center; }
    .blog-post-hero { min-height: 660px; }
    .blog-post-hero-content,
    .blog-post-layout { width: min(calc(100% - 28px), 1040px); }
    .blog-post-hero h1 { font-size: clamp(2.45rem, 12vw, 3.9rem); }
    .blog-post-content { font-size: 16px; line-height: 1.78; }
    .blog-post-footer-inner { align-items: stretch; flex-direction: column; }
    .blog-post-footer .button { width: 100%; }
}
