/* ==========================================================================
   Thoughts — listing + article styles
   Built on the ReFwd design tokens: #B3FF00 accent, #23251E hairlines,
   #BFC3B7 body copy, Source Serif 4 display, JetBrains Mono labels.
   ========================================================================== */

/* ---------- shared eyebrow ---------- */
.eyebrow {
    color: #B3FF00;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 20px;
}

/* ---------- listing hero ---------- */
#header_content.thoughts-header {
    height: auto;
    min-height: 420px;
}
#header_content.thoughts-header .smaller-cta {
    height: auto;
    margin-top: 90px;
    padding: 40px 0 70px 0;
}
#header_content.thoughts-header .smaller-cta .content {
    padding: 0 10px;
}
#header_content.thoughts-header h1 {
    font-size: 72px;
    line-height: 74px;
    margin: 0 0 18px 0;
}
#header_content.thoughts-header p {
    max-width: 620px;
    font-size: 19px;
}

/* ---------- listing ---------- */
.thoughts-list {
    margin: auto;
    max-width: 1200px;
    padding: 40px 20px 140px 20px;
}
.post-card {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid #23251E;
    padding: 44px 0 48px 0;
    transition: padding 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-card:last-child { border-bottom: 1px solid #23251E; }
.post-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: -1px;
    height: 1px;
    width: 0;
    background: #B3FF00;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.post-card:hover::after { width: 100%; }
.post-card:hover { padding-left: 18px; }
.post-card:hover .post-card-title { color: #B3FF00; }
.post-card:hover .post-card-more { gap: 14px; }
.post-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #8A8F84;
    margin-bottom: 16px;
}
.post-card-title {
    font-family: 'Source Serif 4', 'Source Serif Pro', serif;
    font-size: 40px;
    font-weight: 500;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 16px 0;
    max-width: 820px;
    transition: color 0.3s ease;
}
.post-card-excerpt {
    color: #BFC3B7;
    font-size: 17px;
    line-height: 1.65;
    max-width: 700px;
    margin: 0 0 22px 0;
}
.post-card-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #B3FF00;
    transition: gap 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- article header ---------- */
#header_content.post-header {
    height: auto;
    min-height: 0;
}
#header_content.post-header .smaller-cta {
    height: auto;
    margin-top: 100px;
    padding: 40px 0 74px 0;
}
#header_content.post-header .smaller-cta .content {
    padding: 0 10px;
}
#header_content.post-header h1.post-title {
    font-size: 64px;
    line-height: 1.04;
    max-width: 940px;
    margin: 0 0 22px 0;
}
#header_content.post-header .post-lede {
    max-width: 680px;
    font-size: 20px;
    line-height: 1.55;
    color: #BFC3B7;
}
.post-byline {
    margin-top: 26px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    letter-spacing: 0.06em;
    color: #8A8F84;
}
.post-byline .sep { color: #46512B; margin: 0 10px; }

/* ---------- full-bleed image hero (new component) ----------
   Usage: <div id="header_content" class="... hero-bleed hero-<name>">
   The background spans the whole viewport while the copy stays in the
   1200px column. Set the image with the --hero-image custom property. */
#header_content.hero-bleed {
    max-width: none;
    width: 100%;
    height: auto;
    min-height: 0;
    background-color: #000;
    background-image:
        linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.40) 55%, rgba(0,0,0,0.94) 100%),
        var(--hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
#header_content.hero-bleed .smaller-cta {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0;
    padding-top: 150px;
}
#header_content.hero-bleed .smaller-cta .content {
    position: relative;
    z-index: 1;
}

/* per-article hero images */
#header_content.hero-bleed.hero-spens { --hero-image: url('../images/spens-post-bg.png'); }
#header_content.hero-bleed.hero-moral {
    --hero-image: url('../images/moral-ethicspng.png');
    background-position: 30% center;
}

@media (max-width: 768px) {
    #header_content.hero-bleed .smaller-cta {
        padding-top: 70px;
    }
    #header_content.hero-bleed.hero-moral { background-position: 38% center; }
}

/* ---------- progress bar ---------- */
.progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    z-index: 200;
    pointer-events: none;
}
.progress span {
    display: block;
    height: 100%;
    width: 0%;
    background: #B3FF00;
    box-shadow: 0 0 12px rgba(179, 255, 0, 0.7);
}

/* ---------- article body ---------- */
.article-body {
    max-width: 800px;
    margin: 0 auto;
    padding: 90px 20px 40px 20px;
}
.article-body > *:first-child { margin-top: 0; }
.article-body p {
    font-size: 18px;
    line-height: 1.78;
    color: #BFC3B7;
    margin: 0 0 26px 0;
}
.article-body h2 {
    font-family: 'Source Serif 4', 'Source Serif Pro', serif;
    font-size: 38px;
    font-weight: 500;
    line-height: 1.15;
    color: #fff;
    margin: 64px 0 22px 0;
    scroll-margin-top: 110px;
}
.article-body h3 {
    font-family: 'Source Serif 4', 'Source Serif Pro', serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    margin: 44px 0 16px 0;
}
.article-body strong { color: #fff; font-weight: 600; }
.article-body em { color: #E6E8E0; }
.article-body a {
    color: #B3FF00;
    text-decoration: none;
    border-bottom: 1px solid rgba(179, 255, 0, 0.35);
    transition: border-color 0.25s ease, color 0.25s ease;
}
.article-body a:hover { border-bottom-color: #B3FF00; }
.article-body ul,
.article-body ol {
    margin: 0 0 30px 0;
    padding-left: 26px;
}
.article-body li {
    color: #BFC3B7;
    font-size: 18px;
    line-height: 1.72;
    margin: 12px 0;
    padding-left: 6px;
}
.article-body li::marker { color: #B3FF00; }
.article-body li strong { color: #fff; }
.article-body blockquote {
    margin: 44px 0;
    padding: 6px 0 6px 30px;
    border-left: 2px solid #B3FF00;
}
.article-body blockquote p {
    font-family: 'Source Serif 4', 'Source Serif Pro', serif;
    font-size: 27px;
    line-height: 1.35;
    color: #fff;
    margin: 0;
}
.article-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84em;
    color: #B3FF00;
    background: #0D0F0C;
    border: 1px solid #23251E;
    border-radius: 6px;
    padding: 2px 7px;
}
.article-body pre {
    margin: 34px 0;
    padding: 22px 24px;
    background: #0A0B08;
    border: 1px solid #23251E;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.article-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #BFC3B7;
    font-size: 14px;
    line-height: 1.9;
}
.article-body pre .prompt { color: #B3FF00; }

/* benchmark table */
.table-wrap {
    margin: 36px 0;
    overflow-x: auto;
    border: 1px solid #23251E;
    border-radius: 12px;
    background: #0A0B08;
}
.article-body table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}
.article-body th {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8A8F84;
    text-align: left;
    font-weight: 500;
    padding: 16px 20px;
    border-bottom: 1px solid #23251E;
}
.article-body td {
    font-size: 16px;
    color: #BFC3B7;
    padding: 16px 20px;
    border-bottom: 1px solid #1A1C17;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body td:first-child { color: #fff; }
.article-body td .cost { font-family: 'JetBrains Mono', monospace; color: #B3FF00; }
.table-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #8A8F84;
    margin: -18px 0 36px 0;
}

/* ---------- figures / diagrams ---------- */
.diagram {
    position: relative;
    margin: 52px 0;
    padding: 30px 26px 22px 26px;
    border: 1px solid #23251E;
    border-radius: 16px;
    background:
        radial-gradient(120% 130% at 0% 0%, #0B0D09 0%, #050604 72%);
    overflow: hidden;
}
.diagram::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.055) 1px, transparent 1.4px);
    background-size: 18px 18px;
    -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 78%);
    mask-image: radial-gradient(120% 100% at 50% 0%, #000 0%, transparent 78%);
    pointer-events: none;
}
.diagram svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}
.diagram figcaption {
    position: relative;
    z-index: 1;
    margin-top: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: 0.02em;
    color: #8A8F84;
}
.diagram figcaption b { color: #B3FF00; font-weight: 500; }

/* SVG diagram primitives */
.dg-box {
    fill: #0A0B08;
    stroke: #2E3129;
    stroke-width: 1.5;
    transition: stroke 0.4s ease, fill 0.4s ease;
}
.dg-box.soft { fill: #0D100B; }
.dg-box.accent { stroke: #B3FF00; }
.dg-box.dashed { stroke-dasharray: 6 6; fill: none; }
.dg-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    fill: #BFC3B7;
}
.dg-label.dim {
    fill: #8A8F84;
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.dg-label.accent { fill: #B3FF00; }
.dg-label.micro { font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; fill: #676B60; }
.dg-title {
    font-family: 'Source Serif 4', 'Source Serif Pro', serif;
    font-size: 15px;
    fill: #fff;
}
.dg-lane {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    fill: #55584F;
}
.dg-line { stroke: #2E3129; stroke-width: 1.4; fill: none; }
.dg-dash { stroke: #23251E; stroke-width: 1.2; stroke-dasharray: 4 6; fill: none; }
.dg-flow {
    stroke: #B3FF00;
    stroke-width: 1.6;
    fill: none;
    stroke-dasharray: 5 7;
    animation: dg-dash 1.15s linear infinite;
}
.dg-flow.slow { animation-duration: 1.9s; }
.dg-flow.ghost { stroke: #46512B; }
@keyframes dg-dash { to { stroke-dashoffset: -24; } }
.dg-node { animation: dg-pulse 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.dg-node.d1 { animation-delay: 0.5s; }
.dg-node.d2 { animation-delay: 1s; }
.dg-node.d3 { animation-delay: 1.5s; }
@keyframes dg-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* scroll reveal (only hide when JS is present) */
.js .dg-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--d, 0s);
}
.diagram.in .dg-reveal { opacity: 1; transform: none; }

/* generic scroll reveal for prose */
.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- article footer cta ---------- */
.article-end {
    max-width: 800px;
    margin: 20px auto 0 auto;
    padding: 0 20px 120px 20px;
}
.article-end .back {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: #8A8F84;
    text-decoration: none;
    border: none;
}
.article-end .back:hover { color: #B3FF00; }
.article-cta {
    margin-top: 60px;
    padding: 44px;
    border: 1px solid #23251E;
    border-radius: 16px;
    background: #0A0B08;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}
.article-cta h3 {
    font-family: 'Source Serif 4', 'Source Serif Pro', serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    max-width: 420px;
    color: #fff;
}

/* ---------- responsive ---------- */
@media (max-width: 768px) {
    #header_content.thoughts-header h1 { font-size: 46px; line-height: 48px; }
    #header_content.post-header h1.post-title { font-size: 40px; line-height: 1.06; }
    #header_content.post-header .smaller-cta,
    #header_content.thoughts-header .smaller-cta { margin-top: 40px; padding-bottom: 44px; }
    .post-card-title { font-size: 30px; }
    .post-card:hover { padding-left: 0; }
    .article-body { padding: 60px 20px 20px 20px; }
    .article-body p { font-size: 17px; }
    .article-body h2 { font-size: 30px; margin-top: 50px; }
    .article-body blockquote p { font-size: 22px; }
    .diagram { padding: 16px 12px 14px 12px; margin: 40px 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
    .diagram svg { min-width: 660px; }
    .diagram figcaption { font-size: 11px; min-width: 660px; }
    .article-cta { padding: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .dg-flow, .dg-node { animation: none; }
    .dg-reveal, .reveal { opacity: 1; transform: none; transition: none; }
    .post-card, .post-card::after, .post-card-more { transition: none; }
}
