/* ============================================================
   TL GUILLOT — SCREEN.CSS
   Film & Pop Culture Criticism — Ghost 5.x Theme
   ============================================================ */

/* ── 1. CUSTOM PROPERTIES ──────────────────────────────────── */
:root {
  /* Colors */
  --color-bg:          #0e0d0b;
  --color-surface:     #181614;
  --color-surface-2:   #1f1d1a;
  --color-border:      #2a2620;
  --color-border-2:    #3a3630;
  --color-text:        #e8e0d0;
  --color-text-muted:  #7a7060;
  --color-text-dim:    #4a4438;
  --color-accent:      #c9a84c;
  --color-accent-dim:  #8a7030;
  --color-white:       #f5f0e8;

  /* Ghost custom font variables — Ghost Admin injects these when a custom font is selected */
  --gh-font-heading:   'Cormorant Garamond', Georgia, serif;
  --gh-font-body:      'Source Serif 4', Georgia, serif;

  /* Typography — use Ghost font vars with our defaults as fallback */
  --font-display:      var(--gh-font-heading, 'Cormorant Garamond', Georgia, serif);
  --font-body:         var(--gh-font-body, 'Source Serif 4', Georgia, serif);
  --font-ui:           'Bebas Neue', Impact, sans-serif;

  /* Scale */
  --scale-xs:   0.75rem;   /* 12px */
  --scale-sm:   0.875rem;  /* 14px */
  --scale-base: 1.125rem;  /* 18px */
  --scale-md:   1.25rem;   /* 20px */
  --scale-lg:   1.5rem;    /* 24px */
  --scale-xl:   2rem;      /* 32px */
  --scale-2xl:  2.5rem;    /* 40px */
  --scale-3xl:  3.5rem;    /* 56px */
  --scale-4xl:  5rem;      /* 80px */
  --scale-5xl:  7rem;      /* 112px */

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --container-max:   1280px;
  --reading-max:     68ch;
  --reading-padding: clamp(1.5rem, 5vw, 4rem);

  /* Transitions */
  --transition-fast: 180ms ease;
  --transition-mid:  320ms ease;

  /* Header height (for offset) */
  --header-h: 72px;
}

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

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

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

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; }

::selection {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

/* Remove JS class once loaded */
html.no-js .js-only { display: none; }

/* ── 3. GRAIN OVERLAY ───────────────────────────────────────── */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 100;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  animation: grain 0.4s steps(1) infinite;
}

@keyframes grain {
  0%  { transform: translate(0,   0)   rotate(0deg);   }
  10% { transform: translate(-3%, -4%) rotate(0.5deg); }
  20% { transform: translate(4%,  3%)  rotate(-0.5deg);}
  30% { transform: translate(-2%, 5%)  rotate(0.3deg); }
  40% { transform: translate(3%,  -3%) rotate(-0.3deg);}
  50% { transform: translate(-4%, 2%)  rotate(0.2deg); }
  60% { transform: translate(2%,  -5%) rotate(-0.2deg);}
  70% { transform: translate(-3%, 4%)  rotate(0.4deg); }
  80% { transform: translate(4%,  -2%) rotate(-0.4deg);}
  90% { transform: translate(-2%, 3%)  rotate(0.1deg); }
  100%{ transform: translate(3%,  -4%) rotate(-0.1deg);}
}

/* ── 4. READ PROGRESS ───────────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background-color: var(--color-accent);
  z-index: 1000;
  transition: width 80ms linear;
  transform-origin: left;
}

/* ── 5. UTILITIES ───────────────────────────────────────────── */
.site-container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 3rem);
}

.label-tag {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding: 0.2em 0.6em;
  border: 1px solid var(--color-accent-dim);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.label-tag:hover {
  background-color: var(--color-accent);
  color: var(--color-bg);
}

.label-tag--sm {
  font-size: 10px;
  padding: 0.15em 0.5em;
}

.label-tag--ghost {
  color: var(--color-text-muted);
  border-color: var(--color-border-2);
}
.label-tag--ghost:hover {
  background-color: var(--color-surface-2);
  color: var(--color-text);
}

.section-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-block: var(--space-xl);
}

.section-divider--sm { margin-block: var(--space-lg); }
.section-divider--footer { margin-block: var(--space-lg) var(--space-md); }

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

.section-divider__glyph {
  font-family: var(--font-ui);
  font-size: 8px;
  color: var(--color-accent);
  letter-spacing: 0;
  opacity: 0.7;
}

.reading-time {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* ── 6. SITE HEADER & NAV ───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background-color: rgba(14, 13, 11, 0.92);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.site-header__brand {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header__title-main {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--color-white);
  line-height: 1;
  transition: color var(--transition-fast);
}

.site-header__brand:hover .site-header__title-main {
  color: var(--color-accent);
}

.site-header__title-sub {
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  margin-top: 3px;
  line-height: 1;
}

/* Nav list */
.site-nav { display: flex; align-items: center; }

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

.site-nav__list li a {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  position: relative;
}

.site-nav__list li a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-accent);
  transition: width var(--transition-mid);
}

.site-nav__list li a:hover {
  color: var(--color-text);
}

.site-nav__list li a:hover::after { width: 100%; }
.site-nav__list li.nav-current a { color: var(--color-text); }
.site-nav__list li.nav-current a::after { width: 100%; }

/* Mobile toggle */
.site-header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0.5rem;
}

.site-header__menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.site-header__menu-icon span {
  display: block;
  height: 1.5px;
  background-color: var(--color-text);
  transition: transform var(--transition-mid), opacity var(--transition-fast);
  transform-origin: center;
}

/* Animated state */
.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.site-header__menu-toggle[aria-expanded="true"] .site-header__menu-icon span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(14, 13, 11, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 199;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform var(--transition-mid), opacity var(--transition-mid);
  pointer-events: none;
}

.mobile-menu[aria-hidden="false"] {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.mobile-menu__list li a {
  font-family: var(--font-display);
  font-size: var(--scale-3xl);
  font-weight: 300;
  color: var(--color-text);
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
  line-height: 1;
}

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

/* ── 7. HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: clamp(520px, 90vh, 860px);
  display: grid;
  grid-template-areas: "hero";
  overflow: hidden;
  background-color: var(--color-surface);
}

.hero__link,
.hero__image-wrap,
.hero__overlay {
  grid-area: hero;
}

.hero__link {
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero__image-wrap {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.03);
  transition: transform 8s ease-out;
  will-change: transform;
}

.hero:hover .hero__image {
  transform: scale(1.06);
}

.hero__overlay {
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(14, 13, 11, 0.98) 0%,
    rgba(14, 13, 11, 0.70) 40%,
    rgba(14, 13, 11, 0.20) 70%,
    transparent 100%
  );
}

.hero__content {
  grid-area: hero;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 8vw, 6rem);
  max-width: 900px;
  pointer-events: none;
}

.hero__content * { pointer-events: auto; }

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.hero__tag { }

.hero__rule {
  display: block;
  width: 24px;
  height: 1px;
  background-color: var(--color-accent-dim);
}

.hero__date {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--scale-5xl);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: 0;
  color: var(--color-white);
  margin-bottom: var(--space-md);
  max-width: 18ch;
}

.hero__title a {
  text-decoration: none;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size var(--transition-mid);
}

.hero__title a:hover { background-size: 100% 1px; }

.hero__excerpt {
  font-size: var(--scale-md);
  color: rgba(232, 224, 208, 0.7);
  max-width: 52ch;
  line-height: 1.6;
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.hero__footer {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-dim);
  padding-bottom: 2px;
  transition: gap var(--transition-fast), color var(--transition-fast);
}

.hero__cta:hover {
  gap: 0.9rem;
  color: var(--color-white);
}

/* ── 8. POST GRID ───────────────────────────────────────────── */
.posts-container {
  padding-block: var(--space-xl) var(--space-3xl);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

/* 4th card spans 2 columns for rhythm break */
.post-grid > .post-card:nth-child(4) {
  grid-column: auto;
}

.post-grid--related {
  grid-template-columns: repeat(3, 1fr);
}
.post-grid--related > .post-card:nth-child(4) {
  grid-column: span 1;
}

/* ── 9. POST CARD ───────────────────────────────────────────── */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-mid), transform var(--transition-mid);
  overflow: hidden;
}

.post-card:hover {
  border-color: var(--color-border-2);
  transform: translateY(-3px);
}

.post-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card__image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
}

/* Wide card: shorter aspect */
.post-grid > .post-card:nth-child(4) .post-card__image-wrap {
  aspect-ratio: 21 / 9;
}

.post-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-mid) ease, filter var(--transition-mid) ease;
  filter: brightness(0.88) saturate(0.9);
}

.post-card:hover .post-card__image {
  transform: scale(1.025);
  filter: brightness(0.95) saturate(1);
}

.post-card__content {
  padding: var(--space-md) var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.post-card__date {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--color-text-dim);
}

.post-card__title {
  font-family: var(--font-display);
  font-size: var(--scale-xl);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-white);
}

.post-card__title a {
  position: relative;
  z-index: 2;
  text-decoration: none;
}

.post-card__excerpt {
  font-size: var(--scale-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
}

/* Wide card shows more excerpt */
.post-grid > .post-card:nth-child(4) .post-card__title {
  font-size: var(--scale-2xl);
}
.post-grid > .post-card:nth-child(4) .post-card__excerpt {
  font-size: var(--scale-base);
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.post-card__author {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* ── 10. SINGLE POST ────────────────────────────────────────── */
.post-single {
  padding-bottom: var(--space-3xl);
}

/* Post header */
.post-header {
  padding-block: var(--space-2xl) var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-bg);
}

.post-header__inner {
  max-width: 800px;
  margin-inline: auto;
}

.post-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.post-header__sep {
  color: var(--color-text-dim);
  font-size: var(--scale-sm);
}

.post-header__date {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

.post-header__title {
  font-family: var(--font-display);
  font-size: var(--scale-4xl);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.post-header__deck {
  font-family: var(--font-body);
  font-size: var(--scale-md);
  font-style: italic;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-md);
  max-width: 52ch;
}

.post-header__author-row { margin-top: var(--space-sm); }

.post-header__author-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
.post-header__author-link:hover { opacity: 0.75; }

.post-header__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border-2);
}

.post-header__author-initial {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0;
  color: var(--color-accent);
  text-transform: uppercase;
}
.post-header__author-initial::first-letter {
  font-size: var(--scale-base);
}

.post-header__author-name {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

/* Feature image */
.post-feature-image {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(0px, 4vw, 3rem);
  margin-block: var(--space-xl);
}

.post-feature-image img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
}

.post-feature-image__caption {
  margin-top: 0.75rem;
  font-size: var(--scale-sm);
  color: var(--color-text-dim);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

/* Post body */
.post-body {
  padding-inline: var(--reading-padding);
}

.post-body__inner {
  max-width: var(--reading-max);
  margin-inline: auto;
}

/* ── 11. GH-CONTENT (Ghost's editor output) ─────────────────── */
.gh-content {
  font-size: var(--scale-base);
  line-height: 1.8;
  color: var(--color-text);
}

.gh-content > * + * { margin-top: 1.6em; }

.gh-content h2 {
  font-family: var(--font-display);
  font-size: var(--scale-2xl);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-white);
  margin-top: 2.4em;
  margin-bottom: 0.6em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--color-border);
}

.gh-content h3 {
  font-family: var(--font-display);
  font-size: var(--scale-xl);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-white);
  margin-top: 2em;
  margin-bottom: 0.5em;
}

.gh-content h4 {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

.gh-content p { }

.gh-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-dim);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-fast);
}
.gh-content a:hover { text-decoration-color: var(--color-accent); }

.gh-content strong {
  font-weight: 600;
  color: var(--color-white);
}

.gh-content em { font-style: italic; }

.gh-content blockquote {
  position: relative;
  margin-inline: -1.5rem;
  padding: var(--space-md) var(--space-lg) var(--space-md) calc(var(--space-lg) + 4px);
  border-left: 4px solid var(--color-accent);
  background-color: var(--color-surface);
  font-family: var(--font-display);
  font-size: var(--scale-xl);
  font-style: italic;
  font-weight: 300;
  color: var(--color-white);
  line-height: 1.45;
}

.gh-content blockquote p { margin-top: 0; }
.gh-content blockquote p + p { margin-top: 0.8em; }

.gh-content ul,
.gh-content ol {
  padding-left: 1.5em;
}

.gh-content ul { list-style: none; }
.gh-content ul li {
  position: relative;
  padding-left: 1em;
}
.gh-content ul li::before {
  content: '—';
  position: absolute;
  left: -0.5em;
  color: var(--color-accent);
  font-weight: 300;
}

.gh-content ol { list-style: decimal; }
.gh-content ol li::marker { color: var(--color-accent); }

.gh-content li + li { margin-top: 0.4em; }

.gh-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-border-2) 20%, var(--color-border-2) 80%, transparent);
  margin-block: var(--space-xl);
}

.gh-content figure { margin-inline: 0; }
.gh-content figure img { width: 100%; }
.gh-content figcaption {
  margin-top: 0.6rem;
  font-size: var(--scale-sm);
  color: var(--color-text-dim);
  font-style: italic;
  text-align: center;
  line-height: 1.5;
}

/* Wide images break out of the reading column */
.gh-content .kg-width-wide {
  margin-inline: calc(var(--reading-padding) * -1.5);
}
.gh-content .kg-width-full {
  width: 100vw;
  margin-inline: calc((100vw - var(--reading-max)) / -2);
  max-width: 100vw;
}

/* Code */
.gh-content code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background-color: var(--color-surface-2);
  padding: 0.15em 0.4em;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  color: var(--color-accent);
}

.gh-content pre {
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  overflow-x: auto;
  border-radius: 2px;
}

.gh-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text);
  font-size: 0.875em;
  line-height: 1.7;
}

/* Ghost card styles */
.gh-content .kg-image-card { }
.gh-content .kg-gallery-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}
.gh-content .kg-gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-content .kg-video-card video { width: 100%; }

.gh-content .kg-bookmark-card {
  border: 1px solid var(--color-border-2);
  background-color: var(--color-surface);
  display: flex;
  text-decoration: none;
  transition: border-color var(--transition-fast);
}
.gh-content .kg-bookmark-card:hover { border-color: var(--color-border-2); }
.gh-content .kg-bookmark-content { padding: var(--space-md); flex: 1; }
.gh-content .kg-bookmark-title { font-family: var(--font-display); font-size: var(--scale-md); color: var(--color-white); }
.gh-content .kg-bookmark-description { margin-top: 0.4em; font-size: var(--scale-sm); color: var(--color-text-muted); }
.gh-content .kg-bookmark-thumbnail img { width: 160px; height: 100%; object-fit: cover; }

/* ── 12. POST FOOTER ────────────────────────────────────────── */
.post-footer {
  padding-top: var(--space-xl);
}

.post-footer__inner {
  max-width: 800px;
  margin-inline: auto;
}

.post-footer__tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.post-footer__tags-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
}

/* Author card */
.author-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding: var(--space-lg);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
}

.author-card__avatar-link { flex-shrink: 0; }

.author-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--color-border-2);
  transition: border-color var(--transition-fast);
}
.author-card__avatar-link:hover .author-card__avatar { border-color: var(--color-accent); }

.author-card__avatar-link--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: var(--color-surface-2);
  border: 1px solid var(--color-border-2);
}

.author-card__initial {
  font-family: var(--font-display);
  font-size: 0;
  color: var(--color-accent);
  text-transform: uppercase;
}
.author-card__initial::first-letter {
  font-size: var(--scale-xl);
}

.author-card__info { flex: 1; }

.author-card__label {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--color-text-dim);
  margin-bottom: 0.3em;
}

.author-card__name {
  font-family: var(--font-display);
  font-size: var(--scale-xl);
  font-weight: 500;
  color: var(--color-white);
  display: block;
  margin-bottom: 0.5em;
  transition: color var(--transition-fast);
}
.author-card__name:hover { color: var(--color-accent); }

.author-card__bio {
  font-size: var(--scale-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

.author-card__location {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
  margin-top: 0.5em;
}

/* ── 13. RELATED POSTS ──────────────────────────────────────── */
.related-posts {
  padding-block: var(--space-xl) var(--space-2xl);
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2xl);
}

.related-posts__heading {
  font-family: var(--font-display);
  font-size: var(--scale-xl);
  font-weight: 400;
  color: var(--color-white);
  letter-spacing: 0.01em;
  margin-bottom: var(--space-xl);
  margin-top: 0;
}

/* ── 14. ARCHIVE HEADERS (tag / author) ─────────────────────── */
.archive-header {
  padding-block: var(--space-2xl) 0;
  background-color: var(--color-bg);
}

.archive-header__inner {
  max-width: 900px;
  margin-inline: auto;
  padding-bottom: var(--space-xl);
}

.archive-header__label {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.archive-header__title {
  font-family: var(--font-display);
  font-size: var(--scale-5xl);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.archive-header__description {
  font-size: var(--scale-md);
  color: var(--color-text-muted);
  font-style: italic;
  max-width: 52ch;
  line-height: 1.65;
  margin-top: var(--space-sm);
}

.archive-header__count {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
  margin-top: var(--space-md);
}

.archive-header__rule {
  height: 1px;
  background: linear-gradient(to right, var(--color-accent), transparent);
  margin-inline: 0;
  max-width: var(--container-max);
  padding-inline: clamp(1rem, 5vw, 3rem);
  /* The rule is a full-width element; we fake the container padding: */
  width: 100%;
  background: linear-gradient(to right, var(--color-accent-dim) 0%, transparent 60%);
}

/* Author header */
.author-header { padding-block: var(--space-2xl) 0; }

.author-header__inner {
  padding-bottom: var(--space-xl);
}

.author-header__layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.author-header__avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border-2);
  display: block;
}

.author-header__avatar-placeholder {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background-color: var(--color-surface-2);
  border: 2px solid var(--color-border-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-header__avatar-placeholder span {
  font-family: var(--font-display);
  font-size: 0;
  color: var(--color-accent);
  text-transform: uppercase;
}
.author-header__avatar-placeholder span::first-letter {
  font-size: var(--scale-4xl);
}

.author-header__label {
  display: inline-block;
  margin-bottom: var(--space-sm);
}

.author-header__name {
  font-family: var(--font-display);
  font-size: var(--scale-4xl);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.author-header__bio {
  font-size: var(--scale-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 52ch;
}

.author-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.author-header__location {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
}

.author-header__post-count {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
}

.author-header__website {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--scale-sm);
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-dim);
  word-break: break-all;
  transition: text-decoration-color var(--transition-fast);
}
.author-header__website:hover { text-decoration-color: var(--color-accent); }

/* ── 15. PAGINATION ─────────────────────────────────────────── */
.pagination {
  padding-block: var(--space-2xl) 0;
}

.pagination__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
}

.pagination__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.pagination__btn:not(.pagination__btn--disabled):hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.pagination__btn--disabled {
  opacity: 0.3;
  cursor: default;
}

.pagination__info {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
}

/* ── 16. FOOTER ─────────────────────────────────────────────── */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-2xl);
}

.site-footer__inner { }

.site-footer__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.site-footer__wordmark {
  font-family: var(--font-display);
  font-size: var(--scale-xl);
  font-weight: 500;
  color: var(--color-white);
  display: block;
  margin-bottom: var(--space-xs);
  transition: color var(--transition-fast);
}
.site-footer__wordmark:hover { color: var(--color-accent); }

.site-footer__tagline {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--color-text-dim);
  text-transform: uppercase;
}

.site-footer__nav-list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.site-footer__nav-list li a {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}
.site-footer__nav-list li a:hover { color: var(--color-accent); }

.site-footer__bottom { }

.site-footer__legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-footer__copyright {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
}

.site-footer__ghost-credit {
  font-family: var(--font-ui);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--color-text-dim);
}

.site-footer__ghost-credit a {
  color: var(--color-text-muted);
  text-decoration: underline;
  text-decoration-color: var(--color-border-2);
  transition: color var(--transition-fast);
}
.site-footer__ghost-credit a:hover { color: var(--color-accent); }

/* ── 17. ERROR PAGE ─────────────────────────────────────────── */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--space-3xl);
}

.error-page__inner {
  max-width: 500px;
}

.error-page__code {
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 300;
  color: var(--color-text-dim);
  line-height: 1;
  margin-bottom: var(--space-lg);
}

.error-page__title {
  font-family: var(--font-display);
  font-size: var(--scale-3xl);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.error-page__message {
  font-size: var(--scale-base);
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.error-page__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-dim);
  padding-bottom: 2px;
  transition: gap var(--transition-fast), color var(--transition-fast);
}
.error-page__cta:hover { gap: 0.9rem; color: var(--color-white); }

/* ── 18. PAGE TRANSITIONS / ANIMATIONS ──────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__content {
  animation: fadeUp 0.9s ease both;
  animation-delay: 0.15s;
}

.post-header__meta  { animation: fadeUp 0.7s ease both; animation-delay: 0.1s; }
.post-header__title { animation: fadeUp 0.7s ease both; animation-delay: 0.2s; }
.post-header__deck  { animation: fadeUp 0.7s ease both; animation-delay: 0.3s; }
.post-header__author-row { animation: fadeUp 0.7s ease both; animation-delay: 0.4s; }

.archive-header__title { animation: fadeUp 0.7s ease both; animation-delay: 0.15s; }
.archive-header__description { animation: fadeUp 0.7s ease both; animation-delay: 0.25s; }

/* Post card stagger via JS-added class */
.post-card { opacity: 0; transform: translateY(16px); }
.post-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

/* ── 19. RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .post-grid > .post-card:nth-child(4) {
    grid-column: auto;
  }
  .post-grid--related {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  /* Nav */
  .site-nav { display: none; }
  .site-header__menu-toggle { display: flex; }

  /* Hero */
  .hero { height: clamp(400px, 75vh, 600px); }
  .hero__content {
    padding: 1.5rem 1.5rem 2.5rem;
  }
  .hero__excerpt { display: none; }

  /* Grid */
  .post-grid {
    grid-template-columns: 1fr;
  }
  .post-grid > .post-card:nth-child(4) {
    grid-column: span 1;
  }
  .post-grid--related { grid-template-columns: 1fr; }

  /* Post */
  .post-feature-image { padding-inline: 0; margin-block: var(--space-lg); }
  .post-feature-image img { max-height: 340px; }
  .gh-content .kg-width-wide,
  .gh-content .kg-width-full { margin-inline: calc(var(--reading-padding) * -1); }

  /* Author header */
  .author-header__layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .author-header__avatar,
  .author-header__avatar-placeholder {
    margin-inline: auto;
    width: 100px;
    height: 100px;
  }
  .author-header__avatar-placeholder span { font-size: var(--scale-3xl); }
  .author-header__meta { justify-content: center; }
  .site-footer__nav-list { align-items: flex-start; }

  /* Footer */
  .site-footer__top { flex-direction: column; }
  .site-footer__nav-list { align-items: flex-start; }
  .site-footer__legal { flex-direction: column; align-items: flex-start; }

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

@media (max-width: 480px) {
  .hero { height: clamp(380px, 70vh, 500px); }
  .pagination__inner {
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ── 20. FOCUS & ACCESSIBILITY ──────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .grain { animation: none; }
  .post-card { opacity: 1; transform: none; }
}

/* Print */
@media print {
  .site-header, .site-footer, .related-posts, .read-progress, .grain { display: none; }
  body { background: white; color: black; }
  .post-header { background: white; }
}

/* 21. EDITORIAL REFINEMENTS */
.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  transform: translateY(-150%);
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  transition: transform var(--transition-fast);
}
.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  background:
    linear-gradient(to bottom, rgba(14, 13, 11, 0.98), rgba(14, 13, 11, 0.86));
}

.site-header__title-main,
.site-footer__wordmark {
  letter-spacing: 0;
}

.site-header__title-sub,
.site-nav__list li a,
.mobile-menu__list li a,
.label-tag,
.reading-time,
.hero__eyebrow,
.hero__date,
.hero__cta,
.post-card__date,
.post-card__author,
.post-card__read-more,
.post-header__date,
.post-header__archive-link,
.site-footer__tagline,
.site-footer__nav-list li a,
.site-footer__copyright,
.site-footer__ghost-credit,
.section-heading__label {
  letter-spacing: 0.1em;
}

.hero {
  min-height: 620px;
  height: auto;
  max-height: none;
}

.hero__link {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero__overlay {
  background:
    linear-gradient(90deg, rgba(10, 9, 7, 0.84) 0%, rgba(10, 9, 7, 0.58) 32%, rgba(10, 9, 7, 0.18) 58%, rgba(10, 9, 7, 0.08) 100%),
    linear-gradient(0deg, rgba(10, 9, 7, 0.68) 0%, rgba(10, 9, 7, 0.22) 34%, rgba(10, 9, 7, 0.04) 70%),
    radial-gradient(ellipse at 22% 58%, rgba(10, 9, 7, 0.62) 0%, rgba(10, 9, 7, 0.28) 38%, rgba(10, 9, 7, 0) 70%);
}

.hero__content {
  justify-content: flex-end;
  width: min(980px, 100%);
  min-height: 620px;
  padding: clamp(2.25rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 8vh, 6rem);
}

.hero__content::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: min(760px, 82vw);
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.56), rgba(8, 7, 6, 0.28) 48%, rgba(8, 7, 6, 0) 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 62%, transparent 100%);
}

.hero__eyebrow,
.hero__meta,
.hero__title,
.hero__excerpt,
.hero__footer {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.82), 0 1px 2px rgba(0, 0, 0, 0.95);
}

.hero--image-bright .hero__overlay {
  background:
    linear-gradient(90deg, rgba(7, 6, 5, 0.92) 0%, rgba(7, 6, 5, 0.72) 32%, rgba(7, 6, 5, 0.30) 60%, rgba(7, 6, 5, 0.12) 100%),
    linear-gradient(0deg, rgba(7, 6, 5, 0.78) 0%, rgba(7, 6, 5, 0.30) 38%, rgba(7, 6, 5, 0.06) 76%),
    radial-gradient(ellipse at 23% 58%, rgba(7, 6, 5, 0.76) 0%, rgba(7, 6, 5, 0.38) 40%, rgba(7, 6, 5, 0) 72%);
}

.hero--image-bright .hero__content::before {
  background:
    linear-gradient(90deg, rgba(7, 6, 5, 0.68), rgba(7, 6, 5, 0.36) 48%, rgba(7, 6, 5, 0) 100%);
}

.hero--image-bright .hero__title,
.hero--image-bright .hero__excerpt {
  text-shadow: 0 3px 22px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 1);
}

.hero__eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.hero__meta {
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-size: 4.6rem;
  letter-spacing: 0;
  max-width: 15ch;
  margin-bottom: var(--space-sm);
}

.hero__excerpt {
  font-size: var(--scale-base);
  max-width: 44ch;
  margin-bottom: var(--space-md);
}

.hero__footer {
  min-height: 2rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.section-heading__label {
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-accent);
}

.section-heading__title {
  font-size: var(--scale-2xl);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-white);
}

.posts-container {
  padding-block: var(--space-2xl) var(--space-3xl);
}

.post-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 1.75rem);
}

.post-grid > .post-card {
  grid-column: auto;
  min-height: 420px;
}

.post-card {
  background:
    linear-gradient(to bottom, rgba(245, 240, 232, 0.02), transparent 35%),
    var(--color-surface);
}

.post-card__content {
  position: relative;
  z-index: 2;
  padding: var(--space-md);
  min-height: 255px;
}

.post-card__meta {
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.post-card__title {
  font-size: var(--scale-xl);
  letter-spacing: 0;
  display: -webkit-box;
  min-height: 3.45em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-card__title a:hover {
  color: var(--color-accent);
}

.post-card__excerpt {
  color: #a69a86;
  display: -webkit-box;
  min-height: 4.8em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-card__footer {
  gap: var(--space-sm);
}

.post-card__read-more {
  display: inline-flex;
  width: max-content;
  margin-top: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-dim);
}

.post-header {
  background:
    linear-gradient(to bottom, rgba(245, 240, 232, 0.025), transparent 52%),
    var(--color-bg);
}

.post-header__title,
.archive-header__title,
.author-header__name {
  letter-spacing: 0;
}

.post-card__image-wrap {
  background-color: var(--color-surface-2);
}

.post-card__image-wrap--empty {
  display: flex;
  align-items: flex-end;
  min-height: 150px;
  padding: 0;
  background:
    linear-gradient(135deg, rgba(201, 168, 76, 0.18), transparent 34%),
    radial-gradient(circle at 85% 18%, rgba(245, 240, 232, 0.08), transparent 28%),
    linear-gradient(to top, rgba(14, 13, 11, 0.76), transparent),
    var(--color-surface-2);
}

.post-grid--related {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-header__author-initial,
.author-card__initial,
.author-header__avatar-placeholder span {
  font-size: 0;
}

.post-header__author-initial::first-letter {
  font-size: var(--scale-base);
}

.author-card__initial::first-letter {
  font-size: var(--scale-xl);
}

.author-header__avatar-placeholder span::first-letter {
  font-size: var(--scale-4xl);
}

.post-header__archive-link {
  display: inline-flex;
  margin-top: var(--space-md);
  font-family: var(--font-ui);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-accent-dim);
}

.post-feature-image {
  margin-top: 0;
}

.gh-content {
  color: #d8cfbf;
}

.gh-content p:first-child {
  font-size: var(--scale-md);
  line-height: 1.65;
  color: var(--color-text);
}

.site-footer {
  background:
    linear-gradient(to bottom, rgba(14, 13, 11, 0), rgba(14, 13, 11, 0.45)),
    var(--color-surface);
}

@media (max-width: 1024px) {
  .post-grid > .post-card,
  .post-grid > .post-card:nth-child(1),
  .post-grid > .post-card:nth-child(4),
  .post-grid > .post-card:nth-child(6n) {
    grid-column: auto;
  }

  .post-grid,
  .post-grid--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 520px;
    height: auto;
  }

  .hero__content {
    min-height: 520px;
    padding: 1.5rem;
    padding-bottom: 2rem;
  }

  .hero__title {
    font-size: var(--scale-3xl);
    max-width: 12ch;
  }

  .hero__excerpt {
    display: block;
    font-size: var(--scale-sm);
    max-width: 34ch;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .post-header__title,
  .archive-header__title,
  .author-header__name {
    font-size: var(--scale-3xl);
  }

  .error-page__code {
    font-size: 5rem;
  }

  .error-page__title {
    font-size: var(--scale-xl);
  }

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

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

  .post-grid > .post-card,
  .post-grid > .post-card:nth-child(1),
  .post-grid > .post-card:nth-child(4),
  .post-grid > .post-card:nth-child(6n) {
    grid-column: auto;
  }

  .post-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .post-card {
    min-height: auto;
  }

  .post-card__content {
    min-height: auto;
  }

  .post-card__title,
  .post-card__excerpt {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 460px;
  }

  .hero__content {
    min-height: 460px;
  }

  .hero__title {
    font-size: var(--scale-2xl);
  }

  .hero__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-xs);
  }
}

/* 22. ABOUT PAGE */
.page-single {
  padding-bottom: var(--space-3xl);
}

.page-hero {
  padding-block: var(--space-2xl);
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(to bottom, rgba(245, 240, 232, 0.025), transparent 56%),
    var(--color-bg);
}

.page-hero__inner {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.page-hero__copy {
  max-width: 560px;
}

.page-hero__label {
  width: max-content;
  margin-bottom: var(--space-md);
  padding: 0.2em 0.65em;
  border: 1px solid var(--color-accent-dim);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.page-hero__title {
  max-width: 10ch;
  font-size: var(--scale-4xl);
  font-weight: 400;
  line-height: 1;
  color: var(--color-white);
}

.page-hero__deck {
  margin-top: var(--space-md);
  max-width: 34ch;
  color: var(--color-text-muted);
  font-size: var(--scale-md);
  font-style: italic;
  line-height: 1.6;
}

.page-hero__media {
  margin: 0;
  border: 1px solid var(--color-border);
  background-color: var(--color-surface);
  overflow: hidden;
}

.page-hero__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: brightness(0.92) saturate(0.92);
}

.page-body {
  padding-top: var(--space-2xl);
}

.page-body__inner {
  max-width: 760px;
}

.page-body .gh-content p:first-child {
  font-size: var(--scale-base);
}

@media (max-width: 900px) {
  .page-hero__inner {
    grid-template-columns: 1fr;
  }

  .page-hero__copy,
  .page-hero__title,
  .page-hero__deck {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding-block: var(--space-xl);
  }

  .page-hero__title {
    font-size: var(--scale-3xl);
  }

  .page-body {
    padding-top: var(--space-xl);
  }
}
