/* ============================================================
   blog-detail.css — ORA Technology · Article Detail Page
   ============================================================ */

/* ── SCOPED RESET: stop nav.css global nav styles leaking into sidebar ── */
.toc-sidebar nav,
.toc-sidebar ul,
.toc-sidebar li {
  all: unset;
  display: block;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ── READING PROGRESS BAR ────────────────────────────────── */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1000;
  background: transparent;
}
.read-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #ffaa55);
  border-radius: 0 2px 2px 0;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--o60);
}

/* ══════════════════════════════════════════════════════════
   ARTICLE HERO
══════════════════════════════════════════════════════════ */
.article-hero {
  position: relative;
  z-index: 10; /* always above the sticky TOC sidebar */
  padding-top: 72px;
  background: var(--s);
  overflow: hidden;
}

/* Canvas */
.article-hero .hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* Grain */
.article-hero .hero-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

/* Vignette */
.article-hero .hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    transparent 40%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

/* Accent glows */
.ah-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.ah-glow-1 {
  width: 700px;
  height: 600px;
  top: -200px;
  left: -150px;
  background: radial-gradient(
    ellipse,
    rgba(255, 107, 0, 0.12) 0%,
    transparent 65%
  );
  filter: blur(70px);
  animation: glow-a 14s ease-in-out infinite alternate;
}
.ah-glow-2 {
  width: 500px;
  height: 500px;
  top: -50px;
  right: -100px;
  background: radial-gradient(
    ellipse,
    rgba(255, 107, 0, 0.07) 0%,
    transparent 65%
  );
  filter: blur(90px);
  animation: glow-b 18s ease-in-out infinite alternate;
}
@keyframes glow-a {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(60px, 40px) scale(1.1);
  }
}
@keyframes glow-b {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-40px, 50px) scale(1.08);
  }
}

/* Hero inner layout */
.article-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-family: var(--mono);
  letter-spacing: 0.05em;
}
.breadcrumb a {
  color: var(--w38);
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb span {
  color: var(--w50);
}
.breadcrumb svg {
  color: var(--w22);
  flex-shrink: 0;
}

/* ── META ROW ── */
.ah-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.ah-cat {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--o12);
  border: 1px solid var(--o20);
  padding: 0.25rem 0.72rem;
  border-radius: 4px;
}
.ah-sep {
  color: var(--w22);
  font-size: 0.75rem;
}
.ah-date,
.ah-read {
  font-size: 0.78rem;
  color: var(--w38);
  font-family: var(--mono);
}

/* ── H1 ── */
.article-hero-inner h1 {
  font-size: clamp(2.8rem, 5.2vw, 4.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
}
.article-hero-inner h1 em {
  font-style: normal;
  color: var(--primary);
}

/* ── SUBTITLE ── */
.ah-subtitle {
  font-size: 1.05rem;
  color: var(--w50);
  line-height: 1.8;
  font-weight: 300;
  max-width: 680px;
  margin: 0;
}

/* ── AUTHOR ROW ── */
.ah-author-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.ah-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.ah-author-info {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.ah-author-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--w70);
}
.ah-author-role {
  font-size: 0.72rem;
  color: var(--w38);
  font-family: var(--mono);
}
.ah-share-group {
  margin-left: auto;
  position: relative;
}
.ah-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--w06);
  border: 1px solid var(--w12);
  color: var(--w70);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.ah-share-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--o06);
}
.share-toast {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: #1a1a1a;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.72rem;
  font-family: var(--mono);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 10;
}
.share-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── HERO IMAGE / BANNER ── */
.ah-hero-image {
  position: relative;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  height: 380px;
  margin-top: 1rem;
}
.ah-hero-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    #1a3a5c 0%,
    #0f2540 40%,
    #1a0a00 80%,
    #0a0a0a 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ah-hero-emoji {
  font-size: 9rem;
  position: relative;
  z-index: 2;
  animation: float-hero 7s ease-in-out infinite;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6));
}
@keyframes float-hero {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-18px) rotate(2deg);
  }
}
.ah-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 70% at 50% 60%,
      rgba(255, 107, 0, 0.08) 0%,
      transparent 65%
    ),
    linear-gradient(to bottom, transparent 50%, rgba(5, 5, 5, 0.9) 100%);
}
.ah-hero-chips {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  z-index: 3;
}
.ah-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid var(--w12);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--w70);
  padding: 0.32rem 0.8rem;
  border-radius: 100px;
}
.ah-chip span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    box-shadow: 0 0 0 0 var(--o60);
  }
  50% {
    box-shadow: 0 0 0 5px transparent;
  }
}

/* ── REVEAL ANIMATIONS — pure CSS, no JS dependency ── */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-reveal] {
  opacity: 0;
  animation: reveal-up 0.65s cubic-bezier(0.22, 0.68, 0, 1.15) forwards;
}
[data-reveal="0"] {
  animation-delay: 0.15s;
}
[data-reveal="1"] {
  animation-delay: 0.28s;
}
[data-reveal="2"] {
  animation-delay: 0.4s;
}
[data-reveal="3"] {
  animation-delay: 0.52s;
}
[data-reveal="4"] {
  animation-delay: 0.65s;
}
[data-reveal="5"] {
  animation-delay: 0.78s;
}

/* JS-class toggle kept as a no-op alias so blog-detail.js still works */
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════
   ARTICLE LAYOUT
══════════════════════════════════════════════════════════ */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 0;
  background: #080808;
  min-height: 60vh;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════
   TOC SIDEBAR (LEFT)
══════════════════════════════════════════════════════════ */
.toc-sidebar {
  border-right: 1px solid var(--w08);
  background: #0a0a0a;
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow-y: auto;
  z-index: 1;
}
.toc-sidebar::-webkit-scrollbar {
  width: 3px;
}
.toc-sidebar::-webkit-scrollbar-thumb {
  background: var(--w08);
  border-radius: 3px;
}

.toc-inner {
  position: static;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.5rem;
  background: var(--lm-bg);
}
.toc-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--primary);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}
.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  position: static;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.toc-link {
  display: block;
  font-size: 0.8rem;
  color: var(--w38);
  padding: 0.5rem 0.75rem;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
  line-height: 1.4;
}
.toc-link:hover {
  color: var(--w70);
  background: var(--w03);
}
.toc-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: var(--o06);
  font-weight: 600;
}

/* Progress */
.toc-progress-wrap {
  margin-top: 0.5rem;
}
.toc-progress-label {
  font-size: 0.62rem;
  color: var(--w22);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.toc-progress-bar {
  height: 3px;
  background: var(--w08);
  border-radius: 3px;
  overflow: hidden;
}
.toc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), rgba(255, 107, 0, 0.4));
  border-radius: 3px;
  transition: width 0.15s ease;
}
.toc-progress-pct {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--primary);
  margin-top: 0.35rem;
}

/* ══════════════════════════════════════════════════════════
   ARTICLE CONTENT (CENTER)
══════════════════════════════════════════════════════════ */
.article-content {
  padding-left: 60px;
  padding-top: 50px;
  max-width: 900px;
  margin: 0 auto;
  min-width: 0;
}

/* ── ARTICLE SECTIONS ── */
.article-section {
  margin-bottom: 4rem;
  scroll-margin-top: calc(72px + 2rem);
}

/* H2 in article content */
.article-content h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 1.25rem;
  margin-top: 0;
  padding-top: 1rem;
  position: relative;
}
.article-content h2::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* Lead paragraph */
.lead-paragraph {
  font-size: 1rem;
  color: var(--lm-body) !important;
  line-height: 1.9;
  font-weight: 300;
  margin: 0;
}

.lead-paragraph ul {
  padding: 0 3rem;
}

/* Body paragraphs */
.article-content p {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--w50);
  margin-bottom: 1.4rem;
  font-weight: 300;
}
.article-content p strong {
  color: var(--w70);
  font-weight: 700;
}

/* ── CALLOUT BOXES ── */
.article-callout {
  display: flex;
  gap: 1rem;
  background: rgba(255, 107, 0, 0.06);
  border: 1px solid rgba(255, 107, 0, 0.2);
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}
.callout-info {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.25);
  border-left-color: #3b82f6;
}
.callout-highlight {
  background: rgba(255, 107, 0, 0.08);
  border-color: rgba(255, 107, 0, 0.3);
}
.callout-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  line-height: 1.4;
}
.callout-body {
  font-size: 0.9rem;
  color: var(--w50);
  line-height: 1.7;
}
.callout-body strong {
  color: var(--w70);
  display: block;
  margin-bottom: 0.35rem;
}

/* ── STAT GRID ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.75rem 0;
}
.stat-box {
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.stat-box:hover {
  border-color: var(--o35);
  transform: translateY(-3px);
}
.stat-num {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.65rem;
  color: var(--w38);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-family: var(--mono);
}

/* ── ARTICLE FIGURE ── */
.article-figure {
  margin: 2rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--w08);
}
.article-figure img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.article-figure:hover img {
  transform: scale(1.02);
}
.article-figure figcaption {
  padding: 0.85rem 1.1rem;
  background: #0f0f0f;
  font-size: 0.78rem;
  color: var(--w38);
  font-style: italic;
  border-top: 1px solid var(--w08);
  line-height: 1.5;
}

/* ── COMPANY LIST ── */
.company-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin: 1.5rem 0;
}
.company-card {
  display: flex;
  gap: 0;
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 14px;
  overflow: hidden;
  transition:
    border-color 0.25s,
    transform 0.25s,
    box-shadow 0.25s;
}
.company-card:hover {
  border-color: rgba(255, 107, 0, 0.25);
  transform: translateX(4px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}
.company-card.rank-1 {
  border-color: rgba(255, 107, 0, 0.3);
  background: linear-gradient(135deg, #151515, #110f0a);
  box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.08);
}
.company-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 100%;
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--w22);
  background: var(--w03);
  border-right: 1px solid var(--w08);
  writing-mode: vertical-lr;
  text-orientation: mixed;
  letter-spacing: 0.05em;
}
.company-card.rank-1 .company-rank {
  color: var(--primary);
  background: var(--o06);
  border-right-color: var(--o12);
}
.company-body {
  flex: 1;
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.company-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.company-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
}
.company-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
}
.company-meta {
  font-size: 0.7rem;
  color: var(--w38);
  font-family: var(--mono);
  margin-top: 0.15rem;
}
.company-badge {
  margin-left: auto;
  font-size: 0.58rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.65rem;
  border-radius: 100px;
  border: 1px solid var(--w12);
  color: var(--w38);
  white-space: nowrap;
}
.company-desc {
  font-size: 0.85rem;
  color: var(--w38);
  line-height: 1.65;
  margin: 0;
}
.company-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.company-tags span {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--primary);
  background: var(--o06);
  border: 1px solid var(--o12);
  padding: 0.18rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* ── EMERGING GRID ── */
.emerging-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.emerging-card {
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 12px;
  padding: 1.4rem;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.emerging-card:hover {
  border-color: rgba(255, 107, 0, 0.22);
  transform: translateY(-3px);
}
.emerging-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}
.emerging-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.emerging-card p {
  font-size: 0.8rem;
  color: var(--w38);
  line-height: 1.6;
  margin: 0;
}

/* ── SECTOR LIST ── */
.sector-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.sector-item {
  display: flex;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--w08);
}
.sector-item:last-child {
  border-bottom: none;
}
.sector-num {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--o20);
  line-height: 1;
  flex-shrink: 0;
  width: 40px;
  padding-top: 0.15rem;
}
.sector-content {
  flex: 1;
}
.sector-content h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.sector-content p {
  font-size: 0.85rem;
  color: var(--w38);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.sector-bar {
  height: 4px;
  background: var(--w08);
  border-radius: 4px;
  overflow: hidden;
}
.sector-fill {
  height: 100%;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--primary), rgba(255, 107, 0, 0.35));
  border-radius: 4px;
  animation: bar-fill 1.6s 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes bar-fill {
  from {
    width: 0%;
  }
  to {
    width: var(--w);
  }
}

/* ── OUTLOOK CARDS ── */
.outlook-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.5rem 0;
}
.outlook-card {
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--w08);
}
.outlook-positive {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}
.outlook-caution {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}
.outlook-icon {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.outlook-card h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.85rem;
}
.outlook-card ul {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.outlook-card ul li {
  font-size: 0.82rem;
  color: var(--w38);
  line-height: 1.55;
  padding-left: 1.1rem;
  position: relative;
}
.outlook-card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 0.75rem;
}

/* ── TAGS ── */
.article-tags {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid var(--w08);
  margin-top: 1rem;
}
.tag-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--w38);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.tag-pill {
  font-size: 0.72rem;
  color: var(--w50);
  background: var(--w06);
  border: 1px solid var(--w12);
  padding: 0.28rem 0.75rem;
  border-radius: 100px;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}
.tag-pill:hover {
  color: var(--primary);
  border-color: var(--o35);
  background: var(--o06);
}

/* ── AUTHOR BIO ── */
.author-bio {
  display: flex;
  gap: 1.4rem;
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 16px;
  padding: 2rem;
  margin: 2rem 0;
  align-items: flex-start;
}
.author-bio-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 2px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
}
.author-bio-content {
  flex: 1;
}
.author-bio-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.author-bio-role {
  font-size: 0.72rem;
  color: var(--primary);
  font-family: var(--mono);
  margin-bottom: 0.85rem;
  letter-spacing: 0.04em;
}
.author-bio-content p {
  font-size: 0.88rem;
  color: var(--w38);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}
.author-bio-links {
  display: flex;
  gap: 1rem;
}
.author-bio-links a {
  font-size: 0.8rem;
  color: var(--w50);
  font-weight: 600;
  transition: color 0.2s;
}
.author-bio-links a:hover {
  color: var(--primary);
}

/* ── BACK TO BLOG ── */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--w50);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.72rem 1.4rem;
  border: 1px solid var(--w12);
  border-radius: 8px;
  background: var(--w03);
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  margin-top: 0.5rem;
}
.back-to-blog:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--o06);
}
.back-to-blog svg {
  transition: transform 0.2s;
}
.back-to-blog:hover svg {
  transform: translateX(-4px);
}

/* ══════════════════════════════════════════════════════════
   RELATED SIDEBAR (RIGHT)
══════════════════════════════════════════════════════════ */
.related-sidebar {
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Share panel */
.share-panel {
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 14px;
  padding: 1.3rem;
  position: sticky;
  top: calc(72px + 1.5rem);
}
.share-panel-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--w38);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.share-btns {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.share-icon-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: transparent;
  border: 1px solid var(--w08);
  border-radius: 8px;
  color: var(--w50);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  width: 100%;
  text-align: left;
}
.share-icon-btn:hover {
  border-color: var(--o35);
  color: var(--primary);
  background: var(--o06);
}

/* Related articles */
.related-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--primary);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: -0.75rem;
}
.related-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.related-card {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.85rem;
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 12px;
  text-decoration: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}
.related-card:hover {
  border-color: rgba(255, 107, 0, 0.25);
  background: #161616;
  transform: translateX(3px);
}
.related-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.related-body {
  flex: 1;
  min-width: 0;
}
.related-cat {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.28rem;
}
.related-card h5 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--w70);
  line-height: 1.4;
  margin-bottom: 0.3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.related-card:hover h5 {
  color: var(--primary);
}
.related-read {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--w22);
}

/* Newsletter CTA */
.newsletter-cta {
  background: #111;
  border: 1px solid var(--w08);
  border-radius: 14px;
  padding: 1.3rem;
  position: sticky;
  top: calc(62px + 16rem);
}
.newsletter-cta-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.newsletter-cta h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.newsletter-cta p {
  font-size: 0.8rem;
  color: var(--w38);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.newsletter-form input {
  background: var(--w06);
  border: 1px solid var(--w12);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--white);
  font-family: var(--font);
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input::placeholder {
  color: var(--w22);
}
.newsletter-form input:focus {
  border-color: var(--o35);
}
.newsletter-form button {
  padding: 0.95rem 2.4rem;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s;
}
.newsletter-form button:hover {
  background: transparent;
  color: var(--color-primary);
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .article-layout {
    grid-template-columns: 220px 1fr 250px;
  }
  .article-content {
    padding: 3rem 2.5rem 5rem;
  }
}

@media (max-width: 1100px) {
  .article-layout {
    grid-template-columns: 200px 1fr;
  }
  .related-sidebar {
    display: none;
  }
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .toc-sidebar {
    position: static;
    height: auto;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid var(--w08);
  }
  .toc-inner {
    position: static;
    padding: 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
  }
  .toc-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .toc-link {
    border-left: none;
    border-bottom: 2px solid transparent;
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
  }
  .toc-link.active {
    border-left: none;
    border-bottom-color: var(--primary);
  }
  .toc-progress-wrap {
    display: none;
  }
  .article-content {
    padding: 2rem 1.5rem 4rem;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .emerging-grid {
    grid-template-columns: 1fr;
  }
  .outlook-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .article-hero-inner {
    padding: 2rem 1.25rem 0;
  }
  .ah-hero-image {
    height: 260px;
  }
  .ah-hero-emoji {
    font-size: 6rem;
  }
  .article-hero-inner h1 {
    font-size: 2rem;
  }
  .ah-share-group {
    margin-left: 0;
  }
  .ah-author-row {
    gap: 0.75rem;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
  .company-rank {
    width: 44px;
    font-size: 0.75rem;
  }
  .ah-hero-chips {
    display: none;
  }
  .article-figure img {
    height: 240px;
  }
  .author-bio {
    flex-direction: column;
  }
  .article-content {
    padding: 1.5rem 1rem 3rem;
  }
}


/* ============================================
   CODE BLOCKS — Blog Detail (NFC article)
   Add these to the bottom of BlogDetail.css
   ============================================ */

/* Inline code */
.article-content code {
  font-family: 'Space Mono', monospace;
  font-size: 0.82em;
  background: rgba(255, 107, 0, 0.1);
  color: #ff6b00;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid rgba(255, 107, 0, 0.18);
}

/* Block code */
pre.code-block {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid #ff6b00;
  border-radius: 8px;
  padding: 1.4rem 1.6rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  position: relative;
}

pre.code-block code {
  font-family: 'Space Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #c9d1d9;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

/* Light mode overrides for code blocks */
html[data-theme="light"] pre.code-block {
  background: #f6f8fa !important;
  border-color: rgba(0, 0, 0, 0.09) !important;
  border-left-color: #ff6b00 !important;
}

html[data-theme="light"] pre.code-block code {
  color: #24292f !important;
}

html[data-theme="light"] .article-content code {
  background: rgba(255, 107, 0, 0.07) !important;
  color: #c44d00 !important;
  border-color: rgba(255, 107, 0, 0.15) !important;
}