/* ==========================================================================
   nirvani.ai/articles. Pages are generated by _build/blog/build_blog.py.
   Sits on top of /styles.css (tokens, nav, footer, micro-label, chrome CTA).
   Transparent bands so the starfield shows through. Card light effects come
   from the Nirvani flair kit (shine border, spotlight), recolored gold.
   ========================================================================== */

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

.articles-main {
  position: relative;
  z-index: 1;
  padding: 132px 24px 72px;
}

/* ---------- Index hero ---------- */
.art-hero {
  max-width: 860px;
  margin: 0 auto 34px;
  text-align: center;
}
.art-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 7px 14px;
  font: 500 12px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.08em;
  color: var(--text-3);
  background: rgba(8, 8, 8, 0.8);
  border: 1px solid rgba(212, 168, 67, 0.32);
  border-radius: var(--radius-pill);
}
.art-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #F4D572;
  box-shadow: 0 0 10px rgba(244, 213, 114, 0.8);
}
.art-eyebrow-path { color: #E8C16A; }
.art-title {
  margin: 0 0 16px;
  font-size: clamp(46px, 7.4vw, 88px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #FFF7CD 0%, #FDE58C 24%, #F0C85F 50%, #C89637 74%, #F2CA64 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 28px rgba(212, 168, 67, 0.2));
}
.art-sub {
  margin: 0 auto;
  max-width: 640px;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.6;
  color: var(--text-3);
  text-wrap: balance;
}

/* ---------- Topic chips ---------- */
.art-list, .art-related {
  max-width: var(--maxw);
  margin: 0 auto;
}
.art-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 30px;
}
.art-chip {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid var(--line-3);
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.art-chip:hover { border-color: rgba(212, 168, 67, 0.55); color: var(--text-0); }
.art-chip[aria-pressed="true"] {
  color: #120F08;
  background: linear-gradient(180deg, #F4D572, #D4A843);
  border-color: #D4A843;
  box-shadow: 0 6px 22px -8px rgba(212, 168, 67, 0.65);
}
.art-chip:focus-visible { outline: 2px solid #E8C16A; outline-offset: 2px; }

/* ---------- Cards ---------- */
@property --shine-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
@keyframes art-shine { to { --shine-angle: 360deg; } }

.art-lead { margin-bottom: 34px; }
.art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.art-card {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 17, 11, 0.94), rgba(6, 6, 6, 0.95));
  border: 1px solid rgba(212, 168, 67, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 247, 205, 0.05), 0 18px 40px -26px rgba(0, 0, 0, 0.9);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.art-card[hidden] { display: none; }
.art-card:hover, .art-card:focus-within {
  transform: translateY(-4px);
  border-color: rgba(244, 213, 114, 0.42);
  box-shadow: 0 28px 60px -28px rgba(212, 168, 67, 0.45), 0 0 0 1px rgba(244, 213, 114, 0.08);
}
/* Gold light sweeping around the edge on hover (flair kit shine border). */
.shine-border::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 3;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--shine-angle), transparent 0deg, transparent 290deg,
    rgba(255, 247, 205, 0.95) 330deg, #F4D572 345deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.shine-border:hover::after, .shine-border:focus-within::after {
  opacity: 1;
  animation: art-shine 2.6s linear infinite;
}
/* Soft gold light that follows the pointer across a grid (flair kit spotlight). */
.spotlight-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(360px circle at var(--mx, -1000px) var(--my, -1000px),
    rgba(244, 213, 114, 0.13), rgba(212, 168, 67, 0.05) 40%, transparent 70%);
}
.spotlight-grid:hover .spotlight-glow { opacity: 1; }

.art-card-link {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
  overflow: hidden;
}
.art-card-link:focus-visible { outline: 2px solid #E8C16A; outline-offset: 3px; }
.art-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050505;
}
.art-card-media picture, .art-card-media img { display: block; width: 100%; height: 100%; }
.art-card-media img {
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 0.8s var(--ease), filter 0.8s var(--ease);
}
.art-card:hover .art-card-media img { transform: scale(1.06); filter: brightness(1.08) contrast(1.04); }
.art-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(6, 6, 6, 0.78) 100%);
  pointer-events: none;
}
/* HUD corner ticks: the tech-forward frame on every image. */
.art-card-media::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(#F4D572, #F4D572) top left / 14px 1px no-repeat,
    linear-gradient(#F4D572, #F4D572) top left / 1px 14px no-repeat,
    linear-gradient(#F4D572, #F4D572) bottom right / 14px 1px no-repeat,
    linear-gradient(#F4D572, #F4D572) bottom right / 1px 14px no-repeat;
  opacity: 0.5;
  transition: opacity 0.35s ease, inset 0.35s var(--ease);
}
.art-card:hover .art-card-media::before { opacity: 0.95; inset: 9px; }
.art-card-badge {
  position: absolute;
  left: 14px;
  bottom: 13px;
  z-index: 2;
  font: 500 11px/1 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #F4D572;
  background: rgba(6, 6, 6, 0.8);
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-radius: 6px;
  padding: 6px 8px;
}
.art-card-flag {
  position: absolute;
  right: 14px;
  top: 13px;
  z-index: 2;
  font: 700 10.5px/1 'Inter', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #120F08;
  background: linear-gradient(180deg, #FFF0B5, #D4A843);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  box-shadow: 0 6px 18px -6px rgba(212, 168, 67, 0.7);
}
/* Built-in art for an article that has no cover yet: gold orb over a gold grid. */
.art-card-fallback {
  position: absolute;
  inset: 0;
  display: block;
  background:
    radial-gradient(60% 80% at var(--gx, 72%) var(--gy, 28%), rgba(244, 213, 114, 0.22), transparent 62%),
    radial-gradient(45% 55% at 18% 88%, rgba(212, 168, 67, 0.12), transparent 70%),
    repeating-linear-gradient(90deg, rgba(212, 168, 67, 0.08) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(212, 168, 67, 0.06) 0 1px, transparent 1px 44px),
    #050505;
}
.art-card-fallback::after {
  content: "";
  position: absolute;
  left: var(--fx, 50%);
  top: var(--fy, 46%);
  width: var(--fs, 30%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, rgba(255, 247, 205, 0.92), rgba(212, 168, 67, 0.55) 36%,
    rgba(120, 80, 20, 0.16) 62%, transparent 71%);
  box-shadow: 0 0 70px rgba(212, 168, 67, 0.32);
}
.art-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 18px 20px;
}
.art-card-meta {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 12px/1.2 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.02em;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.art-sep { color: rgba(212, 168, 67, 0.65); }
.art-card-title {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--text-0);
  text-wrap: balance;
  transition: color 0.3s var(--ease);
}
.art-card:hover .art-card-title { color: #FDE58C; }
.art-card-dek {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.art-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(212, 168, 67, 0.14);
}
.art-card-author {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
}
.art-card-author img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 168, 67, 0.45);
}
.art-card-go {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #F4D572;
  border: 1px solid rgba(212, 168, 67, 0.35);
  background: rgba(212, 168, 67, 0.06);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}
.art-card:hover .art-card-go {
  color: #120F08;
  background: linear-gradient(180deg, #F4D572, #D4A843);
  transform: translate(2px, -2px);
}

/* Featured (latest) card: image left, text right on wide screens. */
.art-card--lead .art-card-link { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.art-card--lead .art-card-media { aspect-ratio: 16 / 10; }
.art-card--lead .art-card-media::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0) 58%, rgba(6, 6, 6, 0.8) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 62%, rgba(6, 6, 6, 0.55) 100%);
}
.art-card--lead .art-card-body { justify-content: center; gap: 14px; padding: 34px 36px; }
.art-card--lead .art-card-foot { margin-top: 6px; }
.art-card--lead .art-card-title { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; }
.art-card--lead .art-card-dek { font-size: 16px; -webkit-line-clamp: 4; }

.art-grid-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.art-grid-title { margin: 0; font-size: 20px; font-weight: 700; color: var(--text-0); }
.art-count {
  font: 500 12px/1 'JetBrains Mono', ui-monospace, monospace;
  color: #E8C16A;
  padding: 5px 9px;
  border: 1px solid rgba(212, 168, 67, 0.3);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.art-rss { margin: 28px 0 0; text-align: center; font-size: 13px; }
.art-rss a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.art-rss a:hover { color: #E8C16A; }

/* ---------- Article cover ---------- */
.post-cover {
  margin: 0 0 30px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(212, 168, 67, 0.22);
  background: #050505;
  box-shadow: 0 30px 70px -40px rgba(212, 168, 67, 0.4);
}
.post-cover picture, .post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Post ---------- */
.post {
  max-width: 760px;
  margin: 0 auto;
}
.post-hero { margin-bottom: 28px; }
.post-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 22px;
}
.post-crumbs a { color: var(--text-3); text-decoration: none; }
.post-crumbs a:hover { color: var(--text-0); }
.post-hero .micro-label { padding: 0; margin-bottom: 14px; }
.post-title {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.1;
  margin-bottom: 16px;
}
.post-dek {
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--text-2);
  margin: 0 0 24px;
}
.post-meta { display: flex; align-items: center; gap: 14px; }
.author-photo img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 168, 67, 0.55);
}
.post-meta-text { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--text-3); }
.post-author a { color: var(--text-0); text-decoration: none; font-weight: 600; }
.post-author a:hover { color: #E8C16A; }

.post-takeaways {
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid rgba(212, 168, 67, 0.4);
  border-left: 3px solid #D4A843;
  padding: 22px 26px;
  margin: 0 0 36px;
}
.post-takeaways h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E8C16A;
  margin: 0 0 12px;
}
.post-takeaways ul { margin: 0; padding-left: 18px; }
.post-takeaways li {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-1);
  margin-bottom: 8px;
}
.post-takeaways li:last-child { margin-bottom: 0; }

.post-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-2);
}
.post-body > p:first-child { font-size: 18.5px; color: var(--text-1); }
.post-body p { margin: 0 0 20px; }
.post-body h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-0);
  margin: 44px 0 14px;
  scroll-margin-top: 110px;
}
.post-body h3 {
  font-size: 19px;
  font-weight: 650;
  color: var(--text-0);
  margin: 30px 0 10px;
}
.post-body strong { color: var(--text-0); }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 22px; }
.post-body li { margin-bottom: 8px; }
.post-body a:not(.cite) {
  color: var(--text-0);
  text-decoration: underline;
  text-decoration-color: rgba(212, 168, 67, 0.7);
  text-underline-offset: 3px;
}
.post-body a:not(.cite):hover { color: #E8C16A; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.post-body th, .post-body td { border: 1px solid var(--line-3); padding: 10px 12px; text-align: left; }
.post-body th { color: var(--text-0); background: rgba(255, 255, 255, 0.04); }

.cite-group { font-size: 0.86em; color: var(--text-3); white-space: normal; }
.cite {
  color: var(--text-3);
  text-decoration: underline;
  text-decoration-color: rgba(176, 184, 196, 0.45);
  text-underline-offset: 2px;
}
.cite:hover { color: #E8C16A; text-decoration-color: #E8C16A; }

.worked-example {
  margin: 28px 0;
  padding: 20px 24px;
  background: rgba(212, 168, 67, 0.07);
  border: 1px solid rgba(212, 168, 67, 0.35);
  color: var(--text-1);
  font-size: 16px;
}
.worked-example p:last-child { margin-bottom: 0; }
.worked-example ul, .worked-example ol { margin-bottom: 12px; }

.todo-list {
  counter-reset: todo;
  list-style: none;
  padding-left: 0 !important;
}
.todo-list li {
  counter-increment: todo;
  position: relative;
  padding: 14px 16px 14px 56px;
  margin-bottom: 10px !important;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid var(--line);
}
.todo-list li::before {
  content: counter(todo);
  position: absolute;
  left: 16px;
  top: 13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid #D4A843;
  color: #E8C16A;
  font-size: 13px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
}
.fit-head + p {
  padding: 16px 20px;
  border-left: 2px solid var(--line-3);
  color: var(--text-2);
}

.post-chart {
  margin: 32px 0;
  padding: 22px 22px 16px;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid var(--line);
}
.post-chart-title {
  font-size: 15px;
  font-weight: 650;
  color: var(--text-0);
  margin-bottom: 14px;
}
.post-chart svg { display: block; width: 100%; height: auto; }
.post-chart .bc-label { fill: #D7DDE8; font-size: 14px; font-family: 'Inter', sans-serif; }
.post-chart .bc-value { fill: #FFFFFF; font-size: 14px; font-weight: 700; font-family: 'Inter', sans-serif; }
.post-chart .bc-track { fill: rgba(255, 255, 255, 0.06); }
.post-chart-source { margin: 12px 0 0 !important; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.post-chart-source a { color: var(--text-3) !important; }

.post-cta {
  margin: 48px 0 40px;
  padding: 30px 28px;
  text-align: center;
  background: rgba(10, 10, 10, 0.86);
  border: 1px solid rgba(212, 168, 67, 0.45);
}
.post-cta-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #E8C16A;
  margin: 0 0 10px;
}
.post-cta-text { font-size: 17px; color: var(--text-1); margin: 0 auto 22px; max-width: 520px; line-height: 1.55; }
.post-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
}
.post-cta-tool { margin: 0; text-decoration: none; border: 1px solid rgba(212, 168, 67, 0.55); }
.post-cta-tool:hover { border-color: #E8C16A; }

.post-faq, .post-sources { margin-top: 40px; }
.post-faq h2, .post-sources h2, .art-related h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--text-0);
  margin: 0 0 16px;
}
/* FAQ cards use the site's own .faq-list / .faq-item / .faq-q / .faq-a (styles.css). */
.post-faq .faq-list { margin-top: 0; max-width: none; }
.post-faq .faq-q:focus-visible { outline: 2px solid #E8C16A; outline-offset: -4px; }

.post-sources ol { padding-left: 22px; margin: 0; }
.post-sources li {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-3);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}
.post-sources .src-pub { color: var(--text-1); font-weight: 600; }
.post-sources a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.post-sources a:hover { color: #E8C16A; }

.post-author-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 22px 24px;
  background: rgba(10, 10, 10, 0.78);
  border: 1px solid var(--line);
}
.post-author-card .author-photo img { width: 64px; height: 64px; }
.post-author-name { margin: 0 0 4px; font-weight: 700; color: var(--text-0); }
.post-author-bio { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-3); }

.art-related { margin-top: 64px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .art-card--lead .art-card-link { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .art-card--lead .art-card-link { grid-template-columns: minmax(0, 1fr); }
  .art-card--lead .art-card-media { aspect-ratio: 16 / 9; }
  .art-card--lead .art-card-media::after { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 46%, rgba(6, 6, 6, 0.78) 100%); }
  .art-card--lead .art-card-body { padding: 22px 22px 20px; }
}
@media (max-width: 720px) {
  .articles-main { padding: 108px 16px 56px; }
  .art-grid { grid-template-columns: minmax(0, 1fr); }
  .post-body { font-size: 16.5px; }
  .post-body > p:first-child { font-size: 17.5px; }
  .post-takeaways { padding: 18px 18px; }
  .post-cta { padding: 26px 18px; }
  .todo-list li { padding-left: 50px; }
  .worked-example { padding: 16px 18px; }
  .post-cover { border-radius: 14px; margin-bottom: 24px; }
}
@media (hover: none) {
  .spotlight-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .art-card, .art-chip, .art-card-media img, .art-card-go, .art-card-title,
  .art-card-media::before, .spotlight-glow { transition: none; }
  .art-card:hover, .art-card:focus-within { transform: none; }
  .art-card:hover .art-card-media img { transform: none; }
  .shine-border:hover::after, .shine-border:focus-within::after { animation: none; opacity: 0.6; }
}
