/* ============================================
   Blog — Listing & Post Pages
   ============================================ */

/* ─── Blog Listing Layout ─────────────────── */
.blog-main {
    padding-top: 40px;
}

.blog-content {
    max-width: 640px;
}

/* ─── Posts Grid ─────────────────────────── */
.blog-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── Post Card ──────────────────────────── */
.blog-card {
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: opacity 0.2s ease;
}

.blog-card:first-child {
    padding-top: 0;
}

.blog-card:last-child {
    border-bottom: none;
}

.blog-card--featured .blog-card-title {
    font-size: 24px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.blog-card-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.85);
}

.blog-card-sep {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.2);
}

.blog-card-date,
.blog-card-reading {
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.4);
}

.blog-card-title {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.3;
    margin: 0 0 10px;
}

.blog-card-link {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-link:hover {
    color: rgba(167, 139, 250, 1);
}

.blog-card-excerpt {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 16px;
}

.blog-card-read {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-card-read:hover {
    color: rgba(167, 139, 250, 1);
}

/* ─── Skeleton Loading ───────────────────── */
@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

.blog-skeleton-card {
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.blog-skeleton-card:first-child { padding-top: 0; }
.blog-skeleton-card:last-child  { border-bottom: none; }

.blog-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 0%,
        rgba(255,255,255,0.09) 50%,
        rgba(255,255,255,0.04) 100%);
    background-size: 800px 12px;
    animation: skeleton-shimmer 1.6s ease-in-out infinite;
}

.blog-skeleton-line--meta    { width: 38%; height: 10px; }
.blog-skeleton-line--title   { width: 80%; height: 18px; margin-top: 4px; }
.blog-skeleton-line--excerpt { width: 100%; }
.blog-skeleton-line--short   { width: 65%; }
.blog-skeleton-line--read    { width: 14%; height: 10px; margin-top: 4px; }

[data-theme="light"] .blog-skeleton-line {
    background: linear-gradient(90deg,
        rgba(26,10,60,0.06) 0%,
        rgba(26,10,60,0.12) 50%,
        rgba(26,10,60,0.06) 100%);
    background-size: 800px 12px;
}

/* ─── Empty State ─────────────────────────── */
.blog-empty {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.35);
    padding: 40px 0;
    text-align: center;
}

/* ─── Post Back Link ─────────────────────── */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.9);
    text-decoration: none;
    margin-bottom: 32px;
    padding: 6px 14px;
    background: rgba(110, 68, 255, 0.10);
    border: 1px solid rgba(110, 68, 255, 0.28);
    border-radius: 6px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.blog-back-link:hover {
    background: rgba(110, 68, 255, 0.22);
    border-color: rgba(110, 68, 255, 0.58);
    color: #C4B5FD;
}

[data-theme="light"] .blog-back-link {
    color: rgba(110, 68, 255, 0.85);
    background: rgba(110, 68, 255, 0.07);
    border-color: rgba(110, 68, 255, 0.22);
}

[data-theme="light"] .blog-back-link:hover {
    background: rgba(110, 68, 255, 0.14);
    border-color: rgba(110, 68, 255, 0.5);
    color: rgba(110, 68, 255, 1);
}

/* ─── Post Loading Skeleton ──────────────── */
.blog-post-skeleton {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}

/* ─── Individual Post Page ────────────────── */
.blog-post-content {
    max-width: 660px;
}

.blog-post-header {
    margin-bottom: 48px;
}

.blog-post-category {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.85);
    margin-bottom: 14px;
    display: block;
}

.blog-post-title {
    font-size: 36px;
    font-weight: 200;
    letter-spacing: 0.06em;
    line-height: 1.2;
    background: linear-gradient(135deg, #FFFFFF 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px;
}

.blog-post-byline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.04em;
}

.blog-post-byline-sep {
    color: rgba(255, 255, 255, 0.18);
}

/* ─── Post Body ──────────────────────────── */
.blog-post-body {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.75);
}

.blog-post-body h2 {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(167, 139, 250, 0.85);
    margin: 40px 0 14px;
}

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

.blog-post-body p:last-child {
    margin-bottom: 0;
}

.blog-post-body strong {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.blog-post-body em {
    font-style: italic;
    color: rgba(255, 255, 255, 0.65);
}

.blog-post-body ul,
.blog-post-body ol {
    margin: 0 0 20px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-post-body ul li {
    padding-left: 20px;
    position: relative;
    color: rgba(255, 255, 255, 0.75);
}

.blog-post-body ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: rgba(110, 68, 255, 0.5);
}

.blog-post-body ol {
    counter-reset: ol-counter;
}

.blog-post-body ol li {
    padding-left: 24px;
    position: relative;
    counter-increment: ol-counter;
}

.blog-post-body ol li::before {
    content: counter(ol-counter) '.';
    position: absolute;
    left: 0;
    color: rgba(167, 139, 250, 0.6);
    font-size: 12px;
    font-weight: 500;
}

.blog-post-body a {
    color: rgba(167, 139, 250, 0.9);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.blog-post-body a:hover {
    color: rgba(167, 139, 250, 1);
}

.blog-post-body blockquote {
    border-left: 2px solid rgba(167, 139, 250, 0.4);
    padding-left: 20px;
    margin: 28px 0;
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
}

.blog-post-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 40px 0;
}

/* ─── Post Footer CTA ─────────────────────── */
.blog-post-cta {
    margin-top: 56px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.blog-post-cta-label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

.blog-post-cta-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.blog-post-cta-link {
    font-size: 13px;
    font-weight: 400;
    color: rgba(167, 139, 250, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-post-cta-link:hover {
    color: rgba(167, 139, 250, 1);
}

/* ─── Utility ─────────────────────────────── */
.hidden {
    display: none !important;
}

/* ─── Light Mode Overrides ───────────────────── */

[data-theme="light"] .blog-card {
    border-bottom-color: var(--border-subtle);
}

[data-theme="light"] .blog-card-category,
[data-theme="light"] .blog-post-category {
    color: #5B21B6;
}

[data-theme="light"] .blog-card-sep {
    color: rgba(26, 10, 60, 0.2);
}

[data-theme="light"] .blog-card-date,
[data-theme="light"] .blog-card-reading {
    color: var(--text-faint);
}

[data-theme="light"] .blog-card-link {
    color: rgba(26, 10, 60, 0.78);
}

[data-theme="light"] .blog-card-link:hover {
    color: rgba(110, 68, 255, 1);
}

[data-theme="light"] .blog-card-excerpt {
    color: var(--text-muted);
}

[data-theme="light"] .blog-card-read {
    color: rgba(110, 68, 255, 0.8);
}

[data-theme="light"] .blog-card-read:hover {
    color: rgba(110, 68, 255, 1);
}

[data-theme="light"] .blog-empty {
    color: var(--text-faint);
}

[data-theme="light"] .blog-post-title {
    background: linear-gradient(135deg, #2D1266 0%, #6E44FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .blog-post-byline {
    color: var(--text-faint);
}

[data-theme="light"] .blog-post-byline-sep {
    color: var(--text-placeholder);
}

[data-theme="light"] .blog-post-body {
    color: var(--text-secondary);
}

[data-theme="light"] .blog-post-body h2 {
    color: #5B21B6;
}

[data-theme="light"] .blog-post-body strong {
    color: var(--text-primary);
}

[data-theme="light"] .blog-post-body em {
    color: var(--text-muted);
}

[data-theme="light"] .blog-post-body ul li {
    color: var(--text-secondary);
}

[data-theme="light"] .blog-post-body a {
    color: #5B21B6;
}

[data-theme="light"] .blog-post-body a:hover {
    color: #4C1D95;
}

[data-theme="light"] .blog-post-body blockquote {
    color: var(--text-muted);
}

[data-theme="light"] .blog-post-body hr {
    border-top-color: var(--border-subtle);
}

[data-theme="light"] .blog-post-cta {
    border-top-color: var(--border-subtle);
}

[data-theme="light"] .blog-post-cta-label {
    color: var(--text-faint);
}

[data-theme="light"] .blog-post-cta-link {
    color: rgba(110, 68, 255, 0.85);
}

[data-theme="light"] .blog-post-cta-link:hover {
    color: rgba(110, 68, 255, 1);
}
