/* ============ Design tokens (light theme) ============ */
:root {
  --bg: #f7f9fc;
  --bg-soft: #eef2f8;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --line: rgba(20, 45, 85, 0.12);
  --text: #1b2430;
  --text-dim: #5c6b80;
  --orange: #f0760a;
  --orange-soft: rgba(240, 118, 10, 0.1);
  --teal: #0d9488;
  --teal-soft: rgba(13, 148, 136, 0.09);
  --shadow-soft: 0 12px 32px rgba(24, 48, 90, 0.08);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  /* clip (not hidden) avoids turning body into a scroll container, which would
     otherwise break position: sticky for descendants like the docs sidebar/TOC */
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.wrap { width: min(1160px, 92vw); margin: 0 auto; }

::selection { background: var(--orange); color: #fff; }

/* ============ Global backdrop ============ */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(240, 118, 10, 0.1), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(13, 148, 136, 0.07), transparent 60%),
    var(--bg);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(20, 45, 85, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 45, 85, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* ============ Navbar ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(247, 249, 252, 0.8);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; gap: 32px;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: .5px; }
.brand .logo-mark { width: 34px; height: 34px; }
.brand em { font-style: normal; color: var(--orange); }
.brand .brand-suffix {
  font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--teal);
  background: var(--teal-soft); border: 1px solid rgba(13, 148, 136, 0.3);
  padding: 2px 8px; border-radius: 999px; margin-left: 2px;
}

.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--text-dim); }
.nav-links a { position: relative; padding: 4px 0; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--orange); border-radius: 2px;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text-dim);
  font: inherit; font-size: 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lang-btn:hover { color: var(--text); border-color: rgba(240, 118, 10, 0.5); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 140px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; display: none; box-shadow: 0 18px 40px rgba(24, 48, 90, 0.16); font-size: 14px;
}
.lang-menu.open { display: block; }
.lang-menu li { padding: 8px 12px; border-radius: 8px; color: var(--text-dim); cursor: pointer; }
.lang-menu li:hover { background: rgba(20, 45, 85, 0.06); color: var(--text); }
.lang-menu li.current { color: var(--orange); }

.gh-pill {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px;
  border: 1px solid var(--line); background: var(--panel);
  padding: 7px 14px; border-radius: 999px; color: var(--text-dim);
  transition: border-color .2s, color .2s;
}
.gh-pill:hover { color: var(--text); border-color: rgba(240, 118, 10, 0.5); }
.gh-pill .fa-star { color: var(--orange); font-size: 11px; }

.burger {
  display: none; background: none; border: none; color: var(--text);
  font-size: 22px; cursor: pointer; padding: 6px;
}

/* Mobile drawer */
.drawer {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 4vw 20px; border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 252, 0.98);
}
.drawer.open { display: flex; }
.drawer a { padding: 12px 8px; border-radius: 10px; color: var(--text-dim); font-size: 16px; }
.drawer a:hover { background: rgba(20, 45, 85, 0.06); color: var(--text); }

/* ============ Hero ============ */
.hero { padding: 90px 0 70px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
}

.hero-tag {
  display: inline-block; line-height: 1.6;
  font-family: var(--mono); font-size: 13px; color: var(--teal);
  background: var(--teal-soft); border: 1px solid rgba(13, 148, 136, 0.3);
  padding: 8px 16px; border-radius: 14px; margin-bottom: 22px; max-width: 100%;
}
.hero-tag .dot {
  display: inline-block; vertical-align: middle; margin-right: 8px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.45); }
  55% { box-shadow: 0 0 0 7px rgba(13, 148, 136, 0); }
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 62px); font-weight: 900; line-height: 1.16;
  letter-spacing: 1px;
}
.hero h1 .hl {
  background: linear-gradient(100deg, var(--orange) 10%, #e8590c 55%, var(--teal) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub {
  margin: 22px 0 34px; font-size: 17px; color: var(--text-dim); max-width: 500px;
}
.hero .sub strong { color: var(--text); font-weight: 500; }

.cta-row { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border-radius: 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: linear-gradient(120deg, #f9820f, #ea6209);
  color: #fff; box-shadow: 0 10px 28px rgba(240, 118, 10, 0.32);
}
.btn-primary:hover { box-shadow: 0 14px 36px rgba(240, 118, 10, 0.42); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--text); background: var(--panel);
}
.btn-ghost:hover { border-color: rgba(13, 148, 136, 0.5); background: var(--teal-soft); transform: translateY(-2px); }

.hero-meta {
  margin-top: 30px; display: flex; gap: 26px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--text-dim); font-family: var(--mono);
}
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta i { color: var(--teal); }

/* ---- Hero mascot illustration ---- */
.hero-mascot {
  border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 32px 70px rgba(24, 48, 90, 0.16);
  animation: floaty 6s ease-in-out infinite;
}
.hero-mascot img { width: 100%; display: block; }

/* ---- Dashboard mock (illustration) ---- */
.dash {
  position: relative;
  background: linear-gradient(160deg, #ffffff, #f4f7fb);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 32px 70px rgba(24, 48, 90, 0.16);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
}
.dash::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.5), transparent 40%);
}
.dash-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
}
.dash-bar .d { width: 11px; height: 11px; border-radius: 50%; }
.dash-bar .d1 { background: #ff5f57; } .dash-bar .d2 { background: #febc2e; } .dash-bar .d3 { background: #28c840; }
.dash-bar .title { margin: 0 auto; letter-spacing: .5px; }

.dash-body { padding: 18px; display: grid; gap: 14px; }

.traffic {
  background: rgba(20, 45, 85, 0.035); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 8px;
}
.traffic-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.traffic-head b { color: var(--teal); font-weight: 700; }
.spark { width: 100%; height: 74px; }
.spark .up { stroke: var(--orange); }
.spark .down { stroke: var(--teal); }
.spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .fill-down { fill: url(#gradDown); stroke: none; opacity: .8; }

.nodes { display: grid; gap: 8px; }
.node {
  display: flex; align-items: center; gap: 12px;
  background: rgba(20, 45, 85, 0.03); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px; font-size: 13px;
}
.node.selected { border-color: rgba(240, 118, 10, 0.55); background: var(--orange-soft); }
.node .flag { font-size: 17px; }
.node .name { font-weight: 500; }
.node .proto { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); background: rgba(20, 45, 85, 0.07); padding: 2px 7px; border-radius: 5px; }
.node .ping { margin-left: auto; font-family: var(--mono); font-size: 12.5px; }
.ping.fast { color: #16a34a; } .ping.mid { color: #ca8a04; } .ping.slow { color: #dc2626; }
.node .bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.node .bars i { width: 3px; background: var(--teal); border-radius: 1px; opacity: .85; }

.dash-foot {
  display: flex; gap: 10px; font-family: var(--mono); font-size: 11.5px; color: var(--text-dim); flex-wrap: wrap;
}
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: rgba(20, 45, 85, 0.035); }
.chip.on { color: var(--orange); border-color: rgba(240, 118, 10, 0.4); background: var(--orange-soft); }

/* Floating badges around dashboard */
.float-badge {
  position: absolute; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; font-size: 13px; box-shadow: 0 20px 45px rgba(24, 48, 90, 0.18);
  animation: floaty 5s ease-in-out infinite;
}
.float-badge i { font-size: 18px; }
.float-badge b { display: block; font-size: 14px; }
.float-badge small { color: var(--text-dim); font-size: 11.5px; }
.fb-1 { top: -22px; right: -14px; animation-delay: .6s; }
.fb-1 i { color: var(--orange); }
.fb-2 { bottom: -20px; left: -18px; }
.fb-2 i { color: var(--teal); }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

.hero-visual { position: relative; }
.hero-visual .glow {
  position: absolute; inset: 8% -6%; z-index: -1; border-radius: 40px;
  background: radial-gradient(closest-side, rgba(240, 118, 10, 0.14), transparent 70%);
  filter: blur(10px);
}

/* ============ Stats strip ============ */
.stats { padding: 26px 0 10px; }
.stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.stat {
  padding: 28px 20px; text-align: center; position: relative;
}
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%; width: 1px; background: var(--line);
}
.stat .num {
  font-family: var(--mono); font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: var(--text);
}
.stat .num em { font-style: normal; color: var(--orange); }
.stat .lbl { font-size: 13.5px; color: var(--text-dim); margin-top: 4px; }
.stat .lbl i { margin-right: 6px; color: var(--teal); }

/* ============ Section base ============ */
section.block { padding: 88px 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.sec-kicker {
  font-family: var(--mono); font-size: 13px; letter-spacing: 3px; color: var(--orange);
  text-transform: uppercase; margin-bottom: 12px;
}
.sec-head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 900; line-height: 1.3; }
.sec-head p { color: var(--text-dim); margin-top: 14px; font-size: 15.5px; }
.sec-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-size: 14px; font-weight: 500; color: var(--teal);
}
.sec-more:hover { text-decoration: underline; }

/* ============ Features ============ */
.feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.feat {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.feat:hover { transform: translateY(-5px); border-color: rgba(240, 118, 10, 0.45); box-shadow: 0 18px 40px rgba(24, 48, 90, 0.13); }
.feat::after {
  content: ""; position: absolute; top: -60px; right: -60px; width: 140px; height: 140px;
  border-radius: 50%; background: radial-gradient(closest-side, var(--orange-soft), transparent);
  opacity: 0; transition: opacity .3s;
}
.feat:hover::after { opacity: 1; }
.feat .ico {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 21px; margin-bottom: 20px;
  background: var(--orange-soft); color: var(--orange); border: 1px solid rgba(240, 118, 10, 0.25);
}
.feat:nth-child(even) .ico { background: var(--teal-soft); color: var(--teal); border-color: rgba(13, 148, 136, 0.3); }
.feat h3 { font-size: 18px; margin-bottom: 10px; font-weight: 700; }
.feat p { color: var(--text-dim); font-size: 14.5px; }
.feat .idx {
  position: absolute; right: 20px; top: 18px; font-family: var(--mono);
  font-size: 12px; color: rgba(20, 45, 85, 0.22);
}

/* ============ Tutorial steps ============ */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-soft); position: relative;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column;
}
.step-card:hover { transform: translateY(-6px); border-color: rgba(240, 118, 10, 0.45); box-shadow: 0 20px 44px rgba(24, 48, 90, 0.14); }
.step-card .pic { position: relative; background: #fdfdfe; border-bottom: 1px solid var(--line); }
.step-card .pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step-card .step-no {
  position: absolute; top: 14px; left: 14px;
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(120deg, #f9820f, #ea6209); color: #fff;
  font-family: var(--mono); font-weight: 700; font-size: 16px;
  box-shadow: 0 8px 18px rgba(240, 118, 10, 0.35);
}
.step-card .txt { padding: 22px 24px 26px; }
.step-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-card p { color: var(--text-dim); font-size: 14.5px; }
.step-card .txt a { color: var(--teal); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; }
.step-card .txt a:hover { text-decoration: underline; }
.steps-cta { text-align: center; margin-top: 40px; }

/* ============ Blog cards ============ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-soft);
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex; flex-direction: column;
}
.post:hover { transform: translateY(-6px); border-color: rgba(13, 148, 136, 0.45); box-shadow: 0 20px 44px rgba(24, 48, 90, 0.14); }
.post-visual {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--line);
  background-color: var(--panel);
  background-image: radial-gradient(rgba(20, 45, 85, 0.07) 1px, transparent 1px);
  background-size: 15px 15px;
}
.post-visual::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(140px 140px at 50% 50%, var(--orange-soft), transparent 72%);
}
.post-visual.tone-teal::before { background: radial-gradient(140px 140px at 50% 50%, var(--teal-soft), transparent 72%); }
.post-visual-badge {
  position: relative; z-index: 1;
  width: 60px; height: 60px; border-radius: 18px;
  display: grid; place-items: center; color: #fff; font-size: 24px;
  background: linear-gradient(120deg, #f9820f, #ea6209);
  box-shadow: 0 14px 28px rgba(240, 118, 10, 0.32);
}
.post-visual.tone-teal .post-visual-badge {
  background: linear-gradient(120deg, #14b8a6, #0d9488);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.3);
}
.post .txt { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post .cat {
  align-self: flex-start; font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  color: var(--orange); background: var(--orange-soft);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
}
.post .cat.cat-orange { color: var(--orange); background: var(--orange-soft); }
.post .cat.cat-teal { color: var(--teal); background: var(--teal-soft); }
.post h3 { font-size: 16.5px; font-weight: 700; line-height: 1.5; margin-bottom: 8px; }
.post p { color: var(--text-dim); font-size: 13.5px; flex: 1; }
.post .more { margin-top: 16px; font-size: 13.5px; color: var(--teal); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.post:hover .more { text-decoration: underline; }

/* ============ Compact dashboard preview in GitHub CTA ============ */
.dash-mini {
  transform: none; margin-bottom: 18px;
  box-shadow: 0 20px 44px rgba(24, 48, 90, 0.14);
}

/* ============ Rule showcase ============ */
.rules { background: var(--bg-soft); border-block: 1px solid var(--line); }
.rules-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.rules-copy h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 900; line-height: 1.3; }
.rules-copy > p { color: var(--text-dim); margin: 16px 0 26px; font-size: 15.5px; }
.rule-points { display: grid; gap: 16px; }
.rule-points li { display: flex; gap: 14px; align-items: flex-start; }
.rule-points .tick {
  flex: none; width: 26px; height: 26px; border-radius: 8px; margin-top: 2px;
  display: grid; place-items: center; font-size: 12px;
  background: var(--teal-soft); color: var(--teal); border: 1px solid rgba(13, 148, 136, 0.3);
}
.rule-points b { display: block; font-size: 15.5px; }
.rule-points span { color: var(--text-dim); font-size: 14px; }

/* Code panel stays dark on purpose: an anchor accent on the light page */
.code-panel {
  background: #131a26; border: 1px solid #232e40; border-radius: 18px;
  overflow: hidden; box-shadow: 0 26px 60px rgba(24, 48, 90, 0.28);
}
.code-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08); font-family: var(--mono); font-size: 12.5px; color: #93a3ba;
}
.code-head i { color: #ff9d3f; }
.code-head .lang { margin-left: auto; background: rgba(255,255,255,.06); padding: 2px 10px; border-radius: 6px; font-size: 11px; }
.code-panel pre {
  padding: 20px 22px; font-family: var(--mono); font-size: 13px; line-height: 1.85;
  overflow-x: auto; color: #c6d3e5;
}
.tk-key { color: #7dd3fc; } .tk-str { color: #fbbf77; } .tk-cmt { color: #5b6b82; } .tk-flag { color: #6ee7b7; }

/* ============ Platforms ============ */
.plat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.plat {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 16px 28px; text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative; overflow: hidden;
}
.plat:hover { transform: translateY(-6px); border-color: rgba(240, 118, 10, 0.5); box-shadow: 0 18px 40px rgba(24, 48, 90, 0.13); }
.plat i.plat-icon {
  display: inline-block; font-size: 40px; font-weight: 400; margin-bottom: 16px;
  color: var(--text); transition: color .25s;
}
.plat:hover i.plat-icon { color: var(--orange); }
.plat b { display: block; font-size: 16.5px; }
.plat small { color: var(--text-dim); font-size: 12.5px; display: block; margin-top: 4px; }
.plat .go {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--teal); font-weight: 500;
}
.plat .go i { transition: transform .2s; font-size: 11px; }
.plat:hover .go i { transform: translateX(4px); }

/* ============ GitHub CTA ============ */
.gh-cta {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 24px;
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(240, 118, 10, 0.1), transparent 65%),
    radial-gradient(500px 300px at 5% 90%, rgba(13, 148, 136, 0.08), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow-soft);
  padding: 60px 48px;
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center;
}
.gh-cta h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; line-height: 1.35; }
.gh-cta p { color: var(--text-dim); margin: 14px 0 26px; font-size: 15px; }
.repo-card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  font-size: 14px;
}
.repo-card .rname {
  display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; font-weight: 700;
}
.repo-card .rname i { color: var(--text-dim); font-size: 18px; }
.repo-card .rdesc { color: var(--text-dim); margin: 10px 0 16px; font-size: 13.5px; }
.repo-card .rmeta { display: flex; gap: 18px; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); flex-wrap: wrap; }
.repo-card .rmeta .fa-star { color: var(--orange); }
.repo-card .rmeta .fa-code-fork { color: var(--teal); }
.repo-card .lang-dot { width: 10px; height: 10px; border-radius: 50%; background: #00add8; display: inline-block; margin-right: 5px; vertical-align: -1px; }

/* ============ Footer ============ */
footer {
  border-top: 1px solid var(--line); background: var(--bg-soft);
  padding: 60px 0 30px; margin-top: 40px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; margin-bottom: 46px;
}
.foot-brand p { color: var(--text-dim); font-size: 14px; margin-top: 14px; max-width: 300px; }
.foot-col h4 { font-size: 14px; letter-spacing: 1px; color: var(--text); margin-bottom: 16px; }
.foot-col ul { display: grid; gap: 10px; }
.foot-col a { color: var(--text-dim); font-size: 14px; transition: color .2s; }
.foot-col a:hover { color: var(--orange); }
.foot-col a i { width: 20px; color: var(--text-dim); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 8px; }
.foot-langs span {
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px;
  font-size: 12.5px; color: var(--text-dim); cursor: pointer; transition: all .2s;
}
.foot-langs span:hover { border-color: rgba(240, 118, 10, 0.5); color: var(--text); }
.foot-langs span.on { background: var(--orange-soft); border-color: rgba(240, 118, 10, 0.45); color: var(--orange); }
.foot-bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 13px;
}
.foot-bottom .fa-github { font-size: 18px; }
.foot-bottom a:hover { color: var(--orange); }

/* ============ Reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .hero { padding-top: 60px; }
  .dash { transform: none; max-width: 620px; margin: 0 auto; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid, .post-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .plat-grid { grid-template-columns: repeat(3, 1fr); }
  .rules-grid { grid-template-columns: 1fr; gap: 44px; }
  .gh-cta { grid-template-columns: 1fr; padding: 44px 30px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(odd) { border-top: 1px solid var(--line); }
  .stat:nth-child(1), .stat:nth-child(2) { border-top: none; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .feat-grid { grid-template-columns: 1fr; }
  .plat-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr; gap: 30px; }
  .fb-1 { right: 0; } .fb-2 { left: 0; }
  section.block { padding: 64px 0; }
}
@media (max-width: 420px) {
  /* Collapse the language label down to just the globe icon so the brand +
     lang switch + burger don't get squeezed on the narrowest phones. */
  .lang-btn .lang-label { display: none; }
  .lang-btn { padding: 7px 10px; gap: 4px; }
  .brand .brand-suffix { display: none; }
  .plat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
