/* ===== Blog shared styles ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

::selection { background: rgba(0, 175, 240, 0.2); color: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 175, 240, 0.2); border-radius: 3px; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

:root {
  --bg: #FFFFFF;
  --bg-subtle: #F5F5F7;
  --surface: rgba(245, 245, 247, 0.7);
  --border: #E0E0E8;
  --text: #1F1A1E;
  --text-secondary: #606070;
  --text-muted: #A0A0B0;
  --accent: #00AFF0;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --nav-border: rgba(224, 224, 232, 0.5);
  --footer-border: rgba(224, 224, 232, 0.6);
  --code-bg: #F0F0F5;
}

:root.dark {
  --bg: #0A0A0F;
  --bg-subtle: #1A1A1F;
  --surface: rgba(26, 26, 31, 0.7);
  --border: #27272B;
  --text: #FFFFFF;
  --text-secondary: #8888A0;
  --text-muted: #55556A;
  --accent: #00AFF0;
  --nav-bg: rgba(10, 10, 15, 0.8);
  --nav-border: rgba(39, 39, 43, 0.5);
  --footer-border: rgba(39, 39, 43, 0.6);
  --code-bg: #1A1A22;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-secondary);
  min-height: 100vh;
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--nav-bg);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--nav-border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-logo { text-decoration: none; line-height: 0; }
.nav-logo img { height: 40px; width: auto; }

.logo-light { display: block; }
.logo-dark { display: none; }
:root.dark .logo-light { display: none; }
:root.dark .logo-dark { display: block; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 22px; background: #00AFF0; color: #000;
  font-size: 13px; font-weight: 700; border-radius: 10px;
  text-decoration: none; transition: background 0.3s, transform 0.3s;
  letter-spacing: -0.2px;
}
.nav-cta:hover { background: #33C1F5; transform: translateY(-1px); }

/* ===== Article layout ===== */
.article-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}

.article-meta {
  margin-bottom: 32px;
}

.article-category {
  display: inline-block;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: #00AFF0;
  margin-bottom: 12px;
}

.article-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900; letter-spacing: -1.5px;
  line-height: 1.1; color: var(--text);
  margin-bottom: 16px;
}

.article-subtitle {
  font-size: 18px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 16px;
}

.article-date {
  font-size: 14px; color: var(--text-muted); font-weight: 500;
}

/* ===== Table of Contents ===== */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h2 {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  margin-bottom: 12px;
}

.toc ol {
  list-style: none; counter-reset: toc;
  display: flex; flex-direction: column; gap: 8px;
}

.toc li { counter-increment: toc; }

.toc a {
  display: flex; align-items: baseline; gap: 10px;
  text-decoration: none; color: var(--text-secondary);
  font-size: 15px; font-weight: 500;
  transition: color 0.2s;
}

.toc a::before {
  content: counter(toc) ".";
  color: #00AFF0; font-weight: 700;
  min-width: 20px;
}

.toc a:hover { color: #00AFF0; }

/* ===== Article content ===== */
.article-content h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800; color: var(--text);
  letter-spacing: -0.5px; margin: 48px 0 16px;
  padding-top: 16px;
}

.article-content h3 {
  font-size: 19px; font-weight: 700;
  color: var(--text); margin: 32px 0 12px;
}

.article-content p {
  margin-bottom: 16px; font-size: 16px;
  line-height: 1.8; color: var(--text-secondary);
}

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

.article-content li {
  margin-bottom: 8px; font-size: 16px;
  line-height: 1.7; color: var(--text-secondary);
}

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

.article-content a {
  color: #00AFF0; text-decoration: none;
  border-bottom: 1px solid rgba(0, 175, 240, 0.3);
  transition: border-color 0.2s;
}
.article-content a:hover { border-color: #00AFF0; }

/* ===== Key takeaway box ===== */
.takeaway {
  background: rgba(0, 175, 240, 0.05);
  border: 1px solid rgba(0, 175, 240, 0.2);
  border-left: 4px solid #00AFF0;
  border-radius: 12px;
  padding: 20px 24px;
  margin: 32px 0;
}

.takeaway h4 {
  font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: #00AFF0;
  margin-bottom: 8px;
}

.takeaway p, .takeaway li {
  font-size: 15px; color: var(--text-secondary);
}

.takeaway ul { padding-left: 20px; margin-bottom: 0; }

/* ===== Comparison table ===== */
.comparison-table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0; font-size: 14px;
  overflow-x: auto; display: block;
}

.comparison-table th {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 700; font-size: 13px;
  text-align: left; padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.comparison-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}

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

.check { color: #06D6A0; font-weight: 700; }
.cross { color: var(--text-muted); }
.partial { color: #FFD166; font-weight: 600; }

.highlight-col {
  background: rgba(0, 175, 240, 0.06);
  color: var(--text);
  font-weight: 600;
  position: relative;
}

th.highlight-col {
  background: rgba(0, 175, 240, 0.12);
  color: #00AFF0;
}

/* ===== FAQ mini ===== */
.faq-mini { margin: 48px 0; }
.faq-mini h2 { margin-bottom: 16px; }

.faq-mini details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-mini details:hover { border-color: rgba(0, 175, 240, 0.2); }

.faq-mini summary {
  padding: 16px 20px;
  cursor: pointer; font-size: 15px; font-weight: 600;
  color: var(--text); list-style: none; user-select: none;
}
.faq-mini summary::-webkit-details-marker { display: none; }

.faq-mini .faq-a {
  padding: 0 20px 16px;
  font-size: 15px; color: var(--text-secondary); line-height: 1.7;
}

/* ===== CTA box ===== */
.cta-box {
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin: 48px 0;
}

.cta-box h2 {
  font-size: 24px; font-weight: 800; color: var(--text);
  margin: 0 0 8px; letter-spacing: -0.5px;
}

.cta-box p {
  font-size: 16px; color: var(--text-secondary);
  margin-bottom: 24px;
}

.cta-box .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; background: #00AFF0; color: #000;
  font-size: 15px; font-weight: 700; border-radius: 12px;
  text-decoration: none;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.cta-box .btn:hover {
  background: #33C1F5; transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 175, 240, 0.25);
}

/* ===== Footer ===== */
.footer {
  text-align: center; padding: 48px 24px;
  border-top: 1px solid var(--footer-border);
}
.footer-logo { display: flex; justify-content: center; margin-bottom: 20px; line-height: 0; }
.footer-logo img { height: 40px; width: auto; }
.footer-links { display: flex; gap: 32px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: #00AFF0; }
.footer .copy { color: var(--text-muted); font-size: 13px; }

/* ===== Blog index ===== */
.blog-header {
  text-align: center; padding: 120px 24px 48px;
}

.blog-header h1 {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 900; letter-spacing: -2px;
  color: var(--text); margin-bottom: 12px;
}

.blog-header p {
  font-size: 18px; color: var(--text-secondary);
  max-width: 500px; margin: 0 auto;
}

.blog-grid {
  max-width: 900px; margin: 0 auto;
  padding: 0 24px 80px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}
.blog-card:hover {
  border-color: rgba(0, 175, 240, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 175, 240, 0.08);
}

.blog-card .card-category {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: #00AFF0;
  margin-bottom: 10px;
}

.blog-card h2 {
  font-size: 18px; font-weight: 700; color: var(--text);
  line-height: 1.3; margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.blog-card p {
  font-size: 14px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 12px;
}

.blog-card .card-date {
  font-size: 12px; color: var(--text-muted); font-weight: 500;
}

@media (max-width: 640px) {
  .blog-grid { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
}
