/* ============================================================
   China Robotics Insider - Global Stylesheet
   Modern, clean, fast-loading design for a content website.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --navy-900: #0a1a33;
  --navy-800: #0f2447;
  --navy-700: #16305c;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --teal-500: #0d9488;
  --amber-500: #f59e0b;
  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --ink-300: #9ca3af;
  --bg: #f8fafc;
  --bg-soft: #eef2f7;
  --white: #ffffff;
  --line: #e5e7eb;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --font: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --maxw: 1120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
ul { list-style: none; }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--navy-900); }
.brand .logo-mark { width: 34px; height: 34px; }
.brand span b { color: var(--blue-600); }
.main-nav ul { display: flex; gap: 6px; }
.main-nav a {
  display: inline-block; padding: 8px 13px; border-radius: 8px;
  font-size: 0.95rem; font-weight: 600; color: var(--ink-700);
}
.main-nav a:hover { color: var(--blue-600); background: var(--bg-soft); }
.main-nav a.active { color: var(--blue-600); background: var(--bg-soft); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 40px; height: 40px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink-900); margin: 5px auto; border-radius: 2px; transition: 0.2s; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, #1e3a8a 100%);
  color: #fff; padding: 84px 0 76px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(245,158,11,0.28) 0%, rgba(245,158,11,0) 68%);
}
.hero .grid-circles {
  position: absolute; left: -80px; bottom: -90px; width: 340px; height: 340px; opacity: 0.16;
  background:
    radial-gradient(circle at 30% 30%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 50% 80%, #fff 0 2px, transparent 3px);
  background-size: 90px 90px;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.22);
  color: #fde68a; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 18px; }
.hero h1 .accent { color: #fbbf24; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #dbe3f0; max-width: 660px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 0.98rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber-500); color: var(--navy-900); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: #fbbf24; color: var(--navy-900); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.35); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--white); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 34px 0; }
.stat { text-align: center; }
.stat .num { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 900; color: var(--navy-900); }
.stat .num em { font-style: normal; color: var(--blue-600); }
.stat .lbl { font-size: 0.88rem; color: var(--ink-500); margin-top: 4px; }

/* ---------- Section ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head .eyebrow {
  color: var(--blue-600); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em;
  text-transform: uppercase; margin-bottom: 10px; display: inline-flex; align-items: center; gap: 8px;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 12px; }
.section-head p { color: var(--ink-500); font-size: 1.05rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .card-icon { width: 46px; height: 46px; margin-bottom: 16px; }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card h3 a { color: var(--ink-900); }
.card h3 a:hover { color: var(--blue-600); }
.card p { font-size: 0.95rem; color: var(--ink-500); flex: 1; }
.card .tag-row { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--bg-soft); color: var(--ink-700);
}
.tag.teal { background: #e6f7f5; color: #0d9488; }
.tag.amber { background: #fdf1e0; color: #b45309; }
.tag.blue { background: #e8effc; color: #1d4ed8; }
.tag.navy { background: #e6ecf5; color: #16305c; }

/* ---------- Grid 3 cols ---------- */
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Profile cards (people) ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.profile-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.avatar {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--blue-600));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.3rem; letter-spacing: 0.02em;
}
.avatar.alt { background: linear-gradient(135deg, var(--teal-500), var(--blue-600)); }
.avatar.alt2 { background: linear-gradient(135deg, #b45309, var(--amber-500)); }
.avatar.alt3 { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.profile-top .pname { font-size: 1.12rem; font-weight: 800; color: var(--ink-900); }
.profile-top .prole { font-size: 0.86rem; color: var(--ink-500); }
.profile-card p.bio { font-size: 0.94rem; color: var(--ink-500); margin-bottom: 14px; }
.profile-card .fact {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 0.88rem; color: var(--ink-700); padding-top: 12px; border-top: 1px dashed var(--line);
}
.profile-card .fact strong { color: var(--blue-600); font-weight: 800; white-space: nowrap; }

/* ---------- Timeline (history) ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding-left: 8px; }
.timeline::before {
  content: ""; position: absolute; left: 20px; top: 8px; bottom: 8px; width: 3px;
  background: linear-gradient(180deg, var(--blue-600), var(--teal-500), var(--amber-500));
  border-radius: 3px; opacity: 0.55;
}
.tl-item { position: relative; padding: 0 0 42px 64px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: 9px; top: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--blue-600); box-shadow: var(--shadow-sm);
}
.tl-item .era {
  display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em;
  color: #fff; background: var(--navy-800); padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.tl-item h3 { font-size: 1.25rem; margin-bottom: 8px; }
.tl-item p { color: var(--ink-500); font-size: 0.98rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 640px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 800; color: var(--ink-900); }
tr:last-child td { border-bottom: 0; }
td .cn { color: var(--ink-300); font-size: 0.8rem; }

/* ---------- Callout / quote ---------- */
.callout {
  background: #eef4ff; border-left: 4px solid var(--blue-600);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; margin: 26px 0;
}
.callout p { color: var(--ink-700); }
.blockquote {
  background: var(--bg-soft); border-left: 4px solid var(--ink-300);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0;
}
.blockquote p { color: var(--ink-700); font-style: italic; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius-lg); padding: 48px 40px; margin-top: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
}
.cta-band h3 { color: #fff; font-size: 1.5rem; margin-bottom: 8px; }
.cta-band p { color: #cbd5e1; max-width: 560px; }
.cta-band .btn { flex-shrink: 0; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 70%, #1e3a8a 100%);
  color: #fff; padding: 64px 0 58px; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; left: 40%; top: -160px; width: 420px; height: 420px; opacity: 0.14;
  background: radial-gradient(circle, #fff 0 2px, transparent 3px); background-size: 70px 70px;
}
.page-hero .ph-inner { position: relative; z-index: 1; max-width: 820px; }
.page-hero .kicker { color: #fde68a; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 14px; }
.page-hero p { color: #dbe3f0; font-size: 1.08rem; max-width: 720px; }

/* ---------- Article / prose ---------- */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.55rem; margin: 40px 0 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.prose h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.prose p { margin-bottom: 16px; color: var(--ink-700); }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.prose ul li { margin-bottom: 6px; }
.prose strong { color: var(--ink-900); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #cbd5e1; padding: 56px 0 32px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.footer-grid a { color: #cbd5e1; display: block; padding: 4px 0; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-about p { font-size: 0.92rem; color: #94a3b8; margin-top: 12px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.85rem; color: #94a3b8;
}

/* ---------- Misc ---------- */
.more-link { font-weight: 700; font-size: 0.95rem; }
.note { font-size: 0.85rem; color: var(--ink-300); }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mb-24 { margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    padding: 12px 20px 18px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { display: block; padding: 11px 10px; }
  .nav-toggle { display: block; }
  .cta-band { padding: 34px 24px; }
}
