/* =========================================================
   NEXUS AI — Startup Intelligence Blog Theme
   Dark futuristic design with glassmorphism & gradients
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Syne', 'Space Grotesk', sans-serif;

    /* Core palette — overridden by Ghost theme settings pickers */
    --bg:            #080b14;
    --bg-2:          #0d1120;
    --bg-card:       #0d1120;
    --bg-glass:      rgba(255, 255, 255, 0.04);
    --soft:          #0d1120;

    --ink:           #f0f4ff;
    --ink-2:         #c8d0e8;
    --muted:         #6b7a99;
    --line:          rgba(255, 255, 255, 0.08);
    --line-hover:    rgba(255, 255, 255, 0.15);

    /* Accent — overridden by pickers */
    --accent:        #7c3aed;
    --accent-2:      #06b6d4;
    --button-bg:     #7c3aed;
    --badge:         #7c3aed;

    /* Derived accent alpha layers — used for borders, glows, hovers */
    --accent-border: color-mix(in srgb, var(--accent) 30%, transparent);
    --accent-glow:   color-mix(in srgb, var(--accent) 15%, transparent);
    --accent-subtle: color-mix(in srgb, var(--accent) 8%, transparent);
    --accent-hover:  color-mix(in srgb, var(--accent) 35%, transparent);

    --grad-primary:  linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);

    /* Layout */
    --radius:        12px;
    --radius-lg:     20px;
    --wide:          1200px;
    --narrow:        760px;

    /* Ghost font vars */
    --gh-font-heading: var(--font-display);
    --gh-font-body:    var(--font-sans);
}

/* ─── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink-2);
    background: var(--bg);
    font-family: var(--gh-font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Ambient background grid */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--accent-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--accent-subtle) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Ambient glow orbs */
body::after {
    content: '';
    position: fixed;
    top: -20vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 60vh;
    background: radial-gradient(ellipse at center, var(--accent-subtle) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--gh-font-heading);
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }

/* ─── Layout Utilities ─────────────────────────────────── */
.outer { padding-inline: clamp(20px, 4vw, 56px); position: relative; z-index: 1; }
.inner { width: min(100%, var(--wide)); margin-inline: auto; }
.inner-narrow { width: min(100%, var(--narrow)); margin-inline: auto; }
.inner-wide { width: min(100%, 1080px); margin-inline: auto; }
.site-frame { min-height: 100vh; overflow: clip; }

/* ─── Header ───────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--grad-primary);
    opacity: 0.5;
}

.site-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}

/* Logo */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1;
}

.site-logo img { max-height: 34px; width: auto; }

/* Nav */
.site-nav ul,
.footer-nav ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    padding: 6px 14px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 160ms ease, background 160ms ease;
}

.site-nav a:hover {
    color: var(--ink);
    background: var(--bg-glass);
}

.footer-nav a:hover { color: var(--ink); }

.footer-account {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-account a,
.footer-account button {
    padding: 0;
    color: var(--muted);
    background: none;
    border: 0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.footer-account a:hover,
.footer-account button:hover {
    color: var(--accent);
}

/* Actions */
.site-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── Buttons ──────────────────────────────────────────── */
.button,
.icon-button,
.tag-strip a,
.pill-link {
    border-radius: var(--radius);
    transition: all 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
    color: #fff;
    background: var(--button-bg);
    border-color: transparent;
    box-shadow: 0 0 20px var(--accent-glow);
}

.button-primary:hover {
    box-shadow: 0 0 30px var(--accent-hover);
}

.button-secondary {
    color: var(--ink-2);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.button-secondary:hover {
    border-color: var(--line-hover);
    background: color-mix(in srgb, var(--ink) 8%, transparent);
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: var(--muted);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    cursor: pointer;
}

.icon-button:hover { color: var(--ink); border-color: var(--line-hover); }

.icon-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    padding: 0;
    color: var(--ink-2);
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    margin: 5px auto;
    background: currentColor;
    border-radius: 2px;
    transition: all 200ms ease;
}

/* ─── Tag Strip ────────────────────────────────────────── */
.tag-strip { 
	padding-block: 0 24px;
    margin-top: 25px;
}
	

.tag-strip__inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.tag-strip__inner::-webkit-scrollbar { display: none; }

.tag-strip a {
    flex: 0 0 auto;
    padding: 7px 14px;
    color: var(--muted);
    background: var(--bg-card);
    border: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tag-strip a:hover {
    color: var(--ink);
    border-color: var(--accent-border);
    background: var(--accent-subtle);
    transform: translateY(-1px);
}

/* ─── Pill Link (category badge) ──────────────────────── */
.pill-link {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--badge);
    background: color-mix(in srgb, var(--badge) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--badge) 30%, transparent);
}

.pill-link:hover {
    background: color-mix(in srgb, var(--badge) 15%, transparent);
    transform: translateY(-1px);
}

/* ─── Section helpers ─────────────────────────────────── */
.section-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-kicker span {
    width: 24px;
    height: 2px;
    background: var(--button-bg);
    border-radius: 2px;
}

.section-heading { margin-bottom: 28px; }

.section-heading h2,
.membership-cta h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--button-bg);
    border-radius: 2px;
}

/* ─── Home Hero ────────────────────────────────────────── */
.home-hero {
    padding-block: clamp(52px, 8vw, 100px) clamp(36px, 5vw, 72px);
}

.home-hero--editorial {
    padding-top: clamp(40px, 7vw, 92px);
}

.editorial-hero {
    display: grid;
    gap: clamp(18px, 3vw, 32px);
}

.editorial-lead {
    position: relative;
    min-height: clamp(440px, 58vw, 680px);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.editorial-lead__media {
    position: absolute;
    inset: 0;
    display: block;
    background: var(--soft);
}

.editorial-lead__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 68%, transparent) 42%, color-mix(in srgb, var(--bg) 12%, transparent) 100%),
        linear-gradient(0deg, color-mix(in srgb, var(--bg) 72%, transparent) 0%, transparent 55%);
}

.editorial-lead__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) brightness(0.86);
}

.editorial-lead__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    width: min(100%, 700px);
    min-height: inherit;
    padding: clamp(28px, 6vw, 72px);
}

.editorial-lead h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6.5vw, 6.6rem);
    line-height: 0.92;
}

.editorial-lead p {
    margin: 0;
    max-width: 560px;
    color: var(--ink-2);
    font-size: clamp(1rem, 1.35vw, 1.2rem);
}

.editorial-rail {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.editorial-rail__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    min-height: 170px;
    padding: clamp(18px, 2.4vw, 26px);
    background: var(--bg-card);
    transition: background 160ms ease;
}

.editorial-rail__item:hover {
    background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
}

.editorial-rail__number {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 800;
}

.editorial-rail__item h2 {
    margin: 10px 0 8px;
    font-size: clamp(1rem, 1.45vw, 1.28rem);
    line-height: 1.16;
}

.featured-mosaic {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(16px, 2.5vw, 28px);
    align-items: start;
}

/* Featured cards */
.featured-card { min-width: 0; }

.featured-card:first-child { grid-row: span 2; }

.featured-card__image,
.see-card__image,
.post-card__media {
    display: block;
    overflow: hidden;
    background: var(--soft);
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.featured-card__image { aspect-ratio: 1 / 1; }
.featured-card:first-child .featured-card__image { aspect-ratio: 0.88 / 1; }

.featured-card__image img,
.see-card__image img,
.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(0.9);
}

.featured-card:hover img,
.see-card:hover img,
.post-card:hover img {
    transform: scale(1.06);
    filter: brightness(1);
}

.featured-card h2 {
    margin: 14px 0 6px;
    font-size: clamp(1.05rem, 1.7vw, 1.5rem);
    line-height: 1.15;
    color: var(--ink);
}

.featured-card:first-child h2 {
    font-size: clamp(1.7rem, 3.2vw, 2.9rem);
    line-height: 1.05;
}

.home-spotlight {
    padding-block: clamp(52px, 8vw, 104px) clamp(36px, 5vw, 72px);
}

.home-spotlight__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: clamp(18px, 3vw, 34px);
    align-items: stretch;
}

.spotlight-main {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    min-height: clamp(440px, 52vw, 620px);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.spotlight-main__media {
    display: block;
    min-height: 100%;
    background: var(--soft);
}

.spotlight-main__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.92);
}

.spotlight-main__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 16px;
    padding: clamp(24px, 4vw, 48px);
}

.spotlight-main h1 {
    margin: 0;
    font-size: clamp(2.1rem, 4.8vw, 5rem);
    line-height: 0.98;
}

.spotlight-main p {
    margin: 0;
    max-width: 560px;
    color: var(--muted);
    font-size: clamp(1rem, 1.25vw, 1.14rem);
}

.spotlight-stack {
    display: grid;
    gap: 14px;
}

.spotlight-side {
    display: grid;
    align-content: center;
    gap: 12px;
    min-height: 0;
    padding: clamp(18px, 2.6vw, 28px);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.spotlight-side:hover {
    border-color: var(--accent-border);
    background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
    transform: translateY(-2px);
}

.spotlight-side h2 {
    margin: 0;
    font-size: clamp(1.05rem, 1.7vw, 1.45rem);
    line-height: 1.12;
}

.card-authors,
.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
}

/* ─── Intro Hero ──────────────────────────────────────── */
.intro-hero {
    padding-block: clamp(72px, 10vw, 140px);
    text-align: center;
}

.intro-hero__content {
    max-width: 760px;
    margin-inline: auto;
}

.intro-hero h1 {
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.intro-hero p {
    max-width: 580px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* Archive / author headers */
.archive-header,
.author-profile {
    padding-block: clamp(52px, 8vw, 104px);
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}

.archive-header h1,
.author-profile h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5rem);
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.archive-header p,
.author-profile p {
    max-width: 600px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
}

/* ─── Post Grid ────────────────────────────────────────── */
.content-section,
.see-more { padding-block: clamp(48px, 7vw, 88px); }

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 2.2vw, 24px);
}

.post-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ─── Post Card ────────────────────────────────────────── */
.post-card {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: border-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}

.post-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 1px var(--accent-glow), 0 20px 60px color-mix(in srgb, var(--bg) 60%, transparent);
    transform: translateY(-4px);
}

.post-card__media {
    aspect-ratio: 1 / 1;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--line);
}

.post-card__placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--bg-2) 0%, var(--soft) 100%);
}

.post-card__content { padding: 20px; }

.post-card h2 {
    margin: 8px 0 10px;
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    line-height: 1.2;
    color: var(--ink);
}

.post-card p {
    display: none;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 12px;
}

/* Hero card — first in grid */
.post-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
    background: var(--bg-card);
    border-color: var(--line);
}

.post-card:first-child .post-card__media {
    aspect-ratio: 1.7 / 1;
}

.post-card:first-child h2 {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.05;
    max-width: 680px;
    color: var(--ink);
}

.post-card:first-child p { display: block; }

.post-card:first-child .post-card__content { padding: 28px; }

/* ─── See-More Section ────────────────────────────────── */
.see-more__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 2.2vw, 24px);
}

.see-card {
    min-width: 0;
}

.see-card__image {
    aspect-ratio: 1 / 1;
    margin-bottom: 14px;
}

.see-card h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    line-height: 1.2;
    color: var(--ink);
}

/* ─── Membership CTA ──────────────────────────────────── */
.membership-cta { padding-block: clamp(48px, 7vw, 88px); }

.membership-cta__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.6fr);
    gap: 32px;
    align-items: center;
    padding: clamp(32px, 5vw, 64px);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.membership-cta__inner::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.membership-cta__inner::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 30%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 12%, transparent) 0%, transparent 70%);
    pointer-events: none;
}

.membership-cta .eyebrow { color: var(--accent); }
.membership-cta h2 { color: var(--ink); }
.membership-cta p { color: var(--muted); margin: 14px 0 0; max-width: 480px; }

.subscribe-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.subscribe-form input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    color: var(--ink);
    background: color-mix(in srgb, var(--ink) 5%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 200ms ease;
}

.subscribe-form input:focus {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 3px var(--accent-subtle);
}

.subscribe-form input::placeholder { color: var(--muted); }
.form-message { display: none; grid-column: 1 / -1; margin: 0; font-size: 0.88rem; }
.subscribe-form.success .success,
.subscribe-form.error .error { display: block; }

/* ─── Membership Page ─────────────────────────────────── */
.membership-page {
    padding-block: clamp(52px, 8vw, 112px);
}

.membership-page h1 {
    margin: 0;
    font-size: clamp(2.4rem, 6vw, 5rem);
}

.membership-page p { max-width: 600px; margin: 18px 0 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.15rem); }

.membership-page__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.7fr);
    gap: clamp(28px, 6vw, 76px);
    align-items: center;
}

.benefit-list { display: grid; gap: 12px; }

.benefit-list div,
.author-tile,
.tag-tile {
    display: grid;
    gap: 4px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    transition: border-color 200ms ease;
}

.benefit-list div:hover,
.author-tile:hover { border-color: var(--accent-border); }

.benefit-list div h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.benefit-list span,
.author-tile p,
.tag-tile p { color: var(--muted); }

/* ─── Article ─────────────────────────────────────────── */
.article { padding-block: clamp(48px, 7vw, 92px); }

.article-header {
    text-align: center;
    max-width: var(--narrow);
    margin-inline: auto;
}

.article-header h1 {
    margin: 14px 0 0;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.article-excerpt {
    max-width: 620px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.45vw, 1.2rem);
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 500;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 220;
    height: 3px;
    background: transparent;
}

.reading-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left center;
    background: var(--grad-primary);
    transition: transform 80ms linear;
}

.article-image {
    margin-top: clamp(32px, 5vw, 56px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line);
}

.article-image img { width: 100%; border-radius: 0; }
.article-image figcaption { margin-top: 12px; color: var(--muted); font-size: 0.88rem; text-align: center; }

/* Article body */
.gh-content {
    margin-top: clamp(36px, 5vw, 64px);
    font-size: 1.08rem;
    color: var(--ink-2);
}

.gh-content > * { margin-block: 0 1.6em; }

.gh-content h2,
.gh-content h3 { margin-top: 2.2em; color: var(--ink); }

.gh-content h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
.gh-content h3 { font-size: clamp(1.25rem, 2.5vw, 1.85rem); }

.gh-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.2em;
    transition: color 150ms ease;
}

.gh-content a:hover { color: var(--accent-2); }

.gh-content blockquote {
    margin-inline: 0;
    padding: 14px 0 14px 28px;
    border-left: 3px solid;
    border-image: var(--grad-primary) 1;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--ink);
    font-style: italic;
}

.gh-content .kg-width-wide {
    width: min(100vw - 32px, 1080px);
    max-width: none;
    margin-inline: calc((min(100vw - 32px, 1080px) - min(100%, var(--narrow))) / -2);
}

.gh-content .kg-width-full {
    width: 100vw;
    max-width: none;
    margin-inline: calc((100vw - min(100%, var(--narrow))) / -2);
}

.gh-content .kg-width-full img,
.gh-content .kg-width-wide img { width: 100%; }

.article-toc {
    margin-top: clamp(28px, 4vw, 44px);
    padding: 18px 20px;
    color: var(--muted);
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.article-toc__title {
    margin-bottom: 10px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-toc ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.article-toc li { line-height: 1.35; }
.article-toc li.is-nested { padding-left: 16px; font-size: 0.92rem; }

.article-toc a {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 150ms ease;
}

.article-toc a:hover { color: var(--accent); }

.gh-content .kg-callout-card {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    color: var(--ink-2);
    background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
}

.gh-content .kg-callout-emoji {
    flex: 0 0 auto;
    line-height: 1.4;
}

.gh-content .kg-callout-text {
    min-width: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.gh-content .kg-toggle-card {
    padding: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.gh-content .kg-toggle-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    color: var(--ink);
    font-weight: 700;
}

.gh-content .kg-toggle-card-icon {
    flex: 0 0 auto;
    color: var(--accent);
}

.gh-content .kg-toggle-content {
    padding: 0 18px 18px;
    color: var(--ink-2);
    border-top: 1px solid var(--line);
}

.gh-content .kg-toggle-content > *:last-child { margin-bottom: 0; }

.gh-content pre,
.gh-content code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.gh-content code {
    padding: 2px 7px;
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: 5px;
    font-size: 0.88em;
}

.gh-content pre {
    overflow-x: auto;
    padding: 24px;
    color: var(--ink-2);
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}

.gh-content pre code {
    padding: 0;
    color: inherit;
    background: none;
    border: none;
    font-size: 0.9rem;
}

/* Article footer */
.article-footer {
    display: grid;
    gap: 18px;
    margin-top: 52px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.article-tags,
.share-links,
.author-links,
.footer-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.article-tags a {
    padding: 7px 14px;
    color: var(--muted);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 160ms ease;
}

.article-tags a:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-subtle);
}

.share-links { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.share-links a,
.share-copy {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    color: var(--ink-2);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.share-links a:hover,
.share-copy:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-subtle);
}

.article-newsletter,
.article-reactions,
.member-content-cta {
    margin-top: clamp(36px, 5vw, 56px);
}

.member-content-cta {
    display: grid;
    gap: 12px;
    padding: clamp(24px, 4vw, 36px);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
}

.member-content-cta h2,
.member-content-cta p {
    margin: 0;
}

.member-content-cta p {
    color: var(--muted);
}

.article-newsletter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
    gap: 22px;
    align-items: center;
    padding: clamp(24px, 4vw, 36px);
    background: color-mix(in srgb, var(--accent) 10%, var(--bg-2));
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-lg);
}

.article-newsletter h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.1;
}

.article-newsletter p {
    margin: 10px 0 0;
    color: var(--muted);
}

.article-reactions {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.article-reactions p {
    margin: 0;
    color: var(--ink);
    font-weight: 700;
}

.article-reactions__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-reactions button {
    min-height: 36px;
    padding: 0 13px;
    color: var(--ink-2);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.article-reactions button:hover,
.article-reactions button.is-active {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-subtle);
}

.article-reactions button span {
    margin-left: 6px;
    color: var(--muted);
}

.auth-modal,
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-modal[hidden],
.share-modal[hidden] {
    display: none;
}

.auth-modal__backdrop,
.share-modal__backdrop {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    backdrop-filter: blur(8px);
}

.auth-modal__panel,
.share-modal__panel {
    position: relative;
    width: min(100%, 460px);
    padding: clamp(24px, 4vw, 34px);
    color: var(--ink-2);
    background: var(--bg-card);
    border: 1px solid var(--line-hover);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

.auth-modal__close,
.share-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.auth-modal__tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 22px;
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.auth-modal__tabs button {
    min-height: 34px;
    padding: 0 14px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.auth-modal__tabs button.is-active {
    color: #fff;
    background: var(--button-bg);
}

.auth-modal__view {
    display: none;
}

.auth-modal__view.is-active {
    display: grid;
    gap: 14px;
}

.auth-modal__view h2,
.auth-modal__view p,
.share-modal__panel h2 {
    margin: 0;
}

.auth-modal__view p {
    color: var(--muted);
}

.share-modal__actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.share-modal__actions a,
.share-modal__actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    color: var(--ink-2);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.share-modal__actions a:hover,
.share-modal__actions button:hover {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-subtle);
}

body.auth-modal-open,
body.share-modal-open {
    overflow: hidden;
}

/* ─── Author Profile ──────────────────────────────────── */
.author-profile__inner {
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.author-profile__image {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-border);
    box-shadow: 0 0 0 4px var(--accent-subtle);
}

.author-links {
    margin-top: 14px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.author-links a:hover { color: var(--accent-2); }

/* ─── Author & Tag Directories ────────────────────────── */
.author-directory,
.tag-directory {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.author-tile img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--line);
}

.author-tile h2,
.tag-tile h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--ink);
}

.author-tile span { color: var(--accent); font-weight: 650; font-size: 0.88rem; }

.tag-tile {
    display: block;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 200ms ease, transform 200ms ease;
}

.tag-tile:hover {
    border-color: var(--accent-border);
    transform: translateY(-3px);
}

.tag-tile img {
    width: calc(100% + 40px);
    max-width: none;
    aspect-ratio: 16 / 9;
    margin: -20px -20px 18px;
    object-fit: cover;
    filter: brightness(0.7);
    transition: filter 300ms ease;
}

.tag-tile:hover img { filter: brightness(0.85); }

/* ─── Pagination ──────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 44px;
    color: var(--muted);
    font-weight: 600;
}

.pagination a {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 160ms ease;
}

.pagination a:hover {
    border-color: var(--accent-border);
    color: var(--ink);
}

/* ─── Footer ───────────────────────────────────────────── */
.site-footer {
    padding-block: 56px 40px;
    color: var(--muted);
    background: var(--bg-2);
    border-top: 1px solid var(--line);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--grad-primary);
    opacity: 0.4;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
    gap: 32px;
}

.site-footer .site-logo { color: var(--ink); }
.site-footer a:hover { color: var(--ink); }

.site-footer__brand p {
    max-width: 380px;
    margin: 14px 0 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-nav ul { display: grid; justify-content: start; gap: 8px; }
.footer-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 150ms ease;
}

.footer-meta {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 28px;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

.footer-meta a:hover { color: var(--ink); }

/* ─── Error Page ──────────────────────────────────────── */
.error-page {
    min-height: 62vh;
    display: grid;
    align-items: center;
    padding-block: clamp(52px, 8vw, 104px);
    text-align: center;
}

.error-page h1 {
    font-size: clamp(5rem, 15vw, 12rem);
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin: 0 0 16px;
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 980px) {
    .featured-mosaic,
    .post-grid,
    .see-more__grid,
    .post-grid--compact,
    .author-directory,
    .tag-directory {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-card:first-child { grid-column: 1 / -1; }

    .membership-cta__inner,
    .membership-page__inner,
    .site-footer__inner,
    .article-newsletter { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .site-header__inner {
        grid-template-columns: auto auto auto;
        gap: 10px;
        min-height: 62px;
    }

    .nav-toggle { display: block; }

    .site-nav {
        position: absolute;
        inset: calc(100% + 1px) 18px auto;
        display: none;
        padding: 14px;
        background: var(--bg-2);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: 0 24px 80px color-mix(in srgb, var(--bg) 40%, transparent);
        backdrop-filter: blur(24px);
    }

    body.nav-open .site-nav { display: block; }
    .site-nav ul { display: grid; justify-content: stretch; gap: 4px; }
    .site-nav a { display: block; padding: 10px 14px; }
    .hide-small { display: none; }

    .featured-mosaic,
    .post-grid,
    .see-more__grid,
    .post-grid--compact,
    .author-directory,
    .tag-directory { grid-template-columns: 1fr; }

    .featured-card:first-child { grid-row: auto; }
    .featured-card:first-child .featured-card__image,
    .featured-card__image,
    .post-card:first-child .post-card__media,
    .post-card__media { aspect-ratio: 1.3 / 1; }

    .home-spotlight__inner,
    .spotlight-main,
    .editorial-rail {
        grid-template-columns: 1fr;
    }

    .spotlight-main {
        min-height: 0;
    }

    .spotlight-main__media {
        aspect-ratio: 1.25 / 1;
    }

    .editorial-lead {
        min-height: 0;
    }

    .editorial-lead__media {
        position: relative;
        aspect-ratio: 1.25 / 1;
    }

    .editorial-lead__media::after {
        background: linear-gradient(0deg, color-mix(in srgb, var(--bg) 42%, transparent), transparent);
    }

    .editorial-lead__content {
        min-height: 0;
        padding: 24px 0 0;
    }

    .editorial-rail {
        background: transparent;
        border: 0;
        gap: 12px;
    }

    .subscribe-form { grid-template-columns: 1fr; }
    .author-profile__inner { grid-template-columns: 1fr; }
    .footer-meta { display: grid; align-items: start; gap: 12px; }

    .intro-hero { text-align: left; }
    .intro-hero p { margin-inline: 0; }
    .hero-actions { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .outer { padding-inline: 16px; }
    .site-actions .button-primary { padding-inline: 12px; font-size: 0.82rem; }
    .post-card:first-child h2 { font-size: clamp(1.5rem, 8vw, 2rem); }
}

/* ─── Animated gradient text utility ─────────────────── */
.gradient-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* =========================================================
   LOGO (configurable text + badge)
   ========================================================= */
.logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.03em;
    line-height: 1;
}

.logo-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    background: var(--button-bg);
    border-radius: 5px;
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
    line-height: 1.5;
}

/* =========================================================
   ALL-POSTS PAGE
   ========================================================= */
.all-posts-header { padding-block: clamp(52px, 8vw, 104px); }

.archive-header__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.archive-count {
    flex-shrink: 0;
    padding: 10px 20px;
    background: var(--bg-glass);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.all-posts-band { padding-block: clamp(36px, 5vw, 60px); }

/* Filter bar */
.filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 24px;
    margin-bottom: 28px;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
}

.filter-label {
    display: grid;
    gap: 6px;
    font-size: 0;
}

.filter-label span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
}

.filter-select {
    min-width: 160px;
    height: 40px;
    padding: 0 36px 0 14px;
    color: var(--ink-2);
    background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a99' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 160ms ease;
}

.filter-select:focus { border-color: var(--accent-border); }

.filter-reset {
    height: 40px;
    padding-inline: 18px;
    font-size: 0.88rem;
}

.filter-status {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

/* All-posts grid */
.all-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2.2vw, 24px);
}

/* All-posts article card */
.ap-card {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: border-color 240ms ease, box-shadow 240ms ease, transform 240ms ease;
}

.ap-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 0 0 1px var(--accent-glow), 0 16px 48px color-mix(in srgb, var(--bg) 60%, transparent);
    transform: translateY(-4px);
}

.ap-card[hidden] { display: none; }

.ap-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--soft);
    border-bottom: 1px solid var(--line);
}

.ap-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 500ms ease;
    filter: brightness(0.88);
}

.ap-card:hover .ap-card__media img {
    transform: scale(1.06);
    filter: brightness(1);
}

.ap-card__body { padding: 20px; }

.ap-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.ap-card__tag {
    color: var(--accent);
    background: var(--accent-subtle);
    border: 1px solid var(--accent-border);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 160ms ease;
}

.ap-card__tag:hover { background: var(--accent-glow); }

.ap-card__title {
    margin: 0 0 8px;
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.2;
    color: var(--ink);
}

.ap-card__title a { transition: color 150ms ease; }
.ap-card__title a:hover { color: var(--accent); }

.ap-card__excerpt {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ap-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
}

.ap-card__author { color: var(--ink-2); transition: color 150ms ease; }
.ap-card__author:hover { color: var(--accent); }

.filter-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius-lg);
}

/* =========================================================
   ARTICLE LAYOUT + COMMENT SIDEBAR
   ========================================================= */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
}

.article-layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
    gap: 0;
}

.has-sidebar .article { padding-right: 0; }

.comments-sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 80px);
    border-left: 1px solid var(--line);
    background: var(--bg-2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.comments-sidebar__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.comments-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
    flex-shrink: 0;
}

.comments-sidebar__header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.comments-sidebar__close {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.comments-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-border) transparent;
}

.comments-sidebar__notice {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 32px 0;
}

.comments-mobile-trigger {
    display: none;
    margin-top: 32px;
}

@media (max-width: 1024px) {
    .article-layout.has-sidebar {
        grid-template-columns: 1fr;
    }

    .comments-sidebar {
        position: fixed;
        inset: 0 0 0 auto;
        width: min(360px, 92vw);
        height: 100%;
        top: 0;
        z-index: 200;
        transform: translateX(100%);
        transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 40px color-mix(in srgb, var(--bg) 50%, transparent);
    }

    .comments-sidebar.is-open {
        transform: translateX(0);
    }

    .comments-mobile-trigger { display: block; }

    body.comments-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: color-mix(in srgb, var(--bg) 60%, transparent);
        backdrop-filter: blur(2px);
        z-index: 199;
    }
}

.comments-sidebar__body .gh-comments-root {
    --gh-color-primary: var(--accent);
    --gh-color-secondary: var(--accent-2);
}

@media (max-width: 980px) {
    .all-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .all-posts-grid {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .filter-select { width: 100%; min-width: 0; }
    .filter-reset { width: 100%; }

    .archive-header__inner { flex-direction: column; }
}
