* { box-sizing: border-box; }
body {
  margin: 0;
  color: #e8e8e8;
  background: #111318;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(20, 23, 29, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #2a2f3a;
}
.nav-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav a {
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  color: #cfd3dc;
  font-size: 14px;
}
.nav a:hover, .nav a.active { background: #2d3442; color: #fff; }
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.hero {
  display: grid;
  grid-template-columns: 1.5fr .9fr;
  gap: 24px;
  align-items: center;
  padding: 42px 0;
}
.eyebrow { color: #8bb4ff; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
h1 { font-size: 42px; line-height: 1.2; margin: 10px 0 16px; }
h2 { margin-top: 0; }
.hero-text, .page-desc { color: #b9c0cc; font-size: 17px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn, button {
  display: inline-block;
  border: 1px solid #3a4354;
  background: #202633;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.btn.primary, button:hover, .btn:hover { background: #3867d6; border-color: #3867d6; }
.hero-card, .feature-card, .note-card, .tool-card, .resume-section, .search-panel {
  background: #181c24;
  border: 1px solid #2a2f3a;
  border-radius: 18px;
  padding: 22px;
}
.hero-card ul { padding-left: 20px; color: #cfd3dc; }
.grid-3, .note-list, .link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.feature-card, .note-card { text-decoration: none; transition: transform .18s, background .18s; }
.feature-card:hover, .note-card:hover { transform: translateY(-3px); background: #202633; }
.feature-card p, .note-card p { color: #b9c0cc; margin-bottom: 8px; }
.note-tags { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.note-updated {
  display: block;
  font-size: 11px;
  color: #6b7385;
  margin-top: 4px;
}
.search-panel { margin-bottom: 26px; }
.section-group { margin-top: 36px; }
.section-title {
  font-size: 22px;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2a2f3a;
  color: #e8e8e8;
}
#site-search, input, textarea {
  width: 100%;
  background: #0f1218;
  color: #fff;
  border: 1px solid #343b49;
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 15px;
}
textarea { min-height: 130px; resize: vertical; }
.search-results { margin-top: 12px; }
.search-item {
  display: block;
  text-decoration: none;
  padding: 12px;
  border-radius: 12px;
  background: #11151c;
  margin-top: 8px;
  border: 1px solid #252b36;
}
.search-item span { color: #8bb4ff; font-size: 13px; }
.page h1 { font-size: 34px; }
.tag {
  display: inline-block;
  background: #2d3442;
  color: #9fc1ff;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.project-links { padding-left: 20px; margin: 6px 0 0; }
.project-links a { color: #8bb4ff; text-decoration: none; }
.project-links a:hover { text-decoration: underline; }
.project-links li { margin-bottom: 4px; }
.resume-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.resume-section { margin: 18px 0; }
.skill-group-label { color: #8bb4ff; font-size: 13px; margin: 14px 0 6px; }
.skill-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.skill-tags span { background: #202633; border: 1px solid #333b4b; padding: 7px 10px; border-radius: 999px; }
.timeline-item { border-left: 3px solid #3867d6; padding-left: 14px; margin: 16px 0; }
.tool-card { margin-bottom: 22px; }
.tool-actions, .inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.inline-form input { flex: 1; min-width: 240px; }
.copy-btn {
  display: inline-block;
  font-size: 12px;
  padding: 5px 12px;
  margin-top: 6px;
  border-radius: 8px;
  cursor: pointer;
  background: #202633;
  border: 1px solid #3a4354;
  color: #b9c0cc;
  transition: background .15s;
}
.copy-btn:hover { background: #2d3442; color: #fff; }
pre {
  background: #0b0d12;
  border: 1px solid #272d38;
  border-radius: 12px;
  color: #dce3ef;
  padding: 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.link-grid a {
  text-decoration: none;
  background: #181c24;
  border: 1px solid #2a2f3a;
  padding: 18px;
  border-radius: 14px;
}
.link-grid a:hover { background: #202633; }
.footer { text-align: center; color: #8d95a3; padding: 30px 20px; border-top: 1px solid #252b36; margin-top: 30px; }
.article { max-width: 860px; }
.article h1 { font-size: 34px; }
.article code { background: #0b0d12; padding: 2px 6px; border-radius: 6px; }
.article pre code { padding: 0; background: transparent; }

/* ── Markdown 表格样式 ── */
.article table,
.preview-pane table,
.preview table,
.note-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 10px;
}

.article th,
.article td,
.preview-pane th,
.preview-pane td,
.preview th,
.preview td,
.note-content th,
.note-content td {
  border: 1px solid #2d3748;
  padding: 10px 12px;
  text-align: left;
}

.article th,
.preview-pane th,
.preview th,
.note-content th {
  background: #1f2937;
  color: #f8fafc;
}

.article tr:nth-child(even),
.preview-pane tr:nth-child(even),
.preview tr:nth-child(even),
.note-content tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 760px) {
  .nav-wrap { align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .hero { grid-template-columns: 1fr; padding: 24px 0; }
  h1 { font-size: 32px; }
  .resume-head { flex-direction: column; align-items: flex-start; }
}
@media print {
  .site-header, .footer, .btn { display: none; }
  body { background: #fff; color: #111; }
  .container { max-width: 100%; }
  .resume-section { border: 1px solid #ddd; background: #fff; }
}
