/* ----------------------------------------------------------------
   Ekorbia blog — shared styles.
   Tokens lifted from ../index.html so the blog reads as the same
   product, not a separate sub-site. Two new patterns added on top:
     - .post-card     for the listing page
     - .prose         for the post body
   ---------------------------------------------------------------- */

:root {
    --bg: #0d0f13;
    --bg-2: #14171d;
    --panel: #1c1f26;
    --panel-2: #232730;
    --line: #262a33;
    --line-2: #2f3540;

    --text: #e3e6ec;
    --text-dim: #a5acba;
    --muted: #6b7384;

    --orange: #f0934a;
    --orange-2: #ffb27a;
    --blue: #5fb0ff;
    --green: #7dd17a;
    --green-2: #a3e29f;
    --purple: #c281f5;
    --pink: #f17ba0;

    --shadow-lg:
        0 30px 80px -20px rgba(0, 0, 0, 0.6),
        0 10px 30px -10px rgba(0, 0, 0, 0.5);

    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
    --serif: "Instrument Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(240, 147, 74, 0.35); color: #fff; }

/* Background ambience — same recipe as the homepage */
body::before {
    content: "";
    position: absolute;
    inset: -200px -10% auto -10%;
    height: 900px;
    background:
        radial-gradient(60% 60% at 18% 30%, rgba(240,147,74,0.22) 0%, transparent 60%),
        radial-gradient(50% 50% at 78% 18%, rgba(194,129,245,0.18) 0%, transparent 65%),
        radial-gradient(45% 45% at 55% 55%, rgba(95,176,255,0.14) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    filter: blur(20px);
}

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }
.wrap-tight { max-width: 760px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 1; }

/* ---- NAV (copy of homepage nav) ---- */
nav.top {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    background: rgba(13, 15, 19, 0.65);
    border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-weight: 600; font-size: 16px;
    letter-spacing: -0.01em;
}
.brand-mark { width: 22px; height: 22px; position: relative; display: inline-block; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.brand-mark::before {
    background: linear-gradient(135deg, var(--orange), var(--pink) 60%, var(--purple));
    transform: rotate(45deg);
    border-radius: 5px 12px 5px 12px;
}
.brand-mark::after { inset: 4px; background: var(--bg); border-radius: 3px; }
.nav-links {
    display: flex; align-items: center; gap: 28px;
    font-family: var(--mono); font-size: 13px; color: var(--text-dim);
}
.nav-links a { transition: color 0.15s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 14px;
    border-radius: 8px;
    font-family: var(--mono); font-size: 13px; font-weight: 500;
    cursor: pointer; border: 1px solid transparent;
    transition: transform 0.12s, background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--orange); color: #1a0f06;
    box-shadow: 0 6px 22px -6px rgba(240,147,74,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { background: var(--orange-2); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--panel); }

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 28px; padding: 0 12px 0 10px;
    border-radius: 999px;
    background: rgba(240,147,74,0.08);
    border: 1px solid rgba(240,147,74,0.25);
    color: var(--orange-2);
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); }

/* ============================================================
   BLOG LISTING
   ============================================================ */
section.blog-hero { padding: 40px 0 24px; }
.blog-hero h1 {
    margin: 16px 0 0;
    font-family: var(--mono);
    font-weight: 600;
    font-size: clamp(40px, 5.6vw, 76px);
    line-height: 1.0;
    letter-spacing: -0.035em;
}
.blog-hero h1 .grad {
    background: linear-gradient(95deg, var(--orange) 0%, var(--pink) 45%, var(--purple) 80%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.blog-hero p {
    margin: 22px 0 0;
    max-width: 56ch;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-dim);
}

section.posts { padding: 32px 0 80px; }
.post-list { display: grid; gap: 16px; }

.post-card {
    display: block;
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px 28px;
    transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}
.post-card:hover {
    border-color: var(--line-2);
    transform: translateY(-1px);
    box-shadow: 0 10px 30px -16px rgba(0,0,0,0.55);
}
.post-meta {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.02em;
}
.post-meta .swatch {
    width: 8px; height: 8px; border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}
.post-meta .sep { color: var(--line-2); }
.post-meta .tag {
    color: var(--text-dim);
    font-size: 11.5px;
    text-transform: uppercase;
}
.post-card h2 {
    margin: 12px 0 6px;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
}
.post-card .dek {
    margin: 8px 0 0;
    color: var(--text-dim);
    line-height: 1.55;
    font-size: 15.5px;
    max-width: 60ch;
}
.post-card .read-more {
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--orange-2);
}

/* Accent colours — used so post cards can pick up a brand dot. */
.accent-orange { color: var(--orange); }
.accent-pink   { color: var(--pink); }
.accent-purple { color: var(--purple); }
.accent-blue   { color: var(--blue); }
.accent-green  { color: var(--green); }

/* ============================================================
   POST (article) PAGE
   ============================================================ */
article.post { padding: 48px 0 64px; }
.post-header { margin-bottom: 36px; }
.post-header .back {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--text-dim);
    transition: color 0.15s;
}
.post-header .back:hover { color: var(--text); }
.post-header h1 {
    margin: 22px 0 0;
    font-family: var(--mono);
    font-weight: 600;
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.post-header h1 em {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--orange-2);
}

.prose {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text);
    max-width: 68ch;
}
.prose p { margin: 0 0 20px; color: var(--text-dim); }
.prose p > strong, .prose p > b { color: var(--text); font-weight: 500; }
.prose h2 {
    margin: 44px 0 14px;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 24px;
    letter-spacing: -0.02em;
    color: var(--text);
}
.prose h3 {
    margin: 28px 0 10px;
    font-family: var(--mono);
    font-weight: 600;
    font-size: 17px;
    color: var(--text);
}
.prose a {
    color: var(--orange-2);
    border-bottom: 1px solid rgba(240,147,74,0.35);
    transition: border-color 0.15s, color 0.15s;
}
.prose a:hover { color: var(--orange); border-bottom-color: var(--orange); }
.prose code {
    font-family: var(--mono);
    font-size: 14px;
    padding: 2px 6px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
}
.prose pre {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 0 0 24px;
}
.prose pre code {
    border: none; padding: 0; background: transparent;
    font-size: 13px; line-height: 1.55;
    color: var(--text);
}
.prose blockquote {
    margin: 0 0 24px;
    padding: 4px 0 4px 20px;
    border-left: 3px solid var(--orange);
    color: var(--text-dim);
    font-family: var(--serif);
    font-style: italic;
    font-size: 19px;
    line-height: 1.55;
}
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 22px; color: var(--text-dim); }
.prose li { margin: 6px 0; }
.prose hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 36px 0;
}

.post-footer {
    margin-top: 60px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--muted);
}

/* ============================================================
   APP SCREENSHOT STAGE — mirrors the .stage / .stage-glow /
   .stage-frame / .stage-caption rules in ../index.html so a
   real app screenshot inside a post reads as the same surface
   as the hero shot on the homepage.
   ============================================================ */
.stage {
    margin: 8px auto 28px;
    position: relative;
    max-width: 100%;
}
.stage-glow {
    position: absolute;
    inset: -40px -30px -30px -30px;
    background:
        radial-gradient(
            40% 60% at 12% 40%,
            rgba(240, 147, 74, 0.25) 0%,
            transparent 70%
        ),
        radial-gradient(
            40% 60% at 90% 60%,
            rgba(194, 129, 245, 0.22) 0%,
            transparent 70%
        ),
        radial-gradient(
            60% 100% at 50% 110%,
            rgba(95, 176, 255, 0.12) 0%,
            transparent 70%
        );
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}
.stage-frame {
    position: relative;
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line-2);
    box-shadow: var(--shadow-lg);
    background: var(--panel);
}
.stage-frame img {
    display: block;
    width: 100%;
    height: auto;
}
.stage-caption {
    margin: 16px auto 0;
    max-width: 60ch;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    font-family: var(--mono);
    letter-spacing: 0.01em;
    line-height: 1.55;
}

/* ============================================================
   COMPARE-MODE VIGNETTE — fake screenshots of the Ekorbia
   compare-3 chat surface, used in lab posts to show example
   model outputs side-by-side. Same visual vocabulary as the
   .vignette family in ../index.html so the look is consistent.
   ============================================================ */
.compare-vignette {
    background: linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border: 1px solid var(--line-2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 18px 50px -18px rgba(0, 0, 0, 0.55),
        0 2px 0 rgba(255, 255, 255, 0.03) inset;
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    margin: 0 0 28px;
    max-width: 100%;
}

.cv-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.015);
}
.cv-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border: 1px solid var(--orange);
    border-radius: 5px;
    color: var(--orange-2);
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}
.cv-pill .n { color: var(--text); }
.cv-title {
    color: var(--text);
    font-family: var(--mono);
    font-size: 13px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cv-close {
    color: var(--muted);
    font-size: 14px;
    line-height: 1;
    font-family: var(--mono);
}

.cv-user {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.cv-user-label {
    font-family: var(--mono);
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.cv-user-msg {
    color: var(--text);
    font-family: var(--mono);
    font-size: 13.5px;
    line-height: 1.5;
}

.cv-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cv-col {
    padding: 14px 16px 18px;
    border-right: 1px solid var(--line);
}
.cv-col:last-child { border-right: none; }
.cv-model {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.cv-model .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    flex-shrink: 0;
}
.cv-model .dot.gemma   { color: #ffd36a; background: #ffd36a; }
.cv-model .dot.granite { color: #f17ba0; background: #f17ba0; }
.cv-model .dot.qwen    { color: #5fb0ff; background: #5fb0ff; }
.cv-response {
    font-family: var(--sans);
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.55;
}
.cv-response p { margin: 0 0 10px; }
.cv-response p:last-child { margin-bottom: 0; }
.cv-response b, .cv-response strong { color: var(--text); font-weight: 600; }
.cv-response em { font-style: italic; color: var(--text); }

/* Stack columns on narrow screens — the prose width is the
   constraint, not the vignette width. */
@media (max-width: 720px) {
    .cv-cols { grid-template-columns: 1fr; }
    .cv-col {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .cv-col:last-child { border-bottom: none; }
}

/* ============================================================
   FOOTER (clone of the homepage footer, trimmed to fit blog)
   ============================================================ */
footer { padding: 60px 0 80px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
    max-width: 32ch;
    line-height: 1.55;
}
.foot-col h5 {
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 16px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-col a {
    color: var(--text-dim);
    font-size: 13.5px;
    font-family: var(--mono);
    transition: color 0.15s;
}
.foot-col a:hover { color: var(--text); }
.foot-bottom {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
}

@media (max-width: 880px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .post-card { padding: 20px; }
}
