/**
 * Single Post Styles - Narrative Documentation Design
 * Editorial Magazine + Documentation Hybrid
 * Premium Reading Experience
 */

/* ============================================
   CSS Custom Properties for Single Page
   ============================================ */
.single-article {
  --article-max-width: 720px;
  --sidebar-width: 280px;
  --share-sidebar-width: 60px;
  --content-gap: 4rem;
  --hero-height: 65vh;
  --hero-min-height: 480px;
  --hero-max-height: 720px;
  
  /* Prevent horizontal overflow */
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.single-article * {
  max-width: 100%;
  box-sizing: border-box;
}

.single-article img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   外部TOC（親テーマ・プラグイン）を非表示
   ============================================ */
/* Nishiki Pro のTOCを非表示 */
.article-content .toc,
.article-content .table-of-contents,
.article-content #toc,
.article-content #ez-toc-container,
.article-content .ez-toc-container,
.article-content .wp-block-yoast-seo-table-of-contents,
.article-content [class*="toc-widget"],
.article-content [class*="table-of-content"] {
  display: none !important;
}

/* ============================================
   Reading Progress Bar
   ============================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: calc(var(--z-header) + 10);
  pointer-events: none;
}

.reading-progress__track {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.reading-progress__bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    var(--forest-400) 0%,
    var(--forest-500) 50%,
    var(--gold-400) 100%);
  transition: width 0.15s ease-out;
  box-shadow: 0 0 10px var(--forest-400);
}

/* ============================================
   Left Share Sidebar (Desktop)
   ============================================ */
.share-sidebar {
  position: fixed;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-sticky);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.share-sidebar.is-visible {
  opacity: 1;
  visibility: visible;
}

.share-sidebar__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.share-sidebar__label {
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.share-sidebar__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.share-sidebar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.share-sidebar__btn:hover {
  background: var(--accent-main);
  color: var(--text-invert);
  transform: scale(1.1);
}

.share-sidebar__btn--twitter:hover {
  background: #1DA1F2;
}

.share-sidebar__btn--facebook:hover {
  background: #4267B2;
}

.share-sidebar__btn--hatena:hover {
  background: #00A4DE;
}

.share-sidebar__btn--copy:hover {
  background: var(--accent-main);
}

.share-sidebar__btn--copy.copied {
  background: var(--forest-500);
  color: var(--text-invert);
}

.share-sidebar__progress {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-sidebar__progress-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.share-sidebar__progress-bg {
  stroke: var(--border-soft);
}

.share-sidebar__progress-fill {
  stroke: var(--accent-main);
  stroke-dasharray: 100.53;
  stroke-dashoffset: 100.53;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s ease-out;
}

.share-sidebar__progress-text {
  font-size: 9px;
  font-weight: var(--font-weight-bold);
  color: var(--text-sub);
}

/* ============================================
   Article Hero Section
   ============================================ */
.article-hero {
  position: relative;
  min-height: var(--hero-min-height);
  height: var(--hero-height);
  max-height: var(--hero-max-height);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: var(--header-height);
}

.article-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.article-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* 多層グラデーションで確実な視認性を確保 */
  background:
    /* 下部：最も濃い領域（タイトルエリア） */
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.92) 0%,
      rgba(0, 0, 0, 0.85) 15%,
      rgba(0, 0, 0, 0.7) 35%,
      rgba(0, 0, 0, 0.45) 55%,
      rgba(0, 0, 0, 0.2) 75%,
      rgba(0, 0, 0, 0.05) 100%
    ),
    /* フォレストグリーンのティント */
    linear-gradient(
      to top,
      rgba(13, 31, 23, 0.6) 0%,
      rgba(13, 31, 23, 0.3) 40%,
      transparent 80%
    );
}

.article-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    var(--forest-800) 0%,
    var(--forest-900) 50%,
    var(--neutral-900) 100%);
  z-index: 1;
}

.article-hero__gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(45, 96, 71, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(201, 169, 89, 0.1) 0%, transparent 50%);
}

.article-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: var(--space-xxl) 0;
}

.article-hero__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-sm);
}

.article-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color var(--transition-fast);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

.article-breadcrumb__link:hover {
  color: var(--text-invert);
}

.article-breadcrumb__sep {
  color: rgba(255, 255, 255, 0.6);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

.article-breadcrumb__current {
  color: rgba(255, 255, 255, 0.75);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Taxonomies */
.article-hero__taxonomies {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.article-category-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--accent-main);
  color: #ffffff;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.article-category-badge:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(35, 78, 56, 0.4);
}

.article-category-badge__icon {
  opacity: 0.8;
}

.article-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.article-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: var(--font-size-xs);
  text-decoration: none;
  transition: all var(--transition-fast);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.article-tag-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.article-tag-pill--more {
  background: rgba(201, 169, 89, 0.2);
  border-color: rgba(201, 169, 89, 0.4);
  color: var(--gold-400);
}

/* Hero Title - 完璧な視認性のための多重対策 */
.article-hero__title {
  font-family: var(--font-family-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.6; /* 複数行時の行間を広めに */
  color: #ffffff;
  letter-spacing: -0.01em;
  /* 半透明背景ボックス - 各行に適用 */
  display: inline;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  /* 強化された多重テキストシャドウ */
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 1),
    0 4px 12px rgba(0, 0, 0, 0.9),
    0 6px 20px rgba(0, 0, 0, 0.7),
    0 8px 32px rgba(0, 0, 0, 0.5);
}

/* タイトルコンテナ - 余白調整 */
.article-hero__title-container {
  margin-bottom: var(--space-xl);
  /* 複数行時の行ボックス間隔調整 */
  line-height: 1.8;
}

/* タイトルラッパー（より強い背景が必要な場合のオプション） */
.article-hero__title-wrap {
  display: inline-block;
  padding: var(--space-md) var(--space-lg);
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: var(--space-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.article-hero__title-wrap .article-hero__title {
  background: none;
  padding: 0;
  margin-bottom: 0;
}

/* Hero Meta */
.article-hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.article-hero__author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.article-hero__avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.1);
}

.article-hero__author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-hero__author-name {
  color: #ffffff;
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-base);
  text-decoration: none;
  transition: color var(--transition-fast);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.article-hero__author-name:hover {
  color: var(--gold-400);
}

.article-hero__dates {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.85);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5);
}

.article-hero__updated {
  color: rgba(255, 255, 255, 0.75);
}

.article-hero__stats {
  display: flex;
  gap: var(--space-md);
}

.article-hero__stat {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 2px 4px rgba(0, 0, 0, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.article-hero__stat svg {
  opacity: 0.7;
}

/* ============================================
   Article Layout
   ============================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--content-gap);
  max-width: calc(var(--article-max-width) + var(--sidebar-width) + var(--content-gap));
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg);
  overflow: visible;
}

.article-main {
  max-width: var(--article-max-width);
  width: 100%;
  overflow: visible;
}

/* ============================================
   Article Content
   ============================================ */
.article-content {
  font-family: var(--font-family-body);
  font-size: var(--font-size-md);
  line-height: var(--line-height-loose);
  color: var(--text-main);
}

/* Paragraphs */
.article-content > p {
  margin-bottom: var(--space-lg);
}

.article-content > p:first-of-type {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-sub);
}

/* Drop Cap */
.article-content > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-family-display);
  font-size: 4.5rem;
  line-height: 0.8;
  padding-right: var(--space-sm);
  padding-top: 6px;
  color: var(--accent-main);
  font-weight: var(--font-weight-bold);
}

/* Headings */
.article-content h2 {
  position: relative;
  margin-top: var(--space-xxxl);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  font-family: var(--font-family-display);
  font-size: var(--font-size-xxl);
  font-weight: var(--font-weight-bold);
  color: var(--text-main);
  scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-main), var(--forest-300));
  border-radius: var(--radius-full);
}

.article-content h3 {
  position: relative;
  margin-top: var(--space-xxl);
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
  font-family: var(--font-family-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-main);
  border-left: 4px solid var(--accent-main);
  scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

.article-content h4 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-main);
  scroll-margin-top: calc(var(--header-height) + var(--space-lg));
}

/* Links */
.article-content a {
  color: var(--accent-main);
  text-decoration: underline;
  text-decoration-color: var(--forest-200);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: all var(--transition-fast);
}

.article-content a:hover {
  color: var(--accent-strong);
  text-decoration-color: var(--accent-main);
}

/* Lists */
.article-content ul,
.article-content ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-lg);
}

.article-content ul {
  list-style: none;
}

.article-content ul li {
  position: relative;
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.article-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, var(--accent-main), var(--forest-300));
  border-radius: var(--radius-full);
}

.article-content ol {
  counter-reset: list-counter;
  list-style: none;
}

.article-content ol li {
  position: relative;
  margin-bottom: var(--space-sm);
  padding-left: var(--space-lg);
  counter-increment: list-counter;
}

.article-content ol li::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-main);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  border-radius: var(--radius-full);
}

/* Blockquote */
.article-content blockquote {
  position: relative;
  margin: var(--space-xl) 0;
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--bg-sub) 0%, var(--accent-softer) 100%);
  border-left: 4px solid var(--accent-main);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
  font-style: italic;
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  font-family: var(--font-family-display);
  font-size: 4rem;
  font-weight: var(--font-weight-bold);
  color: var(--accent-main);
  opacity: 0.15;
  line-height: 1;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.article-content code {
  padding: 3px 8px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', monospace;
  font-size: 0.875em;
  color: var(--forest-700);
  background: var(--accent-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.article-content pre {
  position: relative;
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: linear-gradient(180deg, var(--neutral-900) 0%, var(--forest-900) 100%);
  border-radius: var(--radius-xl);
  overflow-x: auto;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.article-content pre::before {
  content: '';
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: flex;
  gap: 6px;
  width: 52px;
  height: 12px;
  background:
    radial-gradient(circle at 6px 6px, #ff5f56 5px, transparent 5px),
    radial-gradient(circle at 26px 6px, #ffbd2e 5px, transparent 5px),
    radial-gradient(circle at 46px 6px, #27ca40 5px, transparent 5px);
}

.article-content pre code {
  display: block;
  padding: var(--space-lg) 0 0 0;
  background: transparent;
  border: none;
  color: var(--neutral-100);
  font-size: var(--font-size-sm);
  line-height: 1.7;
}

/* Images */
.article-content img {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  height: auto;
}

.article-content figure {
  margin: var(--space-xl) 0;
}

.article-content figcaption {
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Tables */
.article-content table {
  width: 100%;
  margin: var(--space-xl) 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-content th,
.article-content td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
}

.article-content th {
  background: var(--gradient-hero);
  color: var(--text-invert);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  letter-spacing: var(--letter-spacing-wide);
}

.article-content tbody tr {
  transition: background-color var(--transition-fast);
}

.article-content tbody tr:hover {
  background-color: var(--accent-soft);
}

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

/* ============================================
   Article Footer (Tags)
   ============================================ */
.article-footer {
  margin-top: var(--space-xxxl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border-soft);
}

.article-tags__header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
}

.article-tags__header svg {
  color: var(--accent-main);
}

.article-tags__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.article-tags__item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-sub);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  color: var(--text-sub);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.article-tags__item:hover {
  background: var(--accent-soft);
  border-color: var(--accent-main);
  color: var(--accent-main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.article-tags__hash {
  color: var(--accent-light);
  font-weight: var(--font-weight-medium);
}

.article-tags__count {
  margin-left: var(--space-xs);
  padding: 2px 6px;
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ============================================
   Author Card
   ============================================ */
.author-card {
  margin-top: var(--space-xxl);
  padding: var(--space-xl);
  background: linear-gradient(135deg, var(--bg-sub) 0%, var(--accent-softer) 100%);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.author-card__header {
  margin-bottom: var(--space-md);
}

.author-card__label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
}

.author-card__body {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.author-card__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.author-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--bg-main);
  box-shadow: var(--shadow-md);
}

.author-card__avatar-ring {
  position: absolute;
  inset: -4px;
  border: 2px solid var(--accent-main);
  border-radius: var(--radius-full);
  opacity: 0.5;
}

.author-card__content {
  flex: 1;
}

.author-card__name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  margin: 0 0 var(--space-xs) 0;
}

.author-card__name a {
  color: var(--text-main);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.author-card__name a:hover {
  color: var(--accent-main);
}

.author-card__bio {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  color: var(--text-sub);
  margin: 0 0 var(--space-md) 0;
}

.author-card__actions {
  display: flex;
  gap: var(--space-sm);
}

.author-card__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--accent-main);
  color: var(--text-invert);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.author-card__btn:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   Post Navigation
   ============================================ */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xxl);
}

.post-nav__item {
  min-height: 120px;
}

.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  height: 100%;
  padding: var(--space-lg);
  background: var(--bg-sub);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.post-nav__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.post-nav__link:hover {
  border-color: var(--accent-main);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.post-nav__link:hover::before {
  opacity: 0.05;
}

.post-nav__direction {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--accent-main);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.post-nav__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--text-main);
  line-height: var(--line-height-snug);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.post-nav__thumb {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100px;
  height: 100%;
  opacity: 0.15;
  overflow: hidden;
}

.post-nav__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-nav__item--next .post-nav__link {
  text-align: right;
}

.post-nav__item--next .post-nav__direction {
  justify-content: flex-end;
}

.post-nav__item--next .post-nav__thumb {
  right: auto;
  left: 0;
}

/* ============================================
   Related Posts Section
   ============================================ */
.related-section {
  margin-top: var(--space-xxxl);
  padding-top: var(--space-xxl);
  border-top: 1px solid var(--border-soft);
}

.related-section__header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.related-section__title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-family-display);
  font-size: var(--font-size-xxl);
  font-weight: var(--font-weight-bold);
  color: var(--text-main);
  margin: 0 0 var(--space-xs) 0;
}

.related-section__title-icon {
  color: var(--accent-main);
}

.related-section__subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.related-card {
  background: var(--bg-main);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base) var(--ease-out-cubic);
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.related-card__link {
  display: block;
  text-decoration: none;
}

.related-card__image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
}

.related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow) var(--ease-out-cubic);
}

.related-card:hover .related-card__image img {
  transform: scale(1.08);
}

.related-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.related-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 31, 23, 0.8), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--space-md);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.related-card:hover .related-card__overlay {
  opacity: 1;
}

.related-card__read {
  padding: var(--space-xs) var(--space-md);
  background: var(--text-invert);
  color: var(--accent-main);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  transform: translateY(10px);
  transition: transform var(--transition-base);
}

.related-card:hover .related-card__read {
  transform: translateY(0);
}

.related-card__content {
  padding: var(--space-md);
}

.related-card__category {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--accent-main);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.related-card__title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  color: var(--text-main);
  margin: 0 0 var(--space-xs) 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card__date {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* ============================================
   Desktop Sidebar TOC
   ============================================ */
.article-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--header-height) + var(--space-lg));
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - var(--space-xxl));
  align-self: start;
  z-index: 10;
}

.toc-panel {
  background: var(--bg-sub);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.toc-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-sub) 100%);
  border-bottom: 1px solid var(--border-soft);
}

.toc-panel__title {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text-main);
  margin: 0;
}

.toc-panel__title svg {
  color: var(--accent-main);
}

.toc-panel__count {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.toc-panel__progress {
  height: 3px;
  background: var(--border-soft);
}

.toc-panel__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-main), var(--gold-400));
  transition: width 0.15s ease-out;
}

.toc-panel__nav {
  max-height: calc(100vh - var(--header-height) - 200px);
  overflow-y: auto;
  padding: var(--space-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--border-main) transparent;
}

.toc-panel__nav::-webkit-scrollbar {
  width: 4px;
}

.toc-panel__nav::-webkit-scrollbar-track {
  background: transparent;
}

.toc-panel__nav::-webkit-scrollbar-thumb {
  background: var(--border-main);
  border-radius: var(--radius-full);
}

.toc-panel__nav a {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--text-sub);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: all var(--transition-fast);
  line-height: var(--line-height-snug);
}

.toc-panel__nav a:hover {
  color: var(--text-main);
  border-left-color: var(--forest-300);
  background: var(--accent-soft);
}

.toc-panel__nav a.active {
  color: var(--accent-main);
  font-weight: var(--font-weight-medium);
  border-left-color: var(--accent-main);
  background: var(--accent-soft);
}

.toc-panel__nav a[data-level="3"] {
  padding-left: var(--space-lg);
  font-size: var(--font-size-xs);
}

.toc-panel__nav a[data-level="4"] {
  padding-left: var(--space-xl);
  font-size: var(--font-size-xs);
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--bg-main);
  color: var(--accent-main);
  border: 2px solid var(--accent-main);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-main);
  color: var(--text-invert);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
  .share-sidebar {
    left: 1rem;
  }

  .article-layout {
    gap: var(--space-xl);
  }

  .article-sidebar {
    --sidebar-width: 250px;
  }
}

@media (max-width: 1024px) {
  .share-sidebar {
    display: none;
  }

  .article-layout {
    grid-template-columns: 1fr;
    max-width: var(--article-max-width);
  }

  .article-sidebar {
    display: none;
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Hero Section */
  .article-hero {
    min-height: 400px;
    height: 50vh;
  }

  .article-hero__container {
    padding: 0 var(--space-md);
  }

  .article-hero__title {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .article-hero__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .article-hero__stats {
    width: 100%;
    justify-content: flex-start;
  }

  /* Article Layout */
  .article-layout {
    padding: var(--space-xl) 0;
  }

  .article-main {
    padding: 0 var(--space-md);
  }

  /* Article Content */
  .article-content {
    font-size: var(--font-size-base);
    padding: 0;
  }

  .article-content > p:first-of-type::first-letter {
    font-size: 3.5rem;
  }

  .article-content h2 {
    font-size: var(--font-size-xl);
    margin-top: var(--space-xxl);
    word-break: keep-all;
  }

  .article-content h3 {
    font-size: var(--font-size-lg);
    word-break: keep-all;
  }

  .article-content pre {
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-xs);
    overflow-x: auto;
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    border-radius: 0;
  }

  .article-content table {
    display: block;
    overflow-x: auto;
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    width: auto;
    min-width: 100%;
  }

  /* Author Card */
  .author-card {
    padding: var(--space-lg);
    margin: 0 var(--space-md);
  }

  .author-card__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .author-card__avatar {
    width: 72px;
    height: 72px;
  }

  /* Post Navigation */
  .post-nav {
    grid-template-columns: 1fr;
    margin: 0 var(--space-md);
  }

  .post-nav__item--next .post-nav__link {
    text-align: left;
  }

  .post-nav__item--next .post-nav__direction {
    justify-content: flex-start;
  }

  /* Related Section */
  .related-section {
    padding: 0 var(--space-md);
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    width: 44px;
    height: 44px;
    right: var(--space-sm);
  }
}

@media (max-width: 480px) {
  /* Root overflow prevention */
  .single-article {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Hero Section */
  .article-hero {
    min-height: 300px;
    padding: var(--space-xl) 0;
  }

  .article-hero__container {
    padding: 0 var(--space-sm);
    max-width: 100%;
  }

  .article-hero__breadcrumb {
    font-size: 11px;
    gap: var(--space-2xs);
  }

  .article-hero__title {
    font-size: 1.375rem;
    line-height: 1.3;
    margin-bottom: var(--space-sm);
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .article-hero__taxonomies {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
  }

  .article-hero__category,
  .article-hero__tags {
    font-size: 11px;
  }

  .article-hero__meta {
    font-size: 11px;
    gap: var(--space-xs);
  }

  /* Article Content */
  .article-layout {
    padding: 0;
  }

  .article-main {
    padding: var(--space-md) var(--space-sm);
    max-width: 100%;
  }

  .article-content {
    font-size: 14px;
    line-height: 1.7;
    padding: 0;
  }

  .article-content > p:first-of-type::first-letter {
    font-size: 2.5rem;
    line-height: 0.8;
  }

  .article-content h2 {
    font-size: 1.25rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .article-content h3 {
    font-size: 1.0625rem;
    margin-top: var(--space-lg);
    margin-bottom: var(--space-xs);
  }

  .article-content h4 {
    font-size: 1rem;
  }

  .article-content p {
    margin-bottom: var(--space-sm);
  }

  .article-content ul,
  .article-content ol {
    padding-left: var(--space-md);
    margin-bottom: var(--space-sm);
  }

  .article-content li {
    margin-bottom: var(--space-xs);
  }

  .article-content blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: var(--space-sm) var(--space-md);
    font-size: 13px;
  }

  .article-content pre {
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
    padding: var(--space-sm);
    font-size: 11px;
    line-height: 1.4;
    border-radius: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-content code {
    font-size: 12px;
    padding: 2px 4px;
  }

  .article-content table {
    display: block;
    margin-left: calc(-1 * var(--space-sm));
    margin-right: calc(-1 * var(--space-sm));
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-content img,
  .article-content figure {
    margin: var(--space-md) 0;
  }

  /* Tags */
  .article-tags {
    margin: var(--space-lg) var(--space-sm);
    padding: var(--space-md);
  }

  .article-tags__list {
    gap: var(--space-xs);
  }

  .article-tags__item {
    padding: 4px var(--space-sm);
    font-size: 11px;
  }

  /* Author Card */
  .author-card {
    padding: var(--space-md);
    margin: var(--space-lg) var(--space-sm);
  }

  .author-card__avatar {
    width: 56px;
    height: 56px;
  }

  .author-card__name {
    font-size: var(--font-size-base);
  }

  .author-card__bio {
    font-size: var(--font-size-xs);
  }

  /* Post Navigation */
  .post-nav {
    margin: 0 var(--space-sm);
  }

  .post-nav__link {
    padding: var(--space-md);
  }

  .post-nav__title {
    font-size: var(--font-size-sm);
  }

  /* Related Section */
  .related-section {
    padding: 0 var(--space-sm);
  }

  .related-section__title {
    font-size: var(--font-size-xl);
  }

  /* Back to Top */
  .back-to-top {
    width: 40px;
    height: 40px;
    right: var(--space-xs);
    bottom: var(--space-sm);
  }
}

/* ============================================
   Extra Small Devices - iPhone SE and smaller
   ============================================ */
@media (max-width: 375px) {
  /* Root container */
  .single-article {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Hero Section - Ultra compact */
  .article-hero {
    min-height: 280px;
    padding: var(--space-lg) 0;
  }

  .article-hero__container {
    padding: 0 12px;
  }

  .article-hero__breadcrumb {
    font-size: 10px;
    gap: 4px;
    margin-bottom: var(--space-xs);
  }

  .article-hero__title {
    font-size: 1.25rem;
    line-height: 1.25;
    margin-bottom: var(--space-xs);
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .article-hero__taxonomies {
    margin-bottom: var(--space-xs);
  }

  .article-hero__category,
  .article-hero__tags {
    font-size: 10px;
    padding: 2px 8px;
  }

  .article-hero__meta {
    font-size: 10px;
    gap: 6px;
  }

  /* Article Content - Ultra compact */
  .article-main {
    padding: var(--space-sm) 12px;
  }

  .article-content {
    font-size: 13px;
    line-height: 1.65;
  }

  .article-content > p:first-of-type::first-letter {
    font-size: 2.25rem;
    line-height: 0.75;
    margin-right: 4px;
  }

  .article-content h2 {
    font-size: 1.125rem;
    margin-top: var(--space-lg);
    margin-bottom: 8px;
  }

  .article-content h3 {
    font-size: 1rem;
    margin-top: var(--space-md);
    margin-bottom: 6px;
  }

  .article-content h4 {
    font-size: 0.9375rem;
  }

  .article-content p {
    margin-bottom: 12px;
  }

  .article-content ul,
  .article-content ol {
    padding-left: 20px;
    margin-bottom: 12px;
  }

  .article-content li {
    margin-bottom: 6px;
  }

  .article-content blockquote {
    padding: 12px;
    font-size: 12px;
    margin: var(--space-md) 0;
  }

  .article-content pre {
    margin-left: -12px;
    margin-right: -12px;
    padding: 10px;
    font-size: 10px;
    line-height: 1.35;
  }

  .article-content code {
    font-size: 11px;
    padding: 1px 3px;
  }

  .article-content table {
    margin-left: -12px;
    margin-right: -12px;
    font-size: 11px;
  }

  .article-content th,
  .article-content td {
    padding: 6px 8px;
  }

  .article-content img,
  .article-content figure {
    margin: var(--space-sm) 0;
  }

  /* Tags - Compact */
  .article-tags {
    margin: var(--space-md) 12px;
    padding: 12px;
  }

  .article-tags__title {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .article-tags__list {
    gap: 6px;
  }

  .article-tags__item {
    padding: 3px 8px;
    font-size: 10px;
  }

  /* Author Card - Compact */
  .author-card {
    padding: 12px;
    margin: var(--space-md) 12px;
    flex-direction: column;
    text-align: center;
  }

  .author-card__avatar {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-xs);
  }

  .author-card__info {
    text-align: center;
  }

  .author-card__name {
    font-size: 14px;
  }

  .author-card__bio {
    font-size: 11px;
    line-height: 1.5;
  }

  /* Post Navigation - Compact */
  .post-nav {
    margin: var(--space-md) 12px;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .post-nav__link {
    padding: 12px;
    min-height: auto;
  }

  .post-nav__label {
    font-size: 10px;
    margin-bottom: 4px;
  }

  .post-nav__title {
    font-size: 13px;
    line-height: 1.4;
  }

  /* Related Section - Compact */
  .related-section {
    padding: var(--space-md) 12px;
  }

  .related-section__title {
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
  }

  .related-grid {
    gap: var(--space-sm);
  }

  .related-card__title {
    font-size: 13px;
  }

  .related-card__meta {
    font-size: 10px;
  }

  /* Back to Top - Ultra compact */
  .back-to-top {
    width: 36px;
    height: 36px;
    right: 4px;
    bottom: 4px;
    font-size: 16px;
  }
}

/* ============================================
   Animations & Effects
   ============================================ */

/* Fade In Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero Content Animation */
.article-hero__content {
  animation: fadeInUp 0.8s var(--ease-out-expo) forwards;
}

.article-breadcrumb {
  animation: fadeIn 0.6s var(--ease-out-cubic) 0.1s both;
}

.article-hero__taxonomies {
  animation: fadeInUp 0.6s var(--ease-out-cubic) 0.2s both;
}

.article-hero__title {
  animation: fadeInUp 0.7s var(--ease-out-cubic) 0.3s both;
}

.article-hero__meta {
  animation: fadeInUp 0.6s var(--ease-out-cubic) 0.4s both;
}

/* Article Content Animation */
.article-content {
  animation: fadeIn 0.6s var(--ease-out-cubic) 0.5s both;
}

/* Scroll-triggered Animations */
.fade-in-view {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-cubic), transform 0.6s var(--ease-out-cubic);
}

.fade-in-view.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Animation for Related Cards */
.related-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s var(--ease-out-cubic) forwards;
}

.related-card:nth-child(1) { animation-delay: 0.1s; }
.related-card:nth-child(2) { animation-delay: 0.2s; }
.related-card:nth-child(3) { animation-delay: 0.3s; }
.related-card:nth-child(4) { animation-delay: 0.4s; }

/* Author Card Animation */
.author-card {
  animation: scaleIn 0.5s var(--ease-out-cubic) forwards;
}

/* Post Navigation Animation */
.post-nav__item {
  opacity: 0;
  transform: translateY(15px);
  animation: fadeInUp 0.5s var(--ease-out-cubic) forwards;
}

.post-nav__item--prev { animation-delay: 0.1s; }
.post-nav__item--next { animation-delay: 0.2s; }

/* TOC Panel Animation */
.toc-panel {
  animation: fadeIn 0.4s var(--ease-out-cubic) 0.3s both;
}

/* Pulse Animation for Active TOC Link */
.toc-panel__nav a.active {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(45, 96, 71, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(45, 96, 71, 0.1);
  }
}

/* Hover Lift Effect */
.hover-lift {
  transition: transform var(--transition-base) var(--ease-out-cubic),
              box-shadow var(--transition-base) var(--ease-out-cubic);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Image Reveal Animation */
.article-content img {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.5s var(--ease-out-cubic), transform 0.5s var(--ease-out-cubic);
}

.article-content img.loaded {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .reading-progress,
  .share-sidebar,
  .article-sidebar,
  .back-to-top,
  .post-nav,
  .related-section {
    display: none !important;
  }

  .article-hero {
    height: auto;
    min-height: auto;
    max-height: none;
  }

  .article-layout {
    display: block;
  }

  .article-content {
    font-size: 12pt;
  }

  /* Remove animations for print */
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .article-hero__content,
  .article-breadcrumb,
  .article-hero__taxonomies,
  .article-hero__title,
  .article-hero__meta,
  .article-content,
  .related-card,
  .author-card,
  .post-nav__item,
  .toc-panel {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
