/* ============================================================
   Handhans-max 个人主页样式
   深色主题 · 无外部依赖 · 移动端适配
   ============================================================ */

:root {
  --bg: #0f1115;
  --bg-card: #171a21;
  --bg-hover: #1d212a;
  --border: #262b36;
  --text: #e8eaed;
  --text-dim: #9aa3b2;
  --text-faint: #6b7280;
  --accent: #7c3aed;
  --accent-hover: #8b5cf6;
  --accent-soft: rgba(124, 58, 237, 0.12);
  --radius: 10px;
  --maxw: 820px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  position: sticky; top: 0;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-title { font-weight: 700; font-size: 17px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.site-title:hover { text-decoration: none; color: var(--accent-hover); }
.logo { font-size: 18px; }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav a { color: var(--text-dim); font-size: 14px; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.lang-switch { color: var(--text-faint); font-size: 14px; }

/* ---------- Main ---------- */
.site-main { padding: 48px 24px 72px; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 56px; }
.hero h1 { font-size: 34px; line-height: 1.3; margin: 0 0 10px; letter-spacing: -0.5px; }
.hero h1 .en, .hero h1 .cn { color: var(--text-faint); font-weight: 400; font-size: 22px; }
.hero .tagline { font-size: 18px; color: var(--accent-hover); margin: 0 0 8px; font-weight: 500; }
.hero .meta { color: var(--text-dim); font-size: 14px; margin: 0; }

/* ---------- Sections ---------- */
.section { margin-bottom: 52px; }
.section h2 {
  font-size: 22px; margin: 0 0 20px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ---------- Hiring ---------- */
.hiring-intro { color: var(--text-dim); margin-bottom: 24px; }
.hiring-intro p { margin: 0 0 10px; }
.dir-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dir-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  transition: border-color .15s, background .15s;
}
.dir-card:hover { border-color: var(--accent); background: var(--bg-hover); }
.dir-card h3 { margin: 0 0 6px; font-size: 16px; color: var(--text); }
.dir-card p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ---------- Prose ---------- */
.prose p { margin: 0 0 14px; color: var(--text-dim); }
.prose em { color: var(--text-faint); }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-dim); }
.contact-list li:last-child { border-bottom: none; }

/* ---------- Notes grid (招聘侧记) ---------- */
.notes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 20px 0 0; }
.note-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.note-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent-hover); font-weight: 600; }
.note-card p { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.notes-more { margin: 18px 0 0; font-size: 14px; }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 40px; }
.page-head h1 { font-size: 30px; margin: 0 0 6px; }
.page-sub { color: var(--text-dim); margin: 0; font-size: 15px; }

/* ---------- Blog list ---------- */
.post-item {
  padding: 22px 0; border-bottom: 1px solid var(--border);
}
.post-item:last-child { border-bottom: none; }
.post-item time { font-size: 13px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.post-item h2 { font-size: 19px; margin: 6px 0 8px; }
.post-item h2 a { color: var(--text); }
.post-item h2 a:hover { color: var(--accent-hover); text-decoration: none; }
.post-summary { color: var(--text-dim); font-size: 14px; margin: 0 0 8px; }
.post-tags { margin: 0; }
.tag {
  display: inline-block; font-size: 12px; color: var(--accent-hover);
  background: var(--accent-soft); border-radius: 4px; padding: 2px 8px; margin-right: 6px;
}

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-faint);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty-state .hint { font-size: 13px; margin-top: 10px; }
.empty-state code {
  background: var(--bg-card); padding: 2px 6px; border-radius: 4px; font-size: 12px;
}

/* ---------- Post ---------- */
.post-header { margin-bottom: 32px; }
.post-header h1 { font-size: 30px; line-height: 1.35; margin: 0 0 10px; }
.post-meta { color: var(--text-faint); font-size: 14px; margin: 0; }
.post-content { font-size: 16px; }
.post-content h2 { font-size: 22px; margin: 36px 0 14px; color: var(--text); }
.post-content h3 { font-size: 18px; margin: 28px 0 12px; }
.post-content code {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 4px; padding: 2px 6px; font-size: 14px;
}
.post-content pre {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; overflow-x: auto;
}
.post-content pre code { background: none; border: none; padding: 0; }
.post-content blockquote {
  border-left: 3px solid var(--accent); margin: 0 0 16px;
  padding: 4px 0 4px 18px; color: var(--text-dim);
}
.post-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border); padding: 28px 0;
  color: var(--text-faint); font-size: 13px; text-align: center;
}
.footer-links { margin: 6px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero h1 { font-size: 26px; }
  .hero h1 .en, .hero h1 .cn { display: block; font-size: 18px; }
  .site-main { padding: 32px 20px 56px; }
  .site-nav { gap: 14px; }
}
