:root {
  --bg: #05070d;
  --bg-alt: #0a0f1c;
  --panel: #0d1424;
  --line: rgba(0, 229, 255, 0.12);
  --accent: #00e5ff;
  --accent-2: #00ffa3;
  --text: #d7e3f4;
  --text-dim: #6b7c99;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --font-sans: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- background grid ---------- */
#bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.9;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 14px; color: var(--text); }

.brand-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2), 0 0 24px var(--accent-2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.nav-links { display: flex; gap: 26px; }

.nav-links a { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--accent); font-family: var(--font-mono); font-size: 12px; padding: 6px 10px; cursor: pointer; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 80px 0 40px;
}

.hero-uptime {
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--accent-2);
  margin-bottom: 22px;
}

.hero-uptime::before {
  content: '●';
  display: inline-block;
  margin-right: 8px;
  animation: pulse 1.6s infinite;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(30px, 6vw, 62px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 1px;
  min-height: 1.4em;
  text-align: left;
}

.type-box {
  display: inline-block;
  width: 24ch;
  letter-spacing: 0;
  text-align: left;
}

.hero-title .cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero-sub { margin-top: 18px; font-size: 13px; color: var(--text-dim); letter-spacing: 1px; }

.hero-desc { margin-top: 14px; font-size: 17px; color: var(--text); max-width: 560px; opacity: 0.9; }

.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 26px;
  border-radius: 4px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
}
.btn-primary:hover { background: var(--accent-2); box-shadow: 0 0 28px rgba(0, 255, 163, 0.4); color: var(--bg); }

.btn-ghost { border: 1px solid var(--accent); color: var(--accent); }
.btn-ghost:hover { background: rgba(0, 229, 255, 0.1); color: var(--accent); }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text-dim);
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }

/* ---------- sections ---------- */
.section { padding: 110px 0; }

.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 46px;
}

.section-title .tag { color: var(--accent); margin-right: 14px; }

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ---------- terminal ---------- */
.terminal {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.06);
  overflow: hidden;
}

.terminal-bar, .sys-console-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #0c1322;
  border-bottom: 1px solid var(--line);
}

.term-btn { width: 11px; height: 11px; border-radius: 50%; }
.term-btn.red { background: #ff5f56; }
.term-btn.yellow { background: #ffbd2e; }
.term-btn.green { background: #27c93f; }

.term-title { font-size: 12px; color: var(--text-dim); margin-left: 8px; }

.terminal-body {
  padding: 22px 24px;
  font-size: 14px;
  min-height: 280px;
  white-space: pre-wrap;
}

.terminal-body .ln { display: block; }

.terminal-body .prompt { color: var(--accent-2); }

.terminal-body .cmd { color: var(--text); }

.terminal-body .out { color: var(--text-dim); }

.terminal-body .ok { color: var(--accent-2); }
.terminal-body .key { color: var(--accent); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}

.card:hover { transform: translateY(-6px); border-color: rgba(0, 229, 255, 0.4); box-shadow: 0 14px 40px rgba(0, 229, 255, 0.1); }
.card:hover::before { transform: scaleX(1); }

.card-head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 16px; font-family: var(--font-mono); }

.card-status { color: var(--accent-2); }

.card-title { font-size: 20px; margin-bottom: 10px; }

.card-desc { font-size: 14px; color: var(--text-dim); margin-bottom: 18px; }

.card-links a { font-family: var(--font-mono); font-size: 13px; }

/* ---------- xj380 ---------- */
.sys-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }

.sys-name { font-size: 28px; margin-bottom: 16px; letter-spacing: 1px; }

.sys-info p { color: var(--text-dim); font-size: 15px; margin-bottom: 22px; }

.sys-specs { list-style: none; font-size: 13px; display: grid; gap: 8px; }

.sys-specs li { padding: 8px 12px; background: var(--panel); border-left: 2px solid var(--accent); }
.sys-specs .accent { display: inline-block; width: 90px; }

.sys-console { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }

.sys-console-body { padding: 20px 24px; font-size: 13px; }

.sys-console-body p { white-space: nowrap; overflow: hidden; }

/* ---------- contact ---------- */
.contact-lead { font-size: 16px; color: var(--text-dim); margin-bottom: 32px; }

.contact-channels { display: grid; gap: 14px; }

.channel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}

.channel:hover { border-color: rgba(0, 229, 255, 0.5); transform: translateX(6px); color: var(--text); }

.channel-ico {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent);
}

.channel-label { font-size: 14px; color: var(--text-dim); width: 74px; }

.channel-val { font-size: 14px; color: var(--accent); margin-left: auto; }

.contact-signature { margin-top: 48px; font-size: 13px; color: var(--text-dim); border-top: 1px solid var(--line); padding-top: 26px; }

.contact-signature p + p { margin-top: 6px; color: var(--text); }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  font-size: 12px;
  color: var(--text-dim);
}

.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 7, 13, 0.96);
    padding: 18px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .sys-grid { grid-template-columns: 1fr; }
  .sys-console-body p { white-space: pre-wrap; }
}

@media (max-width: 560px) {
  .channel { flex-wrap: wrap; }
  .channel-val { margin-left: 0; width: 100%; }
}
