:root {
  --bg: #07080c;
  --bg-2: #0c0e14;
  --panel: #10131c;
  --panel-2: #131724;
  --line: #1c2030;
  --line-2: #262b3d;
  --text: #e8eaf2;
  --muted: #8b93a8;
  --muted-2: #5f6677;
  --accent: #8b6dff;
  --accent-2: #56a8ff;
  --accent-3: #c084fc;
  --good: #5ad19a;
  --warn: #f0b454;
  --danger: #ff6d7a;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 30px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  overflow-x: hidden;
}

/* ambient backgrounds */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 85% -5%, rgba(139, 109, 255, 0.18), transparent 60%),
    radial-gradient(700px 400px at -5% 0%, rgba(86, 168, 255, 0.10), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(192, 132, 252, 0.08), transparent 60%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 90%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: sticky; top: 0;
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -.01em; font-size: 15px;
}
.brand .logo {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 20px rgba(139, 109, 255, .35);
  font-weight: 700; color: white; font-size: 13px;
}
.nav nav { display: flex; gap: 4px; align-items: center; }
.nav nav a {
  color: var(--muted);
  font-size: 13.5px;
  padding: 7px 12px; border-radius: 8px;
  transition: color .15s ease, background .15s ease;
  position: relative;
}
.nav nav a:hover { color: var(--text); }
.nav nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.nav .pill {
  display: none;
  align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.nav .pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@media (min-width: 720px) { .nav .pill { display: inline-flex; } }

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 56px 24px 96px; }
section { margin-bottom: 72px; }

h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin: 0 0 16px;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-weight: 600;
}
h2 {
  font-size: 13px;
  margin: 0 0 24px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
h2 .num {
  display: inline-block;
  margin-right: 10px;
  color: var(--accent);
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 12px; color: #c7ccdb; }

.gradient-text {
  background: linear-gradient(135deg, #e8eaf2 0%, #c084fc 40%, #56a8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.4fr .9fr; gap: 56px;
  align-items: center;
  padding: 16px 0 24px;
}
.hero .tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px; color: var(--muted);
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.02);
}
.hero .tag .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 10px var(--good);
  animation: pulse 2s ease-in-out infinite;
}
.hero p.lead {
  font-size: 16px;
  color: #b6bcd0;
  max-width: 540px;
  margin-bottom: 18px;
}
.hero .typing {
  font-family: ui-monospace, "JetBrains Mono", monospace;
  color: var(--accent-2);
  font-size: 13.5px;
  min-height: 22px;
  padding: 8px 12px;
  background: rgba(139, 109, 255, .06);
  border: 1px solid rgba(139, 109, 255, .15);
  border-radius: 8px;
  display: inline-block;
}
.hero .typing::after {
  content: "▋"; margin-left: 2px;
  animation: blink 1s steps(1) infinite;
  color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- avatar ---------- */
.avatar-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #181c27, #0c0f17);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.avatar-wrap::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(139, 109, 255, .35), transparent 70%);
  pointer-events: none;
}
.avatar-wrap img,
.avatar-wrap svg { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.avatar-wrap .corner {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; gap: 6px; align-items: center;
  padding: 5px 10px;
  background: rgba(0,0,0,.45); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  font-size: 11px; color: var(--muted);
}
.avatar-wrap .corner .d { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good);}

/* ---------- buttons ---------- */
.btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--text); font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background .15s ease;
}
.btn:hover { border-color: var(--line-2); background: rgba(255,255,255,.04); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: white;
  box-shadow: 0 6px 20px rgba(139, 109, 255, .3);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(139, 109, 255, .4); }
.btn .icon { width: 14px; height: 14px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .15s ease, transform .12s ease, background .2s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(139, 109, 255, .08), transparent 70%);
  opacity: 0; transition: opacity .25s ease;
  pointer-events: none;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card:hover::before { opacity: 1; }

.card .head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.card .num-tag {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: .1em;
}
.card h3 { margin: 0; }

.badge {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: .02em;
}
.badge.good { color: var(--good); border-color: rgba(90,209,154,.3); background: rgba(90,209,154,.06); }
.badge.warn { color: var(--warn); border-color: rgba(240,180,84,.3); background: rgba(240,180,84,.06); }
.badge.info { color: var(--accent-2); border-color: rgba(86,168,255,.3); background: rgba(86,168,255,.06); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span {
  font-size: 11px; color: var(--muted);
  padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px;
  background: rgba(255,255,255,.02);
  font-family: ui-monospace, monospace;
}

/* ---------- panels ---------- */
.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel .kicker {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}
.panel .kicker::before {
  content: ""; width: 14px; height: 1px;
  background: var(--accent);
  display: inline-block;
}
.list { margin: 6px 0 0; padding-left: 0; list-style: none; }
.list li {
  margin: 8px 0; color: #c7ccdb;
  padding-left: 18px; position: relative;
}
.list li::before {
  content: "—";
  position: absolute; left: 0; top: 0;
  color: var(--muted-2);
}

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px; padding: 16px;
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .4;
}
.stat .v {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.02em;
  word-break: break-word;
}
.stat .k {
  font-size: 11px; color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ---------- lab ---------- */
.bar {
  height: 4px; background: rgba(255,255,255,.04);
  border-radius: 999px; overflow: hidden; margin-top: 14px;
  position: relative;
}
.bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width .6s ease;
}

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid rgba(255,255,255,.04);
  padding: 22px 28px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 12px;
  flex-wrap: wrap; gap: 8px;
}
.foot .links { display: flex; gap: 14px; }
.foot a:hover { color: var(--text); }

/* ---------- utility ---------- */
input, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.03); color: var(--text);
  border: 1px solid var(--line); font: inherit;
}

/* fade in */
.fade-in { animation: fade .4s ease both; }
@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* loading */
.loader {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* arrow link */
.arrow-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-2); font-size: 13px;
  margin-top: 14px;
}
.arrow-link svg { transition: transform .15s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  main { padding: 32px 18px 80px; }
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: 12px 16px; }
  .nav nav { gap: 0; }
  .nav nav a { padding: 6px 8px; font-size: 13px; }
  .brand .logo { width: 24px; height: 24px; }
  section { margin-bottom: 56px; }
}

@media (max-width: 480px) {
  .nav nav a { padding: 6px 6px; font-size: 12.5px; }
  h1 { font-size: 30px; }
}
