/* ═══════════════════════════════════════════════════════════════
   PARROTT.INK — Ghost Theme Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Fonts ── */
@font-face {
  font-family: 'Valkyrie';
  src: url('../fonts/Valkyrie-OT-A-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie';
  src: url('../fonts/Valkyrie-OT-A-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie';
  src: url('../fonts/Valkyrie-OT-A-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie';
  src: url('../fonts/Valkyrie-OT-A-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie B';
  src: url('../fonts/Valkyrie-OT-B-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie B';
  src: url('../fonts/Valkyrie-OT-B-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie B';
  src: url('../fonts/Valkyrie-OT-B-Italic.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Valkyrie B';
  src: url('../fonts/Valkyrie-OT-B-BoldItalic.otf') format('opentype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}


/* ══════════════════════════════════════
   DESIGN TOKENS — LIGHT
   ══════════════════════════════════════ */
:root,
[data-theme="light"] {
  --deep:       #032326;
  --dark:       #1a3f44;
  --mid:        #255459;
  --teal:       #177373;
  --light-teal: #e0f0f0;
  --pale-teal:  #f0f7f7;

  --coral:      #F27777;
  --rose:       #D98989;
  --pale-rose:  #faf0f0;

  --bg:         #f4f1ec;
  --bg-surface: #eae7e1;
  --cream:      #e5e2dc;
  --border:     #d8d4ce;
  --warm-gray:  #8a8580;
  --text:       #1a1a18;
  --text-light: #5c5a56;

  --newsletter-bg:           var(--deep);
  --newsletter-text:         #ffffff;
  --newsletter-muted:        rgba(255,255,255,0.65);
  --newsletter-input-border: rgba(255,255,255,0.2);
  --newsletter-input-bg:     rgba(255,255,255,0.08);

  --scripture-bg:     var(--pale-teal);
  --scripture-border: var(--teal);
  --scripture-ref:    var(--teal);

  --serif:   'Valkyrie', var(--gh-font-body), 'Georgia', serif;
  --serif-b: 'Valkyrie B', var(--gh-font-body), 'Georgia', serif;
  --gh-font-heading: 'Valkyrie', 'Georgia', serif;
  --gh-font-body: 'Valkyrie', 'Georgia', serif;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;

  --max-width:  42rem;
  --max-width-wide: 68rem;
  --wide-width: 64rem;
}


/* ══════════════════════════════════════
   DESIGN TOKENS — DARK
   ══════════════════════════════════════ */
[data-theme="dark"] {
  --deep:       #e0f0f0;
  --dark:       #b0d0d4;
  --mid:        #7ab0b5;
  --teal:       #4abfbf;
  --light-teal: #1a3f44;
  --pale-teal:  #0d2a2e;

  --coral:      #F27777;
  --rose:       #D98989;
  --pale-rose:  #2a1a1a;

  --bg:         #0f1a1c;
  --bg-surface: #152224;
  --cream:      #1c2e30;
  --border:     #253c3f;
  --warm-gray:  #7a8580;
  --text:       #e4e2de;
  --text-light: #a09c96;

  --newsletter-bg:           #0a1214;
  --newsletter-text:         #e4e2de;
  --newsletter-muted:        rgba(228,226,222,0.55);
  --newsletter-input-border: rgba(228,226,222,0.15);
  --newsletter-input-bg:     rgba(228,226,222,0.06);

  --scripture-bg:     #0d2a2e;
  --scripture-border: #2a6565;
  --scripture-ref:    var(--teal);
}


/* ══════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
ul, ol, li { list-style: none; }

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

body {
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--coral); }

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


/* ══════════════════════════════════════
   THEME TOGGLE
   ══════════════════════════════════════ */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 2.2rem;
  height: 2.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-light);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--bg-surface);
}
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }


/* ══════════════════════════════════════
   HEADER
   ══════════════════════════════════════ */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}
.header-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Navigation — Ghost outputs {{navigation}} as <ul><li class="nav-item"><a>…</a></li></ul> */
.site-nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin: 0;
  padding: 0;
}
.site-nav li {
  margin: 0;
  padding: 0;
}
.site-nav a,
.site-nav ul.nav > li a {
  font-family: var(--serif-b);
  font-size: 0.82rem;
  color: var(--text-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--teal); }

/* Dropdown sub-nav: JS groups "- " prefixed items under their parent as .nav-has-children.
   Desktop: dropdown on hover. Mobile: shown inline, indented. */
.nav-has-children {
  position: relative;
}
.nav-has-children > a::after {
  content: ' ▾';
  font-size: 0.6em;
  opacity: 0.5;
}
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 0.6rem;
  z-index: 200;
}
.nav-dropdown-inner {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.4rem 0;
  min-width: 10rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
[data-theme="dark"] .nav-dropdown-inner {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.nav-dropdown-inner a {
  display: block;
  padding: 0.4em 1.2em;
  font-size: 0.78rem !important;
  letter-spacing: 0.08em !important;
  white-space: nowrap;
  text-transform: uppercase;
}
.nav-dropdown-inner a:hover {
  background: var(--bg-surface);
}
.nav-has-children:hover .nav-dropdown {
  display: block;
}

/* Hide the bare sub items (they've been moved into dropdown by JS) */
.site-nav li.nav-item--sub {
  display: none;
}

.nav-subscribe {
  background: var(--teal);
  color: #fff !important;
  padding: 0.4em 1.1em;
  border-radius: 3px;
  font-size: 0.78rem !important;
  letter-spacing: 0.12em;
}
.nav-subscribe:hover {
  background: var(--coral) !important;
  color: #fff !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 1.3rem;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.header-actions {
  display: none;
  align-items: center;
  gap: 0.6rem;
}


/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.site-hero {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto var(--space-xl);
  padding: 0 var(--space-md);
  text-align: center;
}
.site-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}
.site-hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text-light);
  line-height: 1.5;
}
.site-hero .tagline em {
  color: var(--teal);
  font-style: normal;
  font-weight: 700;
}
.hero-rule {
  width: 3rem;
  height: 2px;
  background: var(--coral);
  border: none;
  margin: var(--space-lg) auto 0;
}


/* ══════════════════════════════════════
   POST FEED
   ══════════════════════════════════════ */
.post-feed {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-2xl);
}
.feed-section-label {
  font-family: var(--serif-b);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--warm-gray);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border);
}

/* Featured post (first on homepage) */
.post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  align-items: center;
}
.post-featured-image,
.post-featured-image-link {
  display: block;
}
.post-featured-image {
  aspect-ratio: 4/3;
  background: var(--bg-surface);
  border-radius: 4px;
  overflow: hidden;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-featured-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.01em;
}
.post-featured-content h2 a { color: inherit; }
.post-featured-content h2 a:hover { color: var(--teal); }
.post-featured-content .post-excerpt {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

/* Post tag label */
.post-tag {
  font-family: var(--serif-b);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: var(--space-xs);
}
.post-tag a { color: inherit; }
.post-tag a:hover { color: var(--teal); }

/* Post meta line */
.post-meta {
  font-family: var(--serif-b);
  font-size: 0.78rem;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}
.post-meta a { color: inherit; }
.post-meta a:hover { color: var(--teal); }
.post-meta .sep { margin: 0 0.4em; }

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

/* Post card */
.post-card {
  display: flex;
  flex-direction: column;
}
.post-card-image-link { display: block; }
.post-card-image {
  aspect-ratio: 16/10;
  background: var(--bg-surface);
  border-radius: 4px;
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-image img {
  transform: scale(1.03);
}
/* Colored placeholder for posts without a feature image */
.post-card-no-image {
  background: linear-gradient(145deg, #1a5c5c, #3d8888);
}
[data-theme="dark"] .post-card-no-image {
  background: linear-gradient(145deg, #0f3d3d, #1a5c5c);
}
.post-card .post-tag {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}
.post-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--teal); }
.post-card .post-excerpt {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.55;
  margin-bottom: var(--space-xs);
  flex: 1;
}


/* See all posts button */
.feed-see-all {
  text-align: center;
  margin-top: var(--space-xl);
}
.btn-see-all {
  font-family: var(--serif-b);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  border: 1px solid var(--border);
  padding: 0.7em 2em;
  border-radius: 3px;
  display: inline-block;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-see-all:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}


/* ══════════════════════════════════════
   NEWSLETTER CTA
   ══════════════════════════════════════ */
.newsletter-cta {
  background: var(--newsletter-bg);
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
}
.newsletter-inner {
  max-width: 32rem;
  margin: 0 auto;
}
.newsletter-cta h2 {
  font-size: 1.6rem;
  color: var(--newsletter-text);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}
.newsletter-cta p {
  color: var(--newsletter-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
  line-height: 1.55;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 26rem;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  font-family: var(--serif);
  font-size: 0.88rem;
  padding: 0.65em 1em;
  border: 1px solid var(--newsletter-input-border);
  border-radius: 3px;
  background: var(--newsletter-input-bg);
  color: var(--newsletter-text);
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-form input:focus { border-color: var(--teal); }
.newsletter-form button {
  font-family: var(--serif-b);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.65em 1.5em;
  background: var(--coral);
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s;
}
.newsletter-form button:hover { background: var(--rose); }


/* ══════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════ */
.pagination {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-2xl);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--serif-b);
  font-size: 0.82rem;
}
.pagination a {
  color: var(--teal);
  letter-spacing: 0.04em;
}
.pagination-info {
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}


/* ══════════════════════════════════════
   SINGLE POST
   ══════════════════════════════════════ */
.post-single {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto;
  padding: 0 var(--space-md);
}
.post-single-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.post-single-header .post-tag {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}
.post-single-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}
.post-single-header .post-meta {
  font-size: 0.82rem;
}

/* Feature image */
.post-feature-image {
  margin-bottom: var(--space-xl);
}
.post-feature-image img {
  border-radius: 4px;
  width: 100%;
}
.post-feature-image figcaption {
  font-family: var(--serif-b);
  font-size: 0.75rem;
  color: var(--warm-gray);
  text-align: center;
  margin-top: var(--space-xs);
}

/* Post body */
.post-body {
  font-size: 1.05rem;
  line-height: 1.72;
  color: var(--text);
}
.post-body p { margin-bottom: 1.4em; }

.post-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 2.2em;
  margin-bottom: 0.6em;
}
.post-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.8em;
  margin-bottom: 0.5em;
}

.post-body blockquote {
  border-left: 3px solid var(--coral);
  padding-left: var(--space-md);
  margin: 1.8em 0;
  font-style: italic;
  color: var(--text-light);
}

.post-body ul, .post-body ol {
  margin: 0 0 1.4em var(--space-md);
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin-bottom: 0.3em; list-style: inherit; }

.post-body a {
  text-decoration: none;
  color: var(--teal);
}
.post-body a::after {
  content: '°';
  color: var(--coral);
  font-size: 0.7em;
  vertical-align: super;
  line-height: 0;
  margin-left: 0.05em;
}
/* Don't add degree symbol to tag links, bookmark cards, image links, etc. */
.post-tags a::after,
.post-body .kg-bookmark-container::after,
.post-body .kg-bookmark-container a::after,
.post-body .kg-image-card a::after,
.post-body .kg-gallery-card a::after,
.post-body .kg-callout-card a::after {
  content: none;
}

.post-body code {
  font-size: 0.88em;
  background: var(--bg-surface);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
.post-body pre {
  background: var(--bg-surface);
  padding: var(--space-sm) var(--space-md);
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.8em 0;
}
.post-body pre code {
  background: none;
  padding: 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* Scripture — Ghost callout card with 📖 emoji */
.post-body .kg-callout-card {
  background: var(--scripture-bg);
  border-left: 3px solid var(--scripture-border);
  padding: var(--space-sm) var(--space-md);
  margin: 1.8em 0;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  line-height: 1.65;
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}
.post-body .kg-callout-card .kg-callout-emoji {
  font-style: normal;
  flex-shrink: 0;
}
.post-body .kg-callout-card .kg-callout-text {
  flex: 1;
}
.post-body .kg-callout-card .kg-callout-text strong {
  display: block;
  font-family: var(--serif-b);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--scripture-ref);
  margin-top: 0.6em;
  font-style: normal;
  font-weight: 400;
}

/* Ghost card widths */
.kg-width-wide {
  margin-left: calc(-1 * (50vw - var(--max-width) / 2 - var(--space-md)));
  margin-right: calc(-1 * (50vw - var(--max-width) / 2 - var(--space-md)));
  max-width: var(--wide-width);
}
.kg-width-full {
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  max-width: 100vw;
}

/* Ghost image card */
.kg-image-card,
.kg-gallery-card {
  margin: 1.8em 0;
}
.kg-image-card img {
  border-radius: 4px;
}
.kg-image-card figcaption,
.kg-gallery-card figcaption {
  font-family: var(--serif-b);
  font-size: 0.75rem;
  color: var(--warm-gray);
  text-align: center;
  margin-top: var(--space-xs);
}

/* Ghost bookmark card */
.kg-bookmark-card {
  margin: 1.8em 0;
}
.kg-bookmark-container {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none !important;
}
.kg-bookmark-content {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
}
.kg-bookmark-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3em;
}
.kg-bookmark-description {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}
.kg-bookmark-metadata {
  font-family: var(--serif-b);
  font-size: 0.72rem;
  color: var(--warm-gray);
  margin-top: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.kg-bookmark-icon {
  width: 1em;
  height: 1em;
}
.kg-bookmark-thumbnail {
  width: 10rem;
  flex-shrink: 0;
}
.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Post tags */
.post-tags {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}
.post-tags a {
  font-family: var(--serif-b);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--warm-gray);
  background: var(--bg-surface);
  padding: 0.3em 0.8em;
  border-radius: 3px;
  text-decoration: none;
}
.post-tags a:hover {
  color: var(--teal);
  background: var(--cream);
}


/* ══════════════════════════════════════
   SUGGESTED READING
   ══════════════════════════════════════ */
.post-suggested {
  max-width: var(--max-width-wide);
  margin: var(--space-xxl) auto var(--space-xl);
  padding: 0 var(--space-md);
}
.suggested-label {
  font-family: var(--serif-b);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}

/* ══════════════════════════════════════
   POST AUTHOR CARD
   ══════════════════════════════════════ */
.post-author {
  max-width: var(--max-width);
  margin: var(--space-xl) auto;
  padding: 0 var(--space-md);
}
.post-author-inner {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-surface);
  border-radius: 4px;
}
.post-author-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-author-bio h4 {
  font-size: 1rem;
  margin-bottom: 0.2em;
}
.post-author-bio h4 a { color: var(--text); }
.post-author-bio h4 a:hover { color: var(--teal); }
.post-author-bio p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.5;
}


/* ══════════════════════════════════════
   READING PROGRESS CIRCLE
   ══════════════════════════════════════ */
.reading-progress {
  margin-top: var(--space-md);
  width: 3rem;
  height: 3rem;
  position: relative;
}
.reading-progress svg {
  width: 3rem;
  height: 3rem;
  transform: rotate(-90deg);
}
.reading-progress .progress-bg {
  fill: var(--bg-surface);
  stroke: var(--border);
  stroke-width: 2.5;
}
.reading-progress .progress-ring {
  fill: none;
  stroke: var(--teal);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.15s ease;
}
.reading-progress .progress-pct {
  position: absolute;
  top: 0;
  left: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-b);
  font-size: 0.55rem;
  color: var(--text-light);
  letter-spacing: 0.02em;
  line-height: 1;
}


/* ══════════════════════════════════════
   TABLE OF CONTENTS — Floating (desktop)
   ══════════════════════════════════════ */
.post-toc {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  left: max(1.5rem, calc((100vw - var(--max-width)) / 2 - 16rem));
  width: 13rem;
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.post-toc.visible {
  opacity: 1;
  pointer-events: auto;
}
.post-toc-label {
  font-family: var(--serif-b);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--warm-gray);
  margin-bottom: 0.8rem;
}
.post-toc ol {
  list-style: none;
  border-left: 1px solid var(--border);
  padding-left: 0;
  margin: 0;
}
.post-toc li { margin: 0; }
.post-toc a {
  display: block;
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--warm-gray);
  padding: 0.35em 0 0.35em 1em;
  margin-left: -1px;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  text-decoration: none;
}
.post-toc a:hover { color: var(--teal); }
.post-toc a.active {
  color: var(--teal);
  border-left-color: var(--teal);
}

/* Hide floating TOC on narrow screens */
@media (max-width: 1100px) {
  .post-toc { display: none !important; }
}


/* ══════════════════════════════════════
   TABLE OF CONTENTS — Inline (mobile)
   ══════════════════════════════════════ */
.post-toc-inline {
  display: none;
  margin-bottom: var(--space-lg);
}
@media (max-width: 1100px) {
  .post-toc-inline { display: block; }
}
.toc-toggle-btn {
  font-family: var(--serif-b);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--teal);
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.5em 1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  transition: background 0.15s, border-color 0.15s;
  width: 100%;
  justify-content: center;
}
.toc-toggle-btn:hover {
  background: var(--bg-surface);
  border-color: var(--teal);
}
.toc-toggle-btn .toc-chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.6rem;
}
.toc-toggle-btn.open .toc-chevron {
  transform: rotate(180deg);
}
.toc-inline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-left: 1px solid var(--border);
}
.toc-inline-list.open {
  max-height: 30rem;
  margin-top: var(--space-sm);
}
.toc-inline-list a {
  display: block;
  font-family: var(--serif);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-light);
  padding: 0.45em 0 0.45em 1em;
  margin-left: -1px;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
}
.toc-inline-list a:hover { color: var(--teal); }
.toc-inline-list a.active {
  color: var(--teal);
  border-left-color: var(--teal);
}


/* ══════════════════════════════════════
   ARCHIVE PAGES (tag, author)
   ══════════════════════════════════════ */
.archive-header {
  padding: var(--space-2xl) var(--space-md) var(--space-xl);
  text-align: center;
}
.archive-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.archive-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-xs);
}
.archive-description {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}
.archive-author-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-sm);
}


/* ══════════════════════════════════════
   ERROR PAGE
   ══════════════════════════════════════ */
.error-page {
  max-width: var(--max-width);
  margin: var(--space-2xl) auto;
  padding: 0 var(--space-md);
  text-align: center;
}
.error-page h1 {
  font-size: 6rem;
  font-weight: 700;
  color: var(--border);
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.error-message {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
}
.error-link {
  font-family: var(--serif-b);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}


/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) var(--space-md);
}
.footer-inner {
  max-width: var(--wide-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-inner p {
  font-family: var(--serif-b);
  font-size: 0.75rem;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}
.footer-links {
  display: flex;
  gap: var(--space-sm);
}
.footer-links ul {
  list-style: none;
  display: flex;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}
.footer-links li { margin: 0; padding: 0; }
.footer-links a,
.footer-links li a {
  font-family: var(--serif-b);
  font-size: 0.75rem;
  color: var(--warm-gray);
  letter-spacing: 0.02em;
}


/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .post-featured { grid-template-columns: 1fr; gap: var(--space-md); }
  .post-grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .site-hero h1 { font-size: 1.8rem; }
  .post-single-header h1 { font-size: 1.8rem; }
  .newsletter-form { flex-direction: column; }
  .footer-inner { flex-direction: column; gap: var(--space-sm); text-align: center; }

  /* Header: hamburger menu */
  .header-inner { flex-wrap: wrap; }
  .header-actions { display: flex; }
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    flex-direction: column;
    flex-basis: 100%;
    gap: 0;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border);
    margin-top: var(--space-sm);
  }
  .site-nav.open { display: flex; }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .site-nav a,
  .site-nav ul.nav > li a {
    padding: 0.7em 0;
    font-size: 0.88rem;
  }
  .site-nav .nav-subscribe {
    text-align: center;
    margin-top: var(--space-xs);
    margin-bottom: var(--space-xs);
    padding: 0.6em 1.1em !important;
    border-bottom: none;
  }
  .site-nav .theme-toggle { display: none; }

  /* Dropdown becomes inline on mobile */
  .nav-has-children > a::after { display: none; }
  .nav-dropdown {
    display: block;
    position: static;
    transform: none;
    padding-top: 0;
  }
  .nav-dropdown-inner {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    min-width: 0;
  }
  .nav-dropdown-inner a {
    padding: 0.5em 0 0.5em var(--space-md) !important;
    border-bottom: 1px solid var(--border);
    color: var(--warm-gray) !important;
    font-size: 0.82rem !important;
  }


  /* Author card */
  .post-author-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
