/* ==========================================================================
   PRAVDA — Ghost Theme
   Publication-first. Analytical. Credible.
   ========================================================================== */

/* 1. CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* ── Brand palette ─────────────────────────── */
  --c-navy: #161d51;
  --c-blue: #5174f0;
  --c-lavender: #e2cfff;
  --c-sandy: #fff5e4;
  --c-banana: #fff2ba;
  --c-black: #1c1c1c;
  --c-sky: #8dd9f2;

  /* ── Functional tokens ─────────────────────── */
  --c-bg: var(--c-black);
  --c-text: #ede6da;
  --c-text-secondary: rgba(237, 230, 218, 0.55);
  --c-text-tertiary: rgba(237, 230, 218, 0.35);
  --c-accent: var(--c-lavender);
  --c-card-bg: rgba(255, 245, 228, 0.04);
  --c-card-hover: rgba(255, 245, 228, 0.07);
  --c-divider: rgba(255, 245, 228, 0.1);

  /* ── Typography ────────────────────────────── */
  --f-heading: "Rubik", system-ui, sans-serif;
  --f-body: "Arimo", system-ui, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.0625rem, 1.02rem + 0.2vw, 1.125rem);
  --fs-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --fs-3xl: clamp(1.75rem, 1.35rem + 2vw, 2.5rem);
  --fs-4xl: clamp(2rem, 1.4rem + 3vw, 3rem);

  --lh-tight: 1.18;
  --lh-snug: 1.3;
  --lh-normal: 1.7;

  /* ── Spacing (8 px grid) ───────────────────── */
  --sp-1: 0.25rem; /*  4 */
  --sp-2: 0.5rem; /*  8 */
  --sp-3: 0.75rem; /* 12 */
  --sp-4: 1rem; /* 16 */
  --sp-5: 1.5rem; /* 24 */
  --sp-6: 2rem; /* 32 */
  --sp-8: 3rem; /* 48 */
  --sp-10: 4rem; /* 64 */
  --sp-12: 6rem; /* 96 */
  --sp-16: 8rem; /* 128 */

  /* ── Layout ────────────────────────────────── */
  --w-reading: 720px;
  --w-wide: 1000px;
  --w-content: 1200px;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);

  /* ── Misc ──────────────────────────────────── */
  --radius: 6px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur: 0.2s;
}

/* 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;
  hanging-punctuation: first last;
}

body {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--c-text);
  background: var(--c-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: var(--c-accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover {
  color: var(--c-sandy);
}

::selection {
  background: var(--c-lavender);
  color: var(--c-navy);
}

:focus-visible {
  outline: 2px solid var(--c-lavender);
  outline-offset: 2px;
}

/* 3. TYPOGRAPHY
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-heading);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--c-text);
  text-wrap: balance;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

h1 {
  font-size: var(--fs-4xl);
  font-weight: 700;
}
h2 {
  font-size: var(--fs-3xl);
}
h3 {
  font-size: var(--fs-2xl);
}
h4 {
  font-size: var(--fs-xl);
}
h5 {
  font-size: var(--fs-lg);
  font-weight: 700;
}
h6 {
  font-size: var(--fs-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

p {
  overflow-wrap: break-word;
}

/* 4. LAYOUT
   ========================================================================== */

.reading-column {
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.feed-container {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: var(--sp-8) var(--gutter) var(--sp-12);
}

/* 5. HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-sandy);
  transition: box-shadow var(--dur) var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(22, 29, 81, 0.1);
}

/* ── Top bar (row 1): search | logo | auth ── */

.header-topbar {
  border-bottom: 1px solid rgba(22, 29, 81, 0.1);
}

.header-topbar-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--gutter);
  min-height: 48px;
}

@media (min-width: 768px) {
  .header-topbar-inner {
    min-height: 52px;
  }
}

.header-topbar-left {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1;
  min-width: 0;
}

.header-topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

/* Logo (centered in topbar) */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  color: var(--c-navy);
  font-family: var(--f-heading);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  transition: opacity var(--dur) var(--ease);
}
.site-logo:hover {
  color: var(--c-navy);
  opacity: 0.7;
}
.site-logo img {
  height: 30px;
  width: auto;
}

@media (min-width: 768px) {
  .site-logo img {
    height: 36px;
  }
}

/* Auth links in topbar */
.header-signin {
  display: none;
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-navy);
  letter-spacing: 0.01em;
  transition: opacity var(--dur) var(--ease);
}
.header-signin:hover {
  color: var(--c-navy);
  opacity: 0.6;
}

@media (min-width: 768px) {
  .header-signin {
    display: inline-flex;
  }
}

.header-subscribe {
  display: none;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-lavender);
  background: var(--c-navy);
  border-radius: var(--radius);
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease);
}
.header-subscribe:hover {
  background: #1e2766;
  color: var(--c-sandy);
}

@media (min-width: 768px) {
  .header-subscribe {
    display: inline-flex;
  }
}

/* ── Navigation bar (row 2, desktop) ── */

.site-nav {
  display: none;
  border-bottom: 2px solid var(--c-navy);
}

@media (min-width: 768px) {
  .site-nav {
    display: block;
  }
}

.site-nav-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  list-style: none;
}

.nav-link {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-navy);
  opacity: 0.55;
  transition: opacity var(--dur) var(--ease);
}
.nav-link:hover {
  color: var(--c-navy);
  opacity: 0.8;
}
.nav-link.nav-current {
  opacity: 1;
}

/* ── Nav toggle (mobile) ── */

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-navy);
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease);
}
.nav-toggle:hover {
  background: rgba(22, 29, 81, 0.06);
}
.nav-toggle .icon-close {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}
.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

/* ── Mobile nav panel ── */

.mobile-nav {
  display: none;
  background: var(--c-sandy);
  border-bottom: 2px solid var(--c-navy);
  padding: var(--sp-4) var(--gutter) var(--sp-5);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.mobile-nav-link {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--f-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--c-navy);
  border-radius: var(--radius);
  transition: background var(--dur) var(--ease);
}
.mobile-nav-link:hover,
.mobile-nav-link.nav-current {
  color: var(--c-navy);
  background: rgba(22, 29, 81, 0.06);
}

.mobile-nav-auth {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(22, 29, 81, 0.08);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.mobile-nav-subscribe {
  font-weight: 600;
  color: var(--c-blue);
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Body scroll lock */
body.nav-open {
  overflow: hidden;
}
@media (min-width: 768px) {
  body.nav-open {
    overflow: auto;
  }
}

/* Ghost Announcement Bar */
.gh-announcement-bar {
  background: var(--c-navy) !important;
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  padding: var(--sp-2) var(--sp-6);
}
.gh-announcement-bar .gh-announcement-bar-content {
  color: var(--c-sandy);
}
.gh-announcement-bar .gh-announcement-bar-content a {
  color: var(--c-lavender);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gh-announcement-bar .gh-announcement-bar-content a:hover {
  color: var(--c-sandy);
}
.gh-announcement-bar button {
  color: var(--c-sandy) !important;
  opacity: 0.5;
  transition: opacity var(--dur) var(--ease);
}
.gh-announcement-bar button:hover {
  opacity: 1;
}
.gh-announcement-bar button svg {
  fill: currentColor !important;
  stroke: currentColor !important;
}

/* Ghost Sodo search overrides */
.site-header .gh-search-icon {
  color: var(--c-navy) !important;
  transition: color var(--dur) var(--ease);
}
.site-header .gh-search-icon:hover {
  color: var(--c-blue) !important;
}

/* 6. POST FEED
   ========================================================================== */

.feed-tagline {
  font-family: var(--f-heading);
  font-size: var(--fs-xl);
  font-weight: 400;
  color: var(--c-text-secondary);
  text-align: center;
  margin-bottom: var(--sp-4);
  padding: var(--sp-2) var(--sp-4) var(--sp-6);
  border-bottom: 1px solid var(--c-divider);
  letter-spacing: 0.02em;
}

.post-feed {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .post-feed {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
  }
}

@media (min-width: 1024px) {
  .post-feed {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-8) var(--sp-6);
  }
}

/* All non-hero cards in index use the same grid */
.feed-container > .post-card:not(.post-card--hero) {
  /* These cards sit inside the flow as inline elements on the grid */
}

/* Make index page use CSS grid for non-hero cards */
.feed-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 640px) {
  .feed-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feed-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feed-tagline,
.feed-container > .post-card--hero,
.feed-container > .post-feed,
.feed-container > .pagination {
  grid-column: 1 / -1;
}

/* 7. POST CARDS
   ========================================================================== */

.post-card {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.post-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--c-text);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition:
    background var(--dur) var(--ease),
    border-color 0.3s var(--ease);
}
.post-card-link:hover {
  color: var(--c-text);
  background: var(--c-card-hover);
  border-color: var(--c-divider);
}

.post-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-card-bg);
}
.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.post-card-link:hover .post-card-image img {
  transform: scale(1.03);
}

.post-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--sp-4) var(--sp-2) var(--sp-2);
}

.post-card-tag {
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-lavender);
  margin-bottom: var(--sp-2);
}

.post-card-title {
  font-size: var(--fs-xl);
  font-weight: 600;
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-2);
}

.post-card-excerpt {
  color: var(--c-text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.6;
  margin-bottom: var(--sp-3);

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

.post-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
  margin-top: auto;
}

.post-card-author-image {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card-separator {
  opacity: 0.5;
}

/* ── Hero card (first post on index) ───────── */

.post-card--hero {
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--c-divider);
}

.post-card--hero .post-card-link {
  flex-direction: column;
  border: none;
  background: none;
}

.post-card--hero .post-card-link:hover {
  background: none;
  border-color: transparent;
}

.post-card--hero .post-card-image {
  aspect-ratio: 2 / 1;
}

.post-card--hero .post-card-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.post-card--hero .post-card-title:hover {
  color: var(--c-accent);
}

.post-card--hero .post-card-excerpt {
  font-size: var(--fs-base);
  -webkit-line-clamp: 4;
}

.post-card--hero .post-card-content {
  padding: var(--sp-5) 0 0;
}

@media (min-width: 768px) {
  .post-card--hero .post-card-link {
    flex-direction: row;
    gap: var(--sp-8);
  }
  .post-card--hero .post-card-image {
    flex: 1.2;
    aspect-ratio: 4 / 3;
  }
  .post-card--hero .post-card-content {
    flex: 1;
    padding: var(--sp-4) 0;
    justify-content: center;
  }
}

/* 8. SINGLE POST
   ========================================================================== */

.single-post {
  padding-bottom: var(--sp-12);
  background: linear-gradient(
    to bottom,
    rgba(255, 245, 228, 0.025) 0%,
    rgba(255, 245, 228, 0.015) 60%,
    transparent 100%
  );
}

/* Post header */
.post-header {
  padding: var(--sp-8) 0 var(--sp-6);
}

.post-header--split {
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--c-divider);
  margin-bottom: var(--sp-8);
}

.post-header-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.post-header-tag {
  display: inline-block;
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-lavender);
  margin-bottom: var(--sp-4);
}
.post-header-tag:hover {
  color: var(--c-sandy);
}

.post-title {
  font-size: var(--fs-4xl);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-4);
}

.post-subtitle {
  font-size: var(--fs-xl);
  color: var(--c-text-secondary);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-5);
}

/* Post meta */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--c-divider);
}

.post-meta-authors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.post-meta-author {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.post-meta-author-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.post-meta-author-name {
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text);
}
.post-meta-author-name:hover {
  color: var(--c-accent);
}

.post-meta-details {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
}

.post-meta-separator {
  margin: 0 var(--sp-1);
  opacity: 0.4;
}

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

.post-feature-image img {
  width: 100%;
  border-radius: var(--radius);
}

.post-feature-image figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-sandy);
  text-align: center;
}

/* ── Post content (article body) ───────────── */

.post-content {
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
}

.post-content > * + * {
  margin-top: var(--sp-5);
}

.post-content h2 {
  font-size: var(--fs-2xl);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-3);
}

.post-content h3 {
  font-size: var(--fs-xl);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.post-content h4 {
  font-size: var(--fs-lg);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
}

.post-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-color: rgba(226, 207, 255, 0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color var(--dur) var(--ease);
}
.post-content a:hover {
  text-decoration-color: var(--c-lavender);
}

.post-content strong {
  font-weight: 700;
  color: var(--c-text);
}

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

.post-content blockquote {
  border-left: 3px solid var(--c-lavender);
  padding: var(--sp-5) var(--sp-6);
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: var(--c-text-secondary);
  background: rgba(226, 207, 255, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content blockquote p + p {
  margin-top: var(--sp-4);
}

.post-content ul,
.post-content ol {
  padding-left: var(--sp-5);
}

.post-content li + li {
  margin-top: var(--sp-2);
}

.post-content hr {
  border: none;
  height: 1px;
  background: var(--c-divider);
  margin: var(--sp-8) 0;
}

.post-content pre {
  background: rgba(255, 245, 228, 0.05);
  border: 1px solid var(--c-divider);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-content code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.9em;
}

.post-content :not(pre) > code {
  background: rgba(226, 207, 255, 0.12);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

.post-content figure {
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.post-content figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-sandy);
  text-align: center;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  border: 1px solid var(--c-divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-content th,
.post-content td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-divider);
  text-align: left;
}

.post-content th {
  font-family: var(--f-heading);
  font-weight: 600;
  color: var(--c-text);
  background: rgba(226, 207, 255, 0.06);
}

.post-content tbody tr:hover {
  background: var(--c-card-bg);
}

/* Post tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-divider);
}

.post-tag-pill {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-lavender);
  background: rgba(226, 207, 255, 0.08);
  border-radius: 100px;
  transition: background var(--dur) var(--ease);
}
.post-tag-pill:hover {
  color: var(--c-lavender);
  background: rgba(226, 207, 255, 0.16);
}

/* Author card (below post) */
.post-authors {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-divider);
}

.author-card {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
}

.author-card + .author-card {
  margin-top: var(--sp-6);
}

.author-card-image {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.author-card-name {
  font-size: var(--fs-base);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.author-card-name a {
  color: var(--c-text);
}
.author-card-name a:hover {
  color: var(--c-accent);
}

.author-card-bio {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  line-height: 1.6;
}

/* ── Split header (article two-column intro) ── */
.post-header-top {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

@media (min-width: 768px) {
  .post-header-top {
    flex-direction: row;
    gap: var(--sp-10);
    align-items: flex-end;
  }

  .post-header-top .post-title {
    flex: 1.3;
    margin-bottom: 0;
  }

  .post-header-top .post-subtitle {
    flex: 1;
    margin-bottom: var(--sp-1);
  }
}

.post-header-top .post-subtitle {
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  color: var(--c-text-secondary);
  margin-bottom: 0;
}

/* ── Wide feature image ── */
.post-feature-image--wide {
  max-width: var(--w-content);
  margin: 0 auto var(--sp-8);
  padding: 0 var(--gutter);
}

.post-feature-image--wide img {
  width: 100%;
  border-radius: var(--radius);
}

.post-feature-image--wide figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--c-sandy);
  text-align: center;
}

/* ── Post body (content + sidebar) ── */
.post-body {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

@media (min-width: 1024px) {
  .post-body {
    grid-template-columns: 1fr 280px;
    gap: var(--sp-10);
  }
}

@media (min-width: 1280px) {
  .post-body {
    grid-template-columns: 1fr 320px;
  }
}

.post-body-content {
  min-width: 0;
  max-width: var(--w-reading);
}

/* ── Post sidebar ── */
.post-sidebar {
  padding-top: var(--sp-2);
}

@media (min-width: 1024px) {
  .post-sidebar-sticky {
    position: sticky;
    top: 110px;
  }
}

.post-sidebar-title {
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-divider);
}

/* ── Sidebar card ── */
.sidebar-card {
  margin-bottom: var(--sp-5);
}

.sidebar-card-link {
  display: flex;
  gap: var(--sp-4);
  color: var(--c-text);
  transition: color var(--dur) var(--ease);
}

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

.sidebar-card-image {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: calc(var(--radius) - 1px);
  overflow: hidden;
}

.sidebar-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-card-content {
  flex: 1;
  min-width: 0;
}

.sidebar-card-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: var(--lh-snug);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-card-meta {
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
}

.sidebar-card-meta .post-card-separator {
  margin: 0 var(--sp-1);
  opacity: 0.4;
}

/* 9. PAGES
   ========================================================================== */

.single-page .post-header-inner {
  max-width: var(--w-reading);
}

.single-page .post-header {
  padding-top: var(--sp-10);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--c-divider);
  margin-bottom: var(--sp-6);
}

.single-page .post-title {
  text-align: center;
}

.single-page .post-subtitle {
  text-align: center;
  margin-bottom: 0;
}

/* 10. TAG & AUTHOR ARCHIVES
   ========================================================================== */

.archive-header {
  grid-column: 1 / -1;
  text-align: center;
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--c-divider);
}

.archive-label {
  display: block;
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-lavender);
  margin-bottom: var(--sp-3);
}

.archive-title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-3);
}

.archive-description {
  max-width: 540px;
  margin: 0 auto var(--sp-3);
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
}

.archive-count {
  font-size: var(--fs-sm);
  color: var(--c-text-tertiary);
}

/* ── Author page: two-column header ───────── */

.author-header {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--sp-8);
  align-items: center;
  justify-content: center;
  padding-bottom: var(--sp-6);
  margin-bottom: var(--sp-2);
  border-bottom: 1px solid var(--c-divider);
}

.author-header-inner {
  display: flex;
  gap: var(--sp-8);
  align-items: center;
  max-width: 700px;
}

.author-header-left {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  width: 180px;
}

.author-header-image {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--c-lavender);
}

.author-header-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
}

.author-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3);
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-text-secondary);
  background: rgba(226, 207, 255, 0.06);
  border-radius: 100px;
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.author-link:hover {
  color: var(--c-lavender);
  background: rgba(226, 207, 255, 0.14);
}

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

.author-header-location {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
}

.author-header-location svg {
  flex-shrink: 0;
}

.author-header-right {
  flex: 1;
  min-width: 0;
  padding-top: var(--sp-2);
}

.author-header-name {
  font-size: var(--fs-3xl);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}

.author-header-bio {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
  line-height: var(--lh-normal);
  margin-bottom: var(--sp-4);
  max-width: 540px;
}

.author-header-count {
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-tertiary);
}

/* Author header: stack on mobile */
@media (max-width: 639px) {
  .author-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-5);
  }

  .author-header-left {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-5);
  }

  .author-header-image {
    width: 80px;
    height: 80px;
  }

  .author-header-links {
    justify-content: flex-start;
  }

  .author-header-name {
    font-size: var(--fs-2xl);
  }
}

/* 11. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--c-sandy);
  color: var(--c-navy);
  margin-top: auto;
  border-top: 3px solid var(--c-navy);
}

.footer-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: var(--sp-10) var(--gutter) var(--sp-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: var(--sp-8);
  }
}

/* Footer about */
.footer-logo {
  display: inline-flex;
  margin-bottom: var(--sp-4);
  color: var(--c-navy);
}
.footer-logo:hover {
  color: var(--c-navy);
  opacity: 0.7;
}
.footer-logo img {
  height: 24px;
  width: auto;
}

.footer-description {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--c-navy);
  opacity: 0.7;
  margin-bottom: var(--sp-3);
}

.footer-legal {
  font-size: var(--fs-xs);
  color: var(--c-navy);
  opacity: 0.45;
}

.footer-contact {
  font-size: var(--fs-sm);
  color: var(--c-navy);
  opacity: 0.6;
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.footer-contact a {
  color: var(--c-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-contact a:hover {
  color: var(--c-blue);
}

/* Footer nav */
.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-nav-list a {
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-navy);
  transition: opacity var(--dur) var(--ease);
}
.footer-nav-list a:hover {
  color: var(--c-navy);
  opacity: 0.6;
}

/* Footer newsletter */
.footer-newsletter-text {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--c-navy);
  opacity: 0.7;
  margin-bottom: var(--sp-4);
}

/* Footer bottom */
.footer-bottom {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: var(--sp-4) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--c-navy);
  opacity: 0.4;
  border-top: 1px solid rgba(22, 29, 81, 0.08);
}

/* 12. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.btn-lavender {
  background: var(--c-lavender);
  color: var(--c-navy);
}
.btn-lavender:hover {
  background: #d4bcff;
  color: var(--c-navy);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 245, 228, 0.15);
  color: var(--c-sandy);
}
.btn-outline:hover {
  border-color: rgba(255, 245, 228, 0.35);
  color: var(--c-lavender);
  transform: translateY(-1px);
}

.btn-navy {
  background: var(--c-navy);
  color: var(--c-lavender);
}
.btn-navy:hover {
  background: #1e2766;
  color: var(--c-sandy);
  transform: translateY(-1px);
}

/* 13. ERROR PAGES
   ========================================================================== */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: var(--sp-8) var(--gutter);
}

.error-code {
  display: block;
  font-family: var(--f-heading);
  font-size: clamp(4rem, 3rem + 5vw, 8rem);
  font-weight: 700;
  color: var(--c-lavender);
  line-height: 1;
  margin-bottom: var(--sp-4);
  opacity: 0.3;
}

.error-title {
  font-size: var(--fs-2xl);
  margin-bottom: var(--sp-4);
}

.error-description {
  font-size: var(--fs-base);
  color: var(--c-text-secondary);
  margin-bottom: var(--sp-6);
}

/* 14. PAGINATION
   ========================================================================== */

.pagination {
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-2);
}

.pagination-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  transition:
    color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.pagination-link:hover {
  color: var(--c-accent);
  background: var(--c-card-bg);
}

.pagination-link svg {
  flex-shrink: 0;
}

.pagination-disabled {
  opacity: 0.25;
  pointer-events: none;
  cursor: default;
}

.pagination-info {
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
  white-space: nowrap;
}

@media (max-width: 639px) {
  .pagination-inner {
    flex-direction: column;
    gap: var(--sp-3);
  }
}

/* 14b. LOAD MORE
   ========================================================================== */

.load-more-wrapper {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: var(--sp-8) 0 var(--sp-2);
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-width: 200px;
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-sandy);
  background: transparent;
  border: 1px solid var(--c-divider);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.load-more-btn:hover {
  color: var(--c-lavender);
  border-color: var(--c-lavender);
  background: rgba(226, 207, 255, 0.06);
}

.load-more-btn .load-more-spinner {
  display: none;
}

.load-more-btn.is-loading .load-more-text {
  display: none;
}

.load-more-btn.is-loading .load-more-spinner {
  display: inline-flex;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 15. GHOST EDITOR CARDS (kg-*)
   ========================================================================== */

.post-content .kg-card {
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.post-content .kg-image-card img,
.post-content .kg-gallery-card img {
  border-radius: var(--radius);
}

/* Wide and full-width cards break out of reading column */
.post-content .kg-width-wide {
  max-width: var(--w-wide);
  margin-left: calc(50% - min(var(--w-wide), 100vw - var(--gutter) * 2) / 2);
  margin-right: calc(50% - min(var(--w-wide), 100vw - var(--gutter) * 2) / 2);
  width: min(var(--w-wide), 100vw - var(--gutter) * 2);
}

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

/* Bookmark card */
.post-content .kg-bookmark-card {
  border: 1px solid var(--c-divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.post-content .kg-bookmark-container {
  display: flex;
  flex-direction: column;
  color: var(--c-text);
  text-decoration: none;
}

@media (min-width: 640px) {
  .post-content .kg-bookmark-container {
    flex-direction: row;
  }
}

.post-content .kg-bookmark-content {
  flex: 1;
  padding: var(--sp-4) var(--sp-5);
}

.post-content .kg-bookmark-title {
  font-family: var(--f-heading);
  font-size: var(--fs-base);
  font-weight: 600;
}

.post-content .kg-bookmark-description {
  font-size: var(--fs-sm);
  color: var(--c-text-secondary);
  margin-top: var(--sp-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-content .kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--c-text-tertiary);
}

.post-content .kg-bookmark-icon {
  width: 16px;
  height: 16px;
}

.post-content .kg-bookmark-thumbnail {
  flex-shrink: 0;
}

.post-content .kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 640px) {
  .post-content .kg-bookmark-thumbnail {
    width: 180px;
  }
}

/* Callout card */
.post-content .kg-callout-card {
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
}

/* Toggle card */
.post-content .kg-toggle-card {
  border: 1px solid var(--c-divider);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
}

/* Button card */
.post-content .kg-button-card .kg-btn {
  font-family: var(--f-heading);
  border-radius: var(--radius);
}

/* 15. READING PROGRESS
   ========================================================================== */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--c-lavender);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 200;
  pointer-events: none;
}

/* Only show on post pages */
.post-template .reading-progress {
  display: block;
}
body:not(.post-template) .reading-progress {
  display: none;
}

/* 16. ANIMATIONS
   ========================================================================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-header-inner {
  animation: fadeUp 0.6s var(--ease) both;
}

.post-feature-image {
  animation: fadeUp 0.6s 0.1s var(--ease) both;
}

/* 17. UTILITIES
   ========================================================================== */

.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;
}

/* 18. HOMEPAGE
   ========================================================================== */

/* ── Featured hero (404 Media-style) ──────── */

.featured-hero {
}

.featured-hero-inner {
  display: flex;
  flex-direction: column;
  max-width: var(--w-content);
  margin: 0 auto;
  padding: var(--sp-8) var(--gutter);
}

.featured-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  order: 2;
  padding-top: var(--sp-5);
}

.featured-hero-tag {
  display: inline-block;
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-lavender);
  margin-bottom: var(--sp-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: color var(--dur) var(--ease);
}
.featured-hero-tag:hover {
  color: var(--c-sandy);
}

.featured-hero-title {
  font-size: var(--fs-3xl);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}
.featured-hero-title a {
  color: var(--c-text);
  transition: color var(--dur) var(--ease);
}
.featured-hero-title a:hover {
  color: var(--c-accent);
}

.featured-hero-excerpt {
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  line-height: 1.65;
  margin-bottom: var(--sp-5);
  max-width: 540px;

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

.featured-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--c-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.featured-hero-author-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.featured-hero-author {
  color: var(--c-text-secondary);
}

.featured-hero-sep {
  opacity: 0.4;
}

.featured-hero-image {
  display: block;
  order: 1;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.featured-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.featured-hero-image:hover img {
  transform: scale(1.02);
}

@media (min-width: 768px) {
  .featured-hero-inner {
    flex-direction: row;
    gap: var(--sp-8);
    padding: var(--sp-10) var(--gutter);
    align-items: center;
  }
  .featured-hero-content {
    flex: 0 0 42%;
    order: 1;
    padding-top: 0;
  }
  .featured-hero-image {
    flex: 1;
    order: 2;
    aspect-ratio: 4 / 3;
  }
  .featured-hero-title {
    font-size: var(--fs-4xl);
  }
}

@media (min-width: 1280px) {
  .featured-hero-content {
    flex: 0 0 40%;
  }
  .featured-hero-excerpt {
    font-size: var(--fs-lg);
  }
}

/* ── Breaker (skewed CTA strip) ──────────── */

.breaker {
  position: relative;
  margin: var(--sp-12) 0;
  padding: var(--sp-10) var(--gutter);
  text-align: center;
}

.breaker::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-sandy);
  transform: skewY(-2deg);
  z-index: 0;
}

.breaker-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.breaker-logo {
  height: 36px;
  width: auto;
  margin: 0 auto var(--sp-6);
}

.breaker-text {
  font-family: var(--f-body);
  font-size: var(--fs-lg);
  line-height: var(--lh-normal);
  color: var(--c-navy);
  margin-bottom: var(--sp-4);
}

.breaker-subtext {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--c-navy);
  opacity: 0.6;
  margin-bottom: var(--sp-6);
}

.breaker-btn {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--c-lavender);
  background: var(--c-navy);
  border-radius: var(--radius);
  transition:
    background var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}

.breaker-btn:hover {
  background: #1e2766;
  color: var(--c-sandy);
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .breaker {
    margin: var(--sp-12) 0;
    padding: var(--sp-10) var(--gutter);
  }
}

/* ── Legacy home hero (tagline) ───────────── */

.home-hero {
  padding: var(--sp-10) var(--gutter) var(--sp-6);
  text-align: center;
  border-bottom: 1px solid var(--c-divider);
}

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

.home-hero-tagline {
  font-family: var(--f-heading);
  font-size: var(--fs-3xl);
  font-weight: 400;
  color: var(--c-text-secondary);
  letter-spacing: 0.01em;
  line-height: var(--lh-snug);
  max-width: 640px;
  margin: 0 auto;
}

/* Sections */
.home-section {
  padding: var(--sp-8) 0;
}

.home-section + .home-section {
  border-top: 1px solid var(--c-divider);
}

.home-section-inner {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-divider);
}

.home-section-title {
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.home-section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--f-heading);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-secondary);
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}

.home-section-link:hover {
  color: var(--c-accent);
}

/* Make post cards visible on home (no scroll animation) */
.home-template .post-card {
  opacity: 1;
  transform: none;
}

/* Hero card on home needs full width */
.home-section .post-card--hero {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* 19. RESPONSIVE — FINE TUNING
   ========================================================================== */

/* Ensure comfortable reading on very small screens */
@media (max-width: 375px) {
  :root {
    --gutter: 1rem;
  }
  .post-title {
    font-size: clamp(1.5rem, 1.2rem + 2vw, 2rem);
  }
}

/* Tablet refinements */
@media (min-width: 768px) {
  .post-header {
    padding: var(--sp-10) 0 var(--sp-8);
  }

  .post-feature-image,
  .post-feature-image--wide {
    margin-bottom: var(--sp-10);
  }
}

/* Desktop refinements */
@media (min-width: 1024px) {
  .post-header {
    padding: var(--sp-12) 0 var(--sp-8);
  }
}

/* Stack sidebar below content on mobile */
@media (max-width: 1023px) {
  .post-sidebar {
    border-top: 1px solid var(--c-divider);
    padding-top: var(--sp-6);
    margin-top: var(--sp-4);
  }
}

/* Large screens — keep reading column comfortable */
@media (min-width: 1280px) {
  :root {
    --gutter: 2rem;
  }
}

/* 13. CUSTOM TEMPLATES
   ========================================================================== */

/* ── Showcase Page (About / Association) ─────── */

.showcase-hero {
  background: var(--c-navy);
  padding: var(--sp-16) var(--gutter) var(--sp-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative lavender bar at bottom of hero */
.showcase-hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--c-lavender);
  border-radius: 2px;
}

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

.showcase-title {
  font-family: var(--f-heading);
  font-size: var(--fs-4xl);
  font-weight: 700;
  color: var(--c-sandy);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.showcase-excerpt {
  font-size: var(--fs-xl);
  color: rgba(255, 245, 228, 0.5);
  line-height: var(--lh-normal);
  max-width: 640px;
  margin: 0 auto;
}

.showcase-feature {
  max-width: var(--w-wide);
  margin: var(--sp-8) auto;
  padding: 0 var(--gutter);
}

.showcase-feature img {
  width: 100%;
  border-radius: var(--radius);
}

/* Body — wider than standard reading column */
.showcase-body {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: var(--sp-10) var(--gutter) var(--sp-12);
}

/* Content h1 hidden — template hero shows title */
.page-showcase .post-content > h1:first-child {
  display: none;
}

/* H5 as tagline / motto */
.page-showcase .post-content > h5 {
  font-size: var(--fs-2xl);
  font-weight: 400;
  font-style: italic;
  color: var(--c-lavender);
  text-align: center;
  max-width: var(--w-reading);
  margin: var(--sp-2) auto var(--sp-8);
}

/* H6 as lavender section label */
.page-showcase .post-content > h6 {
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-lavender);
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-divider);
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
}

/* First h6 after image doesn't need extra top margin */
.page-showcase .post-content > .kg-image-card + h6 {
  margin-top: var(--sp-6);
}

/* H2 as bold section dividers */
.page-showcase .post-content > h2 {
  font-size: var(--fs-3xl);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-6);
  padding-top: var(--sp-10);
  border-top: 2px solid var(--c-divider);
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
}

/* H3 for sub-sections */
.page-showcase .post-content > h3 {
  margin-top: var(--sp-10);
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
}

/* Text stays at reading width, centered in the wider container */
.page-showcase .post-content > p {
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
}

/* Sticker / illustration images — centered, restrained size */
.page-showcase .post-content > .kg-image-card {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.page-showcase .post-content > .kg-image-card img {
  border-radius: var(--radius);
}

/* Image + short description pairs — centered visual blocks */
.page-showcase .post-content > .kg-image-card + p {
  text-align: center;
  font-family: var(--f-heading);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--c-text);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--sp-8);
}

/* Blockquotes — navy panel with lavender border */
.page-showcase .post-content blockquote {
  background: var(--c-navy);
  color: var(--c-sandy);
  border-left: 3px solid var(--c-lavender);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--sp-6) var(--sp-8);
  margin: var(--sp-8) auto;
  font-size: var(--fs-lg);
  max-width: none;
}

.page-showcase .post-content blockquote p {
  color: var(--c-sandy);
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.page-showcase .post-content blockquote strong,
.page-showcase .post-content blockquote em {
  color: var(--c-sandy);
}

/* Lists — readable width, centered */
.page-showcase .post-content ul,
.page-showcase .post-content ol {
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
}

/* Ghost button card — centered */
.page-showcase .post-content .kg-button-card {
  text-align: center;
  margin: var(--sp-8) auto;
  max-width: var(--w-reading);
}

/* Team member: photo + name + role pattern */
.page-showcase .post-content > .kg-image-card + h5 {
  margin-top: var(--sp-4);
  text-align: center;
}

.page-showcase .post-content > h5 + h6 {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: var(--sp-1);
  margin-bottom: var(--sp-3);
}

/* Team member bio — after name+role h6 */
.page-showcase .post-content > h6 + p {
  text-align: left;
}

/* H2 preceded by p or list — keep top border for section breaks */
.page-showcase .post-content > h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* "Nagroda specjalna" h5 in mid-content */
.page-showcase .post-content > p + h5 {
  font-style: normal;
  text-align: left;
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
  margin-top: var(--sp-10);
  color: var(--c-lavender);
}

/* H3 after h5 (sub-heading pair) */
.page-showcase .post-content > h5 + h3 {
  max-width: var(--w-reading);
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .showcase-hero {
    padding: var(--sp-12) var(--gutter) var(--sp-8);
  }

  .page-showcase .post-content > .kg-image-card {
    max-width: 280px;
  }
}

/* ── Team Page — Zespół ──────────────────────── */

.zespol-body {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: var(--sp-10) var(--gutter) var(--sp-12);
  color: var(--c-text);
}

/* Intro h5 */
.page-zespol .post-content > h5:first-of-type {
  font-size: var(--fs-xl);
  font-weight: 400;
  font-style: normal;
  color: var(--c-text-secondary);
  text-align: left;
  max-width: var(--w-reading);
  margin-bottom: var(--sp-6);
}

/* Sticker illustration */
.page-zespol .post-content > h5:first-of-type + .kg-image-card {
  max-width: 280px;
  margin-bottom: var(--sp-10);
}

/* Section header */
.page-zespol .post-content > h3 {
  text-align: left;
  font-size: var(--fs-2xl);
  margin: var(--sp-10) 0 var(--sp-12);
  padding-bottom: var(--sp-5);
  position: relative;
  max-width: var(--w-reading);
}

.page-zespol .post-content > h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--c-lavender);
  border-radius: 2px;
}

/* ── Team member card styling ── */

/* Photo */
.page-zespol .post-content > .kg-image-card {
  max-width: 320px;
  margin: 0 0 var(--sp-4);
  padding-top: var(--sp-12);
  position: relative;
}

/* Lavender dot divider between members */
.page-zespol .post-content > .kg-image-card::before {
  content: "";
  position: absolute;
  top: var(--sp-4);
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--c-lavender);
  border-radius: 50%;
  opacity: 0.4;
}

/* First member card — no divider dot */
.page-zespol .post-content > h3 + .kg-image-card::before,
.page-zespol .post-content > h5:first-of-type + .kg-image-card::before {
  display: none;
}

.page-zespol .post-content > .kg-image-card img {
  border-radius: var(--radius);
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.page-zespol .post-content > .kg-image-card:hover img {
  transform: scale(1.03);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* Member name */
.page-zespol .post-content > .kg-image-card + h5 {
  text-align: left;
  font-size: var(--fs-2xl);
  font-weight: 700;
  font-style: normal;
  color: var(--c-text);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-1);
  max-width: none;
}

/* Member role — lavender pill label */
.page-zespol .post-content > h5 + h6 {
  display: inline-block;
  text-align: left;
  font-family: var(--f-heading);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-lavender);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid rgba(226, 207, 255, 0.15);
  border-radius: 99px;
  margin: 0 0 var(--sp-4);
}

/* Member bio */
.page-zespol .post-content > h6 + p {
  text-align: left;
  max-width: var(--w-reading);
  color: var(--c-text-secondary);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
}

/* Generic paragraphs */
.page-zespol .post-content > p {
  text-align: left;
  max-width: var(--w-reading);
}

/* Scroll-triggered reveal for team members */
@keyframes zespol-reveal {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.97);
  }
}

@supports (animation-timeline: view()) {
  .page-zespol .post-content > .kg-image-card {
    animation: zespol-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }

  .page-zespol .post-content > .kg-image-card + h5,
  .page-zespol .post-content > h5 + h6,
  .page-zespol .post-content > h6 + p {
    animation: zespol-reveal 0.5s ease both;
    animation-timeline: view();
    animation-range: entry 0% entry 20%;
  }
}

@media (max-width: 768px) {
  .page-zespol .post-content > .kg-image-card {
    max-width: 240px;
  }

  .page-zespol .post-content > .kg-image-card + h5 {
    font-size: var(--fs-xl);
  }
}
