:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --text: #0f172a;
  --muted: #475569;
  --card: rgba(255, 255, 255, 0.72);
  --border: rgba(148, 163, 184, 0.35);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --font-body: "Manrope", "Aptos", "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Trebuchet MS", "Aptos", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo,
.blog-header h1,
.article-header h1,
.blog-card h2,
.related-article-card h4,
.article-cta h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

body {
  background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 50%, #fdf2f8 100%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* ── Navigation ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 32px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 8px;
  color: var(--muted);
  flex: 1 1 auto;
  min-width: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: inherit;
  transition: color 0.15s, background 0.15s;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.language-switcher label {
  font-weight: 600;
}

.language-switcher select,
.language-selector {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: white;
}

/* ── Article Container ── */
.article-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ── Blog Index ── */
.blog-header {
  padding: 48px 0 40px;
  text-align: center;
}

.blog-header .eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.blog-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

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

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

.blog-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.15s;
  backdrop-filter: blur(8px);
}

.blog-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.blog-card-tag {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}

.blog-card h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.blog-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.blog-card-read {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 4px;
}

/* ── Article Page ── */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color 0.15s;
}

.article-back:hover {
  color: var(--text);
}

.article-header {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 40px;
  text-align: center;
}

.article-header .eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.article-header h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 20px;
}

.article-header .article-meta {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.article-excerpt {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 700px;
  margin: 16px auto 0;
}

.article-body {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
}

.article-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 32px 0 12px;
}

.article-body p {
  margin-bottom: 20px;
}

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

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

.article-body strong {
  font-weight: 700;
  color: var(--text);
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body blockquote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 24px 0;
  background: rgba(37, 99, 235, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--muted);
  font-style: italic;
}

.article-cta {
  width: 100%;
  max-width: 820px;
  margin: 48px auto 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  backdrop-filter: blur(8px);
}

.article-cta h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.article-cta p {
  color: var(--muted);
  margin-bottom: 24px;
  font-size: 16px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s;
}

.cta-button:hover {
  background: var(--primary-dark);
}

.related-articles {
  width: 100%;
  max-width: 1040px;
  margin: 48px auto 0;
}

.related-articles .eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.related-articles h2,
.related-articles h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.related-articles-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 20px;
  max-width: 760px;
}

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.related-article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.2s, transform 0.15s;
  backdrop-filter: blur(8px);
}

.related-article-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.related-article-card h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.related-article-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.related-article-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.related-article-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
}

/* ── Footer ── */
.footer-v2 {
  margin: 64px 0 0;
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-v2 .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-desc {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

.footer-bottom {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--text);
}

/* ── Hamburger button ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.hamburger:hover {
  background: rgba(0, 0, 0, 0.05);
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .hamburger {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 20px);
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 0;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    z-index: 200;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 0;
    color: var(--text);
  }
  .nav-links a:hover {
    background: rgba(37, 99, 235, 0.05);
  }
  .nav {
    flex-wrap: wrap;
    position: relative;
  }
  .nav-actions {
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .language-switcher label {
    display: none;
  }
  .btn.btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 24px 18px 48px;
  }

  .article-container {
    padding: 0 18px 48px;
  }

  .blog-header {
    padding: 32px 0 28px;
    text-align: left;
  }

  .blog-header p {
    margin: 0;
  }

  .article-header {
    text-align: left;
  }

  .article-header .eyebrow {
    justify-content: flex-start;
  }

  .article-header .article-meta {
    justify-content: flex-start;
  }

  .article-cta {
    padding: 28px 20px;
  }

  .footer-v2 {
    padding: 40px 0 28px;
  }

  .footer-v2 .container {
    padding: 0 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
