:root {
  --bg: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f3f7fc;
  --text: #1a2332;
  --text-muted: #5c6778;
  --accent: #026fed;
  --accent-hover: #0256c4;
  --accent-soft: rgba(2, 111, 237, 0.08);
  --border: #e4ecf5;
  --font-display: "Plus Jakarta Sans", "Noto Sans SC", sans-serif;
  --font-sans: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "Consolas", monospace;
  --radius: 16px;
  --shadow: 0 12px 36px rgba(2, 111, 237, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 42% at 12% -10%, rgba(2, 111, 237, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 36% at 100% 0%, rgba(2, 111, 237, 0.04), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

.site-header {
  padding: 40px 0 36px;
  border-bottom: 1px solid var(--border);
}

.site-header--compact {
  padding: 18px 0;
}

.site-header--compact .brand {
  margin-bottom: 0;
}

.site-header--compact .brand-logo {
  height: 28px;
}

.brand {
  display: block;
  margin-bottom: 14px;
  line-height: 0;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.filter-tags {
  display: flex;
  gap: 8px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.tag {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tag:hover {
  border-color: rgba(2, 111, 237, 0.35);
  color: var(--accent);
}

.tag.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.articles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  padding: 40px 0 88px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.article-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.25s;
}

.article-card:hover {
  box-shadow: var(--shadow);
  border-color: rgba(2, 111, 237, 0.22);
}

.article-card:hover::before {
  opacity: 1;
}

.article-card.hidden {
  display: none;
}

.article-card .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.article-card .category {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.article-card h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.5;
  letter-spacing: -0.02em;
}

.article-card h2 a {
  color: inherit;
}

.article-card h2 a:hover {
  color: var(--accent);
}

.article-card .excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 20px;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-start;
}

.article-header {
  padding: 36px 0 36px;
  max-width: 720px;
  margin: 0 auto;
}

.article-header .back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.article-header .back:hover {
  color: var(--accent);
}

.article-header h1 {
  font-family: var(--font-display);
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.article-header .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-header .meta .category {
  color: var(--accent);
  font-weight: 600;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 40px 0 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

.article-body p {
  margin-bottom: 16px;
  color: #3d4654;
}

.article-body ul,
.article-body ol {
  margin: 16px 0 16px 24px;
  color: #3d4654;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body code {
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--accent);
}

.article-body pre {
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.55;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-muted);
  font-style: italic;
}

.loading-text {
  color: var(--text-muted);
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .brand-logo {
    height: 29px;
  }

  .site-header--compact .brand-logo {
    height: 24px;
  }

  .article-header h1 {
    font-size: 1.7rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
