:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-hover: #1c2333;
  --border: #30363d;
  --border-hover: #484f58;
  --text: #f0f6fc;
  --text-muted: #8b949e;
  --accent: #00d4ff;
  --accent-dim: rgba(0, 212, 255, 0.1);
  --green: #00ff87;
  --green-dim: rgba(0, 255, 135, 0.1);
  --orange: #ffa657;
  --radius: 8px;
  --radius-card: 12px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-body: "DM Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(48, 54, 61, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(48, 54, 61, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
}

h1, h2, h3, h4 {
  font-family: var(--font-mono);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(28px, 4.5vw, 52px); font-weight: 700; }
h2 { font-size: clamp(22px, 3vw, 36px); font-weight: 700; }
h3 { font-size: clamp(16px, 1.5vw, 20px); font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0; color: var(--text-muted); }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green); }

::selection { background: var(--accent-dim); color: var(--accent); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.container { width: min(1120px, calc(100% - 48px)); margin: 0 auto; position: relative; z-index: 1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent);
  font-size: 15px;
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: var(--bg-card);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); border-color: var(--border-hover); }
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: #00b8e6;
  border-color: #00b8e6;
  color: var(--bg);
}
.btn-green {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg);
}
.btn-green:hover {
  background: #00d96f;
  border-color: #00d96f;
  color: var(--bg);
}

.section { padding: 72px 0; position: relative; }
.section-head { margin-bottom: 40px; }
.section-head h2 { margin-bottom: 8px; }
.section-head h2 .highlight { color: var(--accent); }
.section-head p { max-width: 600px; font-size: 15px; }

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

.card {
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.15), var(--shadow);
  transform: translateY(-3px);
}

.hero {
  padding: 96px 0 64px;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.03);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin: 12px 0; }
.hero .lead { font-size: 17px; max-width: 640px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  background: var(--green-dim);
  border: 1px solid rgba(0, 255, 135, 0.2);
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.terminal-card {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.terminal-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28c840; }
.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-muted);
}
.terminal-body .line { display: block; }
.terminal-body .prompt { color: var(--green); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .comment { color: var(--text-muted); font-style: italic; }

.stack-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 8px;
  background: var(--accent-dim);
}
.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  border: 1px solid rgba(0, 212, 255, 0.12);
}

.test-block {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 12px 0;
}
.test-block p { color: var(--text); font-size: 14px; line-height: 1.8; }
.test-author { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.cta-box {
  padding: 56px 40px;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-align: center;
}
.cta-box h2 { margin-bottom: 10px; }
.cta-box p { margin-bottom: 20px; font-size: 15px; }
.cta-box .btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.serv-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-dim);
  margin-bottom: 14px;
}

.process-item {
  counter-increment: proc;
  position: relative;
  padding-left: 56px;
}
.process-item::before {
  content: counter(proc, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg-card);
  transition: border-color 0.2s;
}
.faq details:hover { border-color: var(--border-hover); }
.faq details + details { margin-top: 10px; }
.faq summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  transition: color 0.2s;
}
.faq details[open] summary { color: var(--accent); margin-bottom: 12px; }
.faq details p { font-size: 13px; line-height: 1.9; }

.form-card {
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.form-grid { display: grid; gap: 14px; }
.form-grid label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-dim);
}
textarea { min-height: 110px; resize: vertical; }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(0, 212, 255, 0.25);
}

.ft-img {
  height: 180px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.6fr 0.7fr; gap: 28px; }
.footer-col { display: grid; gap: 8px; }
.footer-col a { color: var(--text-muted); font-size: 13px; }
.footer-col a:hover { color: var(--accent); }
.footer-col strong { font-size: 12px; font-family: var(--font-mono); }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.typed-cursor::after {
  content: "|";
  animation: blink 0.9s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}
@keyframes blink {
  50% { opacity: 0; }
}

.code-line {
  overflow: hidden;
  white-space: nowrap;
  animation: typeLine 1.5s steps(60, end) forwards;
  width: 0;
}
.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.8s; }
.code-line:nth-child(3) { animation-delay: 1.4s; }
.code-line:nth-child(4) { animation-delay: 2s; }
@keyframes typeLine {
  to { width: 100%; }
}

.keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
}
.keyword-cloud span {
  padding: 4px 10px;
  border-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid rgba(0, 212, 255, 0.08);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: color 0.2s, background 0.2s;
}
.keyword-cloud span:hover {
  color: var(--accent);
  background: rgba(0, 212, 255, 0.15);
}

@media (max-width: 860px) {
  .nav { flex-direction: column; align-items: stretch; padding: 12px 0; }
  .nav-links { flex-wrap: wrap; }
  .hero-grid, .cols-2, .cols-3, .cols-4, .cols-6, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .footer-grid { gap: 20px; }
  .cta-box { padding: 36px 20px; }
  .process-item { padding-left: 0; padding-top: 50px; }
  .process-item::before { top: 0; }
  body::before { background-size: 32px 32px; }
}
