:root {
  --bg: #f3f6fc;
  --bg-soft: #e9f0ff;
  --surface: rgba(255, 255, 255, 0.82);
  --text: #091b31;
  --muted: #4f617a;
  --line: #d7e1f1;
  --brand: #155dfc;
  --brand-warm: #fb923c;
  --brand-cool: #0ea5a0;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 24px 50px rgba(21, 93, 252, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(21, 93, 252, 0.15), transparent 70%),
    radial-gradient(900px 450px at 90% 0%, rgba(14, 165, 160, 0.12), transparent 65%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 42%, #f7f9fd 100%);
  line-height: 1.65;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 16, 56, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 16, 56, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 100%);
  z-index: -1;
}

.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--text);
}
.skip-link:focus { left: 16px; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin-top: 12px;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(0, 32, 80, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: conic-gradient(from 140deg, var(--brand), var(--brand-warm), var(--brand-cool), var(--brand));
}

.site-nav {
  display: inline-flex;
  gap: 14px;
}

.site-nav a {
  text-decoration: none;
  font-size: 14px;
  color: #213552;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background-color 180ms ease, color 180ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: #e9efff;
  color: var(--brand);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-solid {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, #266bff 55%, var(--brand-cool) 100%);
  box-shadow: 0 12px 24px rgba(21, 93, 252, 0.26);
}

.btn-outline {
  color: var(--brand);
  border: 1px solid rgba(21, 93, 252, 0.3);
  background: rgba(255, 255, 255, 0.7);
}

/* ===== SECTION ===== */
.section {
  padding: 96px 0;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 12px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* ===== HERO ===== */
.hero {
  padding-top: 52px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
}

.hero-title {
  margin: 14px 0 18px;
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  line-height: 1.08;
  font-family: "Sora", sans-serif;
}

.gradient-text {
  background: linear-gradient(130deg, var(--brand) 10%, var(--brand-cool) 60%, var(--brand-warm) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0;
  color: var(--muted);
  max-width: 56ch;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-metrics {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-metrics li {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  padding: 14px;
  text-align: center;
}

.hero-metrics strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.35rem;
}

.hero-metrics span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ===== CHIP ICON (hero) ===== */
.hero-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.stage-visual {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-icon {
  width: 180px;
  height: 180px;
  animation: float 4s ease-in-out infinite;
}

.chip-body {
  position: relative;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1a2a4a, #0d1b33);
  border-radius: 18px;
  border: 2px solid rgba(21, 93, 252, 0.25);
  box-shadow: 0 20px 50px rgba(21, 93, 252, 0.18), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chip-core {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-cool) 100%);
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(21, 93, 252, 0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  position: relative;
}

.chip-core::after {
  content: "IC";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  letter-spacing: 2px;
}

.chip-pin {
  position: absolute;
  width: 16px;
  height: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), rgba(21,93,252,0.4));
  border-radius: 2px;
}

.chip-pin:nth-child(1) { top: 20px; left: -12px; transform: rotate(0deg); }
.chip-pin:nth-child(2) { top: 60px; left: -12px; }
.chip-pin:nth-child(3) { top: 100px; left: -12px; }
.chip-pin:nth-child(4) { right: -12px; top: 20px; }
.chip-pin:nth-child(5) { right: -12px; top: 60px; }
.chip-pin:nth-child(6) { right: -12px; top: 100px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== BENTO GRID ===== */
.bento {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.span-7 { grid-column: span 7; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }

.card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 54px rgba(0, 32, 80, 0.14);
}

.card-tag {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: rgba(21, 93, 252, 0.12);
}

.card h3 {
  margin: 12px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.card-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff3fa;
  color: #3f5678;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
}

/* ===== BLOG FILTERS ===== */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 24px;
}

.filter-btn {
  font-size: 13px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  color: var(--muted);
  cursor: pointer;
  transition: all 180ms ease;
  font-family: inherit;
}

.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.filter-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ===== POST CARDS ===== */
.list-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.post-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 32, 80, 0.1);
}

.post-card time {
  font-size: 12px;
  color: #5f7394;
}

.post-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 165, 160, 0.1);
  color: var(--brand-cool);
  font-weight: 600;
  margin-top: 6px;
}

.post-card h3 {
  margin: 10px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
}

.post-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ===== ABOUT ===== */
.about-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.about-intro h2 {
  margin: 12px 0 12px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
}

.about-intro p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.75;
}

.about-tools h3 {
  margin: 0 0 14px;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
}

.tool-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.tool-list li:last-child {
  border-bottom: none;
}

.tool-cat {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(21, 93, 252, 0.1);
  color: var(--brand);
  min-width: 52px;
  text-align: center;
}

/* ===== CTA ===== */
.cta {
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: var(--shadow);
}

.cta h2 {
  margin: 0 0 10px;
  font-family: "Sora", sans-serif;
}

.cta p {
  margin: 0 0 22px;
  color: var(--muted);
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 30px 0 44px;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #627696;
  font-size: 14px;
}

/* ===== REVEAL ANIMATION ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 480ms ease,
    transform 560ms cubic-bezier(0.2, 0.65, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 980px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 220px;
  }

  .stage-visual {
    transform: scale(0.75);
  }

  .span-7, .span-5, .span-4 {
    grid-column: span 12;
  }

  .list-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .nav-shell {
    justify-content: space-between;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .list-grid {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
