/* ============================================================
   DESIGN TOKENS — identical to ixcdigital.com main site
   ============================================================ */
:root {
  --bg: #0b0b0c;
  --bg-soft: #111113;
  --bg-elev: #16161a;
  --ink: #f4f1ea;
  --ink-dim: #a8a39a;
  --ink-mute: #868174;
  --line: #25252a;
  --accent: #d4ff3c;
  --accent-2: #ff5b2e;
  --display: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  /* spacing scale — 8px base rhythm */
  --space-1: 8px;  --space-2: 12px; --space-3: 16px; --space-4: 20px;
  --space-5: 24px; --space-6: 32px; --space-7: 40px; --space-8: 48px;
  --space-9: 64px; --space-10: 80px; --space-11: 120px;

  --radius-card: 4px;
  --radius-pill: 100px;
  --measure: 700px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: auto;
}

h1, h2, h3, .section-title, .post-title, .featured-title, .logo {
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Grain overlay — identical to main site */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  will-change: transform;
  contain: strict;
  transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.2s;
}
.skip-nav:focus { top: 0; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.reveal-target {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-target.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ============================================================
   NAV — identical to main site, "Blog" marked current
   ============================================================ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  background: rgba(11, 11, 12, 0.65);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
  will-change: border-color;
  transform: translateZ(0);
}
#nav.scrolled { border-bottom-color: var(--line); }
.logo {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--accent); }
.nav-cta {
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

.nav-right { display: flex; align-items: center; gap: 28px; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(11, 11, 12, 0.97);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu-links li {
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.mobile-menu.open .mobile-menu-links li { opacity: 1; transform: translateY(0); }
.mobile-menu.open .mobile-menu-links li:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-menu-links li:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-menu-links li:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-menu-links li:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-menu-links li:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-menu-links li:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu-links a {
  display: block;
  padding: 18px 4px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.mobile-menu-links a[aria-current="page"] { color: var(--accent); }
.mobile-menu-cta {
  margin-top: 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease 0.35s, transform 0.4s ease 0.35s;
}
.mobile-menu.open .mobile-menu-cta { opacity: 1; transform: translateY(0); }

@media (max-width: 768px) {
  #nav { padding: 18px 20px; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  z-index: 201;
  transition: width 0.1s linear;
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.container { max-width: 1280px; margin: 0 auto; }
section { padding: var(--space-11) 40px; position: relative; }
@media (max-width: 640px) {
  section { padding: var(--space-8) 20px; }
}

.section-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
  max-width: 20ch;
}
.section-title em { font-style: italic; color: var(--accent); font-weight: 300; }
.section-intro {
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 56ch;
  line-height: 1.6;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

/* ============================================================
   BLOG HERO
   ============================================================ */
.blog-hero {
  padding: 156px 40px 0;
  position: relative;
  overflow: hidden;
}
.blog-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black, transparent);
}
.blog-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}
.blog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  margin-bottom: var(--space-6);
  background: var(--bg-soft);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.1s forwards;
}
.blog-hero-eyebrow-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}
.blog-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-6);
  max-width: 16ch;
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(0.2,0.8,0.2,1) 0.2s forwards;
}
.blog-hero h1 em { font-style: italic; color: var(--accent); font-weight: 300; }
.blog-hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink-dim);
  max-width: 56ch;
  line-height: 1.6;
  margin-bottom: var(--space-9);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-wrap {
  position: relative;
  max-width: 560px;
  margin-bottom: var(--space-9);
  opacity: 0;
  animation: fadeUp 0.8s ease 0.45s forwards;
}
.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-mute);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  transition: border-color 0.25s, background 0.25s;
}
.search-input::placeholder { color: var(--ink-mute); }
.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.search-clear svg { width: 12px; height: 12px; }
.search-clear.visible { display: flex; }
.search-clear:hover { color: var(--accent); border-color: var(--accent); }

/* ============================================================
   TOPIC / FILTER BAR  (sticky)
   ============================================================ */
.filter-bar-sticky {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  margin-top: var(--space-9);
}
.filter-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.filter-pill:hover { border-color: var(--ink-mute); color: var(--ink); }
.filter-pill[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.filter-count {
  margin-left: auto;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  padding-left: 12px;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .filter-bar { padding: 16px 20px; }
  .filter-count { display: none; }
}

/* ============================================================
   FEATURED STORY (hero card)
   ============================================================ */
.featured-story {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.featured-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-9);
  align-items: stretch;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--bg);
  overflow: hidden;
  position: relative;
  transition: border-color 0.35s ease, transform 0.35s ease;
}
.featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
  z-index: 3;
}
.featured-card:hover::before, .featured-card:focus-visible::before { width: 100%; }
.featured-card:hover, .featured-card:focus-visible {
  border-color: var(--ink-mute);
  transform: translateY(-3px);
}
.featured-media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background: var(--bg-elev);
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.6s cubic-bezier(0.2,0.8,0.2,1);
}
.featured-card:hover .featured-media img { transform: scale(1.05); }
.featured-badge {
  position: absolute;
  top: 20px; left: 20px;
  z-index: 2;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 6px 12px;
  border-radius: 100px;
  font-weight: 600;
}
.featured-body {
  padding: var(--space-8) var(--space-8) var(--space-8) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.featured-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.cat-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-mute);
  flex-shrink: 0;
}
.meta-text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
}
.featured-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  /* overlap guard: clamp line count so long titles can never collide with description below */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-desc {
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: var(--space-6);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.featured-author-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}
.author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line);
}
.author-info { min-width: 0; }
.author-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.author-role {
  font-size: 12px;
  color: var(--ink-mute);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .featured-card { grid-template-columns: 1fr; }
  .featured-media { min-height: 240px; }
  .featured-body { padding: var(--space-7) var(--space-6); }
}
@media (max-width: 480px) {
  .featured-body { padding: var(--space-6) var(--space-4); }
  .featured-meta-row { gap: 10px; }
}

/* ============================================================
   POST CARD — used in Latest / Trending / Category grids
   Hairline-grid seam pattern from main site's service-card,
   adapted to image-forward editorial cards.
   ============================================================ */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: var(--space-8);
}
.post-card {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
  min-width: 0; /* prevents text overflow from breaking grid track */
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
  z-index: 2;
}
.post-card:hover::before, .post-card:focus-visible::before { width: 100%; }
.post-card:hover, .post-card:focus-visible { background: var(--bg-elev); }

.post-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-soft);
  flex-shrink: 0; /* image never compresses to make room for text */
}
.post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s cubic-bezier(0.2,0.8,0.2,1);
}
.post-card:hover .post-media img { transform: scale(1.06); }

.post-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.post-cat {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: var(--space-3);
  /* fixed clamp height — guarantees every card in a row aligns,
     and a long headline can never push into the description */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.25em * 2);
}
.post-desc {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.post-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.post-foot .author-avatar { width: 28px; height: 28px; }
.post-foot-text { min-width: 0; flex: 1; }
.post-author-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-meta-line {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: 1fr; }
  .post-body { padding: var(--space-5); }
}

/* Compact card variant — Trending rail */
.post-card.compact {
  flex-direction: row;
  align-items: stretch;
}
.post-card.compact .post-media {
  width: 136px;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.post-card.compact .post-body { padding: var(--space-4) var(--space-5); justify-content: center; }
.post-card.compact .post-title {
  font-size: 16px;
  -webkit-line-clamp: 2;
  min-height: calc(1.25em * 2);
  margin-bottom: var(--space-2);
}
.post-card.compact .post-desc { display: none; }
.post-card.compact .post-foot { border-top: none; padding-top: 0; margin-top: var(--space-2); }
.post-card.compact .post-cat { margin-bottom: 6px; }
@media (max-width: 480px) {
  .post-card.compact .post-media { width: 96px; }
  .post-card.compact .post-title { font-size: 14.5px; }
}

.trending-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: rgba(11,11,12,0.75);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 100px;
  line-height: 1;
}

/* ============================================================
   TRENDING RAIL
   ============================================================ */
.trending { background: var(--bg-soft); border-top: 1px solid var(--line); }
.trending-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: var(--space-8);
}
.trending-rail .post-card { position: relative; }
@media (max-width: 1024px) {
  .trending-rail { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .trending-rail { grid-template-columns: 1fr; }
}

/* ============================================================
   BROWSE BY CATEGORY
   ============================================================ */
.categories { background: var(--bg); border-top: 1px solid var(--line); }
.category-grid {
  margin-top: var(--space-8);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}
.category-card {
  padding: var(--space-6);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  min-width: 0;
}
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.category-card:hover, .category-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-4px);
  background: var(--bg-elev);
}
.category-card:hover::before, .category-card:focus-visible::before { width: 100%; }
.category-icon {
  width: 40px; height: 40px;
  color: var(--accent);
  margin-bottom: var(--space-5);
}
.category-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.category-card p {
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.55;
  margin-bottom: var(--space-4);
}
.category-count {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .category-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ============================================================
   LOAD MORE / EMPTY STATE
   ============================================================ */
.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-9);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 255, 60, 0.25);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.btn-secondary:hover, .btn-secondary:focus-visible { border-color: var(--ink); background: var(--bg-soft); }
.btn-arrow { width: 16px; height: 16px; transition: transform 0.25s; flex-shrink: 0; }
.btn-primary:hover .btn-arrow, .btn-secondary:hover .btn-arrow { transform: translateX(4px); }

.empty-state {
  display: none;
  text-align: center;
  padding: var(--space-10) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  margin-top: var(--space-8);
}
.empty-state.visible { display: block; }
.empty-state-icon {
  width: 40px; height: 40px;
  color: var(--ink-mute);
  margin: 0 auto var(--space-5);
}
.empty-state h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  margin-bottom: var(--space-3);
}
.empty-state p {
  color: var(--ink-dim);
  font-size: 14px;
  margin-bottom: var(--space-6);
  max-width: 40ch;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(212, 255, 60, 0.07), transparent);
  pointer-events: none;
}
.newsletter-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.newsletter h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}
.newsletter h2 em { font-style: italic; color: var(--accent); }
.newsletter-sub {
  font-size: 16px;
  color: var(--ink-dim);
  margin-bottom: var(--space-7);
  line-height: 1.6;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 15px 20px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  transition: border-color 0.25s;
}
.newsletter-input::placeholder { color: var(--ink-mute); }
.newsletter-input:focus { outline: none; border-color: var(--accent); }
.newsletter-submit {
  flex-shrink: 0;
  padding: 15px 24px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.newsletter-submit:hover, .newsletter-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212, 255, 60, 0.25);
}
.newsletter-meta {
  margin-top: var(--space-4);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.newsletter-success {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-success.visible { display: flex; }
.newsletter-success svg { width: 16px; height: 16px; flex-shrink: 0; }
.newsletter-form.hidden { display: none; }

@media (max-width: 540px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-submit { width: 100%; justify-content: center; }
}

/* ============================================================
   FOOTER — identical to main site
   ============================================================ */
footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  padding: 64px 40px 32px;
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand p {
  color: var(--ink-dim);
  font-size: 14px;
  margin-top: 16px;
  max-width: 36ch;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover, .footer-col a:focus-visible { color: var(--accent); }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  footer { padding: 48px 20px 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================================
   COVER ART — on-brand SVG illustrations standing in for
   featured photography. Built from the same visual vocabulary
   as the main site's hero network (nodes/lines), hairline grid,
   and code-window motifs. Five variants cycle across the journal.
   ============================================================ */
.cover {
  width: 100%; height: 100%;
  position: absolute; inset: 0;
  display: block;
}
.cover-bg { fill: var(--bg-elev); }
.cover-line { stroke: var(--line); fill: none; }
.cover-accent { stroke: var(--accent); fill: var(--accent); }
.cover-accent2 { stroke: var(--accent-2); fill: var(--accent-2); }
.cover-dim { stroke: var(--ink-mute); fill: var(--ink-mute); }
/* Stroke-only variants for connecting lines/paths — prevents CSS fill
   from overriding the inline fill="none" on path/rect/circle outlines */
.cover-accent-line { stroke: var(--accent); fill: none; }
.cover-dim-line { stroke: var(--ink-mute); fill: none; }