:root {
  --bg: #06060a;
  --surface: rgba(255,255,255,0.04);
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --text: #f0f2f8;
  --text-dim: #9aa3b5;
  --text-faint: #5c6475;
  --accent: #ff6b35;
  --accent-2: #7c5cff;
  --accent-3: #2dd4bf;
  --maxw: 760px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(124,92,255,0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(255,107,53,0.14) 0%, transparent 50%),
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(45,212,191,0.1) 0%, transparent 55%);
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px) saturate(1.4);
  background: rgba(6,6,10,0.72);
  border-bottom: 1px solid var(--line);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1040px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
}
.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.nav-links {
  display: flex;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 500;
}
.nav-links a {
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.article-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
  transition: gap 0.25s var(--ease);
}
.blog-back:hover { gap: 10px; color: var(--accent-3); }

.article-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-3);
  margin-bottom: 12px;
}

.article-wrap h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}

.article-lead {
  font-size: 18px;
  color: var(--text-dim);
  margin-bottom: 32px;
  line-height: 1.65;
}

.article-hero {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 40px;
}
.article-hero img {
  width: 100%;
  display: block;
  object-fit: contain;
  background: rgba(0,0,0,0.25);
  max-height: 480px;
}

.article-img {
  margin: 24px 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.article-img img {
  width: 100%;
  display: block;
  object-fit: contain;
}

.article-img-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}
.article-img-grid img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
  background: rgba(0,0,0,0.2);
}

.article-callout {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(255,107,53,0.08);
  font-size: 15px;
}
.article-callout a {
  color: var(--accent);
  font-weight: 600;
  border-bottom: 1px solid rgba(255,107,53,0.35);
}

.article-body blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--accent-2);
  background: rgba(124,92,255,0.08);
  border-radius: 0 10px 10px 0;
  color: var(--text-dim);
  font-size: 15px;
}

.article-body h2 {
  font-size: 22px;
  margin: 36px 0 14px;
  padding-top: 8px;
}
.article-body h3 {
  font-size: 17px;
  margin: 24px 0 10px;
  color: var(--text);
}
.article-body p {
  color: var(--text-dim);
  font-size: 15.5px;
  margin-bottom: 16px;
}
.article-body ul, .article-body ol {
  color: var(--text-dim);
  font-size: 15.5px;
  margin: 0 0 16px 20px;
}
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); font-weight: 600; }

.article-body a {
  color: var(--accent);
  border-bottom: 1px solid rgba(255,107,53,0.35);
  transition: color 0.2s, border-color 0.2s;
}
.article-body a:hover {
  color: var(--accent-3);
  border-color: var(--accent-3);
}

.article-table-wrap {
  overflow-x: auto;
  margin: 20px 0 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.article-table th,
.article-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.article-table th {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.article-table td { color: var(--text-dim); }
.article-table tr:last-child td { border-bottom: none; }

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.article-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.25s;
}
.article-nav a:hover { color: var(--accent); }
.article-nav .next { margin-left: auto; text-align: right; }

footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}
footer a {
  color: var(--text-dim);
  transition: color 0.25s;
}
footer a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .nav-links { display: none; }
  .article-wrap { padding-top: 32px; }
  .article-img-grid { grid-template-columns: 1fr; }
}
