/* ===========================================
   汤液李彦龙 · 中医国风主题
   宣纸暖底 / 墨色文字 / 朱砂点缀 / 宋体标题
   =========================================== */

:root {
  --radius: 10px;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
    "STSong", "SimSun", serif;
  --font-sans: "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --cinnabar: #9c3d32;
  --cinnabar-deep: #7c2d25;
  --paper: #f6f1e7;
  --paper-soft: #fbf8f1;
  --ink: #2b2a26;
  --ink-soft: #5f594f;
  --line: rgba(74, 60, 44, 0.14);
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* ---------- 浅色：宣纸 + 墨 + 朱砂 ---------- */
[data-theme="light"] {
  --efu-theme: var(--cinnabar);
  --efu-theme-op: rgba(156, 61, 50, 0.13);
  --efu-theme-op-deep: rgba(156, 61, 50, 0.86);
  --efu-theme-op-light: rgba(156, 61, 50, 0.055);
  --efu-theme-none: rgba(156, 61, 50, 0);
  --efu-nav-hover-text: var(--paper);

  --efu-background: var(--paper);
  --efu-card-bg: var(--paper-soft);
  --efu-secondbg: #efe7d8;
  --efu-secondbg-bg: #efe7d8;
  --efu-card-border: var(--line);
  --efu-fontcolor: var(--ink);
  --efu-secondtext: var(--ink-soft);
  --search-bg: #efe7d8;

  --efu-shadow-border: 0 8px 24px -16px rgba(74, 60, 44, 0.3);
  --efu-shadow-nav: 0 6px 18px -14px rgba(74, 60, 44, 0.28);
  --efu-shadow-glass: 0 6px 30px -10px rgba(74, 60, 44, 0.2);
}

/* ---------- 深色：夜墨 + 赭石 ---------- */
[data-theme="dark"] {
  --efu-theme: #cf8569;
  --efu-theme-op: rgba(207, 133, 105, 0.16);
  --efu-theme-op-deep: rgba(207, 133, 105, 0.88);
  --efu-theme-op-light: rgba(207, 133, 105, 0.07);
  --efu-theme-none: rgba(207, 133, 105, 0);

  --efu-background: #1b1916;
  --efu-card-bg: #23201b;
  --efu-secondbg: #2b2721;
  --efu-secondbg-bg: #2b2721;
  --efu-card-border: rgba(246, 241, 231, 0.1);
  --efu-fontcolor: #ece4d6;
  --efu-secondtext: #b7ab9a;

  --efu-shadow-border: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --efu-shadow-nav: 0 5px 20px 0 rgba(0, 0, 0, 0.5);
}

/* ---------- 宣纸底纹 ---------- */
body {
  font-family: var(--font-sans);
  line-height: 1.85;
  letter-spacing: 0.015em;
  background-color: var(--efu-background);
  background-image: radial-gradient(
      1100px 560px at 12% -10%,
      rgba(156, 61, 50, 0.06),
      transparent 60%
    ),
    radial-gradient(900px 480px at 100% 0%, rgba(120, 100, 70, 0.05), transparent 55%),
    var(--paper-grain);
  background-attachment: fixed;
}

/* ---------- 标题：宋体味道 ---------- */
h1, h2, h3, h4, h5,
.article-title,
.article-title a,
.home-center-title a,
.footer-title,
.card-info .name {
  font-family: var(--font-serif);
  letter-spacing: 0.06em;
}

h1, h2, h3, h4 {
  color: var(--efu-fontcolor);
}

.site-name,
#site-name,
#site-title {
  font-family: var(--font-serif);
  letter-spacing: 0.12em;
  font-weight: 700;
}

/* ---------- 导航 ---------- */
#nav {
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px) saturate(1.1);
}
[data-theme="light"] #nav {
  background: rgba(251, 248, 241, 0.88);
}
[data-theme="dark"] #nav {
  background: rgba(35, 32, 27, 0.88);
}
#nav a {
  letter-spacing: 0.04em;
}

/* ---------- 卡片与文章列表 ---------- */
.recent-post-item,
.card-widget {
  border-radius: var(--radius);
  border: 1px solid var(--efu-card-border);
  box-shadow: var(--efu-shadow-border);
  background: var(--efu-card-bg);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.recent-post-item:hover,
.card-widget:hover {
  transform: translateY(-3px);
  border-color: rgba(156, 61, 50, 0.32);
  box-shadow: 0 16px 34px -20px rgba(74, 60, 44, 0.5);
}

[data-theme="dark"] .recent-post-item:hover,
[data-theme="dark"] .card-widget:hover {
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, 0.85);
}

.post_cover {
  border-radius: 8px;
  overflow: hidden;
}
.post_cover img {
  filter: saturate(0.92) contrast(1.03);
  transition: transform 0.5s ease;
}
.recent-post-item:hover .post_cover img {
  transform: scale(1.035);
}

.article-title {
  font-size: 1.35rem;
  line-height: 1.5;
}
.article-title:hover {
  color: var(--efu-theme);
}
.recent-post-info-top-tips .original,
.recent-post-meta-info {
  color: var(--efu-secondtext);
}

/* ---------- 首页横幅 ---------- */
#home_center {
  padding-top: 0.35rem;
}
.home-center-content {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--efu-shadow-border);
}
.home-center-cover-img {
  filter: sepia(0.06) saturate(0.94) contrast(1.02);
}
.home-center-mask {
  background: linear-gradient(
    to top,
    rgba(28, 24, 20, 0.78) 0,
    rgba(28, 24, 20, 0.2) 55%,
    transparent 100%
  );
}
.home-center-title a {
  font-size: 30px;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
.home-center-title-tag {
  color: rgba(246, 241, 231, 0.85);
}
.home-center-right {
  background: var(--cinnabar);
}
.home-center-item {
  background: rgba(0, 0, 0, 0.14);
}
.home-center-item.active {
  background: rgba(255, 255, 255, 0.16);
}
[data-theme="dark"] .home-center-cover-img {
  filter: brightness(0.82) sepia(0.08);
}

/* ---------- 侧边栏信息卡 ---------- */
.card-info .avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  padding: 4px;
  border: 2px solid rgba(156, 61, 50, 0.55);
  background: var(--efu-card-bg);
  object-fit: cover;
}
.card-info .description {
  font-family: var(--font-serif);
  color: var(--efu-theme);
  letter-spacing: 0.1em;
  font-size: 1.05rem;
}
.card-info .name {
  font-size: 20px;
}
.card-info .desc {
  color: var(--efu-secondtext);
}
.card-info .social-icon {
  color: var(--efu-secondtext);
}
.card-info .social-icon:hover {
  color: var(--efu-theme);
}

/* ---------- 文章页头部：统一水墨横幅 ---------- */
#page-header.post-bg::before {
  background-image: linear-gradient(
      180deg,
      rgba(28, 24, 20, 0.5) 0%,
      rgba(28, 24, 20, 0.72) 100%
    ),
    url("/img/hero-ink.jpg");
  background-size: cover;
  background-position: center 42%;
  background-repeat: no-repeat;
  background-color: rgba(28, 24, 20, 0.6);
  opacity: 1;
}

@media (max-width: 768px) {
  .post #page-header.post-bg {
    background-color: transparent !important;
  }
  .post #page-header.post-bg::before {
    height: 100% !important;
    background-color: transparent;
  }
  .post #post-info {
    background-image: linear-gradient(
      180deg,
      rgba(28, 24, 20, 0) 0%,
      rgba(28, 24, 20, 0.55) 100%
    ) !important;
  }
}

/* ---------- 正文排版 ---------- */
.post-content {
  letter-spacing: 0.02em;
}
.post-content h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}
.post-content h3 {
  color: var(--cinnabar-deep);
}
[data-theme="dark"] .post-content h3 {
  color: var(--efu-theme);
}
.post-content blockquote {
  border-left: 3px solid var(--efu-theme);
  background: rgba(156, 61, 50, 0.055);
  color: var(--efu-secondtext);
  font-family: var(--font-serif);
}
[data-theme="dark"] .post-content blockquote {
  background: rgba(207, 133, 105, 0.08);
}
.post-content a {
  border-bottom: 1px dashed rgba(156, 61, 50, 0.35);
  color: var(--efu-theme);
}
.post-content a:hover {
  color: var(--cinnabar-deep);
}
.post-content img {
  border-radius: 6px;
  box-shadow: 0 10px 28px -20px rgba(74, 60, 44, 0.45);
}
.post-content figure {
  margin: 1.6rem 0;
}
.post-content figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--efu-secondtext);
}

/* ---------- 页脚 ---------- */
#footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.footer-title {
  color: var(--efu-fontcolor);
  letter-spacing: 0.1em;
}
#footer_deal .deal_link,
#st-footer .footer-item,
#footer-bar,
.footer-bar-link,
.copyright,
.beian-group {
  color: var(--efu-secondtext);
}
#footer_deal .deal_link:hover,
#st-footer .footer-item:hover,
.footer-bar-link:hover {
  color: var(--efu-theme);
}
#footer-bar {
  border-top: 1px solid var(--line);
}

/* ---------- 细节 ---------- */
::selection {
  background: rgba(156, 61, 50, 0.18);
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(156, 61, 50, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(156, 61, 50, 0.55);
}

/* ---------- 轻动效 ---------- */
@keyframes ink-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.recent-post-item {
  animation: ink-rise 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.recent-post-item:nth-child(1) { animation-delay: 0.02s; }
.recent-post-item:nth-child(2) { animation-delay: 0.06s; }
.recent-post-item:nth-child(3) { animation-delay: 0.1s; }
.recent-post-item:nth-child(4) { animation-delay: 0.14s; }
.recent-post-item:nth-child(5) { animation-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .recent-post-item {
    animation: none;
  }
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
  .home-center-title a {
    font-size: 22px;
    letter-spacing: 0.08em;
  }
  .article-title {
    font-size: 1.15rem;
  }
}
