/* ════════════════════════════════════════════════════════════
   THE SIGNAL — SHARED STYLESHEET
   Used by: blog.html (article feed) and article.html (full article)
   ════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #1a1a1a;
  --surface:     #242424;
  --surface-2:   #2d2d2d;
  --border:      #383838;
  --accent:      #d97706;
  --accent-soft: rgba(217,119,6,0.12);
  --text:        #e8e8e8;
  --text-muted:  #888;
  --text-faint:  #555;
  --tag-bg:      #2d2d2d;
  --radius:      10px;
  --font-body:   'Inter', sans-serif;
  --font-display:'Lora', Georgia, serif;
}

html { font-size: 16px; color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }


/* ────────────────────────────────────────────────────────────
   HEADER  (shared)
   ──────────────────────────────────────────────────────────── */

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo span { color: var(--accent); }

/* ── DESKTOP NAV ── */
nav { display: flex; gap: 4px; }

nav a,
.nav-item > a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  text-decoration: none;
}

nav a:hover,
.nav-item > a:hover { color: var(--text); background: var(--surface-2); }
nav a.active,
.nav-item > a.active { color: var(--accent); }

.nav-item > a .chevron {
  width: 10px; height: 10px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-item { position: relative; }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 200;
  pointer-events: none;
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  rotate: 45deg;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-item:hover > a .chevron,
.nav-item:focus-within > a .chevron { transform: rotate(180deg); }

.nav-dropdown a {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-dropdown a:hover { color: var(--text); background: var(--surface-2); }
.nav-dropdown a.active { color: var(--accent); }

.nav-dropdown .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 6px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 12px;
  height: 34px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: border-color 0.15s;
  cursor: text;
  white-space: nowrap;
}

.header-search:hover { border-color: var(--accent); }
.header-search svg { flex-shrink: 0; opacity: 0.5; }


/* ────────────────────────────────────────────────────────────
   MOBILE HAMBURGER  (pure CSS — checkbox :checked trick)
   ──────────────────────────────────────────────────────────── */

#nav-toggle { display: none; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.burger:hover { border-color: var(--accent); }

.burger span {
  display: block;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease;
  transform-origin: center;
}

/* hamburger → X animation */
#nav-toggle:checked ~ .header-inner .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle:checked ~ .header-inner .burger span:nth-child(2) { opacity: 0; width: 0; }
#nav-toggle:checked ~ .header-inner .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* the slide-down panel */
.mobile-nav {
  display: none;
  max-height: 0;
  overflow: hidden;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: max-height 0.3s ease;
}

#nav-toggle:checked ~ .mobile-nav { max-height: 600px; }

.mobile-nav-inner {
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* top-level links and sub-item labels share the same style */
.mobile-nav-inner > a,
.mobile-nav-item > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 10px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  cursor: pointer;
}

.mobile-nav-inner > a:hover,
.mobile-nav-item > label:hover { color: var(--text); background: var(--surface-2); }
.mobile-nav-inner > a.active,
.mobile-nav-item > label.active { color: var(--accent); }

.mobile-nav-item { display: flex; flex-direction: column; }

.mobile-sub-toggle { display: none; }

.mobile-nav-item > label .chevron { width: 12px; height: 12px; transition: transform 0.2s; }
.mobile-sub-toggle:checked ~ label .chevron { transform: rotate(180deg); }

.mobile-sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.mobile-sub-toggle:checked ~ .mobile-sub-menu { max-height: 300px; }

.mobile-sub-menu a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-faint);
  padding: 8px 12px 8px 28px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
}
.mobile-sub-menu a:hover { color: var(--text); background: var(--surface-2); }
.mobile-sub-menu a.active { color: var(--accent); }

.mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 12px;
}


/* ────────────────────────────────────────────────────────────
   TAG / META PRIMITIVES  (shared)
   ──────────────────────────────────────────────────────────── */

.tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(217,119,6,0.25);
  padding: 2px 8px;
  border-radius: 4px;
}

.meta-dot { color: var(--text-faint); font-size: 0.8rem; }
.date, .read-time { color: var(--text-faint); font-size: 0.8rem; }

.tag-pill {
  font-size: 0.78rem;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 20px;
  transition: border-color 0.15s, color 0.15s;
}
.tag-pill:hover { border-color: var(--accent); color: var(--accent); }

.follow-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 20px;
  border-radius: 6px;
  transition: opacity 0.15s;
}
.follow-btn:hover { opacity: 0.85; }


/* ────────────────────────────────────────────────────────────
   AUTHOR AVATAR  (shared — grows on hover, image or initials)
   ──────────────────────────────────────────────────────────── */

.author-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: width 0.25s cubic-bezier(0.34,1.4,0.64,1),
              height 0.25s cubic-bezier(0.34,1.4,0.64,1),
              border-color 0.2s;
}

.author-avatar:hover {
  width: 52px;
  height: 52px;
  border-color: var(--accent);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  border-radius: 50%;
}

.author-name { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }


/* ────────────────────────────────────────────────────────────
   ARTICLE CARD  (shared — feed cards + "related" cards)
   ──────────────────────────────────────────────────────────── */

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

/* signature: top accent bar that grows in from left on hover */
.article-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1);
  z-index: 1;
}

.article-card:hover { border-color: #4a4a4a; background: #272727; }
.article-card:hover::before { transform: scaleX(1); }

.article-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.article-card:hover .article-image img { transform: scale(1.03); }

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: var(--surface-2);
}

.article-body {
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.article-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  transition: color 0.15s;
}

.article-card:hover h2 { color: #fff; }

.article-card h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  transition: color 0.15s;
}
.article-card:hover h4 { color: #fff; }

.article-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
  flex: 1;
}

.article-footer {
  display: flex;
  align-items: center;
  gap: 10px;
}


/* ════════════════════════════════════════════════════════════
   BLOG FEED PAGE  (blog.html only)
   ════════════════════════════════════════════════════════════ */

.page-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.page-hero p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 480px;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.feed { display: flex; flex-direction: column; gap: 2px; }

/* sidebar */
.sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.widget-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.about-widget { text-align: center; }
.about-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9333ea);
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}
.about-widget h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.about-widget p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.about-widget .follow-btn { margin-top: 14px; }

/* trending */
.trending-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }

.trending-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; padding-bottom: 0; }

.trend-num {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-faint);
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
}
.trend-text { min-width: 0; }
.trend-text h4 {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 3px;
  color: var(--text);
}
.trend-text span {
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* tag cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* newsletter */
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }

.newsletter-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 0.8rem;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s;
}

.newsletter-form input::placeholder { color: var(--text-faint); }
.newsletter-form input:focus { border-color: var(--accent); }

.newsletter-form button {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-body);
  padding: 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.newsletter-form button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.newsletter-note {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.page-btn {
  min-width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  padding: 0 8px;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn.ellipsis { border-color: transparent; background: none; cursor: default; }
.page-btn.ellipsis:hover { color: var(--text-muted); border-color: transparent; }

/* blog page responsive */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .page-hero { padding: 28px 16px 20px; margin-bottom: 24px; }
  .layout { padding: 0 16px 60px; }
  .sidebar { grid-template-columns: 1fr; }
}


/* ════════════════════════════════════════════════════════════
   FULL ARTICLE PAGE  (article.html only)
   ════════════════════════════════════════════════════════════ */

.breadcrumb {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.breadcrumb a { color: var(--text-muted); transition: color 0.15s; }
.breadcrumb a:hover { color: var(--accent); }

.article-header {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-bottom: 28px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.18;
  margin-bottom: 16px;
}

.article-dek {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 26px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.byline-text h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.byline-text span {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.byline-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }

/* article byline avatar size (overrides the 26px default) */
.byline .author-avatar { width: 42px; height: 42px; }
.byline .author-avatar:hover { width: 68px; height: 68px; }

/* hero image */
.article-hero-image {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-bottom: 44px;
}

.article-hero-image .image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-hero-image .thumb-placeholder { font-size: 5rem; }

.image-caption {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: 10px;
}

/* article body typography */
.article-content {
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text);
}

.article-content p { margin-bottom: 26px; }

.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 44px 0 20px;
  line-height: 1.3;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 36px 0 16px;
  line-height: 1.35;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(217,119,6,0.4);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}
.article-content a:hover { text-decoration-color: var(--accent); }

.article-content blockquote {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 20px 24px;
  margin: 32px 0;
  border-radius: 0 8px 8px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: #d4d4d4;
  line-height: 1.6;
}

.article-content ul, .article-content ol {
  margin: 0 0 26px 0;
  padding-left: 1.4em;
}

.article-content li { margin-bottom: 10px; }

.article-content code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.9em;
  font-family: 'SF Mono', Consolas, monospace;
  color: #e8b366;
}

.article-content strong { font-weight: 600; color: #fff; }

.pull-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 48px 0;
  color: var(--text-faint);
}
.pull-divider span { font-size: 1.2rem; }

/* engagement bar */
.engagement-bar {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.engage-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 9px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.engage-btn:hover { border-color: var(--accent); color: var(--accent); }
.engage-btn.liked { color: var(--accent); border-color: rgba(217,119,6,0.4); }

/* tags footer */
.article-tags-footer {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* author card */
.author-card {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-top: 40px;
}

.author-card-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.author-card .author-avatar { width: 56px; height: 56px; }
.author-card .author-avatar:hover { width: 56px; height: 56px; cursor: default; }

.author-card-text h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.author-card-text p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

/* related articles */
.related-section {
  max-width: 100%;
  margin: 0;
  padding: 0;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-section h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

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

.related-grid .article-card { margin-bottom: 0; }
.related-grid .article-body { padding: 18px 20px 20px; }
.related-grid .thumb-placeholder { font-size: 2.5rem; }

/* article page responsive */
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }

  .author-card-inner { flex-direction: column; }
  .byline-actions { margin-left: 0; }
  .byline { flex-wrap: wrap; gap: 14px; }
}


/* ════════════════════════════════════════════════════════════
   LIGHTBOX  (pure CSS, no JavaScript — uses the :target trick)
   ════════════════════════════════════════════════════════════
   HOW IT WORKS:
   Each thumbnail is a link to #lightbox-N. Each lightbox-N is a
   full-screen overlay, hidden by default, shown only when its
   id matches the URL hash (:target). A close link resets the
   hash back to #_close (an empty target), and clicking the dark
   backdrop does the same.
   ──────────────────────────────────────────────────────────── */

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 32px 0;
}

.thumb-grid a {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
}

.thumb-grid a:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.thumb-grid a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-grid a .thumb-placeholder {
  font-size: 1.8rem;
}

/* number badge in the corner, just a nice touch */
.thumb-grid a::after {
  content: attr(data-index);
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-body);
}

/* ════════════════════════════════════════════════════════════
   LIGHTBOX
   ════════════════════════════════════════════════════════════ */
/* ==========================================
   1. GALLERY GRID (MAIN PAGE THUMBNAILS)
   ========================================== */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.thumb-grid .thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid var(--border, #333);
  overflow: hidden;
}

.thumb-grid .thumb-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ==========================================
   2. LIGHTBOX OVERLAY (HIDDEN BY DEFAULT)
   ========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  
  /* HIDES LIGHTBOX UNTIL THUMBNAIL CLICKED */
  display: none; 
  
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 16px;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* ACTIVATES WHEN THUMBNAIL IS CLICKED (#lightbox-1) */
.lightbox:target {
  display: flex;
}

/* Lightbox Main Box */
.lightbox-content {
  position: relative;
  width: min(1100px, 100%);
  max-width: 100%;
  height: 90vh;
  margin: 0 auto;
  
  /* 3-Row Grid: Top Ad, Middle Image, Bottom Caption */
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  z-index: 1;
  box-sizing: border-box;
  
  /* CRITICAL FOR CHROME: Stops container from drifting off-center on narrow screens */
  min-width: 0;
}

/* Top Ad Banner */
.lightbox-a {
  margin-bottom: 8px;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.a-placeholder {
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: #222;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Middle Image Area */
.lightbox-media {
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-media picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
}

.lightbox-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Keeps full portrait/landscape image visible */
  border-radius: 8px;
  border: 1px solid var(--border, #333);
  display: block;
}

/* Bottom Captions */
.lightbox-meta {
  width: 100%;
  text-align: center;
  padding-top: 8px;
  min-width: 0;
}

.lightbox-caption {
  margin: 0;
  color: var(--text-muted, #ccc);
  font-size: 0.85rem;
}

.lightbox-counter {
  margin-top: 2px;
  color: var(--text-faint, #777);
  font-size: 0.75rem;
}

/* Navigation & Controls */
.lightbox-close {
  position: absolute;
  top: -12px;
  right: 0px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface, #222);
  border: 1px solid var(--border, #444);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text, #fff);
  font-size: 1.2rem;
  z-index: 10;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface, #222);
  border: 1px solid var(--border, #444);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted, #ccc);
  font-size: 1.3rem;
  z-index: 10;
}

.lightbox-prev { left: 4px; }
.lightbox-next { right: 4px; }

/* Desktop adjustments */
@media (min-width: 641px) {
  .lightbox-prev { left: -16px; }
  .lightbox-next { right: -16px; }
  .lightbox-close { right: -12px; }
}

@media (max-width: 640px) {
  .thumb-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .ad-placeholder { height: 50px; }
}
/* ════════════════════════════════════════════════════════════
   GLOBAL RESPONSIVE  (shared)
   ════════════════════════════════════════════════════════════ */


@media (max-width: 640px) {
  .thumb-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .lightbox { padding: 16px; }
  .lightbox-close { top: 0; right: 0; }
  .lightbox-nav { width: 38px; height: 38px; font-size: 1.1rem; }
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
  .header-inner { padding: 0 16px; }
    nav { display: none; }
  .burger { display: flex; }
  .mobile-nav { display: block; }
  .article-body { padding: 16px 18px 16px; }
  .article-card h2 { font-size: 1.1rem; }
}


@media (prefers-reduced-motion: reduce) {
  .article-card::before,
  .article-card,
  .author-avatar,
  nav a,
  .tag-pill { transition: none; }
    .burger span { transition: none; }
}

/* ════════════════════════════════════════════════════════════
   SITE BANNER  (shared — sits between header and page content)
   ════════════════════════════════════════════════════════════ */

.site-banner {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 24px;
}

.site-banner .banner-frame {
  width: 100%;
  height: 298px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* actual banner image — swap src for your own 1200x200 image */
.site-banner .banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* placeholder shown when no image is set */
.site-banner .banner-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    #1e1e1e 0%,
    #2a2218 40%,
    #1e1a12 60%,
    #1e1e1e 100%
  );
  position: relative;
  overflow: hidden;
}

/* decorative grid lines in the placeholder */
.site-banner .banner-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(217,119,6,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217,119,6,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* glow blob */
.site-banner .banner-placeholder::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 140px;
  background: radial-gradient(ellipse, rgba(217,119,6,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.site-banner .banner-placeholder-text {
  position: relative;
  z-index: 1;
  text-align: center;
}

.site-banner .banner-placeholder-text .banner-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 6px;
}

.site-banner .banner-placeholder-text .banner-title span {
  color: var(--accent);
}

.site-banner .banner-placeholder-text .banner-sub {
  font-size: 0.9rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* subtle inner vignette to blend edges into the page */
.site-banner .banner-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.4);
  pointer-events: none;
}

@media (max-width: 640px) {
  .site-banner { padding: 0 16px; margin-top: 16px; }
  .site-banner .banner-frame { height: 130px; border-radius: 12px; }
  .site-banner .banner-placeholder-text .banner-title { font-size: 1.4rem; }
  .site-banner .banner-placeholder-text .banner-sub { font-size: 0.75rem; }
}



/* ════════════════════════════════════════════════════════════
   DOWNLOAD BTN
   ════════════════════════════════════════════════════════════ */
.download-btn {
   display: flex;        /* change inline-flex to flex */
  justify-content: center;
  width: 100%;
  align-items: center;
  gap: 10px;
  back3ground: var(--surface);
  border: 1px solid var(--border);
  co2lor: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: var(--font-body);
  padding: 11px 20px;
  border-radius: 8px;
  margin: 8px 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
    border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.download-btn:hover {
  color: var(--text-muted);
  background: var(--surface);
}

.download-btn:hove2r {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.download-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.download-btn:hover svg {
  transform: translateY(2px);
}

/* ════════════════════════════════════════════════════════════
   ad banner
   ════════════════════════════════════════════════════════════ */
.a-banner {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
  margin: 8px 0;
}

.a-banner img,
.a-banner iframe,
.a-banner > div {
  display: block;
  width: 100%;
}

.a-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  padding: 6px 0 4px;
  background: var(--surface-2);
}


/* ════════════════════════════════════════════════════════════
   AUTHORS PAGE
   ════════════════════════════════════════════════════════════ */

.authors-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.authors-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.authors-hero p { color: var(--text-muted); font-size: 0.95rem; max-width: 480px; }

.authors-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.authors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(247px, 1fr));
  gap: 20px;
}

.author-card-grid {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  width: 247px;
  justify-self: center;
}

/* reuse the same amber top-bar signature */
.author-card-grid::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1);
  z-index: 1;
}

.author-card-grid:hover { border-color: #4a4a4a; background: #272727; transform: translateY(-3px); }
.author-card-grid:hover::before { transform: scaleX(1); }

.author-card-grid .author-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-card-grid .author-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.4s ease;
}

.author-card-grid:hover .author-photo img { transform: scale(1.04); }

/* placeholder when no photo yet */
.author-card-grid .author-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 3.5rem;
  background: var(--surface-2);
  color: var(--text-faint);
}

.author-card-grid .author-info {
  padding: 16px 18px 18px;
  padding: 16px 18px 18px;
}

.author-card-grid .author-info h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  transition: color 0.15s;
}

.author-card-grid:hover .author-info h3 { color: #fff; }

.author-card-grid .author-info .author-role {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin-bottom: 10px;
  display: block;
}

.author-card-grid .author-info .author-beat {
   display: table;
  margin: 0 auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(217,119,6,0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.author-count {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.author-count strong { color: var(--text-muted); }

@media (max-width: 900px) {
  .authors-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .authors-layout .sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .authors-hero { padding: 28px 16px 20px; margin-bottom: 24px; }
  .authors-layout { padding: 0 16px 60px; }
  .authors-layout .sidebar { grid-template-columns: 1fr; }
  .authors-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .author-card-grid { width: 100%; }
}

.header-search input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font-body);
  width: 160px;
}

.header-search input::placeholder { color: var(--text-muted); }

/* lora-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/lora-v37-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* lora-italic - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  src: url('../fonts/lora-v37-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* lora-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Lora';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/lora-v37-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* lora-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Lora';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/lora-v37-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* inter-regular - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('../fonts/inter-v20-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-500 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('../fonts/inter-v20-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* inter-600 - latin */
@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('../fonts/inter-v20-latin-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}


/* ════════════════════════════════════════════════════════════
   Cam STUFF
   ════════════════════════════════════════════════════════════ */
   
   
#camShow {
  width: 100%;
  max-width: 450px; /* Adjust as needed for your page layout */
  margin: 0 auto;
  box-sizing: border-box;
}

/* Base wrapper: Removes border & background while keeping text centered */
.cam-card {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  padding: 0;
  text-align: center; 
}

/* Centered Title Formatting */
.cam-title {
  margin: 0 0 12px 0;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff; /* Change color to fit your page background */
  word-break: break-word;
}

/* Image Container (Strict bounds, no box styling) */
.cam-preview {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 12px;
}

.cam-preview a {
  display: block;
  width: 100%;
}

.cam-preview img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

/* Text Topic Formatting */
.cam-topic {
  margin: 8px 0 16px 0;
  font-size: 0.9rem;
  color: #ccc;
  word-break: break-word;
}
