/* ========== YikeJoy 站点样式 ========== */
:root {
  --accent: #4f6ef7;
  --accent-2: #7c5cff;
  --ink: #161a23;
  --text: #333a45;
  --muted: #7a828f;
  --bg: #f5f6fa;
  --card: #ffffff;
  --line: #e8eaf1;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(24, 34, 66, .05);
  --shadow-hover: 0 10px 28px rgba(24, 34, 66, .12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1040px; margin: 0 auto; padding: 0 22px; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1040px; margin: 0 auto; padding: 0 22px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.logo { font-size: 19px; font-weight: 800; letter-spacing: .5px; color: var(--ink); }
.logo b { color: var(--accent); }
.logo small { font-weight: 500; color: var(--muted); font-size: 12px; margin-left: 8px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  padding: 6px 14px; border-radius: 999px; font-size: 14px; color: var(--text);
  transition: background .18s, color .18s;
}
.nav-links a:hover { background: #eef1fb; color: var(--accent); }
.nav-links a.active { background: var(--accent); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 84px 0 72px; text-align: center;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(70px); z-index: 0;
}
.hero::before { width: 420px; height: 420px; right: -120px; top: -160px;
  background: radial-gradient(circle, rgba(79,110,247,.20), transparent 65%); }
.hero::after { width: 380px; height: 380px; left: -140px; bottom: -180px;
  background: radial-gradient(circle, rgba(124,92,255,.16), transparent 65%); }
.hero-inner { position: relative; z-index: 1; }
.hero .kicker {
  display: inline-block; font-size: 13px; color: var(--accent);
  background: #eef1fe; border: 1px solid #dfe5fd;
  padding: 4px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 40px; line-height: 1.3; color: var(--ink); font-weight: 800; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.sub { margin: 16px auto 0; max-width: 560px; color: var(--muted); font-size: 16px; }
.hero-actions { margin-top: 28px; display: flex; gap: 14px; justify-content: center; }
.btn {
  display: inline-block; padding: 11px 26px; border-radius: 10px; font-size: 15px;
  transition: transform .15s, box-shadow .15s, background .18s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(79,110,247,.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(79,110,247,.4); }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ---------- 区块 ---------- */
.section { padding: 46px 0 10px; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 23px; color: var(--ink); font-weight: 700; }
.section-head h2::before { content: ""; display: inline-block; width: 5px; height: 20px;
  background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 3px;
  margin-right: 10px; vertical-align: -3px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* ---------- 栏目卡片 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); padding: 24px 22px;
  box-shadow: var(--shadow); border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #dfe5fd; }
.cat-card .icon {
  width: 46px; height: 46px; border-radius: 12px; font-size: 22px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  background: #eef1fe;
}
.cat-card h3 { font-size: 16.5px; color: var(--ink); margin-bottom: 6px; }
.cat-card p { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.cat-card .count { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--accent);
  background: #eef1fe; padding: 2px 10px; border-radius: 999px; }

/* ---------- 文章列表 ---------- */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  display: block; background: var(--card); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow); border: 1px solid transparent;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #dfe5fd; }
.post-tags { display: flex; gap: 8px; margin-bottom: 10px; }
.tag { font-size: 12px; color: var(--accent); background: #eef1fe;
  padding: 2px 10px; border-radius: 999px; }
.tag.gray { color: var(--muted); background: #f0f2f7; }
.post-card h3 { font-size: 19px; color: var(--ink); line-height: 1.5; margin-bottom: 8px;
  transition: color .18s; }
.post-card:hover h3 { color: var(--accent); }
.post-card .excerpt { font-size: 14px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 14px; margin-top: 16px;
  font-size: 12.5px; color: var(--muted); }
.post-meta .readmore { margin-left: auto; color: var(--accent); font-size: 13px; font-weight: 600; }

/* ---------- 关于我 ---------- */
.about-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4f6ff 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; gap: 22px; align-items: center; box-shadow: var(--shadow);
}
.avatar {
  width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 26px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(79,110,247,.35);
}
.about-card h3 { color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.about-card p { font-size: 14px; color: var(--muted); }
.about-card .skills { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.about-card .skills span { font-size: 12px; background: #fff; border: 1px solid var(--line);
  color: var(--text); padding: 2px 10px; border-radius: 999px; }

/* ---------- 文章页 ---------- */
.post-hero { padding: 54px 0 30px; text-align: center; }
.post-hero h1 { font-size: 30px; color: var(--ink); line-height: 1.45; max-width: 760px; margin: 14px auto 0; }
.post-hero .post-meta { justify-content: center; margin-top: 14px; }
.post-body-wrap { max-width: 780px; margin: 0 auto; }
.article {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 44px 48px 40px;
}
.prose p { margin: 14px 0; font-size: 15.5px; }
.prose h2 { font-size: 19px; color: var(--ink); margin: 34px 0 10px; }
.prose h2::before { content: ""; display: inline-block; width: 5px; height: 18px;
  background: linear-gradient(var(--accent), var(--accent-2)); border-radius: 3px;
  margin-right: 9px; vertical-align: -3px; }
.prose ul { margin: 12px 0 12px 24px; }
.prose li { margin: 6px 0; }
.prose code { font-family: "JetBrains Mono", Consolas, monospace; font-size: 13.5px;
  background: #f0f2f7; border-radius: 5px; padding: 1.5px 7px; color: #c2335f; }
.prose .quote {
  background: #f6f8ff; border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin: 18px 0; color: #4d5766; font-size: 14.5px;
}
.post-nav { display: flex; justify-content: space-between; gap: 14px; margin: 26px auto 10px; max-width: 780px; }
.post-nav a {
  flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; font-size: 14px; color: var(--muted); transition: border-color .18s, color .18s;
}
.post-nav a:hover { border-color: var(--accent); color: var(--accent); }
.post-nav a b { display: block; color: var(--ink); font-size: 14.5px; margin-top: 2px; }
.post-nav a.next { text-align: right; }

/* ---------- 页脚 ---------- */
.footer { margin-top: 60px; border-top: 1px solid var(--line); background: #fff; }
.footer-inner {
  max-width: 1040px; margin: 0 auto; padding: 30px 22px 36px;
  text-align: center; color: var(--muted); font-size: 13px;
}
.footer-inner a { color: var(--muted); }
.footer-inner a:hover { color: var(--accent); }
.footer .filing { margin-top: 8px; font-size: 12.5px; }
.footer .filing a { margin: 0 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .cat-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .article { padding: 30px 24px; }
  .about-card { flex-direction: column; text-align: center; }
  .about-card .skills { justify-content: center; }
}
