:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #e0e7ff;
  --dark-bg: #0f172a;
  --card-bg: #ffffff;
  --body-bg: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --accent: #10b981;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Header & Navigation */
header.site-header {
  background-color: var(--dark-bg);
  border-bottom: 2px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-logo .logo-accent {
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.site-logo .logo-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #312e81;
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

nav.main-nav a {
  color: #cbd5e1;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

nav.main-nav a:hover, nav.main-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

/* Main Article Content */
article.main-article {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--primary-light);
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

h1.article-title {
  font-size: 2.35rem;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.meta-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.meta-author img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary-light);
}

.meta-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #059669;
  font-weight: 600;
  background: #ecfdf5;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Hero & Body Images */
figure.article-image {
  margin: 1.75rem 0;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
}

figure.article-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

figcaption {
  font-size: 0.85rem;
  color: #64748b;
  padding: 0.6rem 0.8rem;
  background: #f1f5f9;
  border-left: 3px solid var(--primary);
  font-style: italic;
}

/* Typography Inside Article */
.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  scroll-margin-top: 80px;
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 80px;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: #334155;
  line-height: 1.8;
}

.article-body strong {
  color: #0f172a;
  font-weight: 700;
}

.article-body ul, .article-body ol {
  margin: 1.25rem 0 1.5rem 1.75rem;
  color: #334155;
}

.article-body li {
  margin-bottom: 0.6rem;
  line-height: 1.7;
}

/* Comparison Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.93rem;
}

th {
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-weight: 700;
  white-space: nowrap;
}

td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  color: #334155;
}

tr:nth-child(even) td {
  background-color: #f8fafc;
}

tr:hover td {
  background-color: #f1f5f9;
}

/* Table of Contents */
.toc-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem 0;
}

.toc-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-box li {
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.toc-box a {
  color: #475569;
  display: inline-block;
}

.toc-box a:hover {
  color: var(--primary);
  font-weight: 600;
}

/* Sidebar */
aside.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

.sidebar-list {
  list-style: none;
}

.sidebar-list li {
  margin-bottom: 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid #f1f5f9;
}

.sidebar-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-list a {
  font-size: 0.92rem;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.4;
  display: block;
}

.sidebar-list a:hover {
  color: var(--primary);
}

/* Author Box */
.author-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.75rem;
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.author-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.author-info h4 {
  font-size: 1.15rem;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.author-info .author-role {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.author-info p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

/* Disclaimer Notice */
.disclosure-notice {
  font-size: 0.8rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-top: 2rem;
  line-height: 1.5;
}

/* Footer */
footer.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 1.5rem 2rem 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid #1e293b;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Grid & Cards for Home / Category Pages */
.hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #ffffff;
  padding: 3.5rem 2rem;
  border-radius: 16px;
  margin-bottom: 3rem;
  text-align: center;
}

.hero-banner h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}

.hero-banner p {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 750px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.card-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #0f172a;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-wrap img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin: 0.5rem 0 0.75rem 0;
}

.card-excerpt {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.75rem;
}
