@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

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

:root {
  --bg:       #080c12;
  --surface:  #0f1520;
  --surface2: #151e2e;
  --border:   rgba(255,255,255,0.07);
  --accent:   #4f8ef7;
  --accent2:  #7c3aed;
  --text:     #e2e8f4;
  --muted:    #6b7a99;
  --tag-bg:   rgba(79,142,247,0.12);
  --success:  #34d399;
  --danger:   #f87171;
  --warning:  #fbbf24;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(79,142,247,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  padding: 100px 0 60px;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--tag-bg);
  border: 1px solid rgba(79,142,247,0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(36px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e2e8f4 0%, #8fafd8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.7;
}

/* Section labels */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-label-text {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-label-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Cards */
.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: rgba(79,142,247,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(79,142,247,0.08);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity 0.25s;
}

.card:hover::before { opacity: 1; }

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.card-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.card-badge {
  font-family: 'Sora', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid rgba(79,142,247,0.2);
  border-radius: 6px;
  padding: 4px 10px;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  margin-top: 2px;
}

.card-title {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.card-date {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 5px;
}

.card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 56px;
}

.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Sora', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 16px;
  padding-left: 56px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s, transform 0.25s;
}

.card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  margin-bottom: 48px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

.footer p {
  font-size: 13px;
  color: var(--muted);
}

.footer span { color: var(--accent); }

/* Markdown body */
.md-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px 60px;
  position: relative;
  z-index: 1;
}

.md-body h1 {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.md-body h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}

.md-body h3 {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
}

.md-body h4 {
  font-family: 'Sora', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

.md-body p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.md-body strong { color: var(--text); font-weight: 500; }

.md-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(79,142,247,0.3);
  transition: border-color 0.2s;
}

.md-body a:hover { border-color: var(--accent); }

.md-body ul, .md-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.md-body li {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 6px;
}

.md-body li strong { color: var(--text); }

.md-body code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  background: var(--surface2);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

.md-body pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.md-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.md-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
}

.md-body th {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.md-body td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--muted);
  vertical-align: top;
  line-height: 1.6;
}

.md-body td:first-child { color: var(--text); font-weight: 500; }
.md-body tr:last-child td { border-bottom: none; }

.md-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin-bottom: 16px;
  background: rgba(79,142,247,0.04);
  border-radius: 0 8px 8px 0;
}

.md-body blockquote p { margin-bottom: 0; }

.md-body hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

.md-body img {
  max-width: 100%;
  border-radius: 8px;
}

/* Loading state for docs */
.md-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 60px 0 40px; }
  .card-desc, .card-arrow { padding-left: 0; }
  .card-header { flex-direction: column; gap: 8px; }
  .md-body { padding: 70px 16px 40px; }
  .md-body h1 { font-size: 24px; }
}
