/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 85%, #000);
  text-decoration: none;
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  padding: 12px 18px;
}
.btn-ghost:hover { text-decoration: underline; }

/* ===== Tag / 分类标签 ===== */
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 980px;
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.tag.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tag-filter {
  cursor: pointer;
  transition: all 0.2s ease;
}
.tag-filter:hover {
  color: var(--text);
}
.tag-filter.is-active:hover {
  color: #fff;
}

/* ===== 文章卡片 ===== */
.post-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  color: var(--text);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.post-card .meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-soft);
}
.post-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}
.post-card p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* ===== 分类大卡 ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.category-card {
  padding: 40px 24px;
  border-radius: 18px;
  background: var(--bg-soft);
  color: var(--text);
  text-align: center;
  transition: transform 0.3s ease, background 0.3s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
}
.category-card h3 { margin: 0 0 4px; font-size: 22px; }
.category-card span { font-size: 13px; color: var(--text-soft); }

/* ===== 归档列表 ===== */
.archive-year { margin-bottom: 48px; }
.archive-year h2 {
  font-size: 48px;
  color: var(--text-soft);
  margin-bottom: 16px;
}
.archive-item {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.archive-item .date {
  color: var(--text-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  width: 80px;
}
.archive-item a {
  color: var(--text);
  font-size: 16px;
}
.archive-item a:hover { color: var(--accent); text-decoration: none; }

/* ===== 文章正文 ===== */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 40px;
}
.article-head { margin-bottom: 48px; text-align: center; }
.article-head .tag { margin-bottom: 16px; }
.article-head h1 { font-size: 44px; margin-bottom: 12px; }
.article-head .meta { color: var(--text-soft); font-size: 14px; }
.article-body { font-size: 17px; line-height: 1.75; }
.article-body h2 { font-size: 28px; margin-top: 48px; }
.article-body h3 { font-size: 22px; margin-top: 32px; }
.article-body p { margin: 0 0 1.2em; }
.article-body ul, .article-body ol { padding-left: 1.4em; }
.article-body li { margin-bottom: 0.4em; }
.article-body code {
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: "SF Mono", Menlo, Consolas, monospace;
}
.article-body pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 20px 24px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.55;
  margin: 1.5em 0;
}
.article-body pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}
.article-body blockquote {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 8px 8px 0;
  color: var(--text-soft);
}
.article-foot {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ===== 关于页 ===== */
.about {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding: 120px 0 80px;
  align-items: start;
}
.avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 72px;
  font-weight: 700;
}
.about-body h1 { font-size: 48px; margin-bottom: 8px; }
.about-body .role { color: var(--text-soft); font-size: 20px; margin-bottom: 24px; }
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}
@media (max-width: 768px) {
  .about { grid-template-columns: 1fr; padding: 80px 0 60px; text-align: center; }
  .avatar { margin: 0 auto; width: 140px; height: 140px; font-size: 52px; }
}
