/* =============================================================================
   SIGMADESK BLOG — STANDALONE STYLESHEET
   =============================================================================
   This file replaces all the Tailwind utility classes and inline styles that
   were previously applied through the React app. It is intentionally
   self-contained so that the blog pages have no dependency on the main app
   bundle.

   Order of sections:
     1. CSS reset / base
     2. Brand + typography
     3. Animated gradient background
     4. Layout primitives (nav, footer, container, hero)
     5. Glass cards (the post tiles + related posts)
     6. Tag pills, meta line, buttons
     7. Article typography (.blog-prose)
   ============================================================================= */

/* ----- 1. Reset / base ----------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  min-height: 100vh;
  color: #fff;
  background: #0a1024;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

/* ----- 2. Brand + typography ---------------------------------------------- */
.brand-name {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
}

/* ----- 3. Animated gradient background ------------------------------------ */
.bg-wrap {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #0d0f1a 0%, #0a1024 50%, #111b3a 100%);
  z-index: 0;
}

.bg-blob {
  position: absolute;
  border-radius: 9999px;
}

.bg-blob--cyan {
  top: -7rem;
  left: -4rem;
  width: 500px;
  height: 500px;
  background: rgba(6, 182, 212, 0.2);
  filter: blur(120px);
}

.bg-blob--purple {
  bottom: -6rem;
  right: -2.5rem;
  width: 600px;
  height: 600px;
  background: rgba(168, 85, 247, 0.2);
  filter: blur(140px);
}

.bg-blob--center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: rgba(34, 211, 238, 0.1);
  filter: blur(100px);
}

/* ----- 4. Layout primitives ----------------------------------------------- */
.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navigation bar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background-color 0.5s, backdrop-filter 0.5s, border-color 0.5s;
}

.nav.is-scrolled {
  background: rgba(10, 16, 36, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

@media (min-width: 1024px) {
  .nav__inner {
    padding: 0 2rem;
  }
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity 0.2s;
}

.nav__brand:hover {
  opacity: 0.8;
}

.nav__brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  object-fit: contain;
}

.nav__brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.nav__brand-name {
  font-size: 1.25rem;
  line-height: 1.15;
}

.nav__brand-tag {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.025em;
}

.nav__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}

.nav__back:hover {
  color: #fff;
}

.nav__back svg {
  width: 1rem;
  height: 1rem;
}

/* Main content container */
.main {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 8rem 1rem 4rem;
}

.main--list {
  max-width: 64rem;
}

.main--post {
  max-width: 48rem;
}

@media (min-width: 640px) {
  .main {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .main {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Hero (blog index header) */
.hero {
  text-align: center;
  margin-bottom: 3.5rem;
}

.hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  margin-bottom: 1.5rem;
}

.hero__icon svg {
  width: 2rem;
  height: 2rem;
  color: #22d3ee;
}

.hero__title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.1;
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 3rem;
  }
}

.hero__title-gradient {
  background: linear-gradient(to right, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  max-width: 42rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero__lede {
    font-size: 1.125rem;
  }
}

/* Footer */
.footer {
  position: relative;
  z-index: 10;
  padding: 3rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2rem;
  }
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

@media (min-width: 1024px) {
  .footer__brand {
    flex: 1;
  }
}

.footer__brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  object-fit: contain;
}

.footer__brand-name {
  font-size: 1.125rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .footer__links {
    flex: 1;
    justify-content: flex-end;
  }
}

.footer__link {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
}

.footer__link:hover {
  color: #22d3ee;
}

.footer__link svg {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
}

/* ----- 5. Glass cards ----------------------------------------------------- */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.glass-card {
  display: block;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
  overflow: visible;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.15);
}

.post-card {
  padding: 1.5rem;
}

@media (min-width: 768px) {
  .post-card {
    padding: 1.75rem;
  }
}

.post-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.2s;
}

@media (min-width: 768px) {
  .post-card__title {
    font-size: 1.5rem;
  }
}

.glass-card:hover .post-card__title {
  color: #67e8f9;
}

.post-card__desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.post-card__meta-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.meta-item svg {
  width: 0.875rem;
  height: 0.875rem;
}

.post-card__read {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #22d3ee;
  transition: gap 0.2s;
}

.glass-card:hover .post-card__read {
  gap: 0.5rem;
}

.post-card__read svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Related-posts card */
.related-card {
  padding: 1.25rem;
}

.related-card__title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.glass-card:hover .related-card__title {
  color: #67e8f9;
}

.related-card__desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty state */
.empty-card {
  padding: 2.5rem;
  text-align: center;
  cursor: default;
}

.empty-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.empty-card p {
  color: rgba(255, 255, 255, 0.6);
}

/* ----- 6. Tag pills, meta line, post header ------------------------------ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 11px;
  color: rgba(103, 232, 249, 0.9);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 9999px;
  padding: 0.25rem 0.625rem;
  line-height: 1.4;
}

.tag svg {
  width: 0.75rem;
  height: 0.75rem;
}

/* Post header */
.post-header__tags {
  margin-bottom: 1.25rem;
}

.post-header__title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .post-header__title {
    font-size: 3rem;
  }
}

.post-header__desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.post-header__meta .meta-item svg {
  width: 1rem;
  height: 1rem;
}

.post-cover {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 2rem;
}

/* Related section */
.related-section {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-section__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.5rem;
}

/* ----- 7. Article typography (.blog-prose) -------------------------------- */
.blog-prose {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.75;
}

.blog-prose p {
  margin: 1rem 0;
}

.blog-prose h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2.25rem 0 1rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.blog-prose h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
  line-height: 1.35;
}

.blog-prose h4 {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.blog-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  overflow: hidden;
}

.blog-prose thead {
  background: rgba(34, 211, 238, 0.08);
}

.blog-prose th {
  text-align: left;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-prose td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

.blog-prose tbody tr:last-child td {
  border-bottom: 0;
}

.blog-prose ul,
.blog-prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.blog-prose ul {
  list-style: none;
  padding-left: 0;
}

.blog-prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.blog-prose ul li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.7rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.6);
}

.blog-prose ol li {
  margin: 0.5rem 0;
}

.blog-prose strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.blog-prose em {
  color: rgba(255, 255, 255, 0.85);
}

.blog-prose a {
  color: rgb(34, 211, 238);
  text-decoration: none;
}

.blog-prose a:hover {
  color: rgb(103, 232, 249);
  text-decoration: underline;
}

.blog-prose blockquote {
  border-left: 3px solid rgba(34, 211, 238, 0.5);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  background: rgba(34, 211, 238, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
}

.blog-prose code {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  font-size: 0.9em;
  color: rgb(165, 243, 252);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.blog-prose pre {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.blog-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

.blog-prose img {
  /* width/height attributes on each <img> tell the browser the intrinsic
     aspect ratio so it can reserve layout space *before* the file loads
     (improves CLS and LCP). The two rules below keep the image fully fluid
     once it does load. */
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.25rem 0;
}

.blog-prose figure {
  margin: 1.5rem 0;
}

.blog-prose figure img {
  margin: 0 0 0.6rem 0;
  display: block;
  width: 100%;
  height: auto;
}

.blog-prose figcaption {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  font-style: italic;
}

.blog-prose .blog-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  margin: 1.5rem 0 2rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
}

.blog-prose .blog-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ----- 8. YouTube facade (lazy iframe) ----------------------------------- */
/*
 * The article's video embed defers loading the YouTube iframe until the user
 * actually clicks it. Before the click we only show a static poster image
 * plus a play button — that saves ~770 KiB of YouTube JS and ~105 KiB of
 * YouTube CSS, all of which were the dominant cost on first paint.
 */
.youtube-facade {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  height: 0;
  margin: 1.5rem 0 2rem;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.youtube-facade__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  margin: 0;
  display: block;
}

.youtube-facade__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  pointer-events: none;
}

.youtube-facade:hover .youtube-facade__play {
  background: rgb(255, 0, 0);
}

.youtube-facade__play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

.youtube-facade iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* ============================================================
   New utility classes for capability-analysis post
   ============================================================ */

/* Formula block */
.blog-formula {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid #6366f1;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.05rem;
  color: var(--text-primary, #f1f5f9);
  overflow-x: auto;
}
.blog-formula p { margin: 0; }

/* Comparison grid */
.blog-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 540px) {
  .blog-compare-grid { grid-template-columns: 1fr; }
}
.blog-compare-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1.25rem;
}
.blog-compare-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #a5b4fc;
}

/* Table */
.blog-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
}
.blog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.blog-table th,
.blog-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.blog-table thead th {
  background: rgba(99,102,241,0.15);
  color: #a5b4fc;
  font-weight: 600;
  white-space: nowrap;
}
.blog-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* Callout / highlight box */
.blog-callout {
  background: rgba(6,182,212,0.07);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.blog-callout ul { margin: 0.5rem 0 0; }

/* Figure */
.blog-figure {
  margin: 2rem 0;
}
.blog-figure img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

/* CTA */
.blog-cta {
  margin: 3rem 0 1rem;
  text-align: center;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 16px;
  padding: 2rem;
}
.blog-cta__text {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--text-primary, #f1f5f9);
}
.blog-cta__btn {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.blog-cta__btn:hover { opacity: 0.85; }