/* ============================================
   AXIOM 2026 Pro — Single Post CSS
   ============================================ */

/* ===== READING PROGRESS BAR ===== */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(20, 85, 254, 0.12);
  z-index: 9999;
  pointer-events: none;
}

.reading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1455FE 0%, #C7D6FF 100%);
  transition: width 80ms linear;
  box-shadow: 0 0 8px rgba(20, 85, 254, 0.5);
}

/* ===== SINGLE LAYOUT: Main + Sticky TOC Sidebar ===== */
.single-wrapper {
  padding: 2.5rem 0 4rem;
}

.single-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
}

/* ===== BREADCRUMB ===== */
.single-breadcrumb {
  font-size: 0.8125rem;
  color: #848790;
  margin-bottom: 1.25rem;
}

.single-breadcrumb a {
  color: #848790;
  text-decoration: none;
  transition: color 150ms ease;
}

.single-breadcrumb a:hover {
  color: #1455FE;
}

/* ===== CATEGORY BADGE ===== */
.single-category-badge {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  text-decoration: none;
  margin-bottom: 1rem;
  width: fit-content;
}

.single-category-badge:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ===== POST TITLE ===== */
.single-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  color: #090F20;
}

/* ===== AUTHOR / META ===== */
.single-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(20, 85, 254, 0.08);
  margin-bottom: 1.5rem;
}

.single-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.single-author-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #C7D6FF;
}

.single-author-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.single-author-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #090F20;
}

.single-author-role {
  font-size: 0.78rem;
  color: #848790;
}

.single-meta-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #848790;
}

.single-updated {
  color: #1455FE;
  font-size: 0.8rem;
}

/* ===== SHARE STRIP ===== */
.share-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.share-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #848790;
  margin-right: 0.25rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 0.4rem;
  text-decoration: none;
  transition: all 150ms ease;
  border: 1.5px solid rgba(20, 85, 254, 0.2);
  color: #090F20;
  cursor: pointer;
  background: transparent;
}

.share-twitter:hover  { background: #1DA1F2; border-color: #1DA1F2; color: #fff; }
.share-linkedin:hover { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.share-copy:hover     { background: #1455FE; border-color: #1455FE; color: #fff; }
.share-btn.copied     { background: #10B981; border-color: #10B981; color: #fff; }

/* ===== FEATURED IMAGE ===== */
.single-featured-image {
  border-radius: 1rem;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 12px 40px rgba(9, 15, 32, 0.1);
}

.single-hero-img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: cover;
}

.single-img-caption {
  font-size: 0.8125rem;
  color: #848790;
  text-align: center;
  padding: 0.6rem 1rem;
  background: #f8f9fa;
  margin: 0;
}

/* ===== POST CONTENT TYPOGRAPHY ===== */
.single-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #090F20;
}

.single-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: #090F20;
  letter-spacing: -0.02em;
  padding-top: 1rem;
  scroll-margin-top: 6rem;
}

.single-content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: #090F20;
  scroll-margin-top: 6rem;
}

.single-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
  scroll-margin-top: 6rem;
}

.single-content p { margin-bottom: 1.35rem; }

.single-content ul,
.single-content ol {
  margin: 0 0 1.35rem 1.5rem;
}

.single-content li {
  margin-bottom: 0.5rem;
}

.single-content a {
  color: #1455FE;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-content a:hover {
  color: #0D3AD4;
}

.single-content blockquote {
  border-left: 4px solid #1455FE;
  background: rgba(20, 85, 254, 0.04);
  margin: 1.75rem 0;
  padding: 1rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: #090F20;
}

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

.single-content code {
  font-family: var(--font-mono);
  background: rgba(20, 85, 254, 0.07);
  color: #1455FE;
  font-size: 0.875em;
  padding: 0.15em 0.45em;
  border-radius: 0.3rem;
  border: 1px solid rgba(20, 85, 254, 0.12);
}

.single-content pre {
  background: #090F20;
  border-radius: 0.75rem;
  overflow-x: auto;
  padding: 1.5rem;
  margin: 1.75rem 0;
  box-shadow: 0 8px 24px rgba(9, 15, 32, 0.2);
}

.single-content pre code {
  background: transparent;
  border: none;
  color: #C7D6FF;
  font-size: 0.875rem;
  padding: 0;
}

.single-content img {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 4px 20px rgba(9, 15, 32, 0.1);
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.9375rem;
  overflow: hidden;
  border-radius: 0.5rem;
  box-shadow: 0 1px 8px rgba(9, 15, 32, 0.06);
}

.single-content th {
  background: #1455FE;
  color: #ffffff;
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.single-content td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(20, 85, 254, 0.07);
}

.single-content tr:last-child td { border-bottom: none; }
.single-content tr:nth-child(even) td { background: rgba(20, 85, 254, 0.025); }

/* ===== TAGS ===== */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(20, 85, 254, 0.07);
  color: #1455FE;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  text-decoration: none;
  border: 1px solid rgba(20, 85, 254, 0.15);
  transition: all 150ms ease;
}

.tag-pill:hover {
  background: #1455FE;
  color: #ffffff;
  border-color: #1455FE;
  text-decoration: none;
}

/* ===== AUTHOR BIO CARD ===== */
.author-bio-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(20,85,254,0.04) 0%, rgba(199,214,255,0.08) 100%);
  border: 1px solid rgba(20, 85, 254, 0.1);
  border-radius: 1rem;
  padding: 1.75rem;
  margin: 2.5rem 0;
}

.author-bio-avatar {
  width: 80px !important;
  height: 80px !important;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #C7D6FF;
}

.author-bio-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.author-bio-text {
  font-size: 0.9rem;
  color: #848790;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

.author-bio-link {
  color: #1455FE;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.author-bio-link:hover { text-decoration: underline; }

/* ===== RELATED POSTS ===== */
.related-posts {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(20, 85, 254, 0.08);
}

.related-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.related-grid {
  gap: 1.25rem;
}

.related-card {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(20, 85, 254, 0.07);
  background: #fff;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(9, 15, 32, 0.1);
}

.related-thumb-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f0f4ff;
}

.related-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 300ms ease;
}

.related-card:hover .related-thumb {
  transform: scale(1.05);
}

.related-thumb--placeholder {
  background: linear-gradient(135deg, #C7D6FF 0%, #e9eeff 100%);
}

.related-body {
  padding: 0.9rem 1rem;
}

.related-category {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.35rem;
}

.related-post-title {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.5rem;
}

.related-post-title a {
  color: #090F20;
  text-decoration: none;
  transition: color 150ms ease;
}

.related-post-title a:hover { color: #1455FE; text-decoration: none; }

.related-meta {
  font-size: 0.775rem;
  color: #848790;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ===== TOC SIDEBAR ===== */
.single-toc-sidebar {
  position: sticky;
  top: 5rem;
}

.toc-card {
  background: #fff;
  border: 1px solid rgba(20, 85, 254, 0.1);
  border-radius: 0.875rem;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(9, 15, 32, 0.06);
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #090F20;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(20, 85, 254, 0.08);
}

.toc-title svg {
  color: #1455FE;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.toc-nav a {
  display: block;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #848790;
  text-decoration: none;
  padding: 0.35rem 0.5rem;
  border-radius: 0.375rem;
  border-left: 2px solid transparent;
  transition: all 150ms ease;
}

.toc-nav a:hover {
  color: #1455FE;
  background: rgba(20, 85, 254, 0.05);
  border-left-color: rgba(20, 85, 254, 0.3);
}

.toc-nav a.toc-active {
  color: #1455FE;
  background: rgba(20, 85, 254, 0.07);
  border-left-color: #1455FE;
  font-weight: 500;
}

.toc-nav .toc-h3 {
  padding-left: 1rem;
  font-size: 0.775rem;
}

.toc-loading {
  font-size: 0.8125rem;
  color: #848790;
  margin: 0;
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
  .single-title,
  .single-content,
  .single-content h2,
  .single-content h3,
  .single-content h4,
  .single-author-name,
  .author-bio-name,
  .related-post-title a,
  .toc-title {
    color: #F8FAFB;
  }

  .single-content {
    color: #CBD5E1;
  }

  .toc-card,
  .related-card,
  .author-bio-card {
    background: #12192b;
    border-color: rgba(199, 214, 255, 0.08);
  }

  .single-img-caption {
    background: #1a2236;
  }

  .single-meta {
    border-color: rgba(199, 214, 255, 0.08);
  }

  .share-btn {
    color: #F8FAFB;
    border-color: rgba(199, 214, 255, 0.15);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .single-layout {
    grid-template-columns: 1fr;
  }

  .single-toc-sidebar {
    order: -1;
    position: static;
  }

  .toc-card {
    display: none; /* Hide on mobile; TOC moves inline or is omitted */
  }
}

@media (max-width: 768px) {
  .single-title {
    font-size: 1.6rem;
  }

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

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

  .single-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  .single-title {
    font-size: 1.35rem;
  }

  .single-content {
    font-size: 1rem;
  }
}
