/*
Theme Name: The Blackscribbler
Theme URI: https://theblackscribbler.com
Author: The Blackscribbler
Description: A refined literary blog theme exploring identity, the human mind, and poetry. Warm, editorial, and deeply human.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: blackscribbler
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ============================================================
   FONTS & ROOT VARIABLES
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Lora:ital,wght@0,400;0,500;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  /* Palette */
  --cream:      #f5f2ee;
  --warm-white: #faf8f5;
  --parchment:  #ede8df;
  --sand:       #d6cfc4;
  --mocha:      #8a7563;
  --espresso:   #3d2e22;
  --ink:        #1c1410;
  --charcoal:   #2a2420;
  --gold:       #b8924a;
  --rust:       #9c5c38;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      'Jost', sans-serif;

  /* Spacing */
  --max-width:    1200px;
  --gutter:       clamp(1.5rem, 5vw, 4rem);

  /* Transitions */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ============================================================
   UTILITY CLASSES
============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

/* ============================================================
   HEADER / NAVIGATION  — two-row centered layout
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--warm-white);
  border-bottom: 1px solid var(--parchment);
  padding-block: 0;
}

/* Row 1: nav strip */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--parchment);
}

/* Row 2: branding centered */
.site-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.9rem 0 0.75rem;
  border-bottom: 1px solid var(--parchment);
}

.site-title a {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  transition: color 0.2s var(--ease);
  display: block;
}
.site-title a:hover { color: var(--mocha); }

.site-tagline {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mocha);
  margin-top: 0.2rem;
}

/* Decorative rule under tagline */
.site-branding::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--gold);
  margin-top: 0.5rem;
}

/* Nav — left side of top row */
.main-navigation {
  display: flex;
  align-items: center;
  flex: 1;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.main-navigation a {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--charcoal);
  padding: 0.4rem 0.65rem;
  border-radius: 2px;
  white-space: nowrap;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--ink);
  background: var(--parchment);
}

/* Header actions — right side of top row */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-newsletter {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--warm-white);
  padding: 0.45rem 1rem;
  border-radius: 2px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-newsletter:hover { background: var(--espresso); }

.search-toggle,
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  color: var(--charcoal);
  border-radius: 50%;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.search-toggle:hover, .social-link:hover {
  color: var(--ink);
  background: var(--parchment);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ============================================================
   HERO SECTION
============================================================ */
.hero {
  background: var(--cream);
  padding-block: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text { max-width: 520px; }

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mocha);
  margin-bottom: 1rem;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.hero-heading em {
  font-style: italic;
  color: var(--mocha);
  position: relative;
}

.hero-heading em::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  opacity: 0.6;
}

.hero-description {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--mocha);
  margin-bottom: 2rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--warm-white);
  padding: 0.8rem 1.75rem;
  border-radius: 2px;
  transition: background 0.25s var(--ease), transform 0.2s var(--ease);
}
.btn-primary:hover {
  background: var(--espresso);
  transform: translateX(2px);
}
.btn-primary .arrow { font-size: 1rem; transition: transform 0.2s var(--ease); }
.btn-primary:hover .arrow { transform: translateX(4px); }

.hero-image-wrap {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 20px 60px rgba(60, 40, 20, 0.18);
}

.hero-image-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.hero-image-wrap:hover img { transform: scale(1.03); }

/* No featured image fallback */
.hero-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--parchment) 0%, var(--sand) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--mocha);
  opacity: 0.6;
}

/* ============================================================
   CATEGORY CARDS
============================================================ */
.categories-section {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--parchment);
}

.category-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.category-card {
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 3px;
  padding: 2rem 1.75rem;
  text-align: center;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.category-card:hover {
  border-color: var(--sand);
  box-shadow: 0 8px 30px rgba(60, 40, 20, 0.08);
  transform: translateY(-3px);
}

.category-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.category-card-desc {
  font-family: var(--font-body);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--mocha);
  margin-bottom: 1.25rem;
}

.category-card-link {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--espresso);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}
.category-card:hover .category-card-link {
  gap: 0.6rem;
  color: var(--rust);
}

/* ============================================================
   ARTICLE GRID
============================================================ */
.articles-section {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--parchment);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
}

.view-all {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mocha);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s var(--ease), gap 0.2s var(--ease);
}
.view-all:hover { color: var(--ink); gap: 0.6rem; }

/* Post cards grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* All cards equal — 3-column grid */
.posts-grid .post-card:first-child {
  grid-column: span 1;
  display: block;
}

.posts-grid .post-card:first-child .post-card-image {
  aspect-ratio: 16/10;
  height: auto;
  min-height: unset;
}

.posts-grid .post-card:first-child .post-card-body {
  padding: 1.5rem;
  display: block;
}

.posts-grid .post-card:first-child .post-card-title {
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

/* Regular post card */
.post-card {
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-radius: 3px;
  overflow: hidden;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.post-card:hover {
  box-shadow: 0 12px 40px rgba(60, 40, 20, 0.1);
  transform: translateY(-4px);
}

.post-card-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.post-card:hover .post-card-image img { transform: scale(1.05); }

.post-card-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--parchment), var(--sand));
}

.post-card-body { padding: 1.5rem; }

.post-card-category {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--parchment);
  color: var(--mocha);
  padding: 0.2rem 0.6rem;
  border-radius: 1px;
  margin-bottom: 0.85rem;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0.75rem;
  transition: color 0.2s var(--ease);
}
.post-card:hover .post-card-title { color: var(--espresso); }

.post-card-excerpt {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--mocha);
  margin-bottom: 1rem;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--sand);
  letter-spacing: 0.04em;
}
.post-card-meta span { color: var(--mocha); }

/* ============================================================
   NEWSLETTER / FOOTER BAND
============================================================ */
.newsletter-section {
  background: var(--charcoal);
  padding-block: clamp(3rem, 7vw, 5rem);
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.newsletter-text .section-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.newsletter-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  color: var(--warm-white);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.newsletter-text p {
  font-size: 0.9rem;
  color: var(--sand);
  line-height: 1.7;
}

.newsletter-form { display: flex; flex-direction: column; gap: 0.75rem; }

.newsletter-form .form-row {
  display: flex;
  gap: 0;
}

.newsletter-form input[type="email"] {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-right: none;
  color: var(--warm-white);
  padding: 0.75rem 1rem;
  border-radius: 2px 0 0 2px;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.newsletter-form input[type="email"]::placeholder { color: var(--sand); opacity: 0.5; }
.newsletter-form input[type="email"]:focus {
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
}

.newsletter-form button[type="submit"] {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--warm-white);
  color: var(--ink);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.newsletter-form button[type="submit"]:hover {
  background: var(--parchment);
}

.newsletter-form .form-consent {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--sand);
  opacity: 0.6;
}

/* Quote panel */
.newsletter-quote {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 2.5rem;
  position: relative;
}
.newsletter-quote::before {
  content: '"';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.25;
}

.newsletter-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-style: italic;
  color: var(--warm-white);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.newsletter-quote cite {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.1em;
  color: var(--gold);
  opacity: 0.7;
}

/* ============================================================
   SITE FOOTER
============================================================ */
.site-footer {
  background: var(--ink);
  padding-block: 3rem 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 1.75rem;
}

.footer-brand .footer-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--warm-white);
  margin-bottom: 0.5rem;
}

.footer-brand .footer-desc {
  font-size: 0.83rem;
  line-height: 1.7;
  color: var(--sand);
  opacity: 0.7;
  margin-bottom: 1.25rem;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  background: rgba(255,255,255,0.06);
  color: var(--sand);
  border-radius: 2px;
  font-size: 0.75rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.footer-social a:hover {
  background: var(--mocha);
  color: var(--warm-white);
}

.footer-col-title {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.5rem; }

.footer-col a {
  font-size: 0.83rem;
  color: var(--sand);
  opacity: 0.7;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}
.footer-col a:hover { opacity: 1; color: var(--warm-white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--sand);
  opacity: 0.4;
}

/* ============================================================
   SINGLE POST / PAGE
============================================================ */
.single .post-header,
.page .post-header {
  background: var(--cream);
  padding-block: clamp(3rem, 7vw, 5rem);
  text-align: center;
}

.post-header .post-category {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mocha);
  background: var(--parchment);
  padding: 0.25rem 0.75rem;
  border-radius: 1px;
  margin-bottom: 1.25rem;
}

.post-header .post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.post-header .post-meta {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--mocha);
  letter-spacing: 0.06em;
}

.post-featured-image {
  max-height: 520px;
  overflow: hidden;
}
.post-featured-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.post-content-wrap {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.post-content {
  max-width: 680px;
  margin: 0 auto;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 500;
  color: var(--ink);
  margin-block: 2rem 0.75rem;
  line-height: 1.3;
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  color: var(--ink);
  margin-block: 1.75rem 0.65rem;
}

.post-content p { margin-bottom: 1.5rem; color: var(--charcoal); }

.post-content blockquote {
  border-left: 3px solid var(--gold);
  margin-block: 2rem;
  padding: 1rem 1.75rem;
  background: var(--cream);
  border-radius: 0 3px 3px 0;
}
.post-content blockquote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--espresso);
  margin: 0;
}

.post-content a {
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-content a:hover { color: var(--espresso); }

.post-content ul, .post-content ol {
  margin-block: 1rem 1.5rem;
  padding-left: 1.5rem;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.5rem; }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
============================================================ */
.archive-header {
  background: var(--cream);
  padding-block: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 3rem;
}

.archive-header .archive-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.archive-header .archive-description {
  font-size: 0.95rem;
  color: var(--mocha);
  max-width: 540px;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 4rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding-block: 3rem;
}

.pagination .page-numbers {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  width: 2.5rem; height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--parchment);
  border-radius: 2px;
  color: var(--charcoal);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--warm-white);
}

/* ============================================================
   COMMENTS
============================================================ */
.comments-area {
  max-width: 680px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.comments-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--parchment);
}

.comment {
  display: flex;
  gap: 1.25rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--parchment);
}

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

.comment-author-name {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.comment-date {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--mocha);
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.comment-text { font-size: 0.9rem; color: var(--charcoal); line-height: 1.7; }

/* Comment form */
.comment-respond { margin-top: 3rem; }

.comment-respond .comment-reply-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  color: var(--ink);
  padding: 0.75rem 1rem;
  border-radius: 2px;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s var(--ease);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--sand); }
.comment-form textarea { min-height: 140px; resize: vertical; }

.comment-form input[type="submit"] {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--warm-white);
  border: none;
  cursor: pointer;
  width: auto;
  padding: 0.8rem 2rem;
  transition: background 0.2s var(--ease);
}
.comment-form input[type="submit"]:hover { background: var(--espresso); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image-wrap { max-height: 320px; }

  .category-cards { grid-template-columns: 1fr; }

  .posts-grid { grid-template-columns: 1fr 1fr; }
  .posts-grid .post-card:first-child { grid-column: span 1; }

  .newsletter-inner { grid-template-columns: 1fr; }
  .newsletter-quote { display: none; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .archive-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-navigation { display: none; }
  .main-navigation.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--warm-white);
    border-bottom: 1px solid var(--parchment);
    padding: 1rem var(--gutter);
    z-index: 99;
  }
  .main-navigation.is-open ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .menu-toggle { display: flex; }
  .header-actions .social-link { display: none; }

  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid .post-card:first-child { grid-column: span 1; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .archive-grid { grid-template-columns: 1fr; }

  .newsletter-form .form-row { flex-direction: column; }
  .newsletter-form input[type="email"],
  .newsletter-form button[type="submit"] {
    border-radius: 2px;
    border-right: 1px solid rgba(255,255,255,0.15);
  }
}

/* ============================================================
   POST NAVIGATION (single.php)
============================================================ */
.post-nav {
  max-width: 680px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--parchment);
}

.post-nav-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem;
  border: 1px solid var(--parchment);
  border-radius: 3px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.post-nav-link:hover {
  border-color: var(--sand);
  box-shadow: 0 4px 16px rgba(60,40,20,0.07);
}

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

.nav-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mocha);
}

.nav-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
}

/* ============================================================
   SEARCH BAR (inline, below header)
============================================================ */
.search-bar {
  background: var(--cream);
  border-bottom: 1px solid var(--parchment);
  padding-block: 0.85rem;
}

.search-bar .search-form {
  display: flex;
  gap: 0;
  max-width: 540px;
  margin: 0 auto;
}

.search-bar input[type="search"] {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--warm-white);
  border: 1px solid var(--parchment);
  border-right: none;
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 2px 0 0 2px;
  outline: none;
  transition: border-color 0.2s var(--ease);
}
.search-bar input[type="search"]:focus { border-color: var(--sand); }

.search-bar button[type="submit"] {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--warm-white);
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.search-bar button[type="submit"]:hover { background: var(--espresso); }
