/* The Lord's Freeman — main.css
 * Editorial design system per DESIGN_SPEC_lordsfreeman_com.md
 * Hand-written CSS. No frameworks.
 */

/* === CSS VARIABLES === */
:root {
  /* Backgrounds */
  --color-bg:        #FAF8F4;
  --color-surface:   #F3F0EA;
  --color-border:    #DDD8CE;

  /* Text */
  --color-ink:       #1C1A16;
  --color-muted:     #6B6456;

  /* Accent — editorial red */
  --color-accent:    #8B2635;
  --color-accent-hover: #6B1C28;

  /* Link */
  --color-link:      #8B2635;
  --color-link-hover: #6B1C28;

  /* Decorative */
  --color-rule:      #C8B89A;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Lora', Georgia, serif;
  --font-ui:      system-ui, -apple-system, sans-serif;

  /* Spacing (8px scale) */
  --space-4:   4px;
  --space-8:   8px;
  --space-16:  16px;
  --space-24:  24px;
  --space-32:  32px;
  --space-48:  48px;
  --space-64:  64px;
  --space-96:  96px;

  /* Layout */
  --width-content: 680px;
  --width-wide:    900px;
  --width-site:    1100px;

  /* Header */
  --header-height: 64px;

  /* Border radius */
  --radius: 8px;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-link-hover);
}

ul, ol {
  list-style: none;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.667rem; /* 48px */
  font-weight: 900;
}

h2 {
  font-size: 1.778rem; /* 32px */
  margin-bottom: var(--space-16);
}

h3 {
  font-size: 1.333rem; /* 24px */
  margin-bottom: var(--space-8);
}

h4 {
  font-size: 1.111rem; /* 20px */
  font-weight: 700;
  margin-bottom: var(--space-8);
}

h5 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-4);
}

h6 {
  font-size: 0.889rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Small-caps labels */
.label {
  font-family: var(--font-ui);
  font-size: 0.722rem; /* 13px */
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* === LAYOUT === */
.container {
  max-width: var(--width-site);
  margin: 0 auto;
  padding: 0 var(--space-32);
}

.container--narrow {
  max-width: var(--width-content);
}

.container--wide {
  max-width: var(--width-wide);
}

/* === NAVIGATION === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 248, 244, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: 4px 0;
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  padding: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.333rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: var(--space-8);
  flex-shrink: 0;
}

.site-logo:hover {
  color: var(--color-accent-hover);
}

.logo-verse {
  font-family: var(--font-ui);
  font-size: 0.667rem;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.main-nav {
  display: none;
}

.main-nav > a,
.main-nav .nav-dropdown-toggle {
  font-family: var(--font-ui);
  font-size: 0.833rem;
  font-weight: 500;
  color: var(--color-ink);
  padding: var(--space-8) 0;
  position: relative;
  transition: color 0.2s ease;
  text-decoration: none;
  cursor: pointer;
}

.main-nav > a:hover,
.main-nav .nav-dropdown-toggle:hover {
  color: var(--color-accent);
}

/* Active page indicator */
.main-nav > a.active {
  color: var(--color-accent);
}

.main-nav > a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-caret {
  font-size: 0.6em;
  margin-left: 2px;
  transition: transform 0.2s ease;
  display: inline-block;
}

.nav-dropdown:hover .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 160px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  padding: var(--space-8) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s, transform 0.2s ease;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: var(--space-8) var(--space-24);
  font-family: var(--font-ui);
  font-size: 0.833rem;
  font-weight: 500;
  color: var(--color-ink);
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--color-surface);
  color: var(--color-accent);
}

.nav-dropdown-menu a.active {
  color: var(--color-accent);
}

.nav-subscribe {
  display: none;
  background: var(--color-accent);
  color: var(--color-bg);
  padding: 6px 16px;
  font-family: var(--font-ui);
  font-size: 0.778rem; /* 14px */
  font-weight: 600;
  letter-spacing: 0.04em;
  border: none;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.nav-subscribe:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg);
}

/* Mobile hamburger */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-ink);
  padding: var(--space-8);
}

/* Mobile nav — slide in from right */
.mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  padding: var(--space-24);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
  overflow-y: auto;
}

.mobile-nav.open {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

.mobile-nav a {
  display: block;
  font-family: var(--font-ui);
  font-size: 1.111rem;
  font-weight: 500;
  color: var(--color-ink);
  padding: var(--space-16) 0;
  border-bottom: 1px solid var(--color-border);
  min-height: 48px;
  display: flex;
  align-items: center;
}

.mobile-nav a:hover {
  color: var(--color-accent);
}

.mobile-nav-section {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.722rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: var(--space-24) 0 var(--space-8);
  border-bottom: none;
}

.mobile-nav .nav-subscribe-mobile {
  display: inline-block;
  margin-top: var(--space-24);
  background: var(--color-accent);
  color: var(--color-bg);
  padding: var(--space-16) var(--space-32);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border-bottom: none;
  justify-content: center;
}

/* === HOMEPAGE === */

/* Hero */
.hero {
  padding: var(--space-96) 0 var(--space-64);
  text-align: center;
}

.hero-content {
  max-width: var(--width-wide);
  margin: 0 auto;
}

.hero-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-24);
  border: 3px solid var(--color-rule);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scripture {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.722rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-8);
}

.hero h1 {
  margin-bottom: var(--space-16);
}

.hero-tagline {
  font-size: 1.111rem; /* 20px */
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto var(--space-32);
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  justify-content: center;
}

/* Scripture quote section */
.scripture-quote {
  padding: var(--space-64) var(--space-32);
  text-align: center;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.scripture-quote blockquote {
  max-width: var(--width-content);
  margin: 0 auto;
  font-style: italic;
  font-size: 1.222rem;
  color: var(--color-muted);
  line-height: 1.6;
  border-left: none;
  padding-left: 0;
  border-radius: 0;
}

.scripture-quote cite {
  display: block;
  margin-top: var(--space-16);
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.778rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}

/* Topic section */
.topics {
  padding: var(--space-96) 0;
}

.topics h2 {
  text-align: center;
  margin-bottom: var(--space-48);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-24);
  max-width: var(--width-wide);
  margin: 0 auto;
}

.card {
  background: var(--color-surface);
  border: 1px solid rgba(221, 216, 206, 0.5);
  padding: var(--space-32) var(--space-24);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: var(--space-16);
}

.card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: var(--space-8);
}

.card p {
  color: var(--color-muted);
  font-size: 0.944rem;
  margin-bottom: var(--space-16);
}

.card-link {
  font-family: var(--font-ui);
  font-size: 0.833rem;
  font-weight: 600;
  color: var(--color-accent);
}

.card-link:hover {
  color: var(--color-accent-hover);
}

/* Latest posts section */
.latest-posts {
  padding: var(--space-96) 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.latest-posts h2 {
  text-align: center;
  margin-bottom: var(--space-48);
}

.posts-list {
  max-width: var(--width-wide);
  margin: 0 auto;
}

.post-item {
  display: block;
  padding: var(--space-24) 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
}

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

.post-item:hover h3 {
  color: var(--color-accent);
}

/* Date + title inline (newspaper style) */
.post-header-line {
  display: flex;
  align-items: baseline;
  gap: var(--space-16);
  margin-bottom: var(--space-8);
}

.post-header-line .post-meta {
  font-family: var(--font-ui);
  font-size: 0.778rem;
  font-weight: 500;
  color: var(--color-muted);
  flex-shrink: 0;
}

.post-item h3 {
  font-family: var(--font-heading);
  font-size: 1.222rem;
  font-weight: 700;
  color: var(--color-ink);
  transition: color 0.2s ease;
  margin: 0;
}

.post-item p {
  color: var(--color-muted);
  font-size: 0.944rem;
  line-height: 1.6;
  margin-top: var(--space-8);
}

.read-more {
  display: inline-block;
  margin-top: var(--space-8);
  font-family: var(--font-ui);
  font-size: 0.833rem;
  font-weight: 600;
  color: var(--color-accent);
}

.no-posts {
  text-align: center;
  color: var(--color-muted);
  font-style: italic;
}

/* Subscribe section */
.subscribe {
  padding: var(--space-96) 0;
  text-align: center;
}

.subscribe h2 {
  margin-bottom: var(--space-16);
}

.subscribe > p {
  color: var(--color-muted);
  max-width: 500px;
  margin: 0 auto var(--space-32);
}

.subscribe-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  max-width: 400px;
  margin: 0 auto var(--space-24);
}

.subscribe-form input[type="email"] {
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.subscribe-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

.subscribe-form input[type="email"]::placeholder {
  color: var(--color-muted);
}

.subscribe-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-16);
}

.subscribe-divider {
  font-family: var(--font-ui);
  font-size: 0.833rem;
  color: var(--color-muted);
  text-transform: lowercase;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-family: var(--font-ui);
  font-size: 0.889rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: var(--color-bg);
}

.btn-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}

.btn-secondary:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

.btn-youtube {
  background: #FF0000;
  color: #FFFFFF;
}

.btn-youtube:hover {
  background: #CC0000;
  color: #FFFFFF;
}

/* === ARTICLE (single) === */
.single-post {
  padding-top: var(--space-48);
}

.post-header {
  text-align: center;
  max-width: var(--width-content);
  margin: 0 auto var(--space-32);
  padding: 0 var(--space-32);
}

.post-header .label {
  margin-bottom: var(--space-16);
}

.post-header h1 {
  font-size: 2.333rem; /* 42px */
  margin-bottom: var(--space-16);
}

.post-header .post-meta {
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: 0.833rem;
}

/* Ornament divider */
.ornament {
  text-align: center;
  color: var(--color-rule);
  font-size: 1.333rem;
  margin: var(--space-32) 0;
  letter-spacing: 0.5em;
}

/* Post content */
.post-content {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 var(--space-32) var(--space-64);
}

/* Drop cap on first paragraph */
.post-content > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-size: 3.5em;
  font-weight: 900;
  float: left;
  line-height: 0.85;
  margin-right: 8px;
  color: var(--color-accent);
}

.post-content h2 {
  margin-top: var(--space-48);
  margin-bottom: var(--space-16);
}

.post-content h3 {
  margin-top: var(--space-32);
  margin-bottom: var(--space-8);
}

.post-content h4 {
  margin-top: var(--space-24);
  margin-bottom: var(--space-8);
}

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

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

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

.post-content ul li {
  list-style: disc;
}

.post-content ol li {
  list-style: decimal;
}

.post-content a {
  color: var(--color-accent);
  text-decoration: none;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

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

.post-content img {
  margin: var(--space-32) 0;
  border-radius: var(--radius);
}

.post-content code {
  font-family: 'JetBrains Mono', 'Courier Prime', monospace;
  font-size: 0.9em;
  background: var(--color-surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

.post-content pre {
  margin: var(--space-32) 0;
  padding: var(--space-24);
  background: var(--color-ink);
  color: var(--color-bg);
  overflow-x: auto;
  line-height: 1.5;
  border-radius: var(--radius);
}

.post-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* Post footer */
.post-footer {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 var(--space-32) var(--space-64);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-32);
  text-align: center;
}

.post-footer p {
  color: var(--color-muted);
  font-size: 0.944rem;
}

.post-tags {
  margin-bottom: var(--space-24);
}

.post-tags span {
  font-family: var(--font-ui);
  font-size: 0.833rem;
  color: var(--color-muted);
  margin-right: var(--space-8);
}

.post-tags a {
  font-family: var(--font-ui);
  font-size: 0.833rem;
  color: var(--color-accent);
  margin-right: var(--space-8);
}

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-32);
  flex-wrap: wrap;
}

.post-nav a {
  font-family: var(--font-ui);
  font-size: 0.889rem;
  color: var(--color-accent);
}

/* === LIST PAGES (card grid) === */
.list-page {
  padding-top: var(--space-48);
}

.list-header {
  text-align: center;
  max-width: var(--width-wide);
  margin: 0 auto var(--space-32);
  padding: 0 var(--space-32);
}

.list-header h1 {
  margin-bottom: var(--space-16);
}

.list-description {
  color: var(--color-muted);
  font-size: 1.111rem;
  max-width: var(--width-content);
  margin: 0 auto;
}

.list-content {
  max-width: var(--width-content);
  margin: var(--space-24) auto 0;
  color: var(--color-muted);
}

/* Horizontal rule before posts */
.list-divider {
  max-width: var(--width-wide);
  margin: 0 auto var(--space-32);
  border: none;
  border-top: 1px solid var(--color-border);
}

/* Card grid layout */
.list-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-24);
  max-width: var(--width-wide);
  margin: 0 auto;
  padding: 0 var(--space-32) var(--space-64);
}

.list-post-item {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid rgba(221, 216, 206, 0.5);
  padding: var(--space-24);
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.list-post-item:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.list-post-date {
  font-family: var(--font-ui);
  font-size: 0.778rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: var(--space-8);
}

.list-post-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.list-post-content h2 {
  font-size: 1.222rem;
  margin-bottom: var(--space-8);
}

.list-post-content h2 a {
  color: var(--color-ink);
  text-decoration: none;
}

.list-post-content h2 a:hover {
  color: var(--color-accent);
}

.list-post-content p {
  color: var(--color-muted);
  font-size: 0.944rem;
  line-height: 1.6;
  flex: 1;
}

.list-post-content::after {
  content: 'Read more \2192';
  display: inline-block;
  margin-top: var(--space-16);
  font-family: var(--font-ui);
  font-size: 0.833rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* === COMPONENTS === */

/* Blockquote */
blockquote {
  border-left: 3px solid var(--color-rule);
  padding: var(--space-24);
  font-style: italic;
  color: var(--color-muted);
  margin: var(--space-32) 0;
  background: var(--color-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Table of contents */
.toc {
  background: var(--color-surface);
  border: 1px solid rgba(221, 216, 206, 0.5);
  border-radius: var(--radius);
  padding: var(--space-24);
  margin-bottom: var(--space-32);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Author bio */
.author-bio {
  background: var(--color-surface);
  border: 1px solid rgba(221, 216, 206, 0.5);
  border-radius: var(--radius);
  padding: var(--space-24);
  margin: var(--space-32) 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Related posts */
.related-posts .list-post-item {
  border-radius: var(--radius);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-16);
  margin-top: var(--space-48);
  font-family: var(--font-ui);
  font-size: 0.889rem;
  grid-column: 1 / -1;
}

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

.pagination-info {
  color: var(--color-muted);
}

/* === FOOTER === */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-48) 0 var(--space-32);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-32);
  text-align: center;
}

.footer-brand {
  margin-bottom: var(--space-16);
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.333rem;
  font-weight: 700;
  color: var(--color-ink);
  margin-bottom: var(--space-8);
}

.footer-verse {
  font-style: italic;
  color: var(--color-muted);
  font-size: 0.944rem;
  max-width: 400px;
  margin: 0 auto;
}

.footer-cite {
  font-family: var(--font-ui);
  font-size: 0.778rem;
  color: var(--color-accent);
  margin-top: var(--space-8);
}

.footer-nav {
  margin-bottom: var(--space-16);
}

.footer-nav h4 {
  font-family: var(--font-ui);
  font-size: 0.778rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-16);
}

.footer-nav a {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.889rem;
  color: var(--color-ink);
  margin: 0 var(--space-8);
}

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

.footer-connect h4 {
  font-family: var(--font-ui);
  font-size: 0.778rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-16);
}

.footer-connect a {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.889rem;
  color: var(--color-ink);
  margin: 0 var(--space-8);
}

.footer-connect a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  margin-top: var(--space-32);
  padding-top: var(--space-24);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.833rem;
  color: var(--color-muted);
}

.footer-sovereignty {
  margin-top: var(--space-8);
  font-size: 0.778rem;
}

/* === 404 PAGE === */
.error-page {
  padding: var(--space-96) 0;
  text-align: center;
}

.error-content {
  max-width: var(--width-content);
  margin: 0 auto;
}

.error-code {
  display: block;
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-rule);
  line-height: 1;
  margin-bottom: var(--space-16);
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: var(--space-16);
}

.error-page p {
  color: var(--color-muted);
  font-size: 1.111rem;
  margin-bottom: var(--space-16);
}

.error-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-16);
  margin-top: var(--space-32);
}

.error-nav a {
  font-family: var(--font-ui);
  font-size: 0.889rem;
  font-weight: 600;
  color: var(--color-accent);
  padding: var(--space-8) var(--space-16);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.error-nav a:hover {
  border-color: var(--color-accent);
  background: var(--color-surface);
}

/* === READING PROGRESS BAR === */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--color-accent);
  z-index: 1001;
  pointer-events: none;
}

/* === BACK-TO-TOP BUTTON === */
.back-to-top {
  position: fixed;
  bottom: var(--space-32);
  right: var(--space-32);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-accent);
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  border-radius: var(--radius);
  transition: opacity 0.25s ease, visibility 0.25s, transform 0.25s ease,
              border-color 0.2s ease, background 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-bg);
}

/* === MOBILE — small (max-width: 480px) === */
@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .container {
    padding: 0 var(--space-16);
  }

  .hero {
    padding: var(--space-48) 0 var(--space-32);
  }

  .hero h1 {
    font-size: 1.667rem;
  }

  .hero-tagline {
    font-size: 0.944rem;
  }

  .post-header h1 {
    font-size: 1.556rem;
  }

  .post-content,
  .post-footer,
  .post-header {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }

  .list-posts {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }

  .list-header {
    padding-left: var(--space-16);
    padding-right: var(--space-16);
  }

  .error-code {
    font-size: 4rem;
  }

  .back-to-top {
    bottom: var(--space-16);
    right: var(--space-16);
  }
}

/* === MOBILE — standard (max-width: 768px) === */
@media (max-width: 768px) {
  html {
    font-size: 17px;
  }

  .container {
    padding: 0 20px;
  }

  .hero {
    padding: var(--space-64) 0 var(--space-48);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

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

  .list-posts {
    grid-template-columns: 1fr;
  }

  .post-header h1 {
    font-size: 1.778rem;
  }

  .post-content,
  .post-footer,
  .post-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .post-header-line {
    flex-direction: column;
    gap: var(--space-4);
  }

  .footer-content {
    gap: var(--space-24);
  }

  .footer-nav a,
  .footer-connect a {
    display: block;
    margin: var(--space-4) 0;
  }

  .topics,
  .latest-posts,
  .subscribe {
    padding: var(--space-64) 0;
  }
}

/* === TABLET (min-width: 769px) === */
@media (min-width: 769px) {
  .nav-toggle {
    display: none;
  }

  .main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-32);
  }

  .nav-subscribe {
    display: inline-block;
    margin-left: var(--space-24);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .list-posts {
    grid-template-columns: repeat(2, 1fr);
  }

  .subscribe-form {
    flex-direction: row;
  }

  .subscribe-form input[type="email"] {
    flex: 1;
  }

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .footer-verse {
    margin: 0;
  }
}

/* === DESKTOP (min-width: 1024px) === */
@media (min-width: 1024px) {
  .hero-content {
    display: flex;
    align-items: center;
    gap: var(--space-48);
    text-align: left;
  }

  .hero-photo {
    order: 2;
    margin: 0;
    width: 140px;
    height: 140px;
  }

  .hero-text {
    flex: 1;
  }

  .hero-tagline {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-cta {
    justify-content: flex-start;
  }

  .list-posts {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === PRINT === */
@media print {
  .site-header,
  .site-footer,
  .subscribe,
  .nav-toggle,
  .mobile-nav,
  .back-to-top,
  .reading-progress,
  .cookie-banner {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.6;
  }

  .post-content {
    max-width: 100%;
    padding: 0;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #555;
  }

  .post-header {
    text-align: left;
    padding: 0;
  }

  .ornament {
    color: #999;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  h1, h2, h3, h4 {
    page-break-after: avoid;
    color: #000;
  }
}
