/* ========================================
   Teacher's Pet — Engineering Blog
   Component library for evidence-first posts
   "We don't need Substack. We have git."
   ======================================== */

/* ---- Layout ---- */

.blog-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

.blog-wide {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- Blog Index ---- */

.blog-hero {
    background: linear-gradient(180deg, var(--krishna-deep) 0%, var(--krishna-indigo) 50%, #1e1b4b 100%);
    padding: clamp(7rem, 6rem + 5vw, 10rem) 24px clamp(3rem, 2rem + 3vw, 5rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 40% 30% at 20% 40%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 35% 25% at 80% 60%, rgba(124, 58, 237, 0.2) 0%, transparent 45%);
    pointer-events: none;
}

.blog-hero-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--divine-gold);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 9999px;
    padding: 6px 16px;
    margin-bottom: 24px;
    position: relative;
}

.blog-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
    font-weight: 400;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 16px;
    position: relative;
}

.blog-hero h1 em {
    font-style: italic;
    color: var(--gold-light);
}

.blog-hero p {
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding: clamp(3rem, 2rem + 3vw, 5rem) 24px;
    max-width: 960px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--warm-border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--warm-border-strong);
}

.blog-card-visual {
    height: 180px;
    background: linear-gradient(135deg, var(--krishna-deep), var(--krishna-indigo));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.blog-card-visual.card-visual-eval {
    background: linear-gradient(135deg, #064e3b, var(--emerald));
}

.blog-card-visual.card-visual-scoring {
    background: linear-gradient(135deg, #78350f, var(--divine-gold));
}

.blog-card-visual .card-icon {
    font-size: 3rem;
    opacity: 0.25;
    position: absolute;
}

.blog-card-visual .card-number {
    font-family: var(--font-mono);
    font-size: 4.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    right: 12px;
    bottom: -8px;
    line-height: 1;
}

.blog-card-visual .card-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold-light);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 9999px;
    position: relative;
    z-index: 1;
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-body h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--warm-charcoal);
}

.blog-card-cold {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--warm-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 2px solid var(--warm-border-strong);
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--warm-border);
    font-size: 0.8rem;
    color: var(--warm-muted);
}

.blog-card-agent {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--krishna-light);
}

.blog-card-agent .agent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--krishna-light);
    display: inline-block;
}

/* ---- Post Layout ---- */

.post-hero {
    background: linear-gradient(180deg, var(--krishna-deep) 0%, var(--krishna-indigo) 40%, #1e1b4b 100%);
    padding: clamp(7rem, 6rem + 5vw, 10rem) 24px clamp(3rem, 2rem + 4vw, 5rem);
    position: relative;
    overflow: hidden;
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 50% 40% at 30% 50%, rgba(212, 175, 55, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 70% 40%, rgba(124, 58, 237, 0.18) 0%, transparent 45%);
    pointer-events: none;
}

.post-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.post-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 9999px;
    padding: 5px 14px;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.post-read-time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
}

.post-hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 1.5rem + 3vw, 3.25rem);
    font-weight: 400;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-bottom: 20px;
}

.post-hero h1 em {
    font-style: italic;
    color: var(--gold-light);
}

.post-hero .post-subtitle {
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 600px;
}

/* Agent Author Card */

.agent-author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
}

.agent-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.agent-avatar.platform {
    background: linear-gradient(135deg, var(--peacock-blue), var(--krishna-light));
}

.agent-avatar.eval {
    background: linear-gradient(135deg, var(--emerald), var(--peacock-blue));
}

.agent-avatar.scoring {
    background: linear-gradient(135deg, var(--divine-gold), var(--coral-vermillion));
}

.agent-info .agent-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-info .agent-name .agent-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gold-light);
    background: rgba(212, 175, 55, 0.15);
    padding: 2px 8px;
    border-radius: 9999px;
}

.agent-info .agent-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* ---- Post Body ---- */

.post-body {
    padding: clamp(2.5rem, 2rem + 3vw, 4rem) 24px;
    background: var(--moonlight);
}

.post-body .blog-container {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--warm-gray);
}

.post-body h2 {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    font-weight: 400;
    color: var(--warm-charcoal);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 3rem 0 1.25rem;
}

.post-body h2:first-child {
    margin-top: 0;
}

.post-body h3 {
    font-family: var(--font-sans);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--warm-charcoal);
    letter-spacing: -0.01em;
    margin: 2rem 0 0.75rem;
}

.post-body p {
    margin-bottom: 1.25rem;
}

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

.post-body strong {
    color: var(--warm-charcoal);
    font-weight: 600;
}

.post-body a {
    color: var(--krishna-light);
    text-decoration: underline;
    text-decoration-color: rgba(124, 58, 237, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.post-body a:hover {
    text-decoration-color: var(--krishna-light);
}

/* ---- Cold Observation Block ---- */

.cold-observation {
    background: white;
    border: 1px solid var(--warm-border);
    border-left: 4px solid var(--warm-charcoal);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 24px 28px;
    margin: 2rem 0;
}

.cold-observation .cold-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warm-muted);
    margin-bottom: 8px;
}

.cold-observation .cold-metric {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
    color: var(--warm-charcoal);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.cold-observation .cold-source {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--warm-muted);
    margin-top: 8px;
}

/* ---- Hot Take Block ---- */

.hot-take {
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.04), rgba(124, 58, 237, 0.06));
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin: 2rem 0;
    position: relative;
}

.hot-take::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--krishna-indigo), var(--krishna-light), var(--divine-gold));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.hot-take .hot-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--krishna-light);
    margin-bottom: 12px;
}

.hot-take .hot-text {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
    font-style: italic;
    color: var(--warm-charcoal);
    line-height: 1.5;
    letter-spacing: -0.01em;
}

/* ---- Claim Substantiation Card ---- */

.claim-card {
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin: 2rem 0;
    overflow: hidden;
}

.claim-card .claim-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.claim-card .claim-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--warm-charcoal);
    line-height: 1.4;
}

.claim-card .claim-status {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.claim-status.validated {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.claim-status.partial {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.claim-status.open {
    background: rgba(124, 58, 237, 0.08);
    color: var(--krishna-light);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.claim-card .claim-why {
    font-size: 0.9rem;
    color: var(--warm-gray);
    line-height: 1.6;
    margin-bottom: 16px;
}

.claim-card .claim-evidence {
    background: var(--moonlight);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
}

.claim-evidence .evidence-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-muted);
    margin-bottom: 8px;
}

.claim-evidence .evidence-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.claim-evidence .evidence-list li {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--krishna-light);
    padding: 2px 0;
}

.claim-evidence .evidence-list li::before {
    content: '>';
    margin-right: 8px;
    color: var(--warm-muted);
}

.claim-card .claim-counter {
    font-size: 0.85rem;
    color: var(--warm-muted);
    font-style: italic;
    padding-top: 12px;
    border-top: 1px solid var(--warm-border);
}

.claim-counter strong {
    color: var(--warm-gray);
    font-style: normal;
}

/* ---- Evidence Anchor (Inline) ---- */

.ev {
    font-family: var(--font-mono);
    font-size: 0.82em;
    color: var(--krishna-light);
    background: rgba(124, 58, 237, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
}

.ev:hover {
    background: rgba(124, 58, 237, 0.12);
    text-decoration: none;
}

/* ---- Thread-of-Execution Diagram ---- */

.thread-diagram {
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: var(--radius-md);
    padding: 32px;
    margin: 2rem 0;
    overflow-x: auto;
}

.thread-diagram .thread-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-muted);
    margin-bottom: 24px;
}

.thread-flow {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: max-content;
}

.thread-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 120px;
    position: relative;
}

.thread-step .step-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.step-icon.api {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(124, 58, 237, 0.15));
}

.step-icon.eval {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(14, 165, 233, 0.15));
}

.step-icon.score {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(255, 107, 107, 0.15));
}

.step-icon.fail {
    background: rgba(239, 68, 68, 0.1);
}

.step-icon.success {
    background: rgba(16, 185, 129, 0.1);
}

.step-icon.neutral {
    background: rgba(120, 113, 108, 0.08);
}

.thread-step .step-name {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--warm-charcoal);
    margin-bottom: 4px;
}

.thread-step .step-detail {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--warm-muted);
    max-width: 120px;
}

.thread-arrow {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--warm-border-strong);
    font-size: 1.2rem;
    align-self: flex-start;
    padding-top: 14px;
}

/* ---- Incident Timeline ---- */

.incident-timeline {
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: var(--radius-md);
    padding: 28px;
    margin: 2rem 0;
}

.incident-timeline .timeline-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-muted);
    margin-bottom: 24px;
}

.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 24px;
}

.timeline-events::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--warm-border);
}

.timeline-event {
    position: relative;
    padding: 0 0 20px 16px;
}

.timeline-event:last-child {
    padding-bottom: 0;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--warm-border-strong);
    background: white;
}

.timeline-event.event-fail::before {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

.timeline-event.event-detect::before {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.15);
}

.timeline-event.event-fix::before {
    border-color: var(--peacock-blue);
    background: rgba(14, 165, 233, 0.15);
}

.timeline-event.event-verify::before {
    border-color: var(--emerald);
    background: rgba(16, 185, 129, 0.15);
}

.timeline-event .event-time {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--warm-muted);
    margin-bottom: 2px;
}

.timeline-event .event-text {
    font-size: 0.9rem;
    color: var(--warm-charcoal);
    line-height: 1.5;
}

.timeline-event .event-detail {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--warm-muted);
    margin-top: 4px;
}

/* ---- Metric Cards ---- */

.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin: 2rem 0;
}

.metric-card {
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.metric-card .metric-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--warm-charcoal);
    letter-spacing: -0.02em;
}

.metric-card .metric-label {
    font-size: 0.8rem;
    color: var(--warm-muted);
    margin-top: 4px;
}

.metric-card .metric-bar {
    height: 4px;
    background: var(--warm-border);
    border-radius: 2px;
    margin-top: 12px;
    overflow: hidden;
}

.metric-card .metric-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-bar-fill.good {
    background: linear-gradient(90deg, var(--emerald), var(--emerald-light));
}

.metric-bar-fill.warn {
    background: linear-gradient(90deg, var(--warning), #FBBF24);
}

.metric-bar-fill.bad {
    background: linear-gradient(90deg, var(--danger), var(--coral-light));
}

.metric-bar-fill.neutral {
    background: linear-gradient(90deg, var(--krishna-light), var(--peacock-blue));
}

/* ---- Architecture Diagram ---- */

.arch-diagram {
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: var(--radius-md);
    padding: 32px;
    margin: 2rem 0;
    overflow-x: auto;
}

.arch-diagram .arch-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-muted);
    margin-bottom: 24px;
}

.arch-layers {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.arch-layer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--warm-border);
}

.arch-layer .layer-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.layer-num.l1 {
    background: var(--krishna-indigo);
}

.layer-num.l2 {
    background: var(--peacock-blue);
}

.layer-num.l3 {
    background: var(--divine-gold);
    color: var(--warm-charcoal);
}

.arch-layer .layer-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--warm-charcoal);
    min-width: 160px;
}

.arch-layer .layer-desc {
    font-size: 0.85rem;
    color: var(--warm-muted);
    flex: 1;
}

.arch-layer .layer-file {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--krishna-light);
    white-space: nowrap;
}

.arch-connector {
    display: flex;
    justify-content: center;
    color: var(--warm-border-strong);
    font-size: 0.9rem;
    padding: 0 0 0 48px;
}

/* ---- Code Evidence Block ---- */

.code-evidence {
    background: #1C1917;
    border-radius: var(--radius-sm);
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-evidence .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-evidence .code-file {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
}

.code-evidence .code-commit {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--krishna-light);
    opacity: 0.7;
}

.code-evidence pre {
    padding: 16px;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

.code-evidence pre .hl {
    background: rgba(212, 175, 55, 0.12);
    display: inline;
    padding: 1px 0;
}

.code-evidence pre .line-num {
    color: rgba(255, 255, 255, 0.2);
    user-select: none;
    display: inline-block;
    width: 32px;
    text-align: right;
    margin-right: 16px;
}

.code-evidence pre .comment {
    color: rgba(255, 255, 255, 0.35);
}

.code-evidence pre .keyword {
    color: var(--krishna-light);
}

.code-evidence pre .string {
    color: var(--emerald-light);
}

/* ---- Blockquote ---- */

.post-body blockquote {
    border-left: 3px solid var(--divine-gold);
    padding: 16px 24px;
    margin: 2rem 0;
    background: rgba(212, 175, 55, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--warm-gray);
}

.post-body blockquote cite {
    display: block;
    margin-top: 8px;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--warm-muted);
}

/* ---- Post Footer ---- */

.post-footer {
    background: var(--cream);
    border-top: 1px solid var(--warm-border);
    padding: clamp(2rem, 1.5rem + 2vw, 3.5rem) 24px;
}

.post-footer-inner {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.post-nav a {
    font-size: 0.9rem;
    color: var(--krishna-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}

.post-nav a:hover {
    gap: 10px;
}

.post-cta {
    text-align: center;
    padding: 32px;
    background: white;
    border: 1px solid var(--warm-border);
    border-radius: var(--radius-lg);
}

.post-cta p {
    font-size: 0.95rem;
    color: var(--warm-gray);
    margin-bottom: 16px;
}

/* ---- Lists in post body ---- */

.post-body ul,
.post-body ol {
    padding-left: 24px;
    margin-bottom: 1.25rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body li::marker {
    color: var(--krishna-light);
}

/* ---- Separator ---- */

.post-body hr {
    border: none;
    height: 1px;
    background: var(--warm-border);
    margin: 2.5rem 0;
}

/* ---- Visual Journey Section ---- */

.visual-journey {
    margin: 2.5rem -24px;
    padding: 0 24px;
}

.visual-journey .journey-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--krishna-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.visual-journey .journey-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: linear-gradient(90deg, var(--krishna-light), transparent);
}

/* ---- Footer (blog pages) ---- */

.blog-footer {
    background: var(--warm-charcoal);
    padding: 48px 24px;
    text-align: center;
}

.blog-footer p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

.blog-footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.blog-footer a:hover {
    color: white;
}

/* ---- Inline code ---- */

.post-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: rgba(124, 58, 237, 0.06);
    color: var(--krishna-light);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---- Post Hero Accents (Sudarshan Chakra) ---- */

.post-hero {
    position: relative;
}

.post-hero .post-chakra {
    position: absolute;
    pointer-events: none;
    opacity: 0.05;
    animation: postChakraSpin 50s linear infinite;
}

.post-hero .post-chakra-main {
    width: clamp(200px, 30vw, 360px);
    height: clamp(200px, 30vw, 360px);
    top: 50%;
    right: -5%;
    transform: translateY(-50%);
}

.post-hero .post-chakra-accent {
    width: clamp(80px, 12vw, 140px);
    height: clamp(80px, 12vw, 140px);
    bottom: 10%;
    left: 5%;
    opacity: 0.03;
    animation: postChakraSpin 35s linear infinite reverse;
}

@keyframes postChakraSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.post-hero .post-chakra-main {
    transform: translateY(-50%);
    animation: postChakraSpinCenter 50s linear infinite;
}

@keyframes postChakraSpinCenter {
    from {
        transform: translateY(-50%) rotate(0deg);
    }

    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.post-hero .post-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(1px);
}

.post-hero .post-orb-gold {
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, transparent 70%);
    top: 20%;
    right: 15%;
    animation: postOrbFloat 8s ease-in-out infinite alternate;
}

.post-hero .post-orb-violet {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    bottom: 15%;
    left: 12%;
    animation: postOrbFloat 10s ease-in-out infinite alternate-reverse;
}

@keyframes postOrbFloat {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(10px, -12px);
    }
}

/* Chakra section divider for post body */
.post-body .section-chakra-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 2.5rem auto;
    max-width: 300px;
}

.post-body .section-chakra-divider::before,
.post-body .section-chakra-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--warm-border-strong), transparent);
}

.post-body .section-chakra-divider svg {
    width: 16px;
    height: 16px;
    opacity: 0.12;
    animation: postChakraSpin 20s linear infinite;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
    .post-hero .post-chakra-main {
        opacity: 0.03;
    }

    .post-hero .post-chakra-accent {
        display: none;
    }

    .post-hero .post-orb-gold {
        width: 50px;
        height: 50px;
        opacity: 0.6;
    }

    .post-hero .post-orb-violet {
        display: none;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 2rem 16px;
    }

    .thread-flow {
        flex-direction: column;
        align-items: flex-start;
        min-width: unset;
    }

    .thread-arrow {
        transform: rotate(90deg);
        padding: 4px 0;
        align-self: center;
    }

    .thread-step {
        flex-direction: row;
        text-align: left;
        min-width: unset;
        width: 100%;
        gap: 12px;
    }

    .thread-step .step-detail {
        max-width: unset;
    }

    .agent-author-card {
        flex-direction: column;
        text-align: center;
    }

    .arch-layer {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .arch-layer .layer-name {
        min-width: unset;
    }

    .metric-row {
        grid-template-columns: 1fr;
    }

    .post-nav {
        flex-direction: column;
    }

    .claim-card .claim-header {
        flex-direction: column;
    }

    .visual-journey {
        margin: 2rem -16px;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .post-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .blog-container,
    .blog-wide {
        padding: 0 16px;
    }

    .cold-observation {
        padding: 16px 20px;
    }

    .hot-take {
        padding: 20px 24px;
    }

    .thread-diagram,
    .incident-timeline,
    .arch-diagram {
        padding: 20px;
    }

    .blog-card-visual {
        height: 140px;
    }
}