/* ===== Blog (index + post pages). Everything shared comes from styles.css. =====
   Referenced as /blog.css?v=YYYYMMDD because *.css is cached as immutable:
   bump BLOG_CSS_VERSION in tools/build-blog.py whenever this file changes. */

/* ---------- Shared pieces ---------- */
.bl-eyebrow {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #58a6ff;
    margin-bottom: 1.1rem;
}
.bl-eyebrow a {
    color: inherit;
    text-decoration: none;
}
.bl-eyebrow a:hover { color: #f0f6fc; }

.bl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #8b949e;
}
.bl-meta span + span::before {
    content: "•";
    margin-right: 10px;
    color: #484f58;
}

.amazon-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(45deg, #ff9900, #ffb84d);
    color: #0d1117;
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(255, 153, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.amazon-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(255, 153, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.5);
    color: #0d1117;
}
.ghost-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    border: 1px solid rgba(88, 166, 255, 0.45);
    border-radius: 12px;
    color: #58a6ff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}
.ghost-btn:hover {
    background: rgba(88, 166, 255, 0.1);
    border-color: #58a6ff;
    color: #f0f6fc;
}

/* ---------- Index: hero ---------- */
.bl-hero {
    padding: 136px 0 56px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(88, 166, 255, 0.14), transparent 70%),
        radial-gradient(ellipse 40% 40% at 85% 60%, rgba(255, 153, 0, 0.08), transparent 70%),
        #0d1117;
    border-bottom: 1px solid rgba(88, 166, 255, 0.12);
}
.bl-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.bl-hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.375rem, 6.8vw, 3.25rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.025em;
    text-wrap: balance;
    color: #f0f6fc;
    margin-bottom: 1.25rem;
}
.bl-hero h1 > span,
.bl-hero h1 > em {
    display: block;
}
.bl-hero h1 em {
    font-style: normal;
    color: #58a6ff;
}
.bl-lead {
    font-size: 1.35rem;
    line-height: 1.6;
    color: #c9d1d9;
    max-width: 700px;
    margin-bottom: 0;
    text-wrap: pretty;
}

/* ---------- Index: featured (latest) post ---------- */
.bl-list {
    padding: 70px 0 90px;
}
.bl-list-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.bl-featured {
    display: block;
    padding: 0;
    overflow: hidden;
    margin-bottom: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.10) 0%, rgba(255, 153, 0, 0.06) 100%);
    border: 1px solid rgba(88, 166, 255, 0.3);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.bl-featured-copy { padding: 36px 44px 40px; }
.bl-featured:hover {
    border-color: #58a6ff;
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.bl-featured .bl-eyebrow { color: #ffd700; margin-bottom: 0.9rem; }
.bl-featured h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2.1rem;
    line-height: 1.2;
    color: #f0f6fc;
    margin-bottom: 0.9rem;
}
.bl-featured .bl-dek {
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.5;
    color: #c9d1d9;
    margin-bottom: 1rem;
    max-width: 780px;
}
.bl-featured .bl-excerpt {
    font-size: 1.2rem;
    line-height: 1.65;
    color: #9da7b3;
    margin-bottom: 1.5rem;
    max-width: 780px;
}
.bl-readmore {
    display: inline-block;
    margin-top: 1.1rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #58a6ff;
}

/* ---------- Index: all posts ---------- */
.bl-section-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #8b949e;
    padding-bottom: 14px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(88, 166, 255, 0.15);
}
.bl-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.bl-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(22, 27, 34, 0.75);
    border: 1px solid rgba(88, 166, 255, 0.14);
    text-decoration: none;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.bl-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px 28px;
}
.bl-card:hover {
    border-color: rgba(88, 166, 255, 0.55);
    background: rgba(22, 27, 34, 1);
    transform: translateY(-3px);
}
.bl-card-issue {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #58a6ff;
    margin-bottom: 0.7rem;
}
.bl-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #f0f6fc;
    margin-bottom: 0.7rem;
}
.bl-card p {
    font-size: 1.15rem;
    line-height: 1.55;
    color: #b1bac4;
    font-style: italic;
    flex: 1;
}
.bl-card .bl-meta {
    margin-top: 1.1rem;
    font-size: 0.92rem;
}

/* ---------- Post: header ---------- */
.bl-post-hero {
    padding: 150px 0 56px;
    background:
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(88, 166, 255, 0.14), transparent 70%),
        #0d1117;
    border-bottom: 1px solid rgba(88, 166, 255, 0.12);
}
.bl-post-head,
.bl-post-body,
.bl-post-foot {
    max-width: 740px;
    margin: 0 auto;
}
.bl-post-hero h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #f0f6fc;
    margin-bottom: 1.1rem;
}
.bl-post-dek {
    font-size: 1.45rem;
    font-style: italic;
    line-height: 1.5;
    color: #c9d1d9;
    margin-bottom: 1.6rem;
}
.bl-byline {
    display: flex;
    align-items: center;
    gap: 14px;
}
.bl-byline img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(88, 166, 255, 0.4);
}
.bl-byline-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f0f6fc;
    line-height: 1.3;
}

/* Editorial photos keep their full landscape frame at every screen size. */
.bl-photo {
    display: block;
    overflow: hidden;
    background: #161b22;
}
.bl-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.bl-post-photo {
    max-width: 1100px;
    margin: 40px auto 0;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(88, 166, 255, 0.18);
}

/* ---------- Post: body ---------- */
.bl-post {
    padding: 56px 0 30px;
}
.bl-post-body {
    font-size: 1.32rem;
    font-weight: 500;
    line-height: 1.75;
    color: #d5dbe2;
}
.bl-post-body p {
    margin-bottom: 1.35em;
}
.bl-post-body h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #ffd700;
    margin: 2.2em 0 0.9em;
}
.bl-post-body strong { color: #f0f6fc; font-weight: 700; }
.bl-post-body em { color: #e6edf3; }
.bl-lead a,
.bl-post-body a {
    color: #58a6ff;
    text-decoration: underline;
    text-decoration-color: rgba(88, 166, 255, 0.4);
    text-underline-offset: 3px;
}
.bl-lead a:hover,
.bl-lead a:focus-visible,
.bl-post-body a:hover { color: #f0f6fc; }
.bl-post-body hr {
    border: 0;
    height: 1px;
    width: 120px;
    margin: 2.6em auto;
    background: linear-gradient(90deg, transparent, rgba(88, 166, 255, 0.6), transparent);
}
.bl-post-body ul,
.bl-post-body ol {
    margin: 0 0 1.35em 1.4em;
}
.bl-post-body li { margin-bottom: 0.4em; }
.bl-post-body figure {
    margin: 2.2em auto;
    text-align: center;
}
.bl-post-body figure img {
    max-width: 100%;
    width: 420px;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.bl-signoff {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f0f6fc;
    margin-top: 2em;
}

/* ---------- Post: footer blocks ---------- */
.bl-post-foot {
    padding-bottom: 80px;
}
.bl-source {
    font-size: 1.05rem;
    color: #8b949e;
    padding-top: 26px;
    margin-top: 10px;
    border-top: 1px solid rgba(88, 166, 255, 0.15);
}
.bl-source a { color: #58a6ff; }

.bl-subscribe {
    margin-top: 44px;
    padding: 34px 36px;
    border-radius: 16px;
    background: rgba(22, 27, 34, 0.85);
    border: 1px solid rgba(88, 166, 255, 0.25);
}
.bl-subscribe h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.35rem;
    color: #f0f6fc;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.bl-subscribe p {
    font-size: 1.15rem;
    color: #c9d1d9;
    line-height: 1.55;
    margin-bottom: 1.2rem;
}
.bl-subscribe .substack-note { margin-bottom: 0; font-size: 0.9rem; color: #8b949e; }

.bl-book {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-top: 28px;
    padding: 34px 36px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.12) 0%, rgba(88, 166, 255, 0.08) 100%);
    border: 1px solid rgba(255, 215, 0, 0.28);
}
.bl-book img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.6);
}
.bl-book h2 {
    font-family: 'Orbitron', monospace;
    font-size: 1.35rem;
    color: #f0f6fc;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}
.bl-book p {
    font-size: 1.15rem;
    color: #c9d1d9;
    line-height: 1.55;
    margin-bottom: 1.3rem;
}

.bl-pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 44px;
}
.bl-pager a {
    display: block;
    padding: 22px 24px;
    border-radius: 14px;
    border: 1px solid rgba(88, 166, 255, 0.18);
    background: rgba(22, 27, 34, 0.6);
    text-decoration: none;
    transition: border-color 0.25s ease, background 0.25s ease;
}
.bl-pager a:hover {
    border-color: #58a6ff;
    background: rgba(22, 27, 34, 1);
}
.bl-pager .bl-pager-next { text-align: right; grid-column: 2; }
.bl-pager-label {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8b949e;
    margin-bottom: 6px;
}
.bl-pager-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    color: #f0f6fc;
}
.bl-all {
    text-align: center;
    margin-top: 36px;
}

/* ---------- Index: closing band ---------- */
.bl-closing {
    padding: 0 0 100px;
}
.bl-closing-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}
.bl-closing .bl-subscribe,
.bl-closing .bl-book { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .bl-closing-inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .bl-hero { padding: 110px 0 40px; }
    .bl-lead { font-size: 1.15rem; }
    .bl-list { padding: 44px 0 60px; }
    .bl-featured { margin-bottom: 40px; }
    .bl-featured-copy { padding: 26px 24px 30px; }
    .bl-featured h2 { font-size: 1.5rem; }
    .bl-featured .bl-dek { font-size: 1.2rem; }
    .bl-featured .bl-excerpt { font-size: 1.1rem; }
    .bl-grid { grid-template-columns: 1fr; gap: 16px; }
    .bl-card-content { padding: 22px; }
    .bl-post-photo { margin-top: 28px; border-radius: 10px; }
    .bl-post-hero { padding: 110px 0 40px; }
    .bl-post-hero h1 { font-size: 1.7rem; }
    .bl-post-dek { font-size: 1.2rem; }
    .bl-post { padding: 40px 0 20px; }
    .bl-post-body { font-size: 1.2rem; line-height: 1.7; }
    .bl-subscribe, .bl-book { padding: 26px 22px; }
    .bl-subscribe .substack-subscribe { flex-direction: column; }
    .bl-book { grid-template-columns: 1fr; text-align: center; gap: 22px; }
    .bl-book img { max-width: 150px; margin: 0 auto; }
    .bl-pager { grid-template-columns: 1fr; }
    .bl-pager .bl-pager-next { grid-column: 1; text-align: left; }
    .bl-closing { padding-bottom: 70px; }
    .amazon-btn { width: 100%; justify-content: center; }
}

/* Breadcrumb + author link in the post header */
nav.bl-eyebrow span[aria-current] { color: #8b949e; }
.bl-byline-name a { color: inherit; text-decoration: none; }
.bl-byline-name a:hover { color: #58a6ff; }
