/* ================================================
   Typography — Modern sans-serif, Chinese + Western
   ================================================ */

/* --- 统一字体栈：西文 Inter/Helvetica，中文苹方/冬青 --- */
:root {
  --font-sans:
    "Inter",
    "Helvetica Neue",
    "Arial",
    "PingFang SC",
    "Hiragino Sans GB",
    "Noto Sans SC",
    "Microsoft YaHei",
    sans-serif;
}

body {
  font-family: var(--font-sans);
  line-height: 1.9;
  font-size: 1.0rem;
  color: #1d1d1f;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, time, nav {
  font-family: var(--font-sans);
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111;
}

/* --- 正文段落 --- */
#container main article p,
#container main article li {
  line-height: 1.95;
  letter-spacing: 0.005em;
}

#container main article p {
  margin-bottom: 1.1em;
  margin-top: 0;
}

/* --- 标题层级 --- */
#container main article h1 { font-size: 1.75rem; margin: 2rem 0 0.75rem; font-weight: 700; }
#container main article h2 { font-size: 1.3rem;  margin: 1.8rem 0 0.6rem; }
#container main article h3 { font-size: 1.1rem;  margin: 1.4rem 0 0.5rem; }

/* --- 站点标题 --- */
#container header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- 导航 --- */
#container nav {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-bottom: 1px solid #e0e0e0;
}

/* --- 引用块 --- */
blockquote {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #555;
  background: #f5f5f7;
  border-left: 3px solid #c0c0c0;
  box-shadow: none;
  padding: 0.6em 1.5em;
  margin: 1.2em 0;
}

blockquote::before {
  display: none;
}

/* --- 代码块 --- */
#container main article pre,
#container main article code {
  font-family: "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;
  font-size: 0.87rem;
  line-height: 1.7;
}

#container main article pre {
  background: #f5f5f7;
  border-radius: 6px;
  box-shadow: none;
}

#container main article p code {
  background: #f0f0f2;
  color: #c0392b;
  border-radius: 3px;
  padding: 0.15em 0.4em;
}

/* --- 链接 --- */
a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.12s ease;
}

a:hover {
  color: #004499;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- 内容宽度 --- */
#container > * {
  width: 700px;
}

@media only screen and (max-width: 800px) {
  #container > * {
    width: auto;
    margin: 0 1.2em;
  }
  body {
    font-size: 0.97rem;
    line-height: 1.85;
  }
}

/* --- 暗色模式 --- */
@media (prefers-color-scheme: dark) {
  body {
    background: #111;
    color: #e5e5e7;
  }
  h1, h2, h3, h4, h5, h6 { color: #f5f5f7; }
  #container header h1 a { color: #f5f5f7; }
  #container nav { border-bottom-color: #333; }
  a { color: #4da3ff; }
  a:hover { color: #80bfff; }
  blockquote {
    background: #1c1c1e;
    color: #aaa;
    border-left-color: #444;
  }
  #container main article pre {
    background: #1c1c1e;
  }
  #container main article p code {
    background: #2a1f1f;
    color: #ff6b6b;
  }
}
