/* ==========================================================================
   VIRA blog — shared stylesheet for /blog/* and /authors/*
   Sources design tokens from /index.html (homepage). Keep in sync.
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background: #0a0f1a;
  color: #fff;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === Space background === */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(30, 80, 120, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(20, 40, 80, 0.3) 0%, transparent 50%),
    #0a0f1a;
}
.space-bg .stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 25% 45%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 40% 15%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 55% 70%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 70% 35%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 90% 10%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1px 1px at 5% 55%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 60% 90%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 35% 95%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 75% 85%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1.5px 1.5px at 95% 45%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 45% 5%, rgba(255,255,255,0.5), transparent);
  background-size: 250px 250px;
}
.earth-glow {
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 60%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(40,120,180,0.15) 0%, rgba(20,60,120,0.05) 40%, transparent 70%);
  pointer-events: none;
}

/* === Glass cards (matching app) === */
.glass {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
}
.glass-teal { background: rgba(56, 130, 150, 0.25); }
.glass-teal:hover { background: rgba(56, 130, 150, 0.40); }
.glass-green { background: rgba(34, 120, 60, 0.30); }
.glass-green:hover { background: rgba(34, 120, 60, 0.50); }
.glass-purple { background: rgba(90, 50, 150, 0.30); }
.glass-purple:hover { background: rgba(90, 50, 150, 0.50); }
.glass-orange { background: rgba(160, 80, 20, 0.23); }
.glass-orange:hover { background: rgba(160, 80, 20, 0.40); }
.glass-dark { background: rgba(15, 20, 35, 0.60); }
.glass-subtle { background: rgba(255, 255, 255, 0.04); }
.glass-subtle:hover { background: rgba(255, 255, 255, 0.08); }

/* === Buttons === */
.btn-dark, .btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-dark { background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(6px); }
.btn-dark:hover { background: rgba(0, 0, 0, 0.55); }
.btn-glass {
  background: rgba(56, 130, 150, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
}
.btn-glass:hover { background: rgba(56, 130, 150, 0.45); }

/* === Layout === */
.content { position: relative; z-index: 1; }
.section { padding: 80px 24px; }
.section-tight { padding: 40px 24px; }
.container { max-width: 1100px; margin: 0 auto; }
.container-narrow { max-width: 780px; margin: 0 auto; }

/* === Nav === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 15, 26, 0.7);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nav-logo {
  display: flex; align-items: center; gap: 6px;
  text-decoration: none; font-size: 18px; font-weight: 600;
  letter-spacing: 3px; color: #fff; text-transform: uppercase;
}
.nav-logo img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.5);
  text-decoration: none; font-size: 14px; font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* === Typography === */
h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3.5vw, 36px); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 600; line-height: 1.3; }
p { line-height: 1.7; }
.text-muted { color: rgba(255,255,255,0.50); }
.text-light { color: rgba(255,255,255,0.70); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }

/* === Section header === */
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 12px;
  background: rgba(56,130,150,0.15);
  color: rgba(180,220,240,0.9);
  font-size: 13px; font-weight: 500;
  margin-bottom: 20px;
}
.section-header p {
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  margin-top: 12px;
}

/* === Animations === */
.fade-up { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }

/* === Footer === */
.footer { padding: 48px 24px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer a { color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: #fff; }

/* ==========================================================================
   Blog-specific
   ========================================================================== */

/* === Breadcrumbs === */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}
.breadcrumbs a { color: rgba(180,220,240,0.85); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .sep { color: rgba(255,255,255,0.3); }

/* === Article hero === */
.article-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-top: 24px; margin-bottom: 32px;
}
.article-meta .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  font-size: 12px;
  font-weight: 500;
}
.article-meta .pill-cluster { background: rgba(34,120,60,0.25); color: rgba(140,230,160,0.9); }
.article-meta .pill-pillar { background: rgba(56,130,150,0.30); color: rgba(180,220,240,0.95); }
.article-meta .pill-tl { background: rgba(160,80,20,0.30); color: rgba(255,190,100,0.95); }
.article-meta .author-link { color: rgba(180,220,240,0.85); text-decoration: none; }
.article-meta .author-link:hover { color: #fff; }
.article-meta .dot { color: rgba(255,255,255,0.25); }

/* === TL;DR card === */
.tldr {
  padding: 24px 28px;
  border-left: 3px solid rgba(180,220,240,0.6);
  background: rgba(56,130,150,0.10);
  border-radius: 0 14px 14px 0;
  margin: 32px 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}
.tldr strong { color: #fff; }

/* === Article body typography === */
.prose { color: rgba(255,255,255,0.82); font-size: 16px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  margin-top: 56px; margin-bottom: 16px;
  color: #fff;
  font-size: clamp(22px, 2.6vw, 30px);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  margin-top: 32px; margin-bottom: 8px;
  color: #fff;
  font-size: 19px;
}
.prose p { color: rgba(255,255,255,0.75); }
.prose strong { color: #fff; font-weight: 600; }
.prose a {
  color: rgba(180,220,240,0.95);
  text-decoration: underline;
  text-decoration-color: rgba(180,220,240,0.35);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.prose a:hover { text-decoration-color: rgba(180,220,240,1); }
.prose ul, .prose ol { padding-left: 1.5em; color: rgba(255,255,255,0.78); }
.prose li + li { margin-top: 0.4em; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 4px;
}
.prose blockquote {
  border-left: 3px solid rgba(180,220,240,0.4);
  padding: 8px 0 8px 20px;
  margin: 24px 0;
  color: rgba(255,255,255,0.65);
  font-style: italic;
}
.prose .unverified {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(255,190,100,0.15);
  color: rgba(255,190,100,0.95);
  font-size: 0.82em;
  font-weight: 500;
  margin-left: 4px;
  vertical-align: middle;
}

/* === Comparison table inside article === */
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 14px; margin: 28px 0;
}
.prose table th, .prose table td {
  padding: 14px 18px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.prose table th {
  color: rgba(255,255,255,0.5);
  font-weight: 500; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.04em;
  background: rgba(255,255,255,0.02);
}
.prose table td:first-child { color: rgba(255,255,255,0.75); }

/* === FAQ === */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  padding: 18px 24px;
  border-radius: 14px;
  background: rgba(15, 20, 35, 0.55);
  border: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
}
.faq details[open] { background: rgba(15, 20, 35, 0.75); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 300;
  color: rgba(180,220,240,0.7);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: '–'; }
.faq details > p, .faq details > div {
  margin-top: 12px;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  font-size: 15px;
}

/* === Sources block === */
.sources {
  font-size: 14px; color: rgba(255,255,255,0.65);
  padding: 24px;
}
.sources ol { padding-left: 1.5em; }
.sources li { margin-bottom: 8px; }
.sources a { color: rgba(180,220,240,0.9); text-decoration: none; }
.sources a:hover { text-decoration: underline; }
.sources .src-meta { color: rgba(255,255,255,0.4); font-size: 13px; margin-left: 4px; }

/* === Disclaimer === */
.disclaimer {
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px dashed rgba(255,190,100,0.3);
  background: rgba(160, 80, 20, 0.08);
  color: rgba(255,200,140,0.85);
  font-size: 13px; line-height: 1.55;
  margin: 32px 0;
}

/* === Author byline card === */
.author-card {
  display: flex; gap: 16px; align-items: center;
  padding: 20px 24px;
  margin-top: 48px;
}
.author-card .avatar {
  flex-shrink: 0;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(56,130,150,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.author-card .author-info { flex: 1; min-width: 0; }
.author-card .author-name {
  font-weight: 600; font-size: 16px;
  color: #fff; margin-bottom: 2px;
  text-decoration: none;
}
.author-card .author-name:hover { text-decoration: underline; }
.author-card .author-role {
  font-size: 13px;
  color: rgba(140,230,160,0.85);
  margin-bottom: 6px;
}
.author-card .author-bio {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.55;
}

/* === Pillar uplink === */
.pillar-uplink {
  padding: 18px 24px; margin: 32px 0;
  border-left: 3px solid rgba(140,230,160,0.7);
  background: rgba(34, 120, 60, 0.10);
  border-radius: 0 12px 12px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.80);
}
.pillar-uplink a {
  color: rgba(180,220,240,0.95);
  text-decoration: underline;
  text-decoration-color: rgba(180,220,240,0.4);
}

/* ==========================================================================
   Index / filter page
   ========================================================================== */

/* === Filter strip === */
.filters {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px 28px;
  margin-bottom: 32px;
}
.filter-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.filter-label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.45);
  min-width: 80px;
}
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-pill:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.filter-pill.active {
  background: rgba(56,130,150,0.40);
  border-color: rgba(180,220,240,0.4);
  color: #fff;
}
.filter-pill .count {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}
.filter-pill.active .count { color: rgba(255,255,255,0.7); }
.filter-search {
  flex: 1; min-width: 200px;
  padding: 8px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.filter-search:focus { border-color: rgba(180,220,240,0.4); background: rgba(255,255,255,0.06); }
.filter-search::placeholder { color: rgba(255,255,255,0.3); }
.filter-meta {
  font-size: 13px; color: rgba(255,255,255,0.5);
  display: flex; justify-content: space-between; align-items: center;
}
.filter-reset {
  background: none; border: none;
  color: rgba(180,220,240,0.85);
  font-size: 13px; cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* === Grid of cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
}
.piece-card {
  display: flex; flex-direction: column;
  padding: 24px 22px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
  min-height: 220px;
}
.piece-card:hover { transform: translateY(-2px); }
.piece-card.is-published { background: rgba(15, 20, 35, 0.60); }
.piece-card.is-planned { background: rgba(255,255,255,0.025); border-style: dashed; opacity: 0.78; }
.piece-card.is-backlog { background: rgba(255,255,255,0.015); border-style: dashed; opacity: 0.55; }
.piece-card .type-tag {
  align-self: flex-start;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 3px 10px; border-radius: 8px;
  margin-bottom: 14px;
}
.type-tag-pillar { background: rgba(56,130,150,0.40); color: rgba(180,220,240,0.95); }
.type-tag-cluster { background: rgba(34,120,60,0.30); color: rgba(140,230,160,0.95); }
.type-tag-tl { background: rgba(160,80,20,0.30); color: rgba(255,190,100,0.95); }
.piece-card .title {
  font-size: 16px; font-weight: 600; line-height: 1.3;
  color: #fff;
  margin-bottom: 10px;
}
.piece-card .keyword {
  font-size: 13px; color: rgba(255,255,255,0.45);
  margin-bottom: 14px;
}
.piece-card .meta {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.4);
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.piece-card .status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-published { background: rgba(140,230,160,0.9); }
.status-planned { background: rgba(180,220,240,0.65); }
.status-backlog { background: rgba(255,255,255,0.25); }
.piece-card[data-published="true"] .title { color: #fff; }
.piece-card.is-planned .title, .piece-card.is-backlog .title { color: rgba(255,255,255,0.65); }

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: rgba(255,255,255,0.45);
}
.empty-state h3 { color: rgba(255,255,255,0.7); margin-bottom: 8px; }
