/* =============================================
   BEYOND THE METRIC — Ghost Theme
   Palette: #12131a dark, #ffffff white, 
            #00d4ff cyan, #dc2626 red
   Typography: Playfair Display + Space Mono
   ============================================= */

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg: #12131a;
  --color-surface: #111111;
  --color-text: #e8e8e8;
  --color-text-muted: rgba(255,255,255,0.45);
  --color-text-faint: rgba(255,255,255,0.22);
  --color-cyan: #00d4ff;
  --color-red: #dc2626;
  --color-rule: rgba(255,255,255,0.1);
  --color-rule-strong: rgba(255,255,255,0.2);
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --content-width: 720px;
  --wide-width: 1080px;
}

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-serif);
  line-height: 1.7;
}

a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #fff;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- SITE WRAPPER --- */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* --- HEADER --- */
.site-header {
  border-bottom: 1px solid var(--color-rule);
  padding: 0 2rem;
}

.header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.header-left,
.header-right {
  flex: 1;
}

.header-right {
  text-align: right;
}

.header-center {
  flex: 0 0 auto;
}

.site-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.3px;
}

.site-title:hover {
  color: var(--color-cyan);
}

.site-logo {
  max-height: 52px;
  width: auto;
  background: none;
  display: block;
}

.site-title img {
  background: none;
}

.site-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  list-style: none;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
}

.site-nav a:hover {
  color: #fff;
}

.header-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-red);
  color: var(--color-red);
  text-decoration: none;
  transition: all 0.2s;
}

.header-btn:hover {
  background: var(--color-red);
  color: #fff;
}

/* --- HERO (homepage) --- */
.hero {
  position: relative;
  text-align: center;
  padding: 0;
  border-bottom: 1px solid var(--color-rule);
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hero-curve {
  width: 100%;
  max-width: 1200px;
  height: auto;
  opacity: 1;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem 4rem;
  max-width: var(--wide-width);
}

.hero-rule {
  width: 48px;
  height: 2px;
  background: var(--color-red);
  margin: 1.5rem auto;
}

.hero-description {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.6);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
  text-wrap: balance;
}

.hero-disciplines {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.hero-disciplines .dot {
  color: rgba(0, 212, 255, 0.35);
  margin: 0 0.4rem;
}

/* --- POST FEED (index) --- */
.post-feed {
  padding: 2rem 0;
}

.feed-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.feed-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

.feed-rule {
  flex: 1;
  height: 1px;
  background: var(--color-rule);
}

/* --- HOME SECTIONS (curated homepage) --- */
.home-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--color-rule);
}

.home-section:last-child {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-cyan);
  flex-shrink: 0;
}

.section-rule {
  flex: 1;
  height: 1px;
  background: var(--color-rule);
}

.section-meta {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 1px;
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* --- LATEST HERO (full-width featured post) --- */
.latest-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.latest-hero:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.06);
}
.latest-hero-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.latest-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.latest-hero-body {
  padding: 2rem 2rem 2rem 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.latest-hero-title {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0.5rem 0 0.75rem;
  color: var(--text);
}
.latest-hero-subtitle {
  font-size: 1rem;
  color: var(--dim);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.latest-hero-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}
.latest-hero-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* --- SERIES GRID (3 columns) --- */
.series-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.series-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.series-card:hover {
  border-color: var(--color-cyan);
  transform: translateY(-2px);
  color: inherit;
}

.series-card-img {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.series-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-card-num {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-cyan);
  background: rgba(18, 19, 26, 0.85);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

.series-card-body {
  padding: 1rem 1rem 1.25rem;
}

.series-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.series-card-excerpt {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* --- FEATURED GRID (2 columns) --- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.featured-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.featured-card:hover {
  border-color: var(--color-cyan);
  transform: translateY(-2px);
  color: inherit;
}

.featured-card-img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.featured-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
}

.featured-card-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-red);
  display: block;
  margin-bottom: 0.4rem;
}

.featured-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.featured-card-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-cyan);
  margin-bottom: 0.6rem;
}

.featured-card-excerpt {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- SHELF BANNER (full width) --- */
.shelf-banner {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--color-rule);
  border-left: 3px solid var(--color-cyan);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  transition: border-color 0.2s, background 0.2s;
}

.shelf-banner:hover {
  border-color: var(--color-cyan);
  background: rgba(0, 212, 255, 0.03);
  color: inherit;
}

.shelf-banner-content {
  max-width: 680px;
}

.shelf-banner-tag {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-cyan);
  display: block;
  margin-bottom: 0.5rem;
}

.shelf-banner-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.shelf-banner-desc {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.shelf-banner-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--color-cyan);
}

/* --- HOME SUBSCRIBE CTA --- */
.home-subscribe {
  border-bottom: none;
  padding-bottom: 3rem;
}

.home-subscribe-inner {
  text-align: center;
  max-width: 580px;
  margin: 0 auto;
  padding: 2rem 0;
}

.home-subscribe-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.8rem;
}

.home-subscribe-desc {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.home-subscribe-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-cyan);
  padding: 0.7rem 2.2rem;
  border-radius: 2px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.home-subscribe-btn:hover {
  opacity: 0.85;
  color: var(--color-bg);
}

.home-subscribe-note {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 1px;
  color: var(--color-text-faint);
  margin-top: 0.8rem;
}

/* --- POST CARD --- */
.post-card {
  border-bottom: 1px solid var(--color-rule);
}

.post-card:last-child {
  border-bottom: none;
}

.post-card-link {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 1.75rem 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.post-card-link:hover {
  color: inherit;
}

.post-card-link:hover .post-card-title {
  color: var(--color-cyan);
}

.post-card-content {
  flex: 1;
}

.post-card-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-cyan);
  display: block;
  margin-bottom: 0.4rem;
}

.post-card-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
  letter-spacing: -0.3px;
}

.post-card-excerpt {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.post-card-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--color-text-faint);
  text-transform: uppercase;
}

.meta-sep {
  margin: 0 0.4rem;
}

.post-card-image {
  flex-shrink: 0;
  width: 200px;
  height: 140px;
  overflow: hidden;
  border-radius: 2px;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- PAGINATION --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  border-top: 1px solid var(--color-rule);
}

.pagination-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-cyan);
}

.pagination-info {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-text-faint);
  letter-spacing: 1px;
}

/* --- TAG / AUTHOR HEADER --- */
.tag-header {
  text-align: center;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-rule);
  margin-bottom: 1rem;
}

.tag-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 2.2rem;
  color: #fff;
}

.tag-description {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.tag-rule {
  width: 48px;
  height: 2px;
  background: var(--color-red);
  margin: 1.2rem auto;
}

.tag-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* --- SINGLE POST --- */
.post-full {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.post-header {
  text-align: center;
  padding: 4rem 0 2rem;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-cyan);
  display: block;
  margin-bottom: 1rem;
}

.post-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 2.6rem;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 0.75rem;
}

.post-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.post-header-rule {
  width: 48px;
  height: 2px;
  background: var(--color-red);
  margin: 1.5rem auto;
}

.post-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-faint);
}

/* --- POST CONTENT (gh-content) --- */
.post-content {
  padding-bottom: 3rem;
}

.post-content p {
  margin-bottom: 1.5rem;
}

.post-content h2 {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.7rem;
  color: #fff;
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.3px;
}

.post-content h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.post-content h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-cyan);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* Horizontal rules — the editorial divider */
.post-content hr {
  border: none;
  height: 1px;
  background: var(--color-rule-strong);
  margin: 2.5rem auto;
  max-width: 120px;
}

/* Blockquotes — pull quote with cyan left border */
.post-content blockquote {
  border-left: 3px solid var(--color-cyan);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: rgba(255,255,255,0.7);
}

.post-content blockquote p {
  margin-bottom: 0;
}

/* Strong text */
.post-content strong {
  color: #fff;
  font-weight: 700;
}

/* Emphasis */
.post-content em {
  color: rgba(255,255,255,0.8);
}

/* Links in content */
.post-content a {
  color: var(--color-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0, 212, 255, 0.3);
  text-underline-offset: 2px;
}

.post-content a:hover {
  text-decoration-color: var(--color-cyan);
}

/* Lists */
.post-content ul,
.post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content li::marker {
  color: var(--color-cyan);
}

/* Code */
.post-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(255,255,255,0.06);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  color: var(--color-cyan);
}

.post-content pre {
  background: var(--color-surface);
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.post-content pre code {
  background: none;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* Tables */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.post-content th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--color-rule-strong);
}

.post-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-text);
}

.post-content tr:hover td {
  background: rgba(0, 212, 255, 0.03);
}

/* Images & Figures */
.post-content img {
  border-radius: 2px;
  margin: 1rem 0;
  width: 100%;
  height: auto;
}

.post-content figure {
  margin: 2rem 0;
}

.post-content figcaption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-faint);
  text-align: center;
  margin-top: 0.75rem;
  letter-spacing: 0.5px;
}

/* Ghost bookmark card */
.post-content .kg-bookmark-card {
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.post-content .kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.post-content .kg-bookmark-content {
  flex: 1;
  padding: 1rem;
}

.post-content .kg-bookmark-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.post-content .kg-bookmark-description {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

.post-content .kg-bookmark-metadata {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-text-faint);
  margin-top: 0.5rem;
}

/* Ghost wide/full image support */
.post-content .kg-width-wide {
  max-width: var(--wide-width);
  margin-left: calc(50% - min(var(--wide-width)/2, 50vw - 2rem));
  width: min(var(--wide-width), 100vw - 4rem);
}

.post-content .kg-width-full {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  width: 100vw;
}

/* Feature image */
.post-feature-image {
  margin-bottom: 2.5rem;
}

.post-feature-image img {
  width: 100%;
  border-radius: 2px;
}

.post-feature-image figcaption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-faint);
  text-align: center;
  margin-top: 0.75rem;
}

/* --- POST FOOTER --- */
.post-footer {
  padding-bottom: 3rem;
}

.post-footer-rule {
  height: 1px;
  background: var(--color-rule);
  margin-bottom: 2rem;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.post-tag-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--color-rule);
  color: var(--color-text-muted);
}

.post-tag-link:hover {
  border-color: var(--color-cyan);
  color: var(--color-cyan);
}

.post-author-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: 4px;
}

.author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.author-bio {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* --- SUBSCRIBE CTA --- */
.post-subscribe {
  max-width: var(--content-width);
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.subscribe-inner {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
}

.subscribe-title {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.subscribe-desc {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

/* --- ERROR PAGE --- */
.error-page {
  text-align: center;
  padding: 6rem 2rem;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 6rem;
  font-weight: 700;
  color: var(--color-red);
  line-height: 1;
}

.error-message {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin: 1rem 0 2rem;
}

.error-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-cyan);
}

/* --- SITE FOOTER --- */
.site-footer {
  border-top: 1px solid var(--color-rule);
  padding: 2rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--color-text-faint);
  line-height: 2;
}

.footer-inner a {
  color: var(--color-text-faint);
}

.footer-inner a:hover {
  color: var(--color-cyan);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  /* Header - logo left, nav center, subscribe right on one row */
  .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    gap: 0.4rem;
    justify-content: space-between;
    align-items: center;
  }

  .header-center {
    order: 1;
  }

  .site-logo {
    height: 30px;
  }

  .header-right {
    order: 2;
    width: 100%;
    text-align: center;
  }

  .subscribe-btn {
    font-size: 0.45rem;
    padding: 0.3rem 0.6rem;
  }

  .site-nav {
    display: block;
    order: 3;
    width: 100%;
  }

  .site-nav .nav {
    justify-content: center;
    gap: 1.5rem;
  }

  .site-nav .nav a {
    font-size: 0.55rem;
    letter-spacing: 2px;
  }

  /* Hero - tighter, no double line */
  .hero {
    min-height: auto;
    border-bottom: none;
  }

  .hero-inner {
    padding: 2.5rem 1rem 2rem;
  }

  .hero-description {
    font-size: 1.05rem;
    line-height: 1.5;
    max-width: 100%;
    padding: 0 0.25rem;
  }

  .hero-rule {
    margin: 1rem auto;
  }

  .hero-disciplines {
    font-size: 0.5rem;
    letter-spacing: 2px;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
  }

  .hero-curve {
    opacity: 0.5;
  }

  /* Posts */
  .post-title {
    font-size: 1.8rem;
  }

  .post-card-link {
    flex-direction: column-reverse;
    gap: 1rem;
  }

  .post-card-image {
    width: 100%;
    height: 200px;
  }

  .post-card-title {
    font-size: 1.25rem;
  }

  .latest-hero {
    grid-template-columns: 1fr;
  }
  .latest-hero-body {
    padding: 1.25rem;
  }
  .latest-hero-title {
    font-size: 1.35rem;
  }

  .series-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .series-card-img {
    height: 180px;
  }

  .featured-card-img {
    height: 180px;
  }

  .featured-card-title {
    font-size: 1.1rem;
  }

  .shelf-banner {
    padding: 1.25rem 1.25rem;
  }

  .shelf-banner-title {
    font-size: 1.2rem;
  }

  .section-header {
    flex-wrap: wrap;
  }

  .section-meta {
    width: 100%;
    margin-top: -0.5rem;
  }

  .post-content h2 {
    font-size: 1.4rem;
  }

  .post-author-card {
    flex-direction: column;
    text-align: center;
  }

  /* Pages */
  .page .post-feature-image {
    width: 100%;
    left: 0;
    transform: none;
  }

  .page .post-header {
    padding: 1rem 0 0.75rem;
  }

  .page .post-title {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .hero-inner {
    padding: 2rem 0.75rem 1.5rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .hero-disciplines {
    font-size: 0.45rem;
    letter-spacing: 1.5px;
  }

  .post-title {
    font-size: 1.5rem;
  }
}

/* --- GHOST PORTAL / MEMBERS OVERRIDES --- */
/* Style the Ghost portal button to match theme */
[data-portal] {
  --ghost-accent-color: var(--color-red) !important;
}

/* --- PAYWALL / MEMBER GATING --- */
.paywall-msg {
  text-align: center;
  padding: 2.5rem 2rem;
  margin: 2rem 0;
  border: 1px solid var(--color-rule);
  border-radius: 4px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-text-muted);
  background: var(--color-surface);
}

/* --- COMMENTS --- */
.post-comments {
  max-width: var(--content-width);
  margin: 2rem auto 3rem;
  padding: 0 1rem;
}

/* --- PAGE TEMPLATE OVERRIDES --- */
.page .post-feature-image {
  margin-bottom: 1.5rem;
}

.page .post-header {
  padding: 1.5rem 0 1rem;
}

.page .post-content {
  margin-top: 0;
}

/* --- PAGE FEATURE IMAGE: MATCH HEADER WIDTH --- */
.page .post-feature-image {
  max-width: var(--wide-width);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
  width: var(--wide-width);
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.page .post-feature-image img {
  width: 100%;
  border-radius: 0;
}
