:root {
   --primary: #37ca37;
   --secondary: #188bf6;
   --white: #ffffff;
   --smoke: #f5f5f5;
   --gray: #cbd5e0;
   --black: #000000;
   --text-primary: #f5f5f5;
   --text-secondary: #9ba3b5;
   --text-muted: #6b7280;
   --bg-dark: #10141c;
   --bg-card: #1a1f2b;
   --bg-card-hover: #242832;
   --border-color: #2a2f3c;
   --accent-blue: #0257fa;
   --accent-blue-light: #5992ff;
   --accent-green: #3fed6a;
   --headlinefont: "Plus Jakarta Sans";
   --contentfont: "Plus Jakarta Sans";
}

* {
   margin: 0;
   padding: 0;
   box-sizing: border-box;
}

html {
   scroll-behavior: smooth;
}

body {
   font-family: var(--contentfont);
   background-color: var(--bg-dark);
   color: var(--text-primary);
   line-height: 1.7;
   font-size: 17px;
}

/* Background Pattern */
.bg-pattern {
   position: fixed;
   inset: 0;
   background:
      radial-gradient(ellipse at 20% 0%,
         rgba(2, 87, 250, 0.15) 0%,
         transparent 50%),
      radial-gradient(ellipse at 80% 100%,
         rgba(63, 237, 106, 0.1) 0%,
         transparent 50%),
      var(--bg-dark);
   pointer-events: none;
   z-index: -1;
}

/* Container */
.container {
   max-width: 800px;
   margin: 0 auto;
   padding: 0 24px;
}

.container-wide {
   max-width: 1100px;
   margin: 0 auto;
   padding: 0 24px;
}

/* Header inner - kept for compatibility */
/* .header-inner {
   display: flex;
   justify-content: space-between;
   align-items: center;
}

.logo {
   font-size: 24px;
   font-weight: 800;
   color: var(--white);
   text-decoration: none;
}

.logo span {
   color: var(--accent-blue);
}

.header-cta {
   padding: 10px 20px;
   background: var(--accent-blue);
   color: var(--white);
   text-decoration: none;
   border-radius: 8px;
   font-weight: 600;
   font-size: 14px;
   transition: all 0.3s ease;
}

.header-cta:hover {
   background: var(--accent-blue-light);
   transform: translateY(-2px);
} */

/* Hero Section */
.article-hero {
   padding: 80px 0 60px;
   text-align: center;
}

.article-meta {
   display: flex;
   justify-content: center;
   gap: 24px;
   margin-bottom: 24px;
   margin-top: 24px;
   flex-wrap: wrap;
}

.meta-item {
   display: flex;
   align-items: center;
   gap: 8px;
   color: var(--text-secondary);
   font-size: 14px;
}

.meta-item svg {
   width: 18px;
   height: 18px;
   opacity: 0.7;
}

.article-category {
   display: inline-block;
   padding: 6px 16px;
   background: rgba(2, 87, 250, 0.2);
   color: var(--accent-blue-light);
   border-radius: 20px;
   font-size: 13px;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.5px;
   margin-bottom: 20px;
}

.article-title {
   font-size: clamp(32px, 5vw, 52px);
   font-weight: 800;
   line-height: 1.2;
   margin-bottom: 24px;
   background: linear-gradient(135deg,
         var(--white) 0%,
         var(--text-secondary) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.article-subtitle {
   font-size: 20px;
   color: var(--text-secondary);
   max-width: 600px;
   margin: 0 auto;
   line-height: 1.6;
}

/* Bottom Line Highlight */
.bottom-line {
   background: linear-gradient(135deg,
         rgba(63, 237, 106, 0.1) 0%,
         rgba(2, 87, 250, 0.1) 100%);
   border: 1px solid var(--border-color);
   border-left: 4px solid var(--accent-green);
   border-radius: 12px;
   padding: 24px 32px;
}

.bottom-line-label {
   font-size: 12px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: var(--accent-green);
   margin-bottom: 12px;
}

.bottom-line p {
   font-size: 18px;
   line-height: 1.7;
   color: var(--text-primary);
}

/* Article Layout: Two-column grid for desktop */
.article-layout {
   max-width: 1200px;
   margin: 0 auto;
   padding: 0 24px;
   display: grid;
   grid-template-columns: 1fr 280px;
   grid-template-rows: 1fr auto;
   gap: 48px;
}

/* Main content column */
.article-main {
   min-width: 0;
   /* prevent overflow */
}

/* Sidebar right column */
.sidebar-right {
   display: flex;
   flex-direction: column;
   gap: 16px;
}

/* Sticky TOC container */
.toc-sticky {
   position: sticky;
   top: 100px;
   max-height: calc(100vh - 120px);
   overflow-y: auto;
   padding-bottom: 24px;
}

/* Scrollbar styling */
.toc-sticky::-webkit-scrollbar {
   width: 4px;
}

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

.toc-sticky::-webkit-scrollbar-thumb {
   background: var(--border-color);
   border-radius: 4px;
}

/* Table of Contents */
.toc {
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 16px;
   padding: 24px;
   margin: 0;
}

.toc-title {
   font-size: 15px;
   font-weight: 700;
   margin-bottom: 16px;
   display: flex;
   align-items: center;
   gap: 8px;
   color: var(--text-primary);
   text-transform: uppercase;
   letter-spacing: 0.08em;
}

.toc-title svg {
   width: 18px;
   height: 18px;
   color: var(--accent-blue);
   flex-shrink: 0;
}

.toc-list {
   list-style: none;
   overflow-y: auto;
   max-height: 50vh;
   padding-right: 4px;
}

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

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

.toc-list::-webkit-scrollbar-thumb {
   background: var(--border-color);
   border-radius: 4px;
}

.toc-list::-webkit-scrollbar-thumb:hover {
   background: var(--accent-blue);
}

.toc-list>li {
   margin-bottom: 4px;
}

.toc-list a {
   color: var(--text-secondary);
   text-decoration: none;
   font-size: 14px;
   display: flex;
   align-items: flex-start;
   gap: 8px;
   padding: 7px 10px;
   border-radius: 8px;
   transition: all 0.2s ease;
   line-height: 1.4;
}

.toc-list a::before {
   content: "";
   width: 5px;
   height: 5px;
   border-radius: 50%;
   background: var(--border-color);
   flex-shrink: 0;
   margin-top: 6px;
   transition: all 0.2s ease;
}

.toc-list a:hover {
   background: var(--bg-card-hover);
   color: var(--white);
}

.toc-list a:hover::before {
   background: var(--accent-blue);
}

.toc-list a.active {
   background: var(--bg-card-hover);
   color: var(--accent-blue-light);
   font-weight: 600;
}

.toc-list a.active::before {
   background: var(--accent-blue-light);
}

.toc-list .sub-items {
   margin-left: 16px;
   margin-top: 4px;
   border-left: 1px solid var(--border-color);
   padding-left: 8px;
}

.toc-list .sub-items a {
   font-size: 13px;
   padding: 5px 10px;
}

/* Author Box */
.author-box {
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 16px;
   padding: 24px;
   /* Display above TOC visually while staying after it in DOM */
   order: -1;
}

.author-box-label {
   font-size: 11px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.1em;
   color: var(--text-muted);
   margin-bottom: 6px;
}

.author-box-name {
   font-size: 16px;
   font-weight: 700;
   color: var(--white);
   text-decoration: none;
   display: block;
   margin-bottom: 10px;
   transition: color 0.2s ease;
}

.author-box-name:hover {
   color: var(--accent-blue-light);
}

.author-box-bio {
   font-size: 13px;
   line-height: 1.6;
   color: var(--text-secondary);
   margin: 0 0 14px;
}

/* Sidebar Share */
.sidebar-share {
   display: flex;
   flex-direction: column;
   gap: 10px;
}

.sidebar-share-label {
   font-size: 11px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.1em;
   color: var(--text-muted);
}

.sidebar-share-btns {
   display: flex;
   gap: 8px;
}

.sidebar-share-btn {
   display: flex;
   align-items: center;
   gap: 6px;
   padding: 7px 12px;
   background: var(--bg-card-hover);
   border: 1px solid var(--border-color);
   border-radius: 8px;
   color: var(--text-secondary);
   text-decoration: none;
   font-size: 13px;
   font-weight: 500;
   transition: all 0.2s ease;
   flex: 1;
   justify-content: center;
}

.sidebar-share-btn:hover {
   background: var(--accent-blue);
   border-color: var(--accent-blue);
   color: var(--white);
   transform: translateY(-1px);
}

/* Meta Share (hero area) */
.article-meta {
   display: flex;
   justify-content: center;
   gap: 20px;
   margin-bottom: 24px;
   margin-top: 24px;
   flex-wrap: wrap;
   align-items: center;
}

.meta-share {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-left: 8px;
   padding-left: 20px;
   border-left: 1px solid var(--border-color);
}

.meta-share-label {
   font-size: 13px;
   color: var(--text-muted);
   font-weight: 500;
}

.meta-share-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 32px;
   height: 32px;
   border-radius: 8px;
   background: var(--bg-card-hover);
   color: var(--text-secondary);
   text-decoration: none;
   transition: all 0.2s ease;
}

.meta-share-btn:hover {
   background: var(--accent-blue);
   color: var(--white);
   transform: translateY(-1px);
}

/* Bottom Share (end of article) */
.article-share {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 16px;
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 16px;
   padding: 28px;
   margin-top: 48px;
   text-align: center;
}

.article-share-label {
   font-size: 14px;
   font-weight: 600;
   color: var(--text-secondary);
   margin: 0;
}

.article-share-btns {
   display: flex;
   gap: 12px;
   flex-wrap: wrap;
   justify-content: center;
}

.article-share-btn {
   display: flex;
   align-items: center;
   gap: 8px;
   padding: 10px 20px;
   border-radius: 10px;
   background: var(--bg-card-hover);
   border: 1px solid var(--border-color);
   color: var(--text-primary);
   text-decoration: none;
   font-size: 14px;
   font-weight: 600;
   transition: all 0.2s ease;
}

.article-share-btn:hover {
   background: var(--accent-blue);
   border-color: var(--accent-blue);
   color: var(--white);
   transform: translateY(-2px);
   box-shadow: 0 4px 16px rgba(2, 87, 250, 0.3);
}

/* Article Content */
.article-content {
   padding: 0 0 80px;
}

.article-content section:first-of-type {
   scroll-margin-top: 100px;
}

.article-content h2 {
   font-size: 28px;
   font-weight: 700;
   margin: 56px 0 24px;
   padding-top: 80px;
   color: var(--white);
   position: relative;
   line-height: 150%;
}

.article-content h2:first-of-type {
   margin-top: 0;
}

.article-content h3 {
   font-size: 22px;
   font-weight: 600;
   margin: 40px 0 16px;
   color: var(--white);
}

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

.article-content p strong {
   color: var(--white);
}

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

.article-content li {
   margin-bottom: 12px;
   color: var(--text-secondary);
}

.article-content li strong {
   color: var(--white);
}

/* Article Image */
.article-image {
   margin: 32px 0;
   border-radius: 12px;
   overflow: hidden;
   border: 1px solid var(--border-color);
}

.article-image img {
   width: 100%;
   height: auto;
   display: block;
}

.article-image figcaption {
   padding: 12px 16px;
   background: var(--bg-card);
   border-top: 1px solid var(--border-color);
   font-size: 13px;
   color: var(--text-muted);
   text-align: center;
   line-height: 1.5;
}

/* Comparison Table */
.comparison-table-wrapper {
   margin: 32px 0;
   overflow-x: auto;
}

.comparison-table {
   width: 100%;
   border-collapse: collapse;
   background: var(--bg-card);
   border-radius: 16px;
   overflow: hidden;
   border: 1px solid var(--border-color);
}

.comparison-table thead {
   background: var(--bg-card-hover);
}

.comparison-table th {
   padding: 20px 24px;
   text-align: left;
   font-weight: 700;
   font-size: 15px;
   color: var(--white);
   border-bottom: 2px solid var(--border-color);
}

.comparison-table th:first-child {
   color: var(--text-secondary);
}

.comparison-table td {
   padding: 18px 24px;
   border-bottom: 1px solid var(--border-color);
   color: var(--text-secondary);
   font-size: 15px;
}

.comparison-table tr:last-child td {
   border-bottom: none;
}

.comparison-table tr:hover td {
   background: var(--bg-card-hover);
}

.comparison-table .metric-name {
   font-weight: 600;
   color: var(--white);
}

.comparison-table .highlight-green {
   color: var(--accent-green);
   font-weight: 600;
}

.comparison-table .highlight-blue {
   color: var(--accent-blue-light);
   font-weight: 600;
}

/* Callout Boxes */
.callout {
   padding: 24px 28px;
   border-radius: 12px;
   margin: 32px 0;
   display: flex;
   gap: 16px;
}

.callout-info {
   background: rgba(2, 87, 250, 0.1);
   border: 1px solid rgba(2, 87, 250, 0.3);
}

.callout-warning {
   background: rgba(246, 173, 85, 0.1);
   border: 1px solid rgba(246, 173, 85, 0.3);
}

.callout-icon {
   flex-shrink: 0;
   width: 24px;
   height: 24px;
}

.callout-info .callout-icon {
   color: var(--accent-blue);
}

.callout-warning .callout-icon {
   color: var(--orange);
}

.callout p {
   margin: 0;
   color: var(--text-secondary);
}

/* FAQ Section */
.faq-section {
   margin: 60px 0;
}

.faq-title {
   font-size: 28px;
   font-weight: 700;
   text-align: center;
   margin-bottom: 40px;
}

.faq-item {
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 12px;
   margin-bottom: 16px;
   overflow: hidden;
}

.faq-question {
   padding: 20px 24px;
   cursor: pointer;
   display: flex;
   justify-content: space-between;
   align-items: center;
   font-weight: 600;
   color: var(--white);
   transition: all 0.2s ease;
}

.faq-question:hover {
   background: var(--bg-card-hover);
}

.faq-question svg {
   width: 20px;
   height: 20px;
   transition: transform 0.3s ease;
   flex-shrink: 0;
   margin-left: 16px;
}

.faq-item.active .faq-question svg {
   transform: rotate(180deg);
}

.faq-answer {
   max-height: 0;
   overflow: hidden;
   transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
   max-height: 500px;
}

.faq-answer-content {
   padding: 0 24px 20px;
   color: var(--text-secondary);
}

/* Author Bio */
.author-bio {
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 16px;
   padding: 32px;
   margin: 60px 0;
   display: flex;
   gap: 24px;
   align-items: flex-start;
}

.author-avatar {
   width: 80px;
   height: 80px;
   border-radius: 50%;
   background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 32px;
   font-weight: 700;
   color: var(--white);
   flex-shrink: 0;
}

.author-info h4 {
   font-size: 18px;
   font-weight: 700;
   margin-bottom: 12px;
   color: var(--white);
}

.author-info p {
   font-size: 15px;
   color: var(--text-secondary);
   line-height: 1.7;
}

/* CTA Section */
.cta-section {
   background: linear-gradient(135deg,
         rgba(2, 87, 250, 0.2) 0%,
         rgba(63, 237, 106, 0.1) 100%);
   border: 1px solid var(--border-color);
   border-radius: 24px;
   padding: 60px 40px;
   text-align: center;
   margin: 80px 0;
}

.cta-section h2 {
   font-size: 32px;
   font-weight: 800;
   margin-bottom: 16px;
   background: linear-gradient(135deg,
         var(--white) 0%,
         var(--accent-blue-light) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

.cta-section p {
   font-size: 18px;
   color: var(--text-secondary);
   margin-bottom: 32px;
   max-width: 500px;
   margin-left: auto;
   margin-right: auto;
}

.cta-buttons {
   display: flex;
   justify-content: center;
   gap: 16px;
   flex-wrap: wrap;
}

.btn-primary {
   padding: 16px 32px;
   background: var(--accent-blue);
   color: var(--white);
   text-decoration: none;
   border-radius: 10px;
   font-weight: 700;
   font-size: 16px;
   transition: all 0.3s ease;
   display: inline-flex;
   align-items: center;
   gap: 8px;
}

.btn-primary:hover {
   background: var(--accent-blue-light);
   transform: translateY(-3px);
   box-shadow: 0 10px 30px rgba(2, 87, 250, 0.3);
}

.btn-secondary {
   padding: 16px 32px;
   background: transparent;
   color: var(--white);
   text-decoration: none;
   border-radius: 10px;
   font-weight: 600;
   font-size: 16px;
   border: 2px solid var(--border-color);
   transition: all 0.3s ease;
}

.btn-secondary:hover {
   border-color: var(--accent-blue);
   background: rgba(2, 87, 250, 0.1);
}

/* Author Bio (in article) */
.article-author {
   display: flex;
   gap: 24px;
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 16px;
   padding: 28px;
   margin-top: 48px;
   align-items: flex-start;
}

.article-author-avatar {
   flex-shrink: 0;
   width: 80px;
   height: 80px;
   border-radius: 50%;
   overflow: hidden;
   border: 2px solid var(--border-color);
}

.article-author-avatar img {
   width: 100%;
   height: 100%;
   object-fit: cover;
}

.article-author-info {
   flex: 1;
}

.article-author-label {
   font-size: 12px;
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.08em;
   color: var(--text-muted);
   margin-bottom: 4px;
}

.article-author-name {
   font-size: 20px;
   font-weight: 700;
   color: var(--white);
   text-decoration: none;
   display: block;
   margin-bottom: 2px;
   transition: color 0.2s ease;
}

.article-author-name:hover {
   color: var(--accent-blue-light);
}

.article-author-role {
   font-size: 14px;
   color: var(--accent-blue-light);
   font-weight: 500;
   margin-bottom: 12px;
}

.article-author-bio {
   font-size: 15px;
   line-height: 1.7;
   color: var(--text-secondary);
   margin-bottom: 16px;
}

.article-author-socials {
   display: flex;
   gap: 12px;
}

.social-link {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 36px;
   height: 36px;
   border-radius: 8px;
   background: var(--bg-card-hover);
   color: var(--text-secondary);
   text-decoration: none;
   transition: all 0.2s ease;
}

.social-link:hover {
   background: var(--accent-blue);
   color: var(--white);
   transform: translateY(-2px);
}

/* Related Articles */
.related-section {
   padding: 60px 0;
   border-top: 1px solid var(--border-color);
}

.related-title {
   font-size: 24px;
   font-weight: 700;
   margin-bottom: 32px;
}

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

.related-card {
   background: var(--bg-card);
   border: 1px solid var(--border-color);
   border-radius: 12px;
   padding: 24px;
   text-decoration: none;
   transition: all 0.3s ease;
}

.related-card:hover {
   border-color: var(--accent-blue);
   transform: translateY(-4px);
}

.related-card h4 {
   font-size: 16px;
   font-weight: 600;
   color: var(--white);
   margin-bottom: 8px;
}

.related-card p {
   font-size: 14px;
   color: var(--text-secondary);
}

/* Footer */
/* .site-footer {
   background: var(--bg-card);
   border-top: 1px solid var(--border-color);
   padding: 40px 0;
   margin-top: 60px;
}

.footer-inner {
   display: flex;
   justify-content: space-between;
   align-items: center;
   flex-wrap: wrap;
   gap: 20px;
}

.footer-copy {
   color: var(--text-muted);
   font-size: 14px;
}

.footer-links {
   display: flex;
   gap: 24px;
}

.footer-links a {
   color: var(--text-secondary);
   text-decoration: none;
   font-size: 14px;
   transition: color 0.2s ease;
}

.footer-links a:hover {
   color: var(--accent-blue);
} */

/* Reading Progress */
.reading-progress {
   position: fixed;
   top: 0;
   left: 0;
   width: 0%;
   height: 3px;
   background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
   z-index: 1001;
   transition: width 0.1s ease;
}

.toc.toc-desktop {
   display: block;
}

.toc.toc-mobile {
   display: none;
}

/* Responsive */
@media (max-width: 768px) {
   .toc.toc-mobile {
      display: block;
   }

   .article-hero {
      padding: 160px 0 40px;
   }

   .article-title {
      font-size: 28px;
   }

   .article-subtitle {
      font-size: 17px;
   }

   .article-content h2 {
      font-size: 40px;
   }

   .comparison-table th,
   .comparison-table td {
      padding: 14px 16px;
      font-size: 14px;
   }

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

   .cta-section {
      padding: 40px 24px;
   }

   .cta-section h2 {
      font-size: 24px;
   }

   .article-layout {
      grid-template-columns: 1fr;
      gap: 0;
      padding: 0 16px;
   }

   .container {
      padding: 0 16px;
   }

   .article-main {
      min-width: 0;
   }

   .sidebar-right {
      display: none;
   }

   .toc {
      padding: 20px;
   }

   .toc.toc-desktop {
      display: none;
   }

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

   .article-author-avatar {
      width: 72px;
      height: 72px;
   }

   .article-author-socials {
      justify-content: center;
   }

   .bottom-line {
      margin-top: 80px;
   }
}