/* ============================================================
   ARTICLES — single CSS file for all article pages
   (listing, detail, raw)
   Hero decoration borrowed from listing-page.css so this
   file is self-contained; no listing-page.css needed.
============================================================ */

/* ── Hero decoration keyframes ── */
@keyframes lphOrb1 {
  0%, 100% { transform: translateY(0)      translateX(0); }
  33%       { transform: translateY(-18px)  translateX(12px); }
  66%       { transform: translateY(10px)   translateX(-8px); }
}
@keyframes lphOrb2 {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}
@keyframes lphFloat1 {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  25%       { transform: translateY(-16px) rotate(4deg); }
  75%       { transform: translateY(12px)  rotate(-4deg); }
}
@keyframes lphFloat2 {
  0%, 100% { transform: translateY(0)    translateX(0)   rotate(0deg); }
  40%       { transform: translateY(-12px) translateX(10px) rotate(6deg); }
  80%       { transform: translateY(8px)   translateX(-6px) rotate(-3deg); }
}
@keyframes lphFloat3 {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(180deg); }
}

/* ── Hero decoration elements ── */
.lph-dots {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.032) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.lph-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(88px);
  pointer-events: none;
  will-change: transform;
}
.lph-orb-1 {
  top: -12%; left: -6%;
  width: 520px; height: 520px;
  background: radial-gradient(circle, #00C2FF 0%, transparent 70%);
  opacity: .22;
  animation: lphOrb1 9s ease-in-out infinite;
}
.lph-orb-2 {
  bottom: -12%; right: -5%;
  width: 580px; height: 580px;
  background: radial-gradient(circle, #6C47FF 0%, transparent 70%);
  opacity: .18;
  animation: lphOrb2 13s ease-in-out 2s infinite;
}
.lph-shape {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}
.lph-shape-1 {
  width: 300px; height: 300px;
  top: -48px; right: 6%;
  animation: lphFloat1 17s ease-in-out infinite;
  opacity: .6;
}
.lph-shape-2 {
  width: 190px; height: 190px;
  bottom: 4%; left: 3%;
  animation: lphFloat2 13s ease-in-out 2.5s infinite;
  opacity: .5;
}
.lph-shape-3 {
  width: 100px; height: 100px;
  top: 38%; right: 26%;
  animation: lphFloat3 20s ease-in-out 5s infinite;
  opacity: .35;
}

/* ── Hero ── */
.articles-hero {
  background: var(--navy);
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.articles-hero-inner {
  position: relative;
  z-index: 1;
}
.articles-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 16px;
  line-height: 1.1;
  animation: fadeInUp .7s .2s both;
}
.articles-hero p {
  font-size: 17px;
  color: rgba(255,255,255,.55);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
  animation: fadeInUp .7s .35s both;
}

/* ── Body section ── */
.articles-body {
  background: #F8FAFF;
  padding: 60px 0 100px;
}

/* ── Two-column layout: sidebar + main ── */
.articles-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

/* ── Main content area ── */
.articles-main {
  min-width: 0;
}

/* ── Article list ── */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

/* ================================================================
   SIDEBAR
================================================================ */
.articles-sidebar-wrap {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(10,22,40,.07);
  padding: 24px;
  position: sticky;
  top: 90px;
}

/* Widget block */
.articles-sb-widget {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(10,22,40,.06);
}
.articles-sb-widget:last-of-type {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Widget heading */
.articles-sb-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 10px;
}

/* Search row: input + Go button side by side */
.articles-sb-search-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.articles-sb-search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.articles-sb-search i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 13px;
  pointer-events: none;
}
.articles-sb-search input {
  width: 100%;
  padding: 9px 12px 9px 33px;
  border: 1.5px solid rgba(10,22,40,.1);
  border-radius: 10px;
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  color: var(--navy);
  background: #F8FAFF;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.articles-sb-search input:focus {
  border-color: #6C47FF;
  box-shadow: 0 0 0 3px rgba(108,71,255,.1);
  background: #fff;
}

/* List of radio items (labs, categories) */
.articles-sb-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.articles-sb-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  color: #475569;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
  margin: 0;
}
.articles-sb-item input[type="radio"] { display: none; }
.articles-sb-item:hover {
  background: #F8FAFF;
  color: var(--navy);
}
.articles-sb-item.active {
  background: #EEF2FF;
  color: #6C47FF;
  font-weight: 600;
}
.articles-sb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .7;
}
.articles-sb-check {
  margin-left: auto;
  color: #6C47FF;
  font-size: 13px;
}

/* Tag chips in sidebar */
.articles-sb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.articles-sb-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 100px;
  background: #F1F5F9;
  color: #64748B;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
  margin: 0;
}
.articles-sb-tag input[type="radio"] { display: none; }
.articles-sb-tag:hover {
  background: #E0E7FF;
  color: #4338CA;
}
.articles-sb-tag.active {
  background: var(--navy);
  color: #fff;
}

/* Go button (inline with search) */
.articles-sb-btn-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  background: linear-gradient(135deg, #6C47FF, #00C2FF);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity .2s;
}
.articles-sb-btn-go:hover { opacity: .88; }

/* Clear link */
.articles-sb-btn-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  background: transparent;
  color: #94A3B8;
  border: 1.5px solid rgba(10,22,40,.1);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.articles-sb-btn-clear:hover {
  color: #475569;
  border-color: rgba(10,22,40,.2);
}

/* Result count */
.articles-result-count {
  font-size: 13.5px;
  color: #94A3B8;
  font-family: 'Inter', sans-serif;
  margin-bottom: 0;
}

/* ================================================================
   ARTICLE ROW (horizontal card)
================================================================ */
.article-row {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(10,22,40,.07);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  transition: box-shadow .3s, transform .3s;
}
.article-row:hover {
  box-shadow: 0 12px 40px rgba(10,22,40,.09);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}
.article-row.featured {
  border-color: rgba(0,194,255,.25);
  box-shadow: 0 0 0 1px rgba(0,194,255,.15), 0 4px 20px rgba(0,194,255,.07);
}

/* Image column */
.article-row-img-col {
  width: 40%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.article-row-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}
.article-row:hover .article-row-img { transform: scale(1.04); }
.article-row-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 180px;
  background: linear-gradient(135deg, #6C47FF 0%, #00C2FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: rgba(255,255,255,.35);
}

/* Featured badge overlaid on image */
.article-row-featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: linear-gradient(90deg, #6C47FF, #00C2FF);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}

/* Content column */
.article-row-body {
  flex: 1;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.article-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.article-row-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 8px;
  transition: color .2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-row:hover .article-row-title { color: #6C47FF; }
.article-row-excerpt {
  font-size: 14px;
  color: #64748B;
  line-height: 1.7;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.article-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid rgba(10,22,40,.06);
}
.article-row-author {
  display: flex;
  align-items: center;
  gap: 7px;
}
.article-row-meta-dot {
  color: #CBD5E1;
  font-size: 12px;
}

/* Arrow column */
.article-row-arrow {
  display: flex;
  align-items: center;
  padding: 0 18px;
  font-size: 16px;
  color: #CBD5E1;
  flex-shrink: 0;
  transition: color .2s, transform .2s;
}
.article-row:hover .article-row-arrow {
  color: #6C47FF;
  transform: translateX(3px);
}

/* ================================================================
   SHARED BADGES & META
================================================================ */
.article-cat-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: #EEF2FF;
  color: #6C47FF;
  font-family: 'Space Grotesk', sans-serif;
}
.article-lab-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: #E0F7FF;
  color: #0099CC;
  font-family: 'Space Grotesk', sans-serif;
}
.article-featured-badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: linear-gradient(90deg, #6C47FF, #00C2FF);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
}
.article-tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 100px;
  background: #F1F5F9;
  color: #64748B;
  font-family: 'Inter', sans-serif;
}
.article-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6C47FF, #00C2FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.article-author-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  font-family: 'Inter', sans-serif;
}
.article-card-date {
  font-size: 12px;
  color: #94A3B8;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
}
.article-read-time {
  font-size: 12px;
  color: #94A3B8;
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ================================================================
   ARTICLE DETAIL PAGE
================================================================ */
.article-detail-hero {
  background: var(--navy);
  padding: 100px 0 60px;
  position: relative;
  overflow: hidden;
}
.article-detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.article-detail-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 3.5vw, 44px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-bottom: 20px;
  animation: fadeInUp .7s .2s both;
}
.article-detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp .7s .35s both;
}
.article-detail-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  flex-shrink: 0;
}
.article-detail-meta-item {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  font-family: 'Inter', sans-serif;
  display: flex;
  align-items: center;
  gap: 5px;
}
.article-detail-meta-item i { font-size: 12px; }

/* ── Article body ── */
.article-content-wrap {
  background: #F8FAFF;
  padding: 60px 0 80px;
}
.article-content-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
.article-featured-img {
  width: 100%;
  border-radius: 16px;
  margin-bottom: 40px;
  border: 1px solid rgba(10,22,40,.06);
}

/* Prose */
.article-prose {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(10,22,40,.06);
  padding: 48px;
  font-size: 16px;
  line-height: 1.8;
  color: #374151;
}
.article-prose h2, .article-prose h3, .article-prose h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--navy);
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: .6em;
  line-height: 1.25;
}
.article-prose h2 { font-size: 1.55em; }
.article-prose h3 { font-size: 1.25em; }
.article-prose h4 { font-size: 1.05em; }
.article-prose p { margin-bottom: 1.4em; }
.article-prose a { color: #6C47FF; text-decoration: underline; text-underline-offset: 3px; }
.article-prose a:hover { color: #00C2FF; }
.article-prose ul, .article-prose ol { margin-bottom: 1.4em; padding-left: 1.8em; }
.article-prose li { margin-bottom: .4em; }
.article-prose blockquote {
  border-left: 4px solid #00C2FF;
  padding: 12px 20px;
  background: #F0FAFF;
  border-radius: 0 8px 8px 0;
  margin: 1.6em 0;
  color: #475569;
  font-style: italic;
}
.article-prose img { max-width: 100%; border-radius: 10px; margin: 1.2em 0; }
.article-prose hr { border: none; border-top: 1px solid rgba(10,22,40,.08); margin: 2em 0; }
.article-prose :not(pre) > code {
  background: #F1F5F9;
  border: 1px solid rgba(10,22,40,.1);
  border-radius: 5px;
  padding: 2px 7px;
  font-size: .88em;
  color: #6C47FF;
  font-family: 'Fira Code', 'Consolas', monospace;
}
.article-prose pre { border-radius: 12px; margin: 1.6em 0; overflow-x: auto; font-size: 14px; }
.article-prose pre[class*="language-"] { border-radius: 12px; }

/* ── Article sidebar (detail page) ── */
.article-sidebar { position: sticky; top: 88px; }
.article-sidebar-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(10,22,40,.07);
  padding: 24px;
  margin-bottom: 20px;
}
.article-sidebar-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Related articles */
.related-article-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(10,22,40,.06);
  text-decoration: none;
  transition: opacity .2s;
}
.related-article-item:last-child { border-bottom: none; padding-bottom: 0; }
.related-article-item:hover { opacity: .75; }
.related-article-thumb {
  width: 60px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.related-article-thumb-placeholder {
  width: 60px; height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #6C47FF, #00C2FF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,.5);
}
.related-article-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  font-family: 'Space Grotesk', sans-serif;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-article-date {
  font-size: 11.5px;
  color: #94A3B8;
  margin-top: 3px;
  font-family: 'Inter', sans-serif;
}

/* ── Empty state ── */
.articles-empty {
  text-align: center;
  padding: 60px 20px;
  color: #94A3B8;
}
.articles-empty i { font-size: 48px; display: block; margin-bottom: 16px; }
.articles-empty h3 { font-size: 20px; font-weight: 600; color: #475569; margin-bottom: 8px; }
.articles-empty p { font-size: 15px; margin-bottom: 24px; }

/* ── Pagination ── */
.articles-pagination {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 1024px) {
  /* Detail page: sidebar below content */
  .article-content-inner { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }

  /* Article row: stack image above content */
  .article-row { flex-direction: column; }
  .article-row-img-col { width: 100%; min-height: 200px; }
  .article-row-arrow { display: none; }
}
@media (max-width: 900px) {
  /* Listing: sidebar stacks above articles */
  .articles-layout { grid-template-columns: 1fr; }
  .articles-sidebar-wrap { position: static; }
}
@media (max-width: 768px) {
  .articles-hero { padding: 90px 0 60px; }
  .articles-body { padding: 40px 0 60px; }
  .article-prose { padding: 28px 20px; font-size: 15px; }
  .article-detail-hero { padding: 80px 0 50px; }
}
