/* ============================================
   lucian.co — Post / Dispatch Stylesheet
   Shared by all /posts/ pages
   ============================================ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --bg-card: #12121e;
    --bg-card-hover: #181828;
    --text-primary: #e8e6e1;
    --text-secondary: #9a978f;
    --text-dim: #5a584f;
    --accent: #c9a84c;
    --accent-dim: #8a7535;
    --accent-glow: rgba(201, 168, 76, 0.08);
    --border: #1e1e2e;
    --border-light: #2a2a3a;
    --link: #7ea8be;
    --link-hover: #a8cfe0;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Source Sans 3', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAV ===== */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}
nav.scrolled { padding: 0.8rem 2rem; }

.nav-brand {
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
}
.nav-brand span { color: var(--text-dim); }

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}
.nav-links a {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-decoration: none;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }

/* ===== POST LAYOUT ===== */
.post-wrap {
    max-width: 740px;
    margin: 0 auto;
    padding: 7rem 2rem 6rem;
}

/* ===== POST HEADER ===== */
.post-header {
    margin-bottom: 3.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
}

.post-series {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--accent-dim);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.post-title {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 400;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.post-title em { font-style: italic; color: var(--accent); }

.post-subtitle {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--text-secondary);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.post-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.post-meta-item {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.post-meta-item a {
    color: var(--link);
    text-decoration: none;
    transition: color 0.2s ease;
}
.post-meta-item a:hover { color: var(--link-hover); }

.post-status {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 2px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.status-review { background: rgba(0,200,120,0.1); color: #4ecb7d; border: 1px solid rgba(0,200,120,0.2); }
.status-submitted { background: rgba(201,168,76,0.1); color: var(--accent); border: 1px solid rgba(201,168,76,0.2); }

/* ===== PROSE ===== */
.post-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

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

.post-body h2 {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 3rem 0 1rem;
    line-height: 1.25;
}

.post-body h3 {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin: 2.5rem 0 0.8rem;
}

.post-body strong {
    color: var(--text-primary);
    font-weight: 500;
}

.post-body em { font-style: italic; }

.post-body a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid rgba(126,168,190,0.3);
    transition: all 0.2s ease;
}
.post-body a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* ===== MATH BLOCK ===== */
.math-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent-dim);
    border-radius: 0 6px 6px 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 2;
    overflow-x: auto;
}

.math-block .label {
    font-size: 0.6rem;
    color: var(--accent-dim);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

/* ===== STAT CALLOUT ===== */
.stat-callout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin: 2.5rem 0;
}

.stat-callout-item {
    background: var(--bg-card);
    padding: 1.5rem;
    text-align: center;
}

.stat-callout-number {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    display: block;
}

.stat-callout-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 0.4rem;
    display: block;
    line-height: 1.5;
}

/* ===== PULLQUOTE ===== */
.pullquote {
    border-left: 3px solid var(--accent);
    margin: 2.5rem 0;
    padding: 0.5rem 0 0.5rem 2rem;
    font-family: var(--serif);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--text-primary);
    line-height: 1.55;
}

/* ===== POST FOOTER ===== */
.post-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border);
}

.post-footer-label {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--accent-dim);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.post-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-footer-link {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--link);
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 3px;
}
.post-footer-link:hover {
    color: var(--link-hover);
    border-color: var(--border-light);
    background: var(--accent-glow);
}

/* ===== NAV BETWEEN POSTS ===== */
.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.post-nav-item {
    flex: 1;
}

.post-nav-item.next { text-align: right; }

.post-nav-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.post-nav-title {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--link);
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s ease;
}
.post-nav-title:hover { color: var(--link-hover); }

/* ===== FOOTER ===== */
footer {
    max-width: 740px;
    margin: 0 auto;
    padding: 2.5rem 2rem 4rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    text-decoration: none;
    letter-spacing: 0.08em;
    transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }

/* ===== FIGURES ===== */
.post-figure {
    margin: 3rem 0;
}

.post-figure img {
    width: 100%;
    display: block;
    border-radius: 4px;
    border: 1px solid var(--border);
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.post-figure img:hover { opacity: 0.92; }

.post-figure figcaption {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    line-height: 1.7;
    margin-top: 0.75rem;
}

.post-figure-wide {
    margin: 3rem -2rem;
}

.post-figure-wide img {
    border-radius: 3px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    nav { padding: 1rem 1.2rem; }
    .nav-links { gap: 1.2rem; }
    .nav-links a { font-size: 0.6rem; }
    .post-wrap { padding: 6rem 1.2rem 4rem; }
    .stat-callout { grid-template-columns: repeat(2, 1fr); }
    .post-nav { flex-direction: column; gap: 1.5rem; }
    .post-nav-item.next { text-align: left; }
    footer { flex-direction: column; gap: 1rem; text-align: center; }
}
