/* ---------------------------------------------------------------
   elegant.css — 淡雅覆盖层
   主题：hugo-theme-reimu（青瓷/苔绿配色已在 hugo.toml 的
   params.internal_theme 里改；这里补主题没暴露成参数的部分）
   加载顺序：位于 main.css 之后（injector.head_end），可直接覆盖。
   --------------------------------------------------------------- */

:root {
  /* 纸感底色与墨色正文 */
  --color-background: #f6f5f1;
  --color-wrap: #ffffff;
  --color-default: #3e423f;
  --color-archive-year: #4c514d;
  --color-code-background: #f6f7f4;
  --color-header-background: rgba(255, 255, 255, 0.86);
  --color-footer-background: #fbfaf7;
  --color-mobile-nav-background: #fbfaf7;
  --color-h2-border: #e9e7e1;
  --color-sticky: #fbfaf7;

  /* 阴影压到几乎看不见 */
  --color-shadow: rgba(40, 48, 42, 0.05);
  --color-shadow-ambient: rgba(40, 48, 42, 0.03);
  --color-meta-shadow: rgba(93, 125, 106, 0.14);
  --shadow-card: 0 1px 2px rgba(40, 48, 42, 0.04), 0 6px 24px rgba(40, 48, 42, 0.04);
  --shadow-card-hover: 0 2px 6px rgba(40, 48, 42, 0.06), 0 14px 40px rgba(40, 48, 42, 0.06);
  --shadow-meta: 0 1px 2px rgba(40, 48, 42, 0.04);
  --shadow-meta-hover: 0 2px 6px rgba(40, 48, 42, 0.06);
}

/* 行距与字距：留白多一点 */
body {
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* 标题用衬线，正文保持无衬线 —— 淡雅的关键在对比而不是花哨 */
h1, h2, h3, h4,
.post-content h2,
.post-content h3 {
  font-family: Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: 0.02em;
  font-weight: 600;
}

/* 正文段落更松 */
.post-content p,
.post-content li {
  line-height: 1.85;
}

/* h2 的下划线压得更细、更短 */
.post-content h2::after,
.content h2::after {
  height: 2px;
  border-radius: 2px;
  opacity: 0.75;
}

/* 卡片圆角收敛 */
.post-card, .card, .widget {
  border-radius: 8px;
}

/* 横幅稍微矮一点，露出更多内容 */
.header, .banner {
  background-position: center;
}

/* 深色模式也保持柔和（背景别太黑） */
[data-theme="dark"] {
  --color-background: #22261f;
  --color-wrap: #282d26;
  --color-default: #b8bfb4;
  --color-footer-background: #22261f;
  --color-mobile-nav-background: #282d26;
  --color-header-background: rgba(34, 38, 31, 0.9);
  --color-h2-border: #3a4038;
  --color-sticky: #282d26;
}

/* 选中色也柔和 */
::selection {
  background: rgba(93, 125, 106, 0.18);
}

/* ---------- 横幅文字：浅色底用墨色，去掉白字+黑影 ---------- */
#logo,
#logo h1,
#subtitle {
  color: #2e3a32 !important;
  text-shadow: none !important;
}

#logo {
  font-weight: 600;
  letter-spacing: 0.08em;
}

#logo h1 {
  font-family: Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: 0.14em;
}

#subtitle {
  color: #5f6a61 !important;
  letter-spacing: 0.1em;
  font-weight: 400;
}

/* ---------- 隐藏主题自带的太极图标，导航只留文字 ---------- */
.main-nav-icon,
#header-nav .icon,
.sidebar-menu-list .icon {
  display: none !important;
}

/* 导航项间距重新平衡 */
#main-nav .main-nav-link-wrap {
  padding-left: 18px;
  padding-right: 18px;
}

/* ---------- 卡片：更轻的边框与过渡 ---------- */
.post-cover img {
  filter: saturate(0.9);
  transition: transform 0.6s ease, filter 0.4s ease;
}
.post-wrap:hover .post-cover img {
  transform: scale(1.02);
}

/* 分类/标签胶囊更收敛 */
.post-meta a,
.post-tags a,
.tag-cloud a {
  border-radius: 4px;
}

/* ---------- 横幅文字：浅色底用墨色，去掉白字+黑影 ---------- */
#logo,
#logo h1,
#subtitle {
  color: #2e3a32 !important;
  text-shadow: none !important;
}

#logo {
  font-weight: 600;
  letter-spacing: 0.08em;
}

#logo h1 {
  font-family: Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: 0.14em;
}

#subtitle {
  color: #5f6a61 !important;
  letter-spacing: 0.1em;
  font-weight: 400;
}

/* ---------- 隐藏主题自带的太极图标，导航只留文字 ---------- */
.main-nav-icon,
#header-nav .icon,
.sidebar-menu-list .icon {
  display: none !important;
}

/* 导航项间距重新平衡 */
#main-nav .main-nav-link-wrap {
  padding-left: 18px;
  padding-right: 18px;
}

/* ---------- 卡片：更轻的边框与过渡 ---------- */
.post-cover img {
  filter: saturate(0.9);
  transition: transform 0.6s ease, filter 0.4s ease;
}
.post-wrap:hover .post-cover img {
  transform: scale(1.02);
}

/* 分类/标签胶囊更收敛 */
.post-meta a,
.post-tags a,
.tag-cloud a {
  border-radius: 4px;
}

/* ---------- 侧栏导航：去掉太极图标与粗重双线边框 ---------- */
.sidebar-menu-icon {
  display: none !important;
}

.sidebar-menu-link-wrap {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 6px !important;
  width: 78% !important;
  padding: 9px 0 !important;
  justify-content: center !important;
}

.sidebar-menu-link-wrap:hover {
  background: rgba(93, 125, 106, 0.08) !important;
}

.sidebar-menu-link-wrap:hover .sidebar-menu-link,
.sidebar-menu-link-wrap:hover .sidebar-menu-icon {
  color: #3f5a4c !important;
}

.sidebar-menu-link {
  font-weight: 400 !important;
  letter-spacing: 0.12em !important;
  color: #5c665e;
}

/* ---------- 文章页 ---------- */
/* 破折号分隔线 → 一条极淡的细线 */
.hr-line {
  height: 1px !important;
  opacity: 1 !important;
  margin: 10px 36px !important;
  background-image: none !important;
  background: #ece9e2 !important;
  filter: none !important;
}

/* 正文标题：衬线 + 收敛锚点 */
.e-content h1,
.e-content h2,
.e-content h3,
.e-content h4,
.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4 {
  font-family: Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: 0.02em;
}

.e-content a.header-anchor,
.article-entry a.header-anchor {
  opacity: 0;
  font-size: 0.6em;
  transition: opacity 0.25s;
}

.e-content h2:hover a.header-anchor,
.e-content h3:hover a.header-anchor,
.article-entry h2:hover a.header-anchor,
.article-entry h3:hover a.header-anchor {
  opacity: 0.35;
}

/* 正文行距 */
.e-content p,
.e-content li,
.article-entry p,
.article-entry li {
  line-height: 1.85;
}

/* 侧栏菜单文字居中 */
.sidebar-menu-link {
  text-align: center;
  width: 100%;
}

/* 横幅高度略收，页面更紧凑 */
#header {
  min-height: 320px;
}

/* ---------- 文章页 ---------- */
/* 破折号分隔线 → 一条极淡的细线 */
.hr-line {
  height: 1px !important;
  opacity: 1 !important;
  margin: 10px 36px !important;
  background-image: none !important;
  background: #ece9e2 !important;
  filter: none !important;
}

/* 正文标题：衬线 + 收敛锚点 */
.e-content h1,
.e-content h2,
.e-content h3,
.e-content h4,
.article-entry h1,
.article-entry h2,
.article-entry h3,
.article-entry h4 {
  font-family: Georgia, "Songti SC", "STSong", "Noto Serif SC", serif;
  letter-spacing: 0.02em;
}

.e-content a.header-anchor,
.article-entry a.header-anchor {
  opacity: 0;
  font-size: 0.6em;
  transition: opacity 0.25s;
}

.e-content h2:hover a.header-anchor,
.e-content h3:hover a.header-anchor,
.article-entry h2:hover a.header-anchor,
.article-entry h3:hover a.header-anchor {
  opacity: 0.35;
}

/* 正文行距 */
.e-content p,
.e-content li,
.article-entry p,
.article-entry li {
  line-height: 1.85;
}

/* 侧栏菜单文字居中 */
.sidebar-menu-link {
  text-align: center;
  width: 100%;
}

/* 横幅高度略收，页面更紧凑 */
#header {
  min-height: 320px;
}

/* 锚点彻底隐藏（主题规则特异性更高，必须 !important） */
.article-entry h1 a.header-anchor,
.article-entry h2 a.header-anchor,
.article-entry h3 a.header-anchor,
.article-entry h4 a.header-anchor,
.e-content h1 a.header-anchor,
.e-content h2 a.header-anchor,
.e-content h3 a.header-anchor,
.e-content h4 a.header-anchor {
  opacity: 0 !important;
}

.article-entry h2:hover a.header-anchor,
.article-entry h3:hover a.header-anchor,
.e-content h2:hover a.header-anchor,
.e-content h3:hover a.header-anchor {
  opacity: 0.3 !important;
}
