:root {
  --bg: #080d1a;
  --panel: #0f1526;
  --text: #e8ecf7;
  --muted: #8a96b4;
  --accent: #58c8f0;
  --green: #5ddfa0;
  --border: #1e2d50;
  --border-hover: #3a5080;
  --glow-accent: rgba(88,200,240,0.12);
  --glow-green: rgba(93,223,160,0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Subtle dot-grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, #1e2d50 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

header, main, footer { position: relative; z-index: 1; }

a { color: var(--accent); text-decoration: none; transition: opacity 0.15s; }
a:hover { opacity: 0.8; }

.wrap { max-width: 1100px; margin: auto; padding: 0 24px; }

/* ── Header ─────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  background: rgba(8, 13, 26, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.logo:hover { opacity: 1; }

nav { display: flex; align-items: center; }
nav a {
  margin-left: 24px;
  color: var(--muted);
  font-size: 14px;
  transition: color 0.15s;
  text-decoration: none;
}
nav a:hover { color: var(--text); opacity: 1; }

/* ── Lang switch ─────────────────────────── */
.lang-switch {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: 20px;
}

.lang-switch button {
  border: 1px solid rgba(255,255,255,.14);
  background: transparent;
  color: var(--muted);
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
  line-height: 1;
}

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

.lang-switch button.active {
  background: rgba(88,200,240,0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* ── Hero ────────────────────────────────── */
.hero { padding: 96px 0 72px; position: relative; }

/* Soft radial glow behind hero */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse at 50% 30%,
    rgba(88,200,240,0.07) 0%,
    rgba(93,223,160,0.04) 40%,
    transparent 70%);
  pointer-events: none;
}

.eyebrow {
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(38px, 6.5vw, 70px);
  line-height: 1.04;
  font-weight: 800;
  margin-bottom: 22px;
  background: linear-gradient(160deg, #e8ecf7 20%, #8a96b4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #050c1a;
  padding: 13px 24px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.btn:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(88,200,240,0.28);
}

/* ── Grid ────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0 72px;
}

/* ── Cards ───────────────────────────────── */
.card {
  background: rgba(15, 21, 38, 0.75);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border-hover);
  background: rgba(15, 21, 38, 0.95);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.card h2, .card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 17px;
  color: var(--text);
}

/* ── Metrics ─────────────────────────────── */
.metric {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Tags ────────────────────────────────── */
.tag {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  margin: 5px 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  transition: border-color 0.15s, color 0.15s;
  cursor: default;
}

.tag:hover { border-color: var(--accent); color: var(--text); }

.muted { color: var(--muted); }

/* ── Article pages ───────────────────────── */
.article { max-width: 760px; padding: 72px 0 80px; }

.article h1 {
  font-size: clamp(30px, 5vw, 46px);
  margin-bottom: 14px;
  -webkit-text-fill-color: var(--text);
  background: none;
}

.article h2 {
  margin-top: 48px;
  margin-bottom: 14px;
  font-size: 22px;
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: none;
}

.article p { color: var(--muted); margin-bottom: 18px; }

/* ── Code block ──────────────────────────── */
.code {
  background: rgba(4, 7, 16, 0.8);
  border: 1px solid var(--border);
  padding: 18px 22px;
  border-radius: 10px;
  overflow-x: auto;
  font-family: 'Cascadia Code', ui-monospace, monospace;
  font-size: 13px;
  color: var(--green);
  margin: 24px 0;
}

/* ── Status page ─────────────────────────── */
.status { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 20px rgba(93,223,160,0.3);
  flex-shrink: 0;
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--green), 0 0 16px rgba(93,223,160,0.25); }
  50%       { box-shadow: 0 0 16px var(--green), 0 0 32px rgba(93,223,160,0.4); }
}

/* ── Footer ──────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Mobile ──────────────────────────────── */
@media (max-width: 680px) {
  .hero { padding: 56px 0 40px; }
  nav a { margin-left: 14px; font-size: 13px; }
  .lang-switch { margin-left: 10px; }
  .grid { grid-template-columns: 1fr; }
}
