/* ============================================================
   LeeJackWho · 技术博客视觉层（基于 HTML5 UP Editorial）
   浅色阅读友好 + 技术博客排版 + 代码块/表格/元信息
   ============================================================ */

:root {
  --accent: #2f6fed;
  --accent-soft: rgba(47, 111, 237, 0.08);
  --ink: #1c2430;
  --ink-2: #3d4a5c;
  --ink-dim: #6b7a90;
  --line: #e3e8ef;
  --card: #ffffff;
  --code-bg: #0f172a;
  --code-ink: #d7e2f0;
  --radius: 12px;
  --font-cn: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
             "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, "Courier New", monospace;
}

/* ---------- 排版基础 ---------- */
body, h1, h2, h3, h4, h5, p, li, span, div, a, td, th {
  font-family: var(--font-cn);
  -webkit-font-smoothing: antialiased;
  color: var(--ink-2);
}
h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.4; }

a { transition: color 0.2s ease; }

/* ---------- 站点头 ---------- */
#header .logo { font-size: 1.15em; letter-spacing: 0.01em; }
#header .logo .logo-sub {
  display: block;
  font-size: 0.52em;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  margin-top: 2px;
}
#header .icons a { transition: background 0.22s ease, color 0.22s ease; border-radius: 8px; }

/* ---------- 首屏 ---------- */
#banner h1 {
  font-size: 2.4em;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: var(--ink);
}
#banner .content > p { color: var(--ink-2); line-height: 1.9; }
#banner p.major { color: var(--accent); font-weight: 600; letter-spacing: 0.04em; }

.button {
  background: var(--accent) !important;
  border-radius: 8px !important;
  letter-spacing: 0.05em;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
.button:hover {
  background: #245ad4 !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(47, 111, 237, 0.24);
}
.button.alt {
  background: transparent !important;
  color: var(--ink-2) !important;
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.button.alt:hover { background: var(--accent-soft) !important; color: var(--accent) !important; }

/* ---------- 区块标题 ---------- */
header.major h2 {
  font-size: 1.5em;
  position: relative;
  padding-bottom: 0.5em;
  color: var(--ink);
}
header.major h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 3px;
  border-radius: 3px;
  background: var(--accent);
}

/* ---------- 技术方向卡 ---------- */
.features article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.features article:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 237, 0.4);
  box-shadow: 0 14px 32px rgba(28, 36, 48, 0.08);
}
.features article .icon { color: var(--accent); }
.features article h3 { color: var(--ink); margin-bottom: 0.4em; }
.features article p { font-size: 0.92em; line-height: 1.8; color: var(--ink-dim); }

/* ---------- 文章卡 ---------- */
.posts article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.posts article:hover {
  transform: translateY(-5px);
  border-color: rgba(47, 111, 237, 0.35);
  box-shadow: 0 18px 40px rgba(28, 36, 48, 0.10);
}
.posts article .image { display: block; overflow: hidden; }
.posts article .image img { transition: transform 0.5s ease; }
.posts article:hover .image img { transform: scale(1.05); }
.posts article h3 { color: var(--ink); line-height: 1.5; }
.posts article h3 a { color: inherit; }
.posts article h3 a:hover { color: var(--accent); }
.posts article p { color: var(--ink-dim); line-height: 1.85; font-size: 0.92em; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.post-meta .tag {
  display: inline-block;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 99px;
}
.post-meta .date {
  font-size: 0.75em;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}

/* ---------- 文章正文 ---------- */
.post-full {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 44px;
  margin: 28px 0;
}
.post-header { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 8px; }
.post-header h1 { font-size: 1.9em; line-height: 1.35; margin: 0.2em 0 0.4em; }
.post-lead {
  font-size: 1.05em;
  line-height: 1.9;
  color: var(--ink-dim);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

.post-full section h2 {
  font-size: 1.28em;
  margin: 2em 0 0.7em;
  padding-top: 0.3em;
}
.post-full section h3 { font-size: 1.05em; margin: 1.5em 0 0.5em; color: var(--ink-2); }
.post-full section p { line-height: 1.95; margin: 0 0 1.1em; }
.post-full section ul, .post-full section ol { margin: 0 0 1.2em 1.3em; }
.post-full section li { line-height: 1.9; margin-bottom: 0.4em; }
.post-full section strong { color: var(--ink); }
.post-full section em { color: var(--accent); font-style: normal; font-weight: 600; }

.post-full section code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: #eef2f8;
  color: #c0392b;
  padding: 2px 7px;
  border-radius: 5px;
  word-break: break-word;
}
.post-full section pre {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: var(--radius);
  padding: 20px 22px;
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 1px solid #1e293b;
}
.post-full section pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.85em;
  line-height: 1.75;
  white-space: pre;
}

.post-full table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 0.92em;
}
.post-full table th, .post-full table td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.post-full table th { background: #f5f8fc; color: var(--ink); font-weight: 600; }
.post-full table code { background: #eef2f8; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 24px;
}

/* ---------- 页脚 ---------- */
#footer p { color: var(--ink-dim); font-size: 0.85em; }
#footer a { color: var(--accent); text-decoration: none; }
#footer a:hover { text-decoration: underline; }

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .button:hover, .posts article:hover, .features article:hover { transform: none; }
}

/* ---------- 移动端 ---------- */
@media (max-width: 736px) {
  .post-full { padding: 26px 20px; }
  .post-header h1 { font-size: 1.45em; }
  #banner h1 { font-size: 1.9em; }
  .post-nav .button { width: 100%; text-align: center; }
}
