:root {
    --bg: #080b10;
    --bg2: #0d1117;
    --surface: #111820;
    --border: rgba(255, 255, 255, 0.07);
    --white: #f0f4f8;
    --white-dim: rgba(240, 244, 248, 0.62);
    --white-faint: rgba(240, 244, 248, 0.4);
    --cyan: #29d4f5;
    --cyan-dim: rgba(41, 212, 245, 0.15);
    --warn: #f0b429;
    --warn-dim: rgba(240, 180, 41, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--white);
    font-family: 'Syne', sans-serif;
    line-height: 1.6;
}

a {
    color: var(--cyan);
}

.blog-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    max-width: 760px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}

.blog-nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 14px;
}

.blog-nav .back {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    text-decoration: none;
    letter-spacing: 0.04em;
}

.blog-nav .back:hover {
    text-decoration: underline;
}

main {
    max-width: 760px;
    margin: 0 auto;
    padding: 56px 24px 24px;
}

.wide {
    max-width: 1080px;
}

.crumbs {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--white-dim);
    letter-spacing: 0.06em;
    margin-bottom: 24px;
}

.crumbs a {
    color: var(--white-dim);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--cyan);
}

/* INDEX */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.blog-hero {
    position: relative;
}

.blog-hero-glow {
    position: absolute;
    top: -140px;
    right: -160px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(41, 212, 245, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.blog-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    animation: fadeUp 0.6s ease both;
}

.blog-index-title {
    margin-top: 14px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.1;
    font-weight: 700;
    animation: fadeUp 0.6s ease 0.05s both;
}

.blog-index-title em {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--cyan);
}

.blog-index-lead {
    margin-top: 18px;
    max-width: 560px;
    color: var(--white-dim);
    font-size: 16px;
    animation: fadeUp 0.6s ease 0.1s both;
}

/* Post cover art, shared by the featured card and the grid cards */
.post-cover {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d1520 0%, #0a0e14 100%);
}

.post-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

.post-cover svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cover-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(8, 11, 16, 0.65);
    border: 1px solid rgba(41, 212, 245, 0.3);
    color: var(--cyan);
    z-index: 1;
}

.cover-warn .cover-tag {
    border-color: rgba(240, 180, 41, 0.35);
    color: var(--warn);
}

/* Featured post */
.featured-post {
    display: block;
    margin-top: 52px;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s, transform 0.25s;
    animation: fadeUp 0.6s ease 0.15s both;
}

.featured-post:hover {
    border-color: rgba(41, 212, 245, 0.35);
    transform: translateY(-3px);
}

.featured-post .post-cover {
    aspect-ratio: 21 / 8;
}

.featured-body {
    padding: 30px 32px 34px;
}

.featured-title {
    margin-top: 4px;
    font-size: clamp(23px, 3.2vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    transition: color 0.2s;
}

.featured-post:hover .featured-title {
    color: var(--cyan);
}

.featured-excerpt {
    margin-top: 14px;
    color: var(--white-dim);
    font-size: 15.5px;
    max-width: 620px;
}

.post-meta-row {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1565c0, #29d4f5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #04141c;
}

.post-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--white-faint);
    letter-spacing: 0.04em;
}

.read-more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--cyan);
    white-space: nowrap;
}

.read-more svg {
    transition: transform 0.2s;
}

.featured-post:hover .read-more svg {
    transform: translateX(4px);
}

/* More posts grid */
.more-posts-heading {
    margin-top: 68px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--white-faint);
    text-transform: uppercase;
}

.more-posts-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.post-grid {
    list-style: none;
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}

.post-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.25s, transform 0.25s;
    animation: fadeUp 0.5s ease both;
}

.post-grid li:nth-child(1) .post-card {
    animation-delay: 0.1s;
}

.post-grid li:nth-child(2) .post-card {
    animation-delay: 0.18s;
}

.post-grid li:nth-child(3) .post-card {
    animation-delay: 0.26s;
}

.post-card:hover {
    border-color: rgba(41, 212, 245, 0.3);
    transform: translateY(-3px);
}

.post-card:hover .post-title {
    color: var(--cyan);
}

.post-card .post-cover {
    aspect-ratio: 16 / 9;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px 20px 22px;
}

.post-title {
    margin-top: 10px;
    font-size: clamp(17px, 2vw, 19px);
    font-weight: 600;
    line-height: 1.35;
    transition: color 0.2s;
}

.post-excerpt {
    margin-top: 8px;
    color: var(--white-dim);
    font-size: 13.5px;
    flex: 1;
}

.card-arrow {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--cyan);
}

.card-arrow svg {
    transition: transform 0.2s;
}

.post-card:hover .card-arrow svg {
    transform: translateX(4px);
}

/* ARTICLE */
.post-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

article h1 {
    margin-top: 14px;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.15;
    font-weight: 700;
    max-width: 720px;
}

.post-byline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--white-faint);
}

.post-byline strong {
    color: var(--white-dim);
    font-weight: 400;
    font-family: 'Syne', sans-serif;
}

.post-body {
    margin-top: 40px;
    max-width: 680px;
    font-size: 16.5px;
    line-height: 1.75;
    color: rgba(240, 244, 248, 0.85);
}

.post-body p {
    margin-top: 20px;
}

.post-body h2 {
    margin-top: 48px;
    margin-bottom: 4px;
    font-size: clamp(20px, 3vw, 26px);
    font-weight: 600;
    color: var(--white);
}

.post-body strong {
    color: var(--white);
}

.post-body ol {
    margin-top: 20px;
    padding-left: 0;
    list-style: none;
    counter-reset: checklist;
    display: grid;
    gap: 10px;
}

.post-body ol li {
    counter-increment: checklist;
    padding: 14px 16px 14px 46px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    position: relative;
}

.post-body ol li::before {
    content: counter(checklist);
    position: absolute;
    left: 16px;
    top: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--cyan);
}

.post-body .post-tip {
    margin-top: 20px;
    padding: 16px 18px;
    border-left: 2px solid var(--cyan);
    background: var(--cyan-dim);
    font-size: 15px;
}

.post-cta {
    margin-top: 64px;
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.post-cta h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.post-cta p {
    color: var(--white-dim);
    max-width: 520px;
    font-size: 15px;
}

.cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px 26px;
    background: var(--cyan);
    color: #041016;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 2px;
    transition: opacity 0.2s;
}

.cta:hover {
    opacity: 0.85;
}

footer {
    max-width: 760px;
    margin: 64px auto 0;
    padding: 28px 24px 40px;
    border-top: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--white-dim);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

footer a {
    color: var(--white-dim);
    text-decoration: none;
}

footer a:hover {
    color: var(--cyan);
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 2px;
}

@media (max-width: 600px) {
    main {
        padding-top: 36px;
    }

    .post-cta {
        padding: 26px 20px;
    }
}
