/* 个人技术学习笔记 - 主样式（纯本地，无外部资源） */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  color: #2c3e50;
  background: #f5f7fa;
  line-height: 1.8;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: #3b82f6; text-decoration: none; transition: color .2s; }
a:hover { color: #1d4ed8; }

/* ============ 顶栏 ============ */
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #edf0f3;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(8px);
}
.topbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -1px;
  box-shadow: 0 4px 10px rgba(59,130,246,.25);
}
.brand-title { line-height: 1.2; }
.brand-title small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  margin-top: 2px;
}
nav.main-nav a {
  color: #475569;
  margin-left: 18px;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: #1d4ed8;
  border-bottom-color: #3b82f6;
}

/* ============ 主体容器 ============ */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 14px;
  padding: 28px 26px;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.15), transparent 70%);
}
.hero h1 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #1e293b;
  letter-spacing: .5px;
}
.hero p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
}
.hero .tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero .tags span {
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: #3b82f6;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ============ 章节标题 ============ */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  color: #1e293b;
  margin: 26px 0 14px;
  font-weight: 600;
}
.section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #3b82f6, #6366f1);
  border-radius: 2px;
}

/* ============ 文章卡片列表 ============ */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.post-list li {
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  padding: 18px 20px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  border-color: #dbeafe;
}
.post-list a.title {
  display: block;
  font-size: 16px;
  color: #1e293b;
  font-weight: 600;
  margin-bottom: 6px;
}
.post-list a.title:hover { color: #3b82f6; }
.post-list .excerpt {
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  margin: 6px 0 10px;
}
.post-list .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
}
.post-list .meta .badge {
  background: #eef2ff;
  color: #4f46e5;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

/* ============ 关于/内容通用卡片 ============ */
.card {
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.card h3 {
  font-size: 15px;
  color: #1e293b;
  margin: 18px 0 8px;
  font-weight: 600;
}
.card h3:first-child { margin-top: 0; }
.card ul { padding-left: 22px; margin: 8px 0; }
.card ul li { margin: 4px 0; color: #475569; }

/* ============ 文章正文 ============ */
article.post {
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  padding: 30px 32px;
}
article.post h2.title {
  font-size: 22px;
  color: #0f172a;
  margin: 0 0 10px;
  line-height: 1.4;
}
article.post .post-meta {
  color: #94a3b8;
  font-size: 12px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #e2e8f0;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
article.post h3 {
  font-size: 17px;
  color: #1e293b;
  margin: 26px 0 10px;
  padding-left: 10px;
  border-left: 3px solid #3b82f6;
  line-height: 1.5;
}
article.post p { margin: 12px 0; color: #334155; }
article.post ol, article.post ul { padding-left: 24px; color: #334155; }
article.post ol li, article.post ul li { margin: 5px 0; }

pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  margin: 14px 0;
  border: 1px solid #0f172a;
}
pre code { background: none; padding: 0; color: inherit; }
code {
  background: #f1f5f9;
  color: #db2777;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 13px;
}

blockquote {
  margin: 18px 0;
  padding: 12px 16px;
  background: #fefce8;
  border-left: 4px solid #eab308;
  color: #854d0e;
  font-size: 14px;
  border-radius: 0 8px 8px 0;
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  color: #64748b;
  font-size: 14px;
}
.back-link:hover { color: #3b82f6; }

/* ============ 侧栏小信息（首页） ============ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0 6px;
}
.info-item {
  background: #fff;
  border: 1px solid #edf0f3;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: center;
}
.info-item .num {
  font-size: 22px;
  font-weight: 700;
  color: #3b82f6;
  line-height: 1;
}
.info-item .label {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

/* ============ 页脚 ============ */
footer.site {
  margin-top: 40px;
  padding: 24px 20px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  line-height: 2;
  border-top: 1px solid #edf0f3;
  background: #fff;
}
footer.site a { color: #64748b; margin: 0 4px; }
footer.site a:hover { color: #3b82f6; }
footer.site .beian a { color: #94a3b8; }
footer.site .beian { margin-top: 6px; }
footer.site .copy { margin-top: 4px; }
.about-note { color: #94a3b8; font-size: 13px; margin-bottom: 0; }
.card p.tight { margin-bottom: 0; }

/* ============ 移动端 ============ */
@media (max-width: 600px) {
  .wrap { padding: 20px 14px 40px; }
  .topbar-inner { padding: 12px 14px; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 20px; }
  article.post { padding: 22px 18px; }
  article.post h2.title { font-size: 19px; }
  nav.main-nav a { margin-left: 12px; font-size: 13px; }
  .brand-title small { display: none; }
}
