:root {
  --primary: #8b5cf6;
  --primary-dark: #7c3aed;
  --bg: #ffffff;
  --bg-secondary: #fafbfc;
  --bg-elevated: #f4f5f7;
  --text-primary: #000000;
  --text-secondary: #4b5563;
  --text-tertiary: #6b7280;
  --border: #e5e7eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 64px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  background: #e9d5ff;
  animation: bgFlash 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
  color: var(--text-primary);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

@keyframes bgFlash {
  0% {
    background: #e9d5ff;
  }
  100% {
    background: #fff;
  }
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(90deg, #e9d5ff 0%, #f3e8ff 50%, #fff 100%);
  background-size: 300% 100%;
  animation: bgFlowLR 8s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes bgFlowLR {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 0%;
  }
}

body > nav,
.page,
footer {
  position: relative;
  z-index: 1;
}

/* Landing-page nav style */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.7;
}

.logo-mark {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.logo-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-link {
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.page {
  max-width: 1240px;
  margin: 0 auto;
  padding: 120px var(--spacing-md) var(--spacing-xl);
}

.blog-home {
  max-width: 1240px;
}

.blog-hero {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  color: #f8fbff;
  margin-bottom: 24px;
  background:
    linear-gradient(172deg, rgba(11, 18, 47, 0.76), rgba(16, 17, 41, 0.58)),
    linear-gradient(135deg, #24d1ff 0%, #2444ff 37%, #7e2fdf 68%, #e1610f 100%);
  box-shadow: 0 16px 32px rgba(10, 13, 31, 0.24);
}

.blog-kicker {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 12px;
}

.blog-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 920px;
  margin-bottom: 14px;
}

.blog-lead {
  max-width: 760px;
  color: rgba(247, 250, 255, 0.94);
  font-size: clamp(16px, 2.1vw, 21px);
  line-height: 1.56;
  margin-bottom: 24px;
}

.subscribe-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 640px;
  margin-bottom: 10px;
}

.subscribe-input-wrap {
  flex: 1;
}

.subscribe-form input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.33);
  border-radius: 10px;
  background: rgba(11, 13, 27, 0.32);
  color: #ffffff;
  padding: 0 14px;
  font-size: 15px;
}

.subscribe-form input::placeholder {
  color: rgba(235, 238, 248, 0.76);
}

.subscribe-form input:focus {
  outline: 2px solid rgba(240, 243, 255, 0.55);
  outline-offset: 0;
}

.subscribe-form button {
  height: 46px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  background: #ffffff;
  color: #0f1223;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.subscribe-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.2);
}

.subscribe-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.subscribe-status {
  min-height: 22px;
  font-size: 14px;
  color: rgba(242, 246, 255, 0.86);
}

.subscribe-status.success {
  color: #d2ffd8;
}

.subscribe-status.error {
  color: #ffd6de;
}

.privacy-note {
  color: rgba(236, 241, 255, 0.78);
  font-size: 13px;
}

.privacy-note a {
  color: #ffffff;
}

.topic-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.topic-chip {
  border: 1px solid #cfd4df;
  background: #eef1f7;
  color: #4a5366;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.topic-chip.active {
  background: #121827;
  border-color: #121827;
  color: #f8fbff;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.insight-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-lg);
  border: 1px solid #d7dce7;
  box-shadow: 0 10px 24px rgba(28, 34, 57, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgba(28, 34, 57, 0.12);
}

.insight-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 18px;
  position: relative;
}

.insight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.insight-tags span {
  border-radius: 999px;
  background: #e8ecf7;
  color: #394359;
  border: 1px solid #d2d8e6;
  padding: 4px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.insight-link h2 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  padding-right: 24px;
}

.insight-link p {
  color: #39445f;
  font-size: 15px;
  line-height: 1.6;
}

.insight-meta {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.author {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1530d7, #8b36dd);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.date {
  font-size: 12px;
  color: #697083;
}

.read-arrow {
  position: absolute;
  top: 17px;
  right: 16px;
  font-size: 16px;
  color: #2a3250;
}

.article-page {
  max-width: 1240px;
}

.article-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

/* Keep content open: no white card box */
.article-content {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.page > .article-content {
  max-width: 900px;
  margin-inline: auto;
}

article h1,
article h2,
article h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  color: #11141f;
}

article h1 {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

article h2 {
  margin-top: 42px;
  margin-bottom: 12px;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

article h3 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
}

.meta {
  margin-bottom: 22px;
  color: #5a6275;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

article p,
article li,
article td,
article th {
  font-size: 17px;
  color: #1f2430;
}

article p {
  margin-bottom: 14px;
}

article a {
  color: #243fc9;
  text-decoration-color: rgba(36, 63, 201, 0.36);
  text-underline-offset: 2px;
}

article ul,
article ol {
  padding-left: 24px;
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.article-content h2[id],
.article-content h3[id] {
  scroll-margin-top: 84px;
}

.article-page .article-content > h2:first-of-type + p::first-letter {
  float: left;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-weight: 700;
  font-size: 54px;
  line-height: 0.85;
  margin: 6px 8px 0 0;
  color: #111722;
}

.article-quote {
  border-left: 3px solid #2c3bd9;
  background: rgba(238, 242, 255, 0.6);
  border-radius: 10px;
  margin: 28px 0;
  padding: 16px 18px;
}

.article-quote p {
  font-size: 27px;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: #151b2d;
  margin-bottom: 8px;
}

.article-quote cite {
  font-size: 13px;
  color: #4b546d;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

th,
td {
  border: 1px solid #d7dce8;
  text-align: left;
  vertical-align: top;
  padding: 10px;
}

th {
  background: rgba(238, 241, 248, 0.8);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.cta {
  margin-top: 34px;
  border-radius: var(--radius-md);
  border: 1px solid #ced5e6;
  background: rgba(242, 245, 253, 0.75);
  padding: 18px;
  font-weight: 800;
}

.cta a {
  color: #1324a5;
  text-decoration: none;
}

.cta a:hover {
  text-decoration: underline;
}

.article-toc {
  position: sticky;
  top: 92px;
  align-self: start;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid #d7dce8;
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: 0 12px 24px rgba(18, 25, 42, 0.08);
}

.article-toc h2 {
  margin-bottom: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", sans-serif;
  font-size: 15px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #21283a;
}

.article-toc nav {
  display: grid;
  gap: 2px;
  position: static;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.article-toc a {
  text-decoration: none;
  color: #4e576d;
  font-size: 14px;
  line-height: 1.45;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.article-toc a:hover {
  background: #f0f3fb;
  color: #1f2640;
}

.article-toc a.active {
  background: #161d32;
  border-color: #161d32;
  color: #f8faff;
}

/* Landing-page footer style */
footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: var(--spacing-lg) var(--spacing-md);
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  flex-wrap: wrap;
}

.footer-link {
  font-size: 13px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1180px) {
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .article-toc {
    position: static;
    top: auto;
  }
}

@media (max-width: 820px) {
  .page {
    padding-top: 108px;
    padding-left: var(--spacing-sm);
    padding-right: var(--spacing-sm);
  }

  .blog-hero {
    padding: 20px;
    margin-bottom: 20px;
  }

  .blog-title {
    font-size: clamp(28px, 10vw, 40px);
  }

  .subscribe-form {
    flex-direction: column;
    align-items: stretch;
  }

  .subscribe-form button {
    width: 100%;
  }

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

  .article-page .article-content > h2:first-of-type + p::first-letter {
    font-size: 42px;
  }

  .article-quote p {
    font-size: 24px;
  }

  article p,
  article li,
  article td,
  article th {
    font-size: 16px;
  }

  .nav-links {
    gap: 14px;
  }

  .nav-link {
    font-size: 14px;
  }

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