/* ─── Article Dark Theme ─────────────────────────────────────────────
   Shared stylesheet for all standalone article pages.
   Replaces the inline <style> block previously in each HTML file.
   Matches the dark theme used in blog.html detail view.
   ──────────────────────────────────────────────────────────────────── */

/* ─── Variables ──────────────────────────────────────────────────── */
:root {
    --ice: #60e8ff;
    --ember: #ff4060;
    --purple: #c080ff;
    --text-primary: #fff;
    --text-secondary: rgba(255,255,255,.7);
    --text-muted: rgba(255,255,255,.4);
    --glass-bg: rgba(255,255,255,.055);
    --glass-border: rgba(255,255,255,.09);
    --glass-hover: rgba(255,255,255,.11);
}

/* ─── Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', 'Georgia', serif;
    line-height: 1.8;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
    color: var(--text-secondary);
    background: #080818;
}

/* Canvas background sits behind content (injected by canvas-background.js) */
body > header,
body > main,
body > section,
body > nav,
body > .hero,
body > .container,
body > footer {
    position: relative;
    z-index: 10;
}

h1 {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 400;
    letter-spacing: -.02em;
    margin-bottom: 0.5rem;
    color: #e8e8f0;
    line-height: 1.3;
}
h2 {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #e8e8f0;
}
h3 {
    font-size: 1.2em;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,.8);
}
p {
    margin-bottom: 1.2rem;
    font-family: 'Georgia', serif;
    font-size: .95em;
}

a { color: var(--ice); transition: filter .2s; }
a:hover { filter: brightness(1.2); }

strong { color: rgba(255,255,255,.9); font-weight: 600; }
em { color: rgba(255,255,255,.6); }

ul, ol { margin: 1rem 0; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

/* ─── Navigation ─────────────────────────────────────────────────── */
.article-nav {
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    font-size: 0.9em;
    line-height: 1.6;
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.article-nav a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.article-nav a:hover { color: #fff; text-decoration: none; filter: none; }
.article-nav strong { color: #fff; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    margin-bottom: 0.5rem;
    transition: color .2s;
}
.back-link:hover { color: var(--ice); filter: none; }

/* ─── Video embed ────────────────────────────────────────────────── */
.video-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 2rem 0;
    border-radius: 12px;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ─── Stat grid ──────────────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.stat-box {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}
.stat-box .number {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--ice);
    margin-bottom: 0.5rem;
}
.stat-box .label {
    font-size: 0.9em;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ─── Pull quote ─────────────────────────────────────────────────── */
.pull-quote {
    background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(139,92,246,.12));
    border: 1px solid rgba(99,102,241,.2);
    color: rgba(255,255,255,.85);
    padding: 2rem 2.4rem;
    margin: 2rem 0;
    border-radius: 12px;
    font-size: 1.2em;
    line-height: 1.6;
    font-style: italic;
}
.pull-quote .attribution {
    margin-top: 1rem;
    font-style: normal;
    font-weight: 500;
    font-size: 0.7em;
    color: var(--text-muted);
}

/* ─── Inline quote ───────────────────────────────────────────────── */
.quote {
    border-left: 4px solid rgba(96,232,255,.3);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: rgba(255,255,255,.6);
}

/* ─── Takeaway list ──────────────────────────────────────────────── */
.takeaway-list {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}
.takeaway-list ol, .takeaway-list ul { padding-left: 1.5rem; }
.takeaway-list li { margin-bottom: 0.8rem; line-height: 1.7; }

/* ─── Card ───────────────────────────────────────────────────────── */
.card {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.card ul, .card ol { padding-left: 1.5rem; }
.card li { margin-bottom: 0.5rem; }
.card-title { font-weight: 600; color: #e8e8f0; margin-bottom: 0.5rem; }

/* ─── TL;DR box ──────────────────────────────────────────────────── */
.tldr {
    background: rgba(255,255,255,.04);
    border-left: 4px solid var(--ice);
    border-radius: 0 10px 10px 0;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}
.tldr h2 {
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    margin-top: 0;
    color: var(--ice);
}
.tldr li { margin-bottom: 0.5rem; }

/* ─── Tags ───────────────────────────────────────────────────────── */
.tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.tag {
    display: inline-block;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    padding: 0.4rem 1rem;
    margin: 0.3rem;
    border-radius: 20px;
    font-size: 0.85em;
    color: rgba(255,255,255,.6);
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
}

/* ─── Divider ────────────────────────────────────────────────────── */
.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--ice), var(--purple), var(--ember));
    margin: 2.5rem 0;
    border-radius: 2px;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
    text-align: center;
    padding: 2.5rem 0;
    color: var(--text-muted);
    font-size: 0.85em;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: 3rem;
    font-family: 'DM Sans', sans-serif;
}
.footer a {
    color: rgba(255,255,255,.5);
    text-decoration: none;
}
.footer a:hover { color: var(--ice); }

/* ─── Transcript-specific ────────────────────────────────────────── */
.section-divider {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1.1em;
    color: #e8e8f0;
    margin: 2rem 0 1rem;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,.04);
    border-left: 3px solid var(--ice);
    border-radius: 0 8px 8px 0;
}
.ts-section {
    color: var(--ice);
    font-weight: 700;
    margin-right: 0.5rem;
    font-size: 0.9em;
}

.minute-block {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.8rem 1rem;
    margin: 0.3rem 0;
    border-radius: 8px;
    transition: background .15s;
}
.minute-block:hover {
    background: rgba(255,255,255,.03);
}

.ts-link {
    flex-shrink: 0;
    color: var(--ice);
    font-family: 'DM Sans', monospace;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    min-width: 3.5em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(96,232,255,.08);
    transition: background .15s;
}
.ts-link:hover {
    background: rgba(96,232,255,.18);
    filter: none;
}

.transcript-text {
    color: var(--text-secondary);
    font-family: 'Georgia', serif;
    font-size: .95em;
    line-height: 1.8;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.6);
    font-size: 1.2em;
    cursor: pointer;
    transition: all .2s;
    display: none;
    z-index: 100;
}
.back-to-top:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

/* ─── Wim's Words specific ───────────────────────────────────────── */
.wim-badge {
    display: inline-block;
    background: rgba(96,232,255,.1);
    border: 1px solid rgba(96,232,255,.2);
    color: var(--ice);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 1rem;
    font-family: 'DM Sans', sans-serif;
}

/* ─── Audio player ───────────────────────────────────────────────── */
.audio-player {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin: 1.5rem 0;
}
.audio-player h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1em;
}
.audio-player audio {
    width: 100%;
    border-radius: 8px;
}

/* ─── Metrics bar (injected by inject_metrics.py) ────────────────── */
.metrics-bar {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,255,255,.08) !important;
}

/* ─── Hero meta (legacy articles) ────────────────────────────────── */
.hero-meta {
    color: var(--text-muted);
    font-size: 0.9em;
    font-family: 'DM Sans', sans-serif;
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 600px) {
    body { padding: 1rem; }
    h1 { font-size: 1.7em; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .pull-quote { padding: 1.5rem; font-size: 1.1em; }
    .article-nav { font-size: 0.8em; padding: 0.8rem; }
    .minute-block { gap: 0.6rem; padding: 0.6rem 0.5rem; }
}
