/* ===== Blog Article Page (Cinematic Narrative Style) ===== */
.article-theme {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 232, 176, 0.12), transparent 26%),
    radial-gradient(circle at 20% 76%, rgba(96, 216, 255, 0.1), transparent 30%),
    linear-gradient(180deg, #050507 0%, #0a0c12 52%, #050507 100%);
}

.article-theme .ambient {
  opacity: 0.18;
}

.article-theme .ambient-two {
  top: 10rem;
}

.article-theme .site-header::after {
  background: rgba(5, 5, 7, 0.68);
  border-bottom-color: rgba(247, 244, 234, 0.08);
}

.article-page {
  padding: 2rem 0 4rem;
}

.article-container {
  width: min(980px, calc(100% - 2rem));
}

.article-topbar {
  margin-bottom: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 0;
  border: 1px solid rgba(247, 244, 234, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(247, 244, 234, 0.72);
  font-size: 0.95rem;
  font-weight: 800;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(247, 244, 234, 0.36);
  transform: translateX(-2px);
}

.article-panel {
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(5, 5, 7, 0.72);
  border-color: rgba(247, 244, 234, 0.13);
}

.article-header {
  padding-bottom: 1.6rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid rgba(247, 244, 234, 0.13);
}

.article-meta {
  margin-bottom: 0.95rem;
}

.article-category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.2rem 0;
  border-radius: 0;
  background: transparent;
  color: rgba(247, 244, 234, 0.45);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.article-title {
  max-width: 12ch;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.96;
  letter-spacing: 0;
  text-wrap: balance;
}

.article-summary {
  max-width: 48rem;
  margin-top: 1rem;
  color: rgba(247, 244, 234, 0.54);
  font-size: 1.02rem;
}

.article-content {
  color: rgba(247, 244, 234, 0.74);
  font-size: 1rem;
  line-height: 1.9;
}

.article-content > * + * {
  margin-top: 1rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: #f7f4ea;
  line-height: 1.25;
  letter-spacing: 0;
}

.article-content h2 {
  margin-top: 2.8rem;
  font-size: 1.75rem;
}

.article-content h3 {
  margin-top: 2.2rem;
  font-size: 1.34rem;
}

.article-content h4 {
  margin-top: 1.6rem;
  font-size: 1.08rem;
}

.article-content p {
  margin: 0;
}

.article-content ul,
.article-content ol {
  margin: 0;
  padding-left: 1.35rem;
  list-style: disc;
}

.article-content ol {
  list-style: decimal;
}

.article-content li {
  margin: 0.45rem 0;
  color: var(--text-secondary);
}

.article-content strong {
  color: #f7f4ea;
}

.article-content em {
  color: var(--text-secondary);
}

.article-content code {
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(247, 244, 234, 0.14);
  color: #f7f4ea;
  font-family: "SF Mono", "Monaco", monospace;
  font-size: 0.9em;
}

.article-content pre {
  margin: 1.3rem 0;
  padding: 1.1rem 1.2rem;
  overflow-x: auto;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(247, 244, 234, 0.14);
}

.article-content pre code {
  padding: 0;
  background: transparent;
  border: 0;
}

.article-content table {
  width: 100%;
  margin: 1.2rem 0;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid rgba(247, 244, 234, 0.14);
}

.article-content th,
.article-content td {
  padding: 0.85rem 0.95rem;
  text-align: left;
  border-bottom: 1px solid rgba(247, 244, 234, 0.1);
}

.article-content th {
  background: rgba(255, 255, 255, 0.06);
  color: #f7f4ea;
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid rgba(167, 196, 255, 0.14);
}

.wiki-link {
  color: #f7f4ea;
  border-bottom: 1px dashed rgba(247, 244, 234, 0.45);
  transition: color var(--transition), border-color var(--transition);
}

.wiki-link:hover {
  color: var(--text);
  border-bottom-color: rgba(255, 255, 255, 0.4);
}

.wiki-link.broken {
  color: var(--text-muted);
  border-bottom-color: rgba(205, 218, 246, 0.24);
}

@media (max-width: 768px) {
  .article-page {
    padding-top: 1.2rem;
  }

  .article-panel {
    padding: 1.4rem;
  }

  .article-title {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
  }

  .article-summary,
  .article-content {
    font-size: 0.96rem;
  }
}
