/* ============================================================
   小鸿 AI — Hardcore Tech Site
   palette: deep space + electric cyan + hongmeng red
   ============================================================ */

:root, [data-theme="dark"] {
  --bg-0: #04060d;
  --bg-1: #070b16;
  --bg-2: #0c1322;
  --bg-3: #121a2e;
  --line: rgba(96, 165, 250, 0.10);
  --line-2: rgba(96, 165, 250, 0.22);
  --line-red: rgba(251, 146, 60, 0.28);

  --fg-0: #f1f5f9;
  --fg-1: #cbd5e1;
  --fg-2: #94a3b8;
  --fg-3: #64748b;

  --cyan: #818cf8;
  --cyan-2: #6366f1;
  --cyan-soft: rgba(129, 140, 248, 0.16);
  --red: #fb923c;
  --red-2: #fdba74;
  --red-soft: rgba(251, 146, 60, 0.16);

  --nav-bg: rgba(4, 6, 13, 0.7);
  --card-bg: rgba(12, 19, 34, 0.45);
  --card-bg-strong: rgba(12, 19, 34, 0.85);
  --surface: rgba(7, 11, 22, 0.6);
  --grid-line: rgba(129, 140, 248, 0.06);
  --scanline-op: 0.012;
  --orb-op: 0.35;

  --shadow-cy: 0 0 0 1px rgba(129, 140, 248, 0.35), 0 8px 40px rgba(129, 140, 248, 0.12);
  --shadow-red: 0 0 0 1px rgba(251, 146, 60, 0.35), 0 8px 40px rgba(251, 146, 60, 0.12);

  --font-sans: "Space Grotesk", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --font-display: "Orbitron", "Space Grotesk", "PingFang SC", sans-serif;

  --container: 1280px;
}

[data-theme="light"] {
  --bg-0: #f6f8fb;
  --bg-1: #eef2f8;
  --bg-2: #e3e9f2;
  --bg-3: #d6dde8;
  --line: rgba(15, 23, 42, 0.10);
  --line-2: rgba(15, 23, 42, 0.20);
  --line-red: rgba(220, 38, 38, 0.28);

  --fg-0: #0b1220;
  --fg-1: #1e293b;
  --fg-2: #475569;
  --fg-3: #94a3b8;

  --cyan: #4338ca;
  --cyan-2: #312e81;
  --cyan-soft: rgba(99, 102, 241, 0.12);
  --red: #ea580c;
  --red-2: #c2410c;
  --red-soft: rgba(234, 88, 12, 0.12);

  --nav-bg: rgba(255, 255, 255, 0.78);
  --card-bg: rgba(255, 255, 255, 0.7);
  --card-bg-strong: rgba(255, 255, 255, 0.92);
  --surface: rgba(255, 255, 255, 0.55);
  --grid-line: rgba(15, 23, 42, 0.05);
  --scanline-op: 0.005;
  --orb-op: 0.18;

  --shadow-cy: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 8px 30px rgba(99, 102, 241, 0.08);
  --shadow-red: 0 0 0 1px rgba(234, 88, 12, 0.25), 0 8px 30px rgba(234, 88, 12, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-0); color: var(--fg-1); font-family: var(--font-sans); line-height: 1.55; transition: background-color .3s ease, color .3s ease; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1400px 700px at 80% -200px, rgba(129, 140, 248, 0.10), transparent 60%),
    radial-gradient(1100px 600px at 0% 600px, rgba(251, 146, 60, 0.06), transparent 60%),
    var(--bg-0);
}
[data-theme="light"] body {
  background:
    radial-gradient(1400px 700px at 80% -200px, rgba(99, 102, 241, 0.08), transparent 60%),
    radial-gradient(1100px 600px at 0% 600px, rgba(234, 88, 12, 0.05), transparent 60%),
    var(--bg-0);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--cyan); color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--font-mono); }

.accent-cyan { color: var(--cyan); text-shadow: 0 0 24px rgba(129, 140, 248, 0.35); }
.accent-red { color: var(--red); text-shadow: 0 0 24px rgba(251, 146, 60, 0.35); }

/* ----------------- background fx ----------------- */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}
.bg-scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.012) 0,
    rgba(255, 255, 255, 0.012) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.7;
}
[data-theme="light"] .bg-scanlines { display: none; }
.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb {
  position: absolute; width: 600px; height: 600px; border-radius: 50%;
  filter: blur(120px); opacity: var(--orb-op);
}
.orb-cyan { background: radial-gradient(circle, #818cf8 0%, transparent 60%); top: -200px; right: -150px; animation: float1 22s ease-in-out infinite; }
.orb-red  { background: radial-gradient(circle, #fb923c 0%, transparent 60%); bottom: -200px; left: -100px; animation: float2 26s ease-in-out infinite; }

@keyframes float1 { 50% { transform: translate(-60px, 60px); } }
@keyframes float2 { 50% { transform: translate(80px, -50px); } }

main, header, footer { position: relative; z-index: 2; }

/* ----------------- NAV ----------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 18px rgba(129, 140, 248, 0.45));
}
.brand-mark img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-mark img {
  animation: brand-spin 3.6s linear infinite;
  filter: drop-shadow(0 0 14px rgba(129, 140, 248, 0.55));
}
@keyframes brand-spin {
  to { transform: rotate(360deg); }
}
.brand-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.brand.small .brand-mark { width: 36px; height: 36px; }
[data-theme="light"] .brand-mark {
  filter: drop-shadow(0 4px 18px rgba(99, 102, 241, 0.35));
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-cn { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--fg-0); letter-spacing: 0.6px; }
.brand-en { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 1.2px; text-transform: uppercase; }
.brand.small .brand-cn { font-size: 16px; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px; color: var(--fg-2); font-weight: 500;
  position: relative; padding: 6px 2px;
  transition: color .2s;
}
.nav-links a:hover { color: var(--fg-0); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--red));
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta { display: flex; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600; font-size: 13.5px;
  padding: 9px 16px; border-radius: 4px;
  border: 1px solid transparent;
  transition: all .2s ease;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.btn-primary {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.16), rgba(129, 140, 248, 0.05));
  color: var(--cyan);
  border-color: rgba(129, 140, 248, 0.45);
}
.btn-primary:hover { background: rgba(129, 140, 248, 0.22); box-shadow: 0 0 24px rgba(129, 140, 248, 0.25); transform: translateY(-1px); }
.btn-ghost {
  color: var(--fg-1); border-color: rgba(148, 163, 184, 0.25); background: rgba(148, 163, 184, 0.05);
}
.btn-ghost:hover { color: var(--fg-0); border-color: rgba(148, 163, 184, 0.5); }

.btn-primary-lg, .btn-ghost-lg {
  padding: 14px 24px; font-size: 14.5px;
}
.btn-primary-lg {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--cyan-2) 100%);
  color: #001318; font-weight: 700;
  box-shadow: 0 8px 30px rgba(129, 140, 248, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.btn-primary-lg:hover { transform: translateY(-2px); box-shadow: 0 14px 44px rgba(129, 140, 248, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.3); }
.btn-ghost-lg {
  color: var(--fg-0); border-color: rgba(148, 163, 184, 0.35); background: rgba(255, 255, 255, 0.02);
}
.btn-ghost-lg:hover { border-color: var(--cyan); color: var(--cyan); }

/* ----------------- HERO ----------------- */
.hero { padding: 80px 0 0; position: relative; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start;
  padding-bottom: 80px;
}
.boot-line {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(129, 140, 248, 0.04);
  margin-bottom: 28px;
}
.boot-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan); animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { transform: scale(1.4); opacity: 0.6; } }
.boot-text { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: 0.4px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(46px, 6.5vw, 92px);
  line-height: 1.02;
  letter-spacing: -1px;
  color: var(--fg-0);
  margin-bottom: 28px;
}
.hero-line { display: block; }

.hero-sub {
  max-width: 540px;
  font-size: 17px; color: var(--fg-2); line-height: 1.7;
  margin-bottom: 32px;
}
.hero-sub b { color: var(--fg-0); font-weight: 600; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.meta-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line-2);
  background: var(--card-bg);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-1);
  letter-spacing: 0.4px;
  border-radius: 4px;
}
.meta-tag i { width: 6px; height: 6px; border-radius: 50%; }
.meta-tag .dot-cyan { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.meta-tag .dot-red  { background: var(--red);  box-shadow: 0 0 8px var(--red); }

.hero-cta { display: flex; gap: 14px; margin-bottom: 56px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat {
  padding: 22px 0 22px 18px;
  border-right: 1px solid var(--line);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: 36px; color: var(--fg-0); line-height: 1;
  display: flex; align-items: baseline; gap: 4px;
}
.stat-unit, .stat-plus { font-size: 18px; color: var(--cyan); font-weight: 600; }
.stat-label { margin-top: 6px; font-size: 11.5px; color: var(--fg-3); letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-mono); }

/* ----- hero right (device) ----- */
.hero-right { display: flex; flex-direction: column; gap: 28px; }

.device-frame {
  position: relative;
  padding: 36px 28px 32px;
  background: linear-gradient(180deg, var(--card-bg-strong), var(--surface));
  border: 1px solid var(--line-2);
  border-radius: 6px;
  overflow: hidden;
}
.device-frame::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(129, 140, 248, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.device-corner {
  position: absolute; width: 18px; height: 18px;
  border: 2px solid var(--cyan);
}
.device-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.device-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.device-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.device-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.device-screen { position: relative; z-index: 1; }
.screen-bezel {
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(circle at center, rgba(129, 140, 248, 0.06), transparent 70%),
    #050810;
  box-shadow: inset 0 0 60px rgba(129, 140, 248, 0.08);
}
.screen-content {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(129, 140, 248, 0.4);
  background:
    radial-gradient(circle at 30% 20%, rgba(129, 140, 248, 0.18), transparent 50%),
    radial-gradient(circle at 80% 90%, rgba(251, 146, 60, 0.12), transparent 50%),
    #060912;
  overflow: hidden;
  border-radius: 4px;
}
.screen-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(129, 140, 248, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.08) 1px, transparent 1px);
  background-size: 16px 16px;
}
.screen-wave { position: absolute; left: 0; right: 0; top: 40%; height: 60px; }
.screen-wave svg { width: 100%; height: 100%; }
.screen-wave svg path { animation: wave 4s ease-in-out infinite; }
.screen-wave svg path:nth-child(2) { animation-delay: 0.5s; }
@keyframes wave { 50% { transform: translateY(8px); } }

.screen-text {
  position: absolute; left: 18px; bottom: 22px;
  font-family: var(--font-mono); font-size: 13px;
  color: rgba(129, 140, 248, 0.85); line-height: 1.7;
  text-shadow: 0 0 8px rgba(129, 140, 248, 0.5);
}
.screen-text .cy { color: #fff; }
.caret { display: inline-block; animation: blink 0.9s steps(1) infinite; color: var(--cyan); }
@keyframes blink { 50% { opacity: 0; } }

.screen-corners span {
  position: absolute; width: 10px; height: 10px;
  border: 1.5px solid var(--cyan);
}
.screen-corners span:nth-child(1) { top: 6px; left: 6px; border-right: none; border-bottom: none; }
.screen-corners span:nth-child(2) { top: 6px; right: 6px; border-left: none; border-bottom: none; }
.screen-corners span:nth-child(3) { bottom: 6px; left: 6px; border-right: none; border-top: none; }
.screen-corners span:nth-child(4) { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.device-ports {
  display: flex; gap: 12px; list-style: none;
  margin: 24px 0 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  position: relative; z-index: 1;
}
.device-ports li { display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); border-radius: 3px; }
.device-ports .led {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.device-ports .led.on { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.device-ports .led.pulse { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); animation: pulse 1.5s infinite; }
.device-ports .led.red { background: var(--red); box-shadow: 0 0 6px var(--red); }

.device-label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  position: relative; z-index: 1;
  letter-spacing: 0.5px;
}
.label-status .ok { color: #4ade80; }

/* terminal */
.terminal {
  border: 1px solid var(--line-2);
  background: rgba(4, 6, 13, 0.92);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.terminal-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: rgba(12, 19, 34, 0.8);
  border-bottom: 1px solid var(--line);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot-r { background: #ff5577; }
.tdot-y { background: #fbbf24; }
.tdot-g { background: #4ade80; }
.terminal-title {
  margin-left: 10px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3);
}
.terminal-body {
  padding: 18px 20px;
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--fg-1); line-height: 1.75;
  overflow-x: auto;
}
.terminal-body .cmt { color: var(--fg-3); }
.terminal-body .cm { color: var(--red); }
.terminal-body .kw { color: var(--cyan); }
.terminal-body .str { color: #a3e635; }
.terminal-body .ok { color: #4ade80; }

/* marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 0;
  overflow: hidden;
  position: relative;
}
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 140px; pointer-events: none; z-index: 1;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-0), transparent); }
.marquee::after  { right: 0; background: linear-gradient(-90deg, var(--bg-0), transparent); }
.marquee-track {
  display: flex; gap: 32px; align-items: center;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  font-family: var(--font-display); font-weight: 600;
  font-size: 14px; letter-spacing: 3px;
  color: var(--fg-1);
}
.marquee-track i { color: var(--red); font-style: normal; }
.marquee-track span:hover { color: var(--cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----------------- SECTION COMMON ----------------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--surface), var(--card-bg-strong)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.section-head.wide { max-width: 1100px; }
.section-title.nowrap { white-space: nowrap; }
@media (max-width: 720px) {
  .section-title.nowrap { white-space: normal; }
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
  letter-spacing: 2.5px; text-transform: uppercase;
  margin-bottom: 18px;
}
.kicker-idx { color: var(--red); }
.section-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 4vw, 52px); color: var(--fg-0);
  line-height: 1.1; letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.section-desc { font-size: 16px; color: var(--fg-2); line-height: 1.7; max-width: 640px; margin: 0 auto; }

/* ----------------- PRODUCT ----------------- */
.product-stage {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center;
}
.product-img-wrap {
  position: relative;
  padding: 40px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--card-bg), var(--surface));
  border-radius: 8px;
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-glow {
  position: absolute;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.25), transparent 60%);
  filter: blur(60px);
  z-index: 0;
}
.product-img { position: relative; z-index: 1; max-height: 360px; object-fit: contain; }
.product-rings span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 50%;
}
.product-rings span:nth-child(1) { width: 200px; height: 200px; animation: ring 6s linear infinite; }
.product-rings span:nth-child(2) { width: 320px; height: 320px; animation: ring 9s linear infinite reverse; opacity: 0.7; }
.product-rings span:nth-child(3) { width: 460px; height: 460px; animation: ring 13s linear infinite; opacity: 0.5; }
@keyframes ring { to { transform: translate(-50%, -50%) rotate(360deg); } }

.product-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.callout {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 6px;
  position: relative;
  transition: all .25s;
}
.callout:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(129, 140, 248, 0.08); }
.callout-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--cyan);
  letter-spacing: 1.5px; margin-bottom: 10px;
}
.callout h4 { font-family: var(--font-sans); font-size: 16px; font-weight: 700; color: var(--fg-0); margin-bottom: 8px; }
.callout p { font-size: 13px; color: var(--fg-2); line-height: 1.6; }

/* ----------------- ARCH ----------------- */
.arch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 64px; }
.arch-card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--line-2);
  background:
    linear-gradient(180deg, var(--cyan-soft), var(--card-bg));
  border-radius: 6px;
  transition: all .3s;
  overflow: hidden;
}
.arch-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}
.arch-card-mid::before { background: linear-gradient(90deg, var(--red), transparent); }
.arch-card:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 18px 60px rgba(129, 140, 248, 0.1); }
.arch-card-mid:hover { border-color: var(--red); box-shadow: 0 18px 60px rgba(251, 146, 60, 0.1); }

.arch-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
  font-family: var(--font-mono); font-size: 11.5px;
  letter-spacing: 1px;
}
.arch-id {
  padding: 4px 9px; border-radius: 3px;
  background: var(--red-soft); color: var(--red);
  font-weight: 700;
}
.arch-card:first-child .arch-id, .arch-card:last-child .arch-id {
  background: var(--cyan-soft); color: var(--cyan);
}
.arch-name { color: var(--fg-2); }

.arch-card h3 {
  font-family: var(--font-sans); font-size: 20px; font-weight: 700; color: var(--fg-0);
  margin-bottom: 14px;
}
.arch-card p { font-size: 14px; color: var(--fg-2); line-height: 1.7; margin-bottom: 22px; }
.arch-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.arch-feats li {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-1); padding: 5px 10px;
  border: 1px solid var(--line-2); border-radius: 3px;
  background: rgba(0, 0, 0, 0.3);
}
.arch-feats b { color: var(--cyan); }
.arch-card-mid .arch-feats b { color: var(--red); }

/* stack */
.stack {
  border: 1px solid var(--line-2);
  background: var(--surface);
  border-radius: 6px;
  padding: 28px;
}
.stack-title {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line-2);
}
.stack-rows { display: flex; flex-direction: column; gap: 10px; }
.stack-row {
  display: grid; grid-template-columns: 80px 1fr; align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card-bg);
  font-size: 14px; color: var(--fg-1);
  transition: all .25s;
}
.stack-row:hover { border-color: var(--cyan); transform: translateX(4px); }
.row-tag {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  color: var(--cyan); letter-spacing: 1.5px;
}
.r5 .row-tag { color: var(--red); }
.r4 .row-tag { color: #a3e635; }
.r3 .row-tag { color: #fbbf24; }

/* ----------------- SPECS ----------------- */
.specs-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.spec-card {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 6px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.spec-card::after {
  content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--red));
  transition: width .35s;
}
.spec-card:hover::after { width: 100%; }
.spec-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.spec-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--line-2);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--cyan); margin-bottom: 14px;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.04);
}
.spec-key {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px;
}
.spec-val { font-size: 18px; font-weight: 700; color: var(--fg-0); margin-bottom: 6px; line-height: 1.3; }
.spec-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-2); line-height: 1.65; }

/* ----------------- SAMPLES ----------------- */
.samples-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.sample {
  padding: 22px 20px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 6px;
  transition: all .25s;
  position: relative;
  display: block;
}
.sample:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: rgba(129, 140, 248, 0.06);
  box-shadow: 0 10px 30px rgba(129, 140, 248, 0.1);
}
.s-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.s-idx {
  font-family: var(--font-display); font-weight: 700;
  font-size: 22px; color: var(--cyan);
}
.s-tag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700;
  padding: 3px 7px; border-radius: 2px;
  letter-spacing: 1px;
}
.tag-base { background: rgba(148, 163, 184, 0.15); color: var(--fg-1); }
.tag-rtos { background: rgba(129, 140, 248, 0.15); color: var(--cyan); }
.tag-peri { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.tag-net  { background: rgba(163, 230, 53, 0.15); color: #a3e635; }
.tag-sle  { background: rgba(251, 146, 60, 0.15); color: var(--red); }
.sample h4 { font-size: 15px; font-weight: 700; color: var(--fg-0); margin-bottom: 6px; }
.sample p { font-size: 12.5px; color: var(--fg-3); line-height: 1.55; }

/* ----------------- WORKFLOW ----------------- */
.steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  position: relative;
}
.steps::before {
  content: ""; position: absolute;
  top: 36px; left: 5%; right: 5%; height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--red));
  opacity: 0.3;
  z-index: 0;
}
.step {
  position: relative; z-index: 1;
  padding: 24px;
  border: 1px solid var(--line-2);
  background: var(--card-bg-strong);
  border-radius: 6px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  color: var(--bg-0);
  background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
  border-radius: 4px;
  margin-bottom: 18px;
  box-shadow: 0 0 24px rgba(129, 140, 248, 0.3);
}
.step:nth-child(2) .step-num { background: linear-gradient(135deg, #a3e635, #65a30d); box-shadow: 0 0 24px rgba(163, 230, 53, 0.3); }
.step:nth-child(3) .step-num { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 0 24px rgba(251, 191, 36, 0.3); }
.step:nth-child(4) .step-num { background: linear-gradient(135deg, var(--red), #e11d48); box-shadow: 0 0 24px rgba(251, 146, 60, 0.3); }
.step h4 { font-size: 17px; font-weight: 700; color: var(--fg-0); margin-bottom: 10px; }
.step p { font-size: 13.5px; color: var(--fg-2); line-height: 1.65; margin-bottom: 12px; }
.step code {
  display: block;
  font-family: var(--font-mono); font-size: 11.5px;
  padding: 9px 11px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--cyan);
  overflow-x: auto;
  white-space: nowrap;
}
.step code.i { display: inline; padding: 1px 5px; font-size: inherit; color: var(--cyan); }

/* ----------------- REPOS ----------------- */
.repos-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-bottom: 48px;
}
.repo {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  border-radius: 6px;
  transition: all .25s;
  display: block;
}
.repo:hover {
  transform: translateY(-3px);
  border-color: var(--cyan);
  background: rgba(129, 140, 248, 0.04);
}
.repo-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.repo-lang {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 3px;
  letter-spacing: 1px;
}
.lang-c   { background: rgba(129, 140, 248, 0.15); color: var(--cyan); }
.lang-cpp { background: rgba(251, 146, 60, 0.15); color: var(--red); }
.lang-md  { background: rgba(163, 230, 53, 0.15); color: #a3e635; }
.lang-xml { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.repo-name {
  font-family: var(--font-mono); font-size: 14.5px; font-weight: 600; color: var(--fg-0);
}
.repo p { font-size: 13px; color: var(--fg-2); line-height: 1.6; }

.repo-cta { text-align: center; }

/* ----------------- PARTNERS ----------------- */
.partners-block { margin-bottom: 48px; }
.partners-block:last-of-type { margin-bottom: 28px; }
.partners-sub {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-weight: 700;
  font-size: 18px; color: var(--fg-0);
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line-2);
}
.partners-sub-tag {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 2px; color: var(--cyan);
  padding: 4px 10px;
  background: var(--cyan-soft);
  border-radius: 3px;
  flex-shrink: 0;
}
.partners-sub-label { color: var(--fg-1); font-size: 16px; font-weight: 600; letter-spacing: 0; font-family: var(--font-sans); flex: 1; }

/* prev/next navigation pair */
.swiper-nav { display: inline-flex; gap: 8px; flex-shrink: 0; }
.swiper-btn {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
  background: var(--card-bg);
  color: var(--fg-1);
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s ease;
  font: inherit;
}
.swiper-btn:hover { color: var(--cyan); border-color: var(--cyan); transform: translateY(-1px); }
.swiper-btn:disabled { opacity: 0.3; cursor: not-allowed; transform: none; color: var(--fg-3); border-color: var(--line); }
.swiper-btn svg { display: block; }

/* swiper wrap (container with fade overlays) */
.swiper-wrap {
  position: relative;
  margin: 0 -28px; /* bleed past container padding for full-width feel */
  padding: 0;
}
.swiper-fade {
  position: absolute; top: 0; bottom: 0; width: 56px;
  pointer-events: none; z-index: 2;
  transition: opacity .2s;
}
.swiper-fade.left  { left: 0;  background: linear-gradient(90deg, var(--bg-0), transparent); }
.swiper-fade.right { right: 0; background: linear-gradient(-90deg, var(--bg-0), transparent); }
.swiper-wrap[data-at-start="true"]  .swiper-fade.left  { opacity: 0; }
.swiper-wrap[data-at-end="true"]    .swiper-fade.right { opacity: 0; }

/* horizontal scroll track — Kimi-style logo strip */
.partners-grid,
.universities-grid {
  display: flex;
  align-items: center;
  gap: 56px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 18px 28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.partners-grid:active,
.universities-grid:active { cursor: grabbing; }
.partners-grid::-webkit-scrollbar,
.universities-grid::-webkit-scrollbar { display: none; }

/* flat item — no card chrome, hugs content */
.partner-card, .uni-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  scroll-margin-left: 28px;
}
/* partner item — flat, logo-strip style */
.partner-card {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  opacity: 0.55;
  transition: opacity .3s, transform .3s, filter .3s;
  filter: grayscale(0.25);
  cursor: pointer;
  position: relative;
  overflow: visible;
}
.partner-card::before { display: none; }
.partner-card:hover {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-2px);
  border: none;
  box-shadow: none;
  background: transparent;
}
/* SVG mark in front of partner name — hidden per spec, leave only brand wordmark */
.p-mark { display: none !important; }
.p-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-0);
  letter-spacing: 0.3px;
  line-height: 1;
  white-space: nowrap;
  padding: 0;
}
.p-role { display: none !important; }

/* universities — same flat strip style */
.uni-card {
  display: inline-flex !important;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  opacity: 0.55;
  transition: opacity .3s, transform .3s, filter .3s;
  filter: grayscale(0.25);
  cursor: pointer;
  position: relative; overflow: visible;
}
.uni-card::before { display: none; }
.uni-card:hover {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-2px);
  border: none;
}
.uni-idx {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  color: var(--red);
  opacity: 0.55;
  padding: 0;
  line-height: 1;
  letter-spacing: 0.5px;
}
.uni-name {
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  color: var(--fg-0); line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.uni-tag { display: none !important; }

.partners-footnote {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 8px;
  padding: 12px 18px;
  border: 1px dashed var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-2);
}
.partners-footnote b { color: var(--cyan); font-weight: 700; }
.partners-footnote .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ----------------- CTA ----------------- */
.cta { padding: 100px 0; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 20% 50%, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(800px 400px at 80% 50%, rgba(251, 146, 60, 0.10), transparent 60%);
}
.cta-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center;
  padding: 56px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--card-bg-strong), var(--surface));
  border-radius: 8px;
}
.cta-tag {
  font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
  letter-spacing: 2px; margin-bottom: 18px;
}
.cta-left h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(28px, 3vw, 40px); color: var(--fg-0); line-height: 1.25;
  letter-spacing: -0.3px;
}
.cta-right { display: flex; flex-direction: column; gap: 14px; }

/* ----------------- FOOTER ----------------- */
.footer { border-top: 1px solid var(--line); background: var(--nav-bg); padding-top: 56px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 40px; }
.foot-col h5 {
  font-family: var(--font-mono); font-size: 11px; color: var(--cyan);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 16px;
}
.foot-col a {
  display: block; padding: 5px 0;
  font-size: 13.5px; color: var(--fg-2);
  transition: color .2s;
}
.foot-col a:hover { color: var(--cyan); }
.foot-desc { font-size: 13px; color: var(--fg-3); line-height: 1.7; margin-top: 14px; max-width: 360px; }

.footer-bar { border-top: 1px solid var(--line); padding: 22px 0; }
.fbar-inner { display: flex; justify-content: space-between; align-items: center; }
.fbar-inner span:first-child { font-size: 12px; color: var(--fg-3); }
.fbar-inner .mono { font-size: 11px; color: var(--fg-3); letter-spacing: 1px; }

/* ============================================================
   INTERACTIVE FX — cursor spotlight, scroll progress, tilt, magnetic
   ============================================================ */

/* scroll progress bar (top) */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--red));
  z-index: 200;
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.5);
  pointer-events: none;
  transition: width .08s linear;
}

/* cursor spotlight (radial light follows mouse) */
.cursor-spot {
  position: fixed; top: 0; left: 0;
  width: 540px; height: 540px;
  pointer-events: none; z-index: 3;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.10) 0%, rgba(251, 146, 60, 0.05) 30%, transparent 65%);
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity .35s ease;
  filter: blur(20px);
}
[data-theme="light"] .cursor-spot {
  /* in light mode the purple wash murders text contrast — keep it almost invisible */
  background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 60%);
  mix-blend-mode: normal;
  width: 360px; height: 360px;
}
body.has-cursor .cursor-spot { opacity: 1; }
@media (hover: none) { .cursor-spot { display: none; } }

/* cursor dot (small precise dot at pointer) */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan), 0 0 24px rgba(129, 140, 248, 0.6);
  pointer-events: none; z-index: 999;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .2s, transform .15s cubic-bezier(.2, .8, .2, 1), background .2s;
  mix-blend-mode: screen;
}
body.has-cursor .cursor-dot { opacity: 0.9; }
body.cursor-clickable .cursor-dot { transform: translate(-50%, -50%) scale(2.2); background: var(--red); box-shadow: 0 0 14px var(--red), 0 0 28px rgba(251, 146, 60, 0.6); }
@media (hover: none) { .cursor-dot { display: none; } }

/* tilt cards (3D rotate on mouse move) */
.tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.tilt > * { transform: translateZ(0); }

/* magnetic buttons */
.btn-primary-lg, .btn-ghost-lg { will-change: transform; }

/* hero title word reveal */
.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  filter: blur(8px);
  transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1), filter .8s;
}
.hero-title.revealed .word { opacity: 1; transform: translateY(0); filter: blur(0); }
.hero-title .word:nth-child(1) { transition-delay: 0.05s; }
.hero-title .word:nth-child(2) { transition-delay: 0.15s; }
.hero-title .word:nth-child(3) { transition-delay: 0.25s; }
.hero-title .word:nth-child(4) { transition-delay: 0.35s; }

/* floating particles overlay */
.particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0;
  animation: float-particle linear infinite;
  box-shadow: 0 0 6px var(--cyan);
}
.particle.warm { background: var(--red); box-shadow: 0 0 6px var(--red); }
@keyframes float-particle {
  0% { opacity: 0; transform: translateY(100vh) translateX(0); }
  10% { opacity: 0.5; }
  90% { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-100px) translateX(60px); }
}

/* link / button hover micro-bounce */
.btn-primary-lg:active, .btn-ghost-lg:active { transform: translateY(-2px) scale(.97); transition-duration: .05s; }

/* ----------------- THEME TOGGLE BUTTON ----------------- */
.theme-toggle, .lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--line-2);
  background: var(--card-bg);
  color: var(--fg-1);
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s ease;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
}
.theme-toggle:hover, .lang-toggle:hover {
  border-color: var(--cyan); color: var(--cyan);
  transform: translateY(-1px);
}
.lang-toggle { width: auto; padding: 0 12px; gap: 4px; }
.lang-toggle .lang-current { color: var(--cyan); }
.lang-toggle .lang-sep { color: var(--fg-3); }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ----------------- ALWAYS-DARK SURFACES (terminal, codeblock) ----------------- */
[data-theme="light"] .terminal,
[data-theme="light"] .codeblock {
  --fg-0: #f1f5f9;
  --fg-1: #cbd5e1;
  --fg-2: #94a3b8;
  --fg-3: #64748b;
  --line: rgba(96, 165, 250, 0.10);
  --line-2: rgba(96, 165, 250, 0.22);
  background: rgba(4, 6, 13, 0.92);
  color: var(--fg-1);
  border-color: rgba(96, 165, 250, 0.22);
}
[data-theme="light"] .terminal-head,
[data-theme="light"] .code-head {
  background: rgba(12, 19, 34, 0.85);
  border-bottom-color: rgba(96, 165, 250, 0.10);
}
[data-theme="light"] .terminal-body,
[data-theme="light"] .code-body { color: #cbd5e1; }
[data-theme="light"] .terminal-title, [data-theme="light"] .code-title { color: #64748b; }
/* terminal cyan/red/string keep their hardcoded brand colors – no override needed */

/* device screen (TFT simulator) always reads dark */
[data-theme="light"] .screen-bezel,
[data-theme="light"] .screen-content { background: #050810; }

/* footer needs different border in light mode */
[data-theme="light"] .footer-bar { background: rgba(15, 23, 42, 0.04); }

/* btn-ghost contrast tweak in light mode */
[data-theme="light"] .btn-ghost {
  background: rgba(15, 23, 42, 0.04);
  color: var(--fg-0);
}

/* ---------- light-mode chip / button readability ----------
   strategy: anywhere we have a SOLID colored bg in light mode, text becomes WHITE.
   dark mode is untouched. */

/* small primary button (nav): solid indigo + white */
[data-theme="light"] .btn-primary {
  background: #4338ca;
  color: #fff;
  border-color: #4338ca;
}
[data-theme="light"] .btn-primary:hover { background: #312e81; border-color: #312e81; box-shadow: 0 6px 18px rgba(67, 56, 202, 0.32); }

/* LARGE primary CTA buttons (hero / cta / repos sections) — these have solid
   indigo gradient bg. Original color #001318 was dark-on-dark in light mode.
   Force WHITE in light mode. */
[data-theme="light"] .btn-primary-lg,
[data-theme="light"] .btn-primary-lg:hover {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
[data-theme="light"] .btn-primary-lg svg { stroke: #fff; }

/* step-num badges: large gradient indigo blocks with the step digits.
   They use color: var(--bg-0) which in light = near-white. Force white explicitly. */
[data-theme="light"] .step-num { color: #fff; }

/* sample/tag chips: solid color + white text */
[data-theme="light"] .tag-base { background: #475569; color: #fff; }
[data-theme="light"] .tag-rtos { background: #4338ca; color: #fff; }
[data-theme="light"] .tag-peri { background: #b45309; color: #fff; }
[data-theme="light"] .tag-net  { background: #4d7c0f; color: #fff; }
[data-theme="light"] .tag-sle  { background: #c2410c; color: #fff; }

/* repo language chips */
[data-theme="light"] .lang-c   { background: #4338ca; color: #fff; }
[data-theme="light"] .lang-cpp { background: #c2410c; color: #fff; }
[data-theme="light"] .lang-md  { background: #4d7c0f; color: #fff; }
[data-theme="light"] .lang-xml { background: #b45309; color: #fff; }

/* architecture id badges */
[data-theme="light"] .arch-id { background: #4338ca; color: #fff; }
[data-theme="light"] .arch-card-mid .arch-id { background: #c2410c; color: #fff; }

/* feature pills inside arch cards */
[data-theme="light"] .arch-feats li {
  background: rgba(15, 23, 42, 0.04);
  color: var(--fg-1);
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .arch-feats b { color: #312e81; }
[data-theme="light"] .arch-card-mid .arch-feats b { color: #9a3412; }

/* meta tag inside hero: dark text on white (text-like, not a badge) */
[data-theme="light"] .meta-tag { background: rgba(255, 255, 255, 0.85); color: var(--fg-0); }

/* boot pill — light bg + BLACK text (per user spec) */
[data-theme="light"] .boot-line {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(15, 23, 42, 0.14);
  color: #0b1220;
}
[data-theme="light"] .boot-text { color: #0b1220; }
[data-theme="light"] .boot-dot {
  background: #4338ca;
  box-shadow: 0 0 12px rgba(67, 56, 202, 0.55);
}

/* hero stat plus / unit */
[data-theme="light"] .stat-unit, [data-theme="light"] .stat-plus { color: #4338ca; }

/* partners sub-tag: solid indigo + white */
[data-theme="light"] .partners-sub-tag {
  background: #4338ca;
  color: #fff;
}
/* p-mark is hidden globally (see .p-mark rule above) */
[data-theme="light"] .uni-idx { color: #c2410c; }

/* footnote bold text — text only, on white card bg */
[data-theme="light"] .partners-footnote b { color: #4338ca; }

/* article tag-cat in docs: solid orange + white */
[data-theme="light"] .tag-cat { background: #c2410c; color: #fff; }
/* docs side-idx (group index chip in sidebar) */
[data-theme="light"] .side-idx { background: #c2410c; color: #fff; }

/* boot-line dot/text in light mode pop better */
[data-theme="light"] .boot-line { background: rgba(99, 102, 241, 0.06); }

/* sample/spec/arch cards hover in light mode */
[data-theme="light"] .sample:hover,
[data-theme="light"] .repo:hover { background: rgba(99, 102, 241, 0.06); }
[data-theme="light"] .stack-row:hover { background: rgba(99, 102, 241, 0.04); }
[data-theme="light"] .spec-table tbody tr:hover { background: rgba(99, 102, 241, 0.04); }
[data-theme="light"] .callout:hover,
[data-theme="light"] .arch-card:hover { box-shadow: 0 12px 30px rgba(99, 102, 241, 0.08); }

/* marquee gradient fades — switch overlay color to match light bg-0 */
[data-theme="light"] .marquee::before { background: linear-gradient(90deg, var(--bg-0), transparent); }
[data-theme="light"] .marquee::after { background: linear-gradient(-90deg, var(--bg-0), transparent); }

/* ============================================================
   MOBILE — hamburger + drawer
   ============================================================ */
.nav-menu-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  padding: 0;
  border: 1px solid var(--line-2);
  background: var(--card-bg);
  color: var(--fg-0);
  border-radius: 4px;
  cursor: pointer;
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.nav-menu-toggle:hover { color: var(--cyan); border-color: var(--cyan); }
.nav-menu-toggle svg { display: block; }
.nav-menu-toggle .icon-bar {
  transform-origin: center;
  transition: transform .3s ease, opacity .2s ease;
}
.nav-menu-toggle.open .icon-bar.top { transform: translateY(6px) rotate(45deg); }
.nav-menu-toggle.open .icon-bar.mid { opacity: 0; }
.nav-menu-toggle.open .icon-bar.bot { transform: translateY(-6px) rotate(-45deg); }

/* backdrop for any open drawer */
.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ----------------- RESPONSIVE ----------------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 64px; }
  .product-stage { grid-template-columns: 1fr; gap: 40px; }
  .arch-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .samples-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .repos-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { grid-template-columns: 1fr; padding: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  /* === nav: hamburger + drawer === */
  .nav-menu-toggle { display: inline-flex; }
  .nav-inner { padding: 12px 18px; gap: 12px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn-ghost,
  .nav-cta .btn-primary,
  .nav-cta .docs-search { display: none; }

  /* turn .nav-links into a slide-in drawer (reuses existing markup) */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0; right: 0;
    flex-direction: column;
    width: min(320px, 86vw);
    height: 100dvh;
    background: var(--bg-1);
    padding: calc(64px + env(safe-area-inset-top)) 28px calc(24px + env(safe-area-inset-bottom));
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    z-index: 150;
    gap: 0;
    overflow-y: auto;
    border-left: 1px solid var(--line-2);
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.25);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    padding: 18px 4px;
    font-size: 17px;
    font-weight: 600;
    color: var(--fg-0);
    border-bottom: 1px solid var(--line);
    -webkit-tap-highlight-color: transparent;
  }
  .nav-links a::after { display: none; } /* drop hover underline in drawer */
  .nav-links a:active { color: var(--cyan); }
  .nav-links a.active { color: var(--cyan); }

  /* drawer accent strip at top */
  .nav-links::before {
    content: ""; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--cyan), var(--red));
  }

  /* === general mobile layout === */
  .container { padding: 0 18px; }
  .hero { padding: 32px 0 0; }
  .hero-title { font-size: clamp(38px, 10vw, 56px) !important; }
  .hero-sub { font-size: 15px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats .stat:nth-child(2) { border-right: none; }
  .hero-stats .stat { padding: 18px 0 18px 14px; }
  .stat-num { font-size: 28px; }

  /* device-frame and terminal compact */
  .hero-right { max-width: 100%; }
  .device-frame { padding: 24px 18px 22px; }
  .device-frame .screen-bezel { padding: 10px; }
  .terminal-body { padding: 14px 16px; font-size: 11.5px; }
  .terminal-title { font-size: 10.5px; }

  /* section content */
  .specs-grid, .samples-grid, .steps, .repos-grid, .product-callouts { grid-template-columns: 1fr; }
  .swiper-wrap { margin: 0 -18px; }
  .partners-grid, .universities-grid { padding: 14px 18px; gap: 32px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 40px; }
  .section-title { font-size: clamp(26px, 7.5vw, 38px) !important; }
  .section-desc { font-size: 14.5px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 28px; }
  .fbar-inner { flex-direction: column; gap: 8px; text-align: center; padding: 16px 0; }
  .partners-sub { flex-direction: column; align-items: flex-start; gap: 8px; }
  .swiper-nav { align-self: flex-end; }

  /* product image area */
  .product-img-wrap { padding: 24px; min-height: 280px; }
  .product-glow { width: 280px; height: 280px; }
  .product-img { max-height: 240px; }
  .product-rings span:nth-child(2),
  .product-rings span:nth-child(3) { display: none; }

  /* arch cards stack */
  .arch-card { padding: 22px 20px; }
  .stack { padding: 20px; }
  .stack-row { padding: 12px 14px; font-size: 13px; }
  .row-tag { font-size: 10px; }

  /* boot pill stays inline but smaller */
  .boot-line { padding: 7px 12px; }
  .boot-text { font-size: 11px; }

  /* CTA section */
  .cta-inner { padding: 28px 22px; gap: 28px; }
  .cta-left h2 { font-size: clamp(22px, 6.5vw, 30px); }
  .cta-right { gap: 10px; }
  .cta-right .btn { width: 100%; justify-content: center; }

  /* desktop-only interactive fx off */
  .cursor-spot, .cursor-dot { display: none; }

  /* hide swiper arrows on touch (swipe is natural) */
  .swiper-nav { display: none; }

  /* touch tap targets */
  a, button { -webkit-tap-highlight-color: transparent; }
  .btn { min-height: 44px; touch-action: manipulation; }
}

/* === extra-small phones (320–480px) === */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 24px 0 0; }
  .hero-title { font-size: clamp(34px, 10vw, 48px) !important; }
  .hero-grid { gap: 40px; }
  .hero-meta { gap: 6px; }
  .meta-tag { padding: 6px 10px; font-size: 11px; }
  .hero-stats { padding: 0; }
  .stat-num { font-size: 24px; }
  .stat-label { font-size: 10px; }

  .section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }
  .section-title { font-size: clamp(22px, 7.5vw, 32px) !important; }
  .kicker { font-size: 10.5px; }

  /* tighten partners */
  .partners-grid, .universities-grid { gap: 28px; padding: 12px 16px; }
  .p-name, .uni-name { font-size: 15px; }
  .uni-idx { font-size: 16px; }

  /* spec cards: don't shrink to wallpapers, keep at 1 col */
  .spec-card { padding: 18px; }
  .spec-val { font-size: 16px; }

  /* terminal */
  .terminal-body { font-size: 11px; padding: 12px 14px; }

  /* sample chips smaller */
  .sample { padding: 18px 16px; }
  .s-idx { font-size: 20px; }
}

/* === touch only (no fine cursor) === */
@media (hover: none) {
  .tilt:hover { transform: none !important; }
}
