/* ============================================================
   SIGILLUM ALEXIO — Archive Theme
   Dark charcoal · Old-world serif · Editorial
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Cormorant+SC:wght@300;400;500&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

/* ── TOKENS ── */
:root {
  --bg:           #181818;
  --bg-2:         #1e1e1e;
  --bg-3:         #242424;
  --border:       #2e2e2e;
  --border-light: #383838;
  --text:         #d8d0c8;
  --text-dim:     #8a8278;
  --text-faint:   #4a4642;
  --accent:       #c8b89a;
  --accent-dim:   #7a6e62;
  --white:        #ece8e2;
  --red:          #8a3a2a;

  --font-display: 'Cormorant SC', 'Cormorant Garamond', serif;
  --font-body:    'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  --font-mono:    'Courier New', monospace;

  --space-xs:  4px;
  --space-s:   10px;
  --space-m:   20px;
  --space-l:   40px;
  --space-xl:  80px;
  --space-2xl: 140px;

  --col: 680px;
  --col-wide: 900px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.5s;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.65; }

/* ── GRAIN OVERLAY ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================
   SITE HEADER / NAV
   ============================================================ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 var(--space-l);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background var(--duration) var(--ease),
              border-color var(--duration) var(--ease);
}

.site-header.scrolled {
  background: rgba(24, 24, 24, 0.96);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
}

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

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

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--white);
  opacity: 1;
}

.nav-subscribe {
  border: 1px solid var(--border-light);
  padding: 7px 20px;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim) !important;
  transition: border-color 0.2s, color 0.2s !important;
}

.nav-subscribe:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  opacity: 1 !important;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text-dim);
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   HERO — HOMEPAGE
   ============================================================ */

.site-hero {
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-rule-top {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 0;
  background: var(--border-light);
  animation: grow-line 1.4s var(--ease) 0.3s forwards;
}

@keyframes grow-line {
  to { height: 120px; }
}

.hero-year {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(-90px);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 0;
  animation: fade-in 0.8s var(--ease) 1.4s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
  opacity: 0;
  transform: translateY(24px);
  animation: rise-in 1s var(--ease) 0.5s forwards;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 var(--space-l);
}

.hero-sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-dim);
  margin-top: var(--space-m);
  opacity: 0;
  animation: fade-in 0.8s var(--ease) 1s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-l);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  opacity: 0;
  animation: fade-in 0.8s var(--ease) 1.8s forwards;
}

.hero-scroll span {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--border-light), transparent);
  animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION LABELS
   ============================================================ */

.section-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: var(--space-m);
  padding: var(--space-xl) var(--space-l) var(--space-l);
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.section-header .count {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
  margin-left: auto;
}

/* ============================================================
   POST GRID
   ============================================================ */

.posts-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-l);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* First post — full width featured */
.posts-grid .post-card:first-child {
  grid-column: 1 / -1;
}

.post-card {
  display: block;
  background: var(--bg);
  overflow: hidden;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: rise-in 0.7s var(--ease) forwards;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

.post-card-image {
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--bg-3);
}

/* Featured card has wider ratio */
.post-card:first-child .post-card-image {
  aspect-ratio: 21/8;
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.5s;
  filter: brightness(0.85) saturate(0.7);
}

.post-card:hover .post-card-image img {
  transform: scale(1.04);
  filter: brightness(0.95) saturate(0.85);
}

/* No-image placeholder */
.post-card-image-none {
  aspect-ratio: 16/10;
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card:first-child .post-card-image-none {
  aspect-ratio: 21/8;
}

.post-card-image-none .card-roman {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 300;
  color: var(--text-faint);
  letter-spacing: 0.2em;
  user-select: none;
}

.post-card-content {
  padding: var(--space-m) var(--space-m) var(--space-l);
  border-bottom: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

/* Featured card content */
.post-card:first-child .post-card-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-l);
  align-items: end;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-bottom: var(--space-s);
}

.post-card-tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.post-card-date {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}

.post-card h2,
.post-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 1.2;
  transition: color 0.2s;
}

.post-card:first-child h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.post-card h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
}

.post-card:hover h2,
.post-card:hover h3 { color: var(--accent); }

.post-card-excerpt {
  margin-top: var(--space-s);
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-read {
  margin-top: var(--space-m);
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: var(--space-s);
  transition: color 0.2s, gap 0.3s;
}

.post-card-read::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text-faint);
  transition: width 0.3s var(--ease), background 0.2s;
}

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

.post-card:hover .post-card-read::after {
  width: 40px;
  background: var(--accent);
}

/* Video indicator */
.post-card-type {
  position: absolute;
  top: var(--space-m);
  right: var(--space-m);
  font-family: var(--font-display);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(24,24,24,0.8);
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
}

.pagination a {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}

.pagination a:hover { color: var(--white); opacity: 1; }

.pagination a::before { content: '←'; font-size: 1rem; }
.pagination a.next::before { display: none; }
.pagination a.next::after { content: '→'; font-size: 1rem; }

.pagination-info {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

/* ============================================================
   SINGLE POST
   ============================================================ */

.post-hero {
  padding-top: 72px; /* nav height */
  min-height: 60svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.post-hero-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.post-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.4) saturate(0.5);
}

.post-hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 30%,
    rgba(24,24,24,0.6) 70%,
    var(--bg) 100%
  );
}

.post-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-l) var(--space-xl);
  width: 100%;
}

/* No image variant */
.post-hero-no-image .post-hero-content {
  padding-top: var(--space-2xl);
}

.post-hero-tag {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: var(--space-m);
  display: block;
}

.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: var(--white);
  max-width: 18ch;
}

.post-hero-excerpt {
  margin-top: var(--space-m);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 52ch;
  line-height: 1.6;
}

.post-hero-byline {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-top: var(--space-l);
  padding-top: var(--space-l);
  border-top: 1px solid var(--border);
}

.post-hero-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1);
}

.post-hero-author-name {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text);
}

.post-hero-date {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-left: auto;
}

.post-reading-time {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}

/* ============================================================
   POST BODY
   ============================================================ */

.post-body {
  max-width: var(--col);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-l);
}

.post-body p {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.6em;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--white);
  margin: 2.5em 0 0.8em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--white);
  margin: 2em 0 0.6em;
}

.post-body h4 {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 2em 0 0.6em;
}

.post-body strong {
  font-weight: 600;
  color: var(--white);
}

.post-body em {
  font-style: italic;
  color: var(--text);
}

.post-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  transition: border-color 0.2s;
}

.post-body a:hover {
  opacity: 1;
  border-bottom-color: var(--accent);
}

.post-body blockquote {
  border-left: 2px solid var(--accent-dim);
  margin: 2em 0;
  padding: var(--space-m) var(--space-l);
  background: var(--bg-2);
}

.post-body blockquote p {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text);
  margin: 0;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
  position: relative;
  text-align: center;
}

.post-body hr::after {
  content: '✦';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  padding: 0 16px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.post-body ul, .post-body ol {
  margin: 1.4em 0 1.4em 2em;
}

.post-body li {
  margin-bottom: 0.5em;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.75;
}

.post-body figure {
  margin: var(--space-xl) calc(-1 * var(--space-l));
}

.post-body figure img {
  width: 100%;
  filter: saturate(0.75) brightness(0.9);
}

.post-body figcaption {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  text-align: center;
  margin-top: var(--space-s);
  text-transform: uppercase;
}

.post-body pre {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: var(--space-m) var(--space-l);
  overflow-x: auto;
  margin: 1.6em 0;
}

.post-body code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  background: var(--bg-3);
  padding: 1px 6px;
  border-radius: 2px;
}

.post-body pre code {
  background: none;
  padding: 0;
}

/* Wide cards */
.kg-width-wide {
  margin-left: calc(-1 * var(--space-xl));
  margin-right: calc(-1 * var(--space-xl));
}

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

/* Video / embed */
.kg-video-card, .kg-embed-card {
  margin: var(--space-xl) 0;
}

.kg-embed-card iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  background: var(--bg-3);
}

/* ============================================================
   POST TAGS
   ============================================================ */

.post-tags {
  max-width: var(--col);
  margin: 0 auto;
  padding: 0 var(--space-l) var(--space-l);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.post-tag {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 5px 14px;
  transition: border-color 0.2s, color 0.2s;
}

.post-tag:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  opacity: 1;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */

.related-posts {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-l);
  max-width: 1400px;
  margin: 0 auto;
}

.related-posts h3 {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-l);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* ============================================================
   TAG / AUTHOR PAGE
   ============================================================ */

.archive-hero {
  padding: calc(72px + var(--space-2xl)) var(--space-l) var(--space-xl);
  max-width: var(--col-wide);
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.archive-hero .section-label {
  display: block;
  margin-bottom: var(--space-m);
}

.archive-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}

.archive-hero .description {
  margin-top: var(--space-m);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 48ch;
  line-height: 1.7;
}

/* ============================================================
   SUBSCRIBE / MEMBERSHIP
   ============================================================ */

.subscribe-section {
  padding: var(--space-2xl) var(--space-l);
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.subscribe-section::before {
  content: 'SIGILLUM';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 16rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.015);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.subscribe-section .section-label {
  display: block;
  margin-bottom: var(--space-m);
}

.subscribe-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--space-m);
}

.subscribe-section p {
  font-style: italic;
  color: var(--text-dim);
  max-width: 44ch;
  margin: 0 auto var(--space-l);
  font-size: 1rem;
  line-height: 1.7;
}

.subscribe-form {
  display: flex;
  max-width: 460px;
  margin: 0 auto;
  gap: 0;
}

.subscribe-form input[type="email"] {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border-light);
  border-right: none;
  color: var(--text);
  padding: 14px 20px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

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

.subscribe-form input::placeholder {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.subscribe-form button {
  background: var(--bg-3);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.subscribe-form button:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
  color: var(--bg);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-l) var(--space-l);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border);
}

.footer-brand .logo {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--white);
  display: block;
  margin-bottom: var(--space-s);
}

.footer-brand p {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-faint);
  max-width: 28ch;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: var(--space-xl);
}

.footer-nav-col h4 {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--space-m);
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.footer-nav-col a {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  transition: color 0.2s;
}

.footer-nav-col a:hover { color: var(--white); opacity: 1; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-l);
  gap: var(--space-m);
  flex-wrap: wrap;
}

.footer-bottom p {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}

.footer-bottom a {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--text-faint);
  transition: color 0.2s;
}

.footer-bottom a:hover { color: var(--white); opacity: 1; }

/* ============================================================
   ERROR PAGE
   ============================================================ */

.error-page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-l);
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 14rem);
  font-weight: 300;
  color: var(--text-faint);
  line-height: 1;
  letter-spacing: 0.1em;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: var(--space-m) 0;
}

.error-page a {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 2px;
}

/* ============================================================
   MOBILE NAV DRAWER
   ============================================================ */

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-l);
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-nav.open { opacity: 1; }

.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.mobile-nav-close {
  position: absolute;
  top: var(--space-l);
  right: var(--space-l);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: none;
  border: none;
  color: var(--text-dim);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1100px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card:first-child .post-card-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --space-l: 24px; --space-xl: 56px; --space-2xl: 90px; }

  .site-nav { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { display: flex; }

  .posts-grid { grid-template-columns: 1fr; padding: var(--space-m); }
  .posts-grid .post-card:first-child { grid-column: 1; }
  .post-card:first-child .post-card-image { aspect-ratio: 16/10; }
  .post-card:first-child .post-card-image-none { aspect-ratio: 16/10; }

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

  .footer-top { flex-direction: column; gap: var(--space-l); }
  .footer-nav { flex-direction: column; gap: var(--space-l); }

  .kg-width-wide { margin-left: 0; margin-right: 0; }

  .post-body figure { margin-left: 0; margin-right: 0; }

  .subscribe-form { flex-direction: column; }
  .subscribe-form input[type="email"] { border-right: 1px solid var(--border-light); }
  .subscribe-form button { border-top: none; }
}

@media (max-width: 480px) {
  .hero-title { letter-spacing: 0.08em; }
  .post-hero h1 { font-size: 2rem; }
}

/* ============================================================
   SEARCH
   ============================================================ */

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.search-btn:hover { color: var(--white); }

.search-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* Ghost native search overlay */
.gh-search-modal {
  background: rgba(18, 18, 18, 0.97) !important;
  backdrop-filter: blur(20px) !important;
}

.gh-search-input {
  background: var(--bg-2) !important;
  border: 1px solid var(--border-light) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
  font-size: 1.2rem !important;
  border-radius: 0 !important;
}

.gh-search-result {
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
}

.gh-search-result:hover {
  background: var(--bg-2) !important;
}

.gh-search-result-title {
  font-family: var(--font-display) !important;
  font-size: 1rem !important;
  letter-spacing: 0.04em !important;
  color: var(--white) !important;
}

.gh-search-result-description {
  font-family: var(--font-body) !important;
  color: var(--text-dim) !important;
  font-style: italic !important;
}
