/* Cover Section */
.article-cover {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.cover-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(45, 42, 46, 0.95) 0%,
    rgba(45, 42, 46, 0.7) 50%,
    rgba(45, 42, 46, 0.2) 100%
  );
}

[data-theme="dark"] .cover-overlay {
  background: linear-gradient(
    to top,
    rgba(34, 31, 34, 0.98) 0%,
    rgba(34, 31, 34, 0.8) 50%,
    rgba(34, 31, 34, 0.3) 100%
  );
}

.cover-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  width: 100%;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.9rem;
  color: rgba(252, 252, 250, 0.7);
}

.breadcrumb a {
  color: rgba(252, 252, 250, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--vibrant-burgundy);
}

.breadcrumb-separator {
  color: rgba(252, 252, 250, 0.5);
}

.article-category {
  display: inline-block;
  background: rgba(255, 97, 136, 0.2);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 97, 136, 0.4);
  color: var(--vibrant-burgundy);
  padding: 8px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

.article-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fcfcfa;
  margin-bottom: 24px;
  line-height: 1.1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: rgba(252, 252, 250, 0.8);
  font-size: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-separator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(252, 252, 250, 0.5);
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6188, #ab9df2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fcfcfa;
}

/* Article Container */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}

/* Content Styles */
.article-content {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5em;
}

.article-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 2em 0 0.8em;
  line-height: 1.2;
}

.article-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 1.8em 0 0.6em;
  line-height: 1.3;
}

.article-content h4 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 1.5em 0 0.5em;
}

.article-content strong {
  font-weight: 700;
  color: var(--vibrant-burgundy);
}

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

.article-content a {
  color: var(--vibrant-burgundy);
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 97, 136, 0.3);
  transition: all 0.3s ease;
}

.article-content a:hover {
  border-bottom-color: var(--vibrant-burgundy);
}

/* Code Blocks */
.article-content code {
  font-family: "JetBrains Mono", monospace;
  background: rgba(171, 157, 242, 0.1);
  border: 1px solid rgba(171, 157, 242, 0.2);
  color: var(--radiant-purple);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

.article-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  overflow-x: auto;
  margin: 2em 0;
  box-shadow: 0 4px 16px var(--shadow-color);
}

.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
  font-size: 0.95em;
}

/* Blockquotes */
.article-content blockquote {
  border-left: 4px solid var(--vibrant-burgundy);
  padding-left: 28px;
  margin: 2em 0;
  font-family: "Playfair Display", serif;
  font-size: 1.3rem;
  font-style: italic;
  color: var(--text-secondary);
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  left: -10px;
  top: -20px;
  font-size: 4rem;
  color: rgba(255, 97, 136, 0.2);
  font-family: "Playfair Display", serif;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.article-content li {
  margin-bottom: 0.5em;
}

.article-content ul li::marker {
  color: var(--vibrant-burgundy);
}

.article-content ol li::marker {
  color: var(--vibrant-burgundy);
  font-weight: 700;
}

/* Images */
.article-content img {
  width: 100%;
  border-radius: 16px;
  margin: 2em 0;
  box-shadow: 0 8px 32px var(--shadow-color);
}

.article-content figure {
  margin: 2em 0;
}

.article-content figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 12px;
  font-style: italic;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow-color);
}

.article-content thead {
  background: linear-gradient(
    135deg,
    rgba(255, 97, 136, 0.1),
    rgba(171, 157, 242, 0.1)
  );
}

.article-content th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: 2px solid var(--glass-border);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
}

.article-content td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-primary);
}

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

.article-content tbody tr:hover {
  background: rgba(255, 97, 136, 0.05);
}

/* Tags Section */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 3em 0;
  padding: 2em 0;
  border-top: 1px solid rgba(147, 146, 147, 0.2);
  border-bottom: 1px solid rgba(147, 146, 147, 0.2);
}

.tag {
  background: rgba(255, 97, 136, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 97, 136, 0.3);
  color: var(--vibrant-burgundy);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tag:hover {
  background: rgba(255, 97, 136, 0.2);
  border-color: rgba(255, 97, 136, 0.5);
  transform: translateY(-2px);
}

/* Social Share */
.social-share {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  margin: 3em 0;
  box-shadow: 0 8px 32px var(--shadow-color);
}

.share-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  border: none;
  outline: none;
}

.share-btn svg {
  width: 20px;
  height: 20px;
}

.share-linkedin {
  background: #0a66c2;
  color: #fff;
}

.share-linkedin:hover {
  background: #004182;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 102, 194, 0.4);
}

.share-twitter {
  background: #000000;
  color: #fff;
}

.share-twitter:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.share-facebook {
  background: #1877f2;
  color: #fff;
}

.share-facebook:hover {
  background: #0d5dbf;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.4);
}

.share-reddit {
  background: #ff4500;
  color: #fff;
}

.share-reddit:hover {
  background: #cc3700;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 69, 0, 0.4);
}

/* Related Posts */
.related-posts {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px;
  background: var(--bg-secondary);
}

.related-header {
  text-align: center;
  margin-bottom: 60px;
}

.related-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.related-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
}

.related-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(255, 97, 136, 0.25);
  border-color: rgba(255, 97, 136, 0.3);
}

.related-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.related-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.related-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
}

.related-content {
  padding: 24px;
}

.related-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
}

.related-card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.related-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6188, #fc5fa3);
  color: #fcfcfa;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(255, 97, 136, 0.4);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  pointer-events: none;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 48px rgba(255, 97, 136, 0.5);
}

/* Responsive */
@media (max-width: 968px) {
  .article-cover {
    height: 60vh;
    min-height: 400px;
  }

  .cover-content {
    padding: 60px 24px;
  }

  .article-title {
    font-size: 2.5rem;
  }

  .article-container {
    padding: 40px 24px 60px;
  }

  .article-content {
    font-size: 1.05rem;
  }

  .article-content h2 {
    font-size: 2rem;
  }

  .article-content h3 {
    font-size: 1.5rem;
  }

  .related-posts {
    padding: 60px 24px;
  }

  .related-title {
    font-size: 2rem;
  }

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

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    width: 100%;
    justify-content: center;
  }

  .theme-toggle {
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .theme-icon {
    width: 24px;
    height: 24px;
  }

  .back-to-top {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 640px) {
  .article-title {
    font-size: 2rem;
  }

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

  .article-content h3 {
    font-size: 1.3rem;
  }

  .article-content table {
    font-size: 0.85rem;
  }

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
