:root {
  --bg: #080b14;
  --bg-2: #0d1220;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .08);
  --text: #e8edf7;
  --muted: #9aa6bd;
  --gold: #f2b33d;
  --gold-2: #f97316;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --grad-gold: linear-gradient(135deg, #f6d064, #f2b33d 45%, #f97316);
  --grad-hero: linear-gradient(115deg, #f6d064, #f2b33d 38%, #f97316 68%, #ec4899);
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px -24px rgba(0, 0, 0, .75);
  --font-head: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(139, 92, 246, .20), transparent 60%),
    radial-gradient(900px 520px at -5% -5%, rgba(242, 179, 61, .16), transparent 55%);
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { font-family: var(--font-head); line-height: 1.18; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
::selection { background: rgba(242, 179, 61, .3); color: #fff; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.site-main { flex: 1 0 auto; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #0a0e1a;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 11, 20, .7);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { flex: none; border-radius: 50%; box-shadow: 0 8px 24px -8px rgba(242, 179, 61, .55); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 20px; letter-spacing: -.02em; }
.brand-tagline { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; }

.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link {
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }

.dropdown, .lang-switcher { position: relative; }
.dropdown-toggle, .lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.dropdown-toggle:hover, .lang-toggle:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .16); }
.caret { font-size: 10px; color: var(--muted); }

.dropdown-menu, .lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  background: #101626;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .18s, transform .18s, visibility .18s;
  list-style: none;
  margin: 0;
}
.dropdown.is-open .dropdown-menu,
.lang-switcher.is-open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a, .lang-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  transition: background .15s, color .15s;
}
.dropdown-menu a:hover, .lang-menu a:hover { background: var(--surface-2); color: var(--text); }
.lang-menu a.is-active { color: var(--gold); font-weight: 600; }
.lang-code { font-weight: 700; letter-spacing: .04em; }
.globe { color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; background: none; border: 0; cursor: pointer; }
.nav-toggle-bar { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }

.mobile-menu { display: none; border-top: 1px solid var(--border); padding: 14px 24px 22px; background: rgba(8, 11, 20, .96); }
.mobile-menu a { display: block; padding: 10px 4px; color: var(--muted); }
.mobile-menu a:hover { color: var(--text); }
.mobile-menu-label { margin: 12px 4px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero-blobs { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 380px; height: 380px; top: -120px; right: 8%; background: radial-gradient(circle, rgba(242, 179, 61, .55), transparent 70%); }
.blob-2 { width: 420px; height: 420px; top: 10%; left: -8%; background: radial-gradient(circle, rgba(139, 92, 246, .5), transparent 70%); }
.blob-3 { width: 300px; height: 300px; bottom: -140px; left: 40%; background: radial-gradient(circle, rgba(236, 72, 153, .4), transparent 70%); }
.hero-inner { position: relative; max-width: 820px; text-align: center; }
.hero-eyebrow { display: inline-block; margin-bottom: 20px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: .06em; }
.hero-title { font-size: clamp(36px, 6.5vw, 68px); line-height: 1.05; font-weight: 700; color: var(--gold); margin-bottom: 22px; }
.hero-subtitle { font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad-gold); color: #15100a; box-shadow: 0 12px 34px -12px rgba(242, 179, 61, .7); }
.btn-primary:hover { box-shadow: 0 16px 44px -12px rgba(242, 179, 61, .85); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-title { font-size: 26px; margin-bottom: 24px; }

.chips-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500; transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--gold); border-color: rgba(242, 179, 61, .4); background: rgba(242, 179, 61, .08); }
.chip-lg { padding: 11px 20px; font-size: 15px; }

/* ---------- Cards ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: #101827; transition: transform .22s, border-color .22s, box-shadow .22s; }
.card:hover { transform: translateY(-6px); border-color: rgba(242, 179, 61, .35); box-shadow: var(--shadow); }
.card-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card-title { font-size: 21px; line-height: 1.3; margin: 0 0 10px; }
.card-title a { color: #ffffff; }
.card-title a:hover { color: var(--gold); }
.card-desc { color: #aab3c5; font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.card-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.card-cta { align-self: flex-start; font-weight: 600; font-size: 14px; color: var(--gold); }
.card-cta:hover { color: #f6d064; }

/* ---------- Category cards ---------- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.category-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: transform .2s, border-color .2s; }
.category-card:hover { transform: translateY(-4px); border-color: rgba(242, 179, 61, .4); }
.category-card-name { font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.category-card-count { color: var(--muted); font-size: 13px; }

/* ---------- Page head ---------- */
.page-head { padding: 56px 0 24px; }
.page-title { font-size: clamp(28px, 4.5vw, 44px); color: var(--gold); }
.page-desc { color: var(--muted); max-width: 640px; }
/* ---------- Article ---------- */
.post-hero { padding: 64px 0 28px; }
.post-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.post-title { font-size: clamp(30px, 5vw, 52px); line-height: 1.1; margin-bottom: 18px; }
.post-desc { font-size: 18px; color: var(--muted); max-width: 760px; margin-bottom: 22px; }
.post-meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; }
.post-meta .dot { opacity: .5; }


.post-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding-top: 20px; padding-bottom: 80px; align-items: start; }
.post-layout--full { grid-template-columns: 1fr; }
.toc-sidebar { position: sticky; top: 96px; }
.toc-box { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); padding: 20px; }
.toc-title { font-family: var(--font-head); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 14px; }
.toc-box nav ul { list-style: none; margin: 0; padding: 0; }
.toc-box nav li { margin: 6px 0; }
.toc-box nav a { color: var(--muted); font-size: 14px; transition: color .15s; }
.toc-box nav a:hover { color: var(--gold); }
.toc-box nav ul ul { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 4px; }

.prose { font-size: 17px; }
.prose h2 { font-size: 30px; margin: 2em 0 .6em; padding-top: .4em; scroll-margin-top: 90px; }
.prose h3 { font-size: 22px; margin: 1.6em 0 .5em; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #cdd6e6; }
.prose strong { color: var(--text); }
.prose a { color: var(--gold); border-bottom: 1px solid rgba(242, 179, 61, .4); }
.prose a:hover { color: #f6d064; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; color: #cdd6e6; }
.prose li { margin: .4em 0; }
.prose blockquote { margin: 1.4em 0; padding: 16px 20px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 8px; color: var(--muted); }
.prose code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose img { border-radius: var(--radius-sm); }

/* ---------- FAQ ---------- */
.faq { margin-top: 48px; }
.faq-title { font-size: 28px; margin-bottom: 20px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 18px 20px; font-weight: 600; font-family: var(--font-head); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--gold); transition: transform .2s; flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 20px 20px; color: #cdd6e6; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: rgba(8, 11, 20, .6); padding: 56px 0 40px; }
.footer-inner { text-align: center; }
.brand-footer { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.brand-footer .brand-name { font-size: 22px; }
.footer-tagline { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.footer-nav { display: flex; gap: 20px; justify-content: center; margin-bottom: 26px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); transition: color .15s; }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { color: var(--muted); font-size: 13px; opacity: .7; }

/* ---------- 404 ---------- */
.notfound { padding: 120px 0; text-align: center; }
.notfound-inner { max-width: 620px; }
.notfound-code { font-family: var(--font-head); font-size: clamp(90px, 20vw, 180px); font-weight: 700; line-height: 1; color: var(--gold); }
.notfound-title { font-size: 28px; margin: 8px 0 16px; }
.notfound-text { color: var(--muted); margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open .mobile-menu { display: block; }
  .post-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc-sidebar { position: static; order: 2; }
}
@media (max-width: 520px) {
  .hero { padding: 64px 0 48px; }
  .cards-grid { grid-template-columns: 1fr; }
  .header-inner { height: 64px; }
  .brand-tagline { display: none; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232b3e; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #303a52; }

/* ---------- Animations ---------- */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.blob { animation: floaty 9s ease-in-out infinite; }
.blob-2 { animation-delay: -3s; }
.blob-3 { animation-delay: -6s; }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-title,
  .page-title,
  .notfound-code {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
  .hero-title { background-image: var(--grad-hero); }
  .page-title { background-image: var(--grad-gold); }
  .notfound-code { background-image: var(--grad-hero); }
}

