@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

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

:root {
  --bg: #f4f7fb;
  --bg-soft: #edf3fb;
  --card: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --border: #d9e3f1;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --accent-3: #ea580c;
  --success: #15803d;
  --warning: #b45309;
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.12), transparent 34%),
    radial-gradient(circle at 92% 10%, rgba(15, 118, 110, 0.12), transparent 36%),
    linear-gradient(to bottom, #f9fbff, var(--bg));
  min-height: 100vh;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  z-index: 100;
  transition: width 0.1s ease;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-content {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.25);
}

.logo-text {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
}

.nav-link {
  padding: 8px 14px;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.cta-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
}

.cta-btn:hover {
  transform: translateY(-1px);
}

.main-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 30px 24px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: 22px;
}

.toc-sidebar,
.sidebar {
  position: sticky;
  top: 92px;
  height: fit-content;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toc-card,
.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

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

.toc-list {
  list-style: none;
}

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

.toc-link {
  display: block;
  padding: 8px 10px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  border-radius: 10px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.toc-link:hover {
  color: var(--accent);
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.25);
}

.toc-link.active {
  color: var(--accent);
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.25);
  font-weight: 700;
}

.article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 34px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 14px;
}

.article h1 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

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

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

.article-content h2 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--text);
  margin: 34px 0 16px;
  scroll-margin-top: 90px;
}

.article-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--accent);
  margin: 22px 0 10px;
}

.article-content p {
  margin-bottom: 14px;
}

.article-content ul,
.article-content ol {
  margin: 12px 0 14px 22px;
}

.article-content li {
  margin-bottom: 8px;
}

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

.feature-box,
.use-case,
.scenario {
  background: #f9fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin: 24px 0;
  scroll-margin-top: 90px;
}

.tip {
  background: rgba(15, 118, 110, 0.08);
  border-left: 4px solid var(--accent);
  padding: 14px 16px;
  margin: 16px 0;
  border-radius: 10px;
}

.warning {
  background: rgba(180, 83, 9, 0.1);
  border-left: 4px solid var(--warning);
  padding: 14px 16px;
  margin: 16px 0;
  border-radius: 10px;
}

.cta-section {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  margin: 34px 0;
}

.cta-section h3 {
  color: white !important;
  margin-top: 0;
  margin-bottom: 8px;
}

.cta-btn-large {
  display: inline-block;
  background: white;
  color: var(--accent);
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 14px;
  transition: all 0.2s;
}

.cta-btn-large:hover {
  transform: translateY(-1px);
}

.sidebar-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-card p {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.6;
}

.sidebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 10px 15px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s;
  width: 100%;
}

.feature-list {
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

.check-icon {
  color: var(--success);
  font-size: 15px;
}

.cross-icon {
  color: #dc2626;
  font-size: 15px;
}

.related-post {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  margin-bottom: 10px;
  background: var(--bg);
}

.related-post:hover {
  border-color: rgba(15, 118, 110, 0.35);
}

.related-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
  flex-shrink: 0;
}

.related-content h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.related-content p {
  font-size: 11px;
  color: var(--text-soft);
  margin: 0;
}

@media (max-width: 1230px) {
  .main-container {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .toc-sidebar {
    display: none;
  }
}

@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 24px 20px;
  }

  .sidebar {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
  }

  .article {
    padding: 26px;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 0 14px;
    height: 62px;
  }

  .nav-links {
    display: none;
  }

  .logo-icon {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .logo-text {
    font-size: 16px;
  }

  .cta-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .main-container {
    padding: 18px 14px;
  }

  .article {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .article-content {
    font-size: 15px;
  }

  .feature-box,
  .use-case,
  .scenario {
    padding: 16px;
    margin: 18px 0;
  }

  .cta-section {
    padding: 22px 16px;
  }
}

@media (max-width: 480px) {
  .logo-subtitle {
    display: none;
  }

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

  .meta {
    gap: 8px;
    font-size: 12px;
  }

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

  .article-content h3 {
    font-size: 17px;
  }

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