/* ============================================================
   TAPESTRY — Editorial Theme for Ghost
   https://tapestry.news

   Design: Atlantic-inspired editorial layout
   - Alternating compact list items + feature cards
   - Monospace small-caps author names
   - Thin rule separators, no card UI
   - Mobile-first, serif-dominant
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

/* ============================================================
   1. CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Colors — B&W only, all color from images */
  --black: #1a1a1a;
  --pure-black: #000000;
  --white: #ffffff;
  --off-white: #f7f7f5;
  --grey-dark: #555555;
  --grey: #8b8b8b;
  --grey-light: #c4c4c4;
  --grey-rule: #e0e0e0;

  /* Typography */
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', 'Courier New', Courier, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Font Sizes — mobile-first */
  --fs-2xs: 0.625rem;    /* 10px */
  --fs-xs: 0.6875rem;    /* 11px */
  --fs-sm: 0.8125rem;    /* 13px */
  --fs-base: 1rem;       /* 16px */
  --fs-md: 1.125rem;     /* 18px */
  --fs-lg: 1.25rem;      /* 20px */
  --fs-xl: 1.5rem;       /* 24px */
  --fs-2xl: 1.875rem;    /* 30px */
  --fs-3xl: 2.25rem;     /* 36px */
  --fs-4xl: 3rem;        /* 48px */

  /* Spacing */
  --sp-2xs: 0.125rem;
  --sp-xs: 0.25rem;
  --sp-sm: 0.5rem;
  --sp-md: 1rem;
  --sp-lg: 1.5rem;
  --sp-xl: 2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --content-width: 680px;
  --gutter: 1.25rem;

  /* Line Heights */
  --lh-tight: 1.12;
  --lh-snug: 1.25;
  --lh-normal: 1.55;
  --lh-relaxed: 1.75;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  color: var(--black);
  background: var(--white);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.65;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

::selection {
  background: var(--black);
  color: var(--white);
}

/* ============================================================
   3. SHARED TYPOGRAPHIC PATTERNS
   ============================================================ */

/* Author name — Atlantic-style monospace small caps */
.author-name {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--black);
}

/* Photo credit */
.photo-credit {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--grey);
  margin-top: var(--sp-xs);
  letter-spacing: 0.03em;
}

/* Category label — small uppercase */
.category-label {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey);
}

/* Read time */
.read-time {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-light);
}

/* Section label row — label + "View all →" link */
.section-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--sp-lg);
}

/* Section title — e.g. "The Daily Lens", "Ideas" */
.section-label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--grey);
  margin-bottom: 0;
}

/* "View all →" link next to section label */
.section-link {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--grey);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.section-link:hover {
  color: var(--pure-black);
}

/* Thin rule */
.rule {
  border: none;
  border-top: 1px solid var(--grey-rule);
}

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

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

/* ============================================================
   5. HEADER — Minimal, Atlantic-style
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--pure-black);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--sp-md) var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Hamburger — left side */
.nav-toggle {
  position: absolute;
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--pure-black);
  transition: transform 0.3s, opacity 0.3s;
}

/* Logo — centered */
.site-logo {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-logo a {
  color: var(--pure-black);
}

/* ============================================================
   6. MOBILE MENU — Full-screen overlay
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2xl);
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  color: var(--black);
  letter-spacing: 0.02em;
}

.mobile-menu a:hover {
  opacity: 0.5;
}

.mobile-menu-close {
  position: absolute;
  top: var(--sp-md);
  right: var(--sp-lg);
  font-size: var(--fs-2xl);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  line-height: 1;
  color: var(--black);
}

/* ============================================================
   7. HERO — Atlantic-style: image left + stacked stories right
   On mobile: stacks vertically (feature first, then list)
   ============================================================ */
.hero {
  padding: var(--sp-xl) 0;
  border-bottom: 1px solid var(--grey-rule);
}

/* Featured story */
.hero-feature {
  margin-bottom: var(--sp-xl);
  padding: 0 var(--gutter);
}

.hero-feature__image {
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

.hero-feature__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.hero-feature__title {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-sm);
}

.hero-feature__excerpt {
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--grey-dark);
  margin-bottom: var(--sp-sm);
}

/* Hero sidebar stories (compact list items) */
.hero-sidebar {
  padding: 0 var(--gutter);
}

.hero-sidebar-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: var(--sp-md) 0;
  border-top: 1px solid var(--grey-rule);
}

.hero-sidebar-item__content {
  flex: 1;
}

.hero-sidebar-item__title {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-xs);
}

.hero-sidebar-item__thumb {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  overflow: hidden;
}

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

/* ============================================================
   8. COMPACT LIST ITEM — headline + author + thumbnail
   Used in Daily Lens stream and general article lists
   ============================================================ */
.compact-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid var(--grey-rule);
}

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

.compact-item__content {
  flex: 1;
}

.compact-item__category {
  margin-bottom: var(--sp-xs);
}

.compact-item__title {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-sm);
}

.compact-item__author {
  margin-bottom: var(--sp-xs);
}

.compact-item__thumb {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  overflow: hidden;
}

.compact-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Variant: compact item without image */
.compact-item--no-image .compact-item__thumb {
  display: none;
}

/* Mobile: compact items get smaller, tighter treatment */
@media (max-width: 767px) {
  .compact-item {
    padding: var(--sp-md) 0;
  }

  .compact-item__thumb {
    width: 72px;
    height: 72px;
  }

  .compact-item__title {
    font-size: var(--fs-base);
  }

  /* Feature cards get extra presence on mobile */
  .feature-card {
    padding: var(--sp-2xl) 0;
  }

  .feature-card__title {
    font-size: var(--fs-xl);
  }

  /* Medium cards: show image but keep title moderate */
  .medium-card__image img {
    aspect-ratio: 3 / 2;
  }

  .medium-card__title {
    font-size: var(--fs-lg);
  }
}

/* ============================================================
   9. FEATURE CARD — full-width image + headline + excerpt
   Used to break up compact list items (every N stories)
   ============================================================ */
.feature-card {
  padding: var(--sp-xl) 0;
  border-bottom: 1px solid var(--grey-rule);
}

.feature-card__image {
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}

.feature-card__image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-card__title {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-sm);
}

.feature-card__excerpt {
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--grey-dark);
  margin-bottom: var(--sp-sm);
}

/* ============================================================
   10. MEDIUM CARD — 2-up side by side
   ============================================================ */
.medium-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  padding: var(--sp-xl) 0;
  border-bottom: 1px solid var(--grey-rule);
}

.medium-card {
  display: flex;
  flex-direction: column;
}

.medium-card a {
  text-decoration: none;
  color: inherit;
}

.medium-card__image {
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}

.medium-card__image img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.medium-card:hover .medium-card__image img {
  transform: scale(1.03);
}

.medium-card__title {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-sm);
}

/* ============================================================
   10b. VARIABLE FEED — nth-child layout rhythm for archives
   Cycle: 1 large (full) → 2 medium (side-by-side) → 3 compact
   ============================================================ */
.variable-feed {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.feed-item {
  padding: var(--sp-xl) 0;
  border-bottom: 1px solid var(--grey-rule);
}

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

.feed-item a {
  text-decoration: none;
  color: inherit;
}

.feed-item__image {
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}

.feed-item__image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feed-item__title {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-sm);
}

.feed-item__excerpt {
  font-family: var(--serif);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--grey-dark);
  margin-bottom: var(--sp-sm);
}

/* === VARIABLE FEED RHYTHM (every 6 items) ===
   1st: LARGE — big image, big title, excerpt visible
   2nd-3rd: MEDIUM — image visible, moderate title
   4th-6th: COMPACT — no image, no excerpt, tight spacing */

/* Large items (1st in each group of 6) */
.feed-item:nth-child(6n+1) {
  padding: var(--sp-2xl) 0;
}

.feed-item:nth-child(6n+1) .feed-item__title {
  font-size: var(--fs-2xl);
}

.feed-item:nth-child(6n+1) .feed-item__image img {
  aspect-ratio: 2 / 1;
}

/* Medium items (2nd, 3rd in each group of 6) */
.feed-item:nth-child(6n+2),
.feed-item:nth-child(6n+3) {
  padding: var(--sp-lg) 0;
}

.feed-item:nth-child(6n+2) .feed-item__image img,
.feed-item:nth-child(6n+3) .feed-item__image img {
  aspect-ratio: 3 / 2;
}

/* Compact items (4th-6th in each group of 6): headline-only, no image/excerpt */
.feed-item:nth-child(6n+4),
.feed-item:nth-child(6n+5),
.feed-item:nth-child(6n+6) {
  padding: var(--sp-md) 0;
}

.feed-item:nth-child(6n+4) .feed-item__image,
.feed-item:nth-child(6n+5) .feed-item__image,
.feed-item:nth-child(6n+6) .feed-item__image,
.feed-item:nth-child(6n+4) .feed-item__excerpt,
.feed-item:nth-child(6n+5) .feed-item__excerpt,
.feed-item:nth-child(6n+6) .feed-item__excerpt {
  display: none;
}

.feed-item:nth-child(6n+4) .feed-item__title,
.feed-item:nth-child(6n+5) .feed-item__title,
.feed-item:nth-child(6n+6) .feed-item__title {
  font-size: var(--fs-base);
}

/* ============================================================
   11. HOMEPAGE SECTIONS
   ============================================================ */
.home-section {
  padding: var(--sp-2xl) var(--gutter);
  border-bottom: 1px solid var(--grey-rule);
  max-width: var(--max-width);
  margin: 0 auto;
}

.home-section:last-child {
  border-bottom: none;
}

/* ============================================================
   11. IDEAS TABS — horizontal scrolling category filter
   ============================================================ */
.ideas-tabs {
  display: flex;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-sm);
  border-bottom: 1px solid var(--grey-rule);
  scrollbar-width: none;
}

.ideas-tabs::-webkit-scrollbar {
  display: none;
}

.ideas-tab {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey);
  padding: var(--sp-sm) 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.ideas-tab:hover,
.ideas-tab--active {
  color: var(--black);
  border-bottom-color: var(--pure-black);
}

.ideas-content {
  display: none;
}

.ideas-content--active {
  display: block;
}

/* ============================================================
   12. NEWSLETTER CTA
   ============================================================ */
.newsletter-section {
  background: var(--off-white);
  padding: var(--sp-3xl) var(--gutter);
  text-align: center;
}

.newsletter-inner {
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-title {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 500;
  margin-bottom: var(--sp-sm);
}

.newsletter-text {
  font-family: var(--serif);
  font-size: var(--fs-base);
  color: var(--grey-dark);
  margin-bottom: var(--sp-xl);
  line-height: var(--lh-normal);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.newsletter-form__input {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  padding: var(--sp-md);
  border: 1px solid var(--grey-light);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.02em;
}

.newsletter-form__input:focus {
  border-color: var(--pure-black);
}

.newsletter-form__input::placeholder {
  color: var(--grey-light);
}

.newsletter-form__button {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: var(--sp-md) var(--sp-xl);
  background: var(--pure-black);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.newsletter-form__button:hover {
  opacity: 0.8;
}

/* Ghost member form states */
.newsletter-form .success {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--grey-dark);
  margin-top: var(--sp-md);
}

.newsletter-form .error {
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: #b00;
  margin-top: var(--sp-md);
}

/* ============================================================
   13. SINGLE ARTICLE — post.hbs
   ============================================================ */

/* Post header */
.post-header {
  padding: var(--sp-2xl) var(--gutter) var(--sp-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.post-category {
  margin-bottom: var(--sp-md);
}

.post-title {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-md);
  max-width: var(--content-width);
}

.post-excerpt {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  color: var(--grey-dark);
  margin-bottom: var(--sp-lg);
  max-width: var(--content-width);
}

.post-byline {
  display: flex;
  align-items: baseline;
  gap: var(--sp-md);
  padding-bottom: var(--sp-lg);
  border-bottom: 1px solid var(--grey-rule);
  max-width: var(--content-width);
}

.post-date {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Feature image */
.post-feature-image {
  max-width: var(--max-width);
  margin: 0 auto var(--sp-xl);
  padding: 0 var(--gutter);
}

.post-feature-image img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

/* Article body */
.post-body {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--sp-3xl);
  font-family: var(--serif);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
}

.post-body p {
  margin-bottom: var(--sp-lg);
}

.post-body h2 {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 500;
  line-height: var(--lh-snug);
  margin-top: var(--sp-3xl);
  margin-bottom: var(--sp-lg);
}

.post-body h3 {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  line-height: var(--lh-snug);
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-md);
}

.post-body blockquote {
  border-left: 2px solid var(--pure-black);
  padding-left: var(--sp-xl);
  margin: var(--sp-2xl) 0;
  font-style: italic;
  color: var(--grey-dark);
}

.post-body ul,
.post-body ol {
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-lg);
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li {
  margin-bottom: var(--sp-sm);
}

.post-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.post-body figure {
  margin: var(--sp-2xl) 0;
}

.post-body figcaption {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--grey);
  margin-top: var(--sp-xs);
  letter-spacing: 0.03em;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--grey-rule);
  margin: var(--sp-3xl) 0;
}

/* Ghost card overrides */
.post-body .kg-image-card img,
.post-body .kg-gallery-image img {
  width: 100%;
  height: auto;
}

.post-body .kg-width-wide {
  margin-left: calc(-1 * var(--gutter));
  margin-right: calc(-1 * var(--gutter));
  max-width: none;
}

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

.post-body .kg-width-full img {
  width: 100%;
}

/* ============================================================
   14. RELATED ARTICLES
   ============================================================ */
.related-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--sp-2xl) var(--gutter) var(--sp-3xl);
  border-top: 1px solid var(--pure-black);
}

/* ============================================================
   15. TAG ARCHIVE PAGE
   ============================================================ */
.tag-header {
  padding: var(--sp-2xl) var(--gutter);
  border-bottom: 1px solid var(--grey-rule);
  max-width: var(--max-width);
  margin: 0 auto;
}

.tag-name {
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 500;
}

.tag-description {
  font-family: var(--serif);
  font-size: var(--fs-base);
  color: var(--grey-dark);
  margin-top: var(--sp-sm);
  line-height: var(--lh-normal);
}

.tag-feed {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ============================================================
   16. ABOUT PAGE
   ============================================================ */
.about-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--sp-3xl) var(--gutter);
}

.about-page h1 {
  font-family: var(--serif);
  font-size: var(--fs-3xl);
  font-weight: 500;
  margin-bottom: var(--sp-xl);
  line-height: var(--lh-tight);
}

.about-page p {
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--sp-lg);
}

.about-page h2 {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 500;
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-md);
}

/* ============================================================
   17. FOOTER — Minimal
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--pure-black);
  padding: var(--sp-xl) var(--gutter);
  margin-top: var(--sp-2xl);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.footer-logo {
  font-family: var(--serif);
  font-size: var(--fs-md);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

.footer-nav a {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
}

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

.footer-copy {
  font-family: var(--mono);
  font-size: var(--fs-2xs);
  color: var(--grey);
  letter-spacing: 0.03em;
}

/* ============================================================
   18. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-xl);
  padding: var(--sp-2xl) var(--gutter);
}

.pagination a {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--black);
  padding: var(--sp-sm) var(--sp-md);
  border: 1px solid var(--grey-light);
  transition: background 0.2s;
}

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

.pagination .page-number {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--grey);
}

/* ============================================================
   19. UTILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   20. RESPONSIVE — Tablet (768px+)
   ============================================================ */
@media (min-width: 768px) {
  :root {
    --gutter: 2rem;
  }

  .site-logo {
    font-size: var(--fs-2xl);
  }

  /* Hero: side-by-side layout */
  .hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
  }

  .hero-feature {
    padding: 0;
    padding-right: var(--sp-xl);
    margin-bottom: 0;
    border-right: 1px solid var(--grey-rule);
  }

  .hero-feature__title {
    font-size: var(--fs-3xl);
  }

  .hero-sidebar {
    padding: 0;
    padding-left: var(--sp-xl);
  }

  /* Medium row: 2 columns side by side (variable widths at higher breakpoint) */
  .medium-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .medium-card__title {
    font-size: var(--fs-lg);
  }

  /* Variable feed: medium items side by side */
  .variable-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--sp-2xl);
  }

  /* Large items span full width */
  .feed-item:nth-child(6n+1) {
    grid-column: 1 / -1;
  }

  /* Medium items (2nd, 3rd) sit side by side naturally */

  /* Compact items span full width as single column */
  .feed-item:nth-child(6n+4),
  .feed-item:nth-child(6n+5),
  .feed-item:nth-child(6n+6) {
    grid-column: 1 / -1;
  }

  /* Feature cards get larger titles on tablet */
  .feature-card__title {
    font-size: var(--fs-3xl);
  }

  /* Newsletter: inline form */
  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-form__input {
    flex: 1;
  }

  /* Post: larger title */
  .post-title {
    font-size: var(--fs-3xl);
  }

  /* Footer: horizontal */
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ============================================================
   21. RESPONSIVE — Desktop (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  :root {
    --gutter: 2.5rem;
  }

  .site-logo {
    font-size: var(--fs-2xl);
    letter-spacing: 0.22em;
  }

  /* Hero: 60/40 split instead of 50/50 */
  .hero-inner {
    grid-template-columns: 0.6fr 0.4fr;
  }

  /* Hero feature: larger image and title */
  .hero-feature__title {
    font-size: var(--fs-4xl);
  }

  .hero-sidebar-item__title {
    font-size: var(--fs-xl);
  }

  /* Medium row: variable width (55/45 split) */
  .medium-row {
    grid-template-columns: 1.1fr 0.9fr;
  }

  /* Variable feed: larger titles on large items */
  .feed-item:nth-child(6n+1) .feed-item__title {
    font-size: var(--fs-3xl);
  }

  /* Medium items in feed get medium titles */
  .feed-item:nth-child(6n+2) .feed-item__title,
  .feed-item:nth-child(6n+3) .feed-item__title {
    font-size: var(--fs-xl);
  }

  /* Feature cards: larger titles on desktop */
  .feature-card__title {
    font-size: var(--fs-4xl);
  }

  /* Ideas section: 2-column grid for feature cards */
  .ideas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2xl);
  }

  .ideas-grid .feature-card {
    border-bottom: none;
  }

  /* Compact items: slightly larger titles */
  .compact-item__title {
    font-size: var(--fs-xl);
  }

  /* Post */
  .post-title {
    font-size: var(--fs-4xl);
  }

  /* Wider images in articles */
  .post-body .kg-width-wide {
    margin-left: -6rem;
    margin-right: -6rem;
  }

  /* Tag archive: 2-column grid for feature cards */
  .tag-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-2xl);
  }
}
