/* ============================================================
   Jia Dabao — personal site
   Plain CSS, no framework, no web fonts.
   ============================================================ */

:root {
  --bg: #08090e;
  --panel: #0e1017;
  --panel-2: #131624;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #e9ebf4;
  --muted: #9198b0;
  --dim: #6b7189;
  --accent: #5b8cff;
  --accent-2: #2ee6c5;
  --radius: 16px;
  --max: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 顶部光晕 */
body::before {
  content: "";
  position: fixed;
  inset: -20% 0 auto 0;
  height: 620px;
  background:
    radial-gradient(60% 60% at 50% 0%, rgba(91, 140, 255, 0.16), transparent 70%),
    radial-gradient(40% 40% at 80% 10%, rgba(46, 230, 197, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.wrap.narrow { max-width: var(--max); }

/* 正文类内容限制阅读宽度，但标题仍与其它区块左对齐 */
#about p,
.section-contact > .wrap > p,
.section-contact .contact-grid {
  max-width: 760px;
}

a { color: inherit; text-decoration: none; }

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(8, 9, 14, 0.72);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 66px;
}

.brand {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
  transition: color 0.18s;
}

.nav a:hover { color: var(--text); }

.lang {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  margin-left: 8px;
}

.lang button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}

.lang button:hover { color: var(--text); }

.lang button.is-active {
  background: var(--accent);
  color: #fff;
}

/* ---------------- hero ---------------- */

.hero {
  padding: 104px 0 88px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.lede {
  margin: 24px 0 0;
  max-width: 640px;
  font-size: clamp(17px, 2.1vw, 20px);
  line-height: 1.62;
  color: var(--muted);
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 10px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.facts li {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 999px;
  padding: 6px 14px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.15s, background 0.18s, border-color 0.18s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(180deg, #6d9aff, #4a7bf0);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 30px -12px rgba(91, 140, 255, 0.9);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #7ea6ff, #5585f5);
}

/* ---------------- sections ---------------- */

.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

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

.section h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: -0.02em;
  font-weight: 750;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---------------- featured product ---------------- */

.product-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.product {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    var(--panel);
  position: relative;
  overflow: hidden;
}

.product::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 140, 255, 0.6), transparent);
}

/* 非主推的插件卡片：单列、更紧凑 */
.product.compact {
  grid-column: auto;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 26px 28px;
  background: var(--panel);
}

/* 普通卡片是奇数个时，最后一张占满整行 */
.product.compact.span-2 { grid-column: 1 / -1; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-2);
  border: 1px solid rgba(46, 230, 197, 0.32);
  background: rgba(46, 230, 197, 0.07);
  border-radius: 999px;
  padding: 4px 11px;
  margin-bottom: 16px;
}

.product h3 {
  margin: 0;
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 750;
}

.product .pdesc {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.pmeta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--dim);
}

.pmeta b { color: var(--muted); font-weight: 600; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 10px;
}

.pactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.pactions .btn {
  height: 42px;
  padding: 0 17px;
  font-size: 13.5px;
  border-radius: 10px;
}

.pactions .btn svg { width: 15px; height: 15px; opacity: 0.9; }

.pnote {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--dim);
  line-height: 1.6;
}

.more-note {
  margin: 26px 0 0;
  font-size: 13.5px;
  color: var(--dim);
}

/* ---------------- mock window ---------------- */

.mock {
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0d15;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.95);
}

.mock-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.mock-bar i:first-child { background: rgba(255, 95, 86, 0.6); }

.mock-body {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
  padding: 8px;
  height: 230px;
}

.mock-main {
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(91, 140, 255, 0.22), rgba(46, 230, 197, 0.10)),
    #11141f;
  border: 1px solid rgba(91, 140, 255, 0.22);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.mock-main::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto 18px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 20px 0 rgba(255, 255, 255, 0.08),
    0 40px 0 rgba(255, 255, 255, 0.06),
    0 60px 0 rgba(255, 255, 255, 0.04);
}

.mock-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(180, 205, 255, 0.9);
  background: rgba(10, 14, 26, 0.75);
  border: 1px solid rgba(91, 140, 255, 0.35);
  border-radius: 5px;
  padding: 3px 7px;
  position: relative;
  z-index: 1;
}

.mock-side {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.mock-tile {
  border-radius: 8px;
  background: linear-gradient(160deg, #1b2036, #12162a);
  border: 1px solid var(--line);
  position: relative;
}

.mock-tile.is-live::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2ee6c5;
  box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(46, 230, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 230, 197, 0); }
}

/* ---------------- capability grid ---------------- */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card {
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.card:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
  transform: translateY(-2px);
}

.card .icon {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 14px;
  line-height: 1;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

/* ---------------- about ---------------- */

#about p {
  color: var(--muted);
  font-size: 15.5px;
  margin: 0 0 18px;
}

#about h2 { margin-bottom: 24px; }

/* ---------------- contact ---------------- */

.section-contact { padding-bottom: 96px; }

.section-contact h2 { margin-bottom: 10px; }

.section-contact .wrap > p {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.2s, background 0.2s;
}

.contact-item:hover {
  border-color: rgba(91, 140, 255, 0.45);
  background: var(--panel-2);
}

.contact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--dim);
  text-transform: uppercase;
}

.contact-value {
  font-size: 15.5px;
  font-weight: 600;
  word-break: break-all;
}

.contact-loc {
  margin-top: 20px !important;
  font-size: 13.5px !important;
  color: var(--dim) !important;
}

/* ---------------- footer ---------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--dim);
}

.site-footer .dot { margin: 0 8px; opacity: 0.5; }

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .product-list { grid-template-columns: 1fr; }
  .product.compact { grid-column: 1 / -1; }
  .product { grid-template-columns: 1fr; gap: 28px; padding: 26px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mock-body { height: 200px; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { padding: 64px 0 56px; }
  .section { padding: 56px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .mock-body { grid-template-columns: 1fr; height: auto; }
  .mock-side { grid-template-columns: repeat(3, 1fr); grid-template-rows: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
