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

:root {
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-mid: #4a4a68;
  --text-light: #6e7191;
  --accent: #2563eb;
  --accent-soft: #eff4ff;
  --border: #e2e5eb;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --tag-bg: #f0f4f8;
  --tag-text: #475569;
  --green: #16a34a;
  --green-bg: #f0fdf4;
  --amber: #d97706;
  --amber-bg: #fffbeb;
}

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

.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover { color: var(--text); }

.article {
  max-width: 700px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-meta {
  margin-bottom: 32px;
}

.article-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tag {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--tag-bg);
  color: var(--tag-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-meta h1 {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.article-meta .subtitle {
  font-size: 17px;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 20px;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.author-info {
  font-size: 14px;
}

.author-info .name {
  font-weight: 600;
  color: var(--text);
}

.author-info .date {
  color: var(--text-light);
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.article-body p {
  font-size: 16px;
  margin-bottom: 16px;
  color: var(--text);
}

.article-body ul, .article-body ol {
  margin: 0 0 16px 24px;
  font-size: 16px;
}

.article-body li { margin-bottom: 6px; }

.article-body p code, .article-body li code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13.5px;
  background: var(--tag-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--accent);
}

.code-block {
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.code-header {
  background: #1e293b;
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-label {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.code-label .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.copy-btn {
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: #334155;
  color: #e2e8f0;
}

.code-block pre {
  background: var(--code-bg);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--code-text);
  line-height: 1.6;
}

.callout {
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.callout-info {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  color: var(--text);
}

.callout-success {
  background: var(--green-bg);
  border-left: 3px solid var(--green);
  color: var(--text);
}

.callout-warn {
  background: var(--amber-bg);
  border-left: 3px solid var(--amber);
  color: var(--text);
}

.callout strong { font-weight: 700; }

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
}

.feature-card .fc-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.feature-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.45;
}

.output-block {
  background: var(--code-bg);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 16px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--code-text);
  line-height: 1.6;
  overflow-x: auto;
  border: 1px solid #1e293b;
}

.output-block .green { color: #4ade80; }
.output-block .amber { color: #fbbf24; }
.output-block .dim { color: #64748b; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

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

.footer-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 13px;
  color: var(--text-light);
}

.footer a {
  color: var(--text-light);
  text-decoration: none;
}

.footer a:hover { color: var(--text); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .article-meta h1 { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
