/* ═══════════════════════════════════════════════════════════════
   蕴藉·创作学院 样式
   完全对齐 console.html 设计系统令牌 (Fr_ClaudeDesign/Yunjie)
   字体：Noto Serif SC（标题）+ Noto Sans SC（正文）
═══════════════════════════════════════════════════════════════ */

/* ── 核心令牌 ──────────────────────────────────────────────── */
:root {
  /* 亮色系 */
  --bg:          #EFE8DB;   /* 页面底色：古籍宣纸暖 */
  --surface:     #F8F4EF;   /* 卡片/面板 */
  --surface2:    #FDFBF7;   /* 内层高亮区 */
  --line:        #E2D8C6;   /* 分割线/边框 */

  /* 文字 */
  --ink:         #0D1117;    /* 主文字：浓墨黑 */
  --muted:       #7C7365;    /* 次文字：淡墨灰 */

  /* 强调色 */
  --gold:        #B8962E;   /* 主强调：古籍金 */
  --gold-ink:    #1A1F2E;   /* 金底文字 */
  --sub:         #8B6914;    /* 次强调 */
  --blue:        #4A7CC7;   /* 信息蓝 */
  --green:       #2D6A4F;   /* 成功绿 */
  --red:         #C23B22;   /* 错误红 */

  /* 暗色（沉浸模式） */
  --imm-bg:      #1A1F2E;
  --imm-surf:    #222839;
  --imm-surf2:   #2A3143;
  --imm-text:    #EDE7DA;
  --imm-muted:   #98A0B0;
  --imm-line:    #333B4E;

  /* 阴影（双层：紧+松，console 规范） */
  --shadow: 0 1px 2px rgba(13,17,23,.04), 0 8px 28px rgba(13,17,23,.07);

  /* 字体族 */
  --serif: 'Noto Serif SC', 'Source Han Serif CN', 'SimSun', serif;
  --sans:  'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* 圆角/过渡 */
  --radius: 12px;
  --radius-sm: 8px;
  --transition: .2s ease;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
}

::selection { background: rgba(184,150,46,.28); color: var(--ink); }

/* 滚动条（console 规范） */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(124,115,101,.32);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--sub); text-decoration: underline; }

/* ── 动效（console 逐字对齐） ─────────────────────────────── */
@keyframes yj-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes yj-spring {
  0%   { opacity: 0; transform: translateY(22px) scale(.97); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.006); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes yj-breathe {
  0%,100% { box-shadow: 0 0 0 0 rgba(184,150,46,.42), 0 8px 24px rgba(184,150,46,.28); }
  50%     { box-shadow: 0 0 0 12px rgba(184,150,46,0), 0 10px 30px rgba(184,150,46,.42); }
}
@keyframes yj-ink-spread {
  0%   { transform: scale(.28); opacity: .55; }
  70%  { opacity: .12; }
  100% { transform: scale(2.3); opacity: 0; }
}
@keyframes yj-blob {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(-6%,-8%) scale(1.14); }
  100% { transform: translate(4%,6%) scale(.92); }
}
@keyframes yj-blob2 {
  0%   { transform: translate(0,0) scale(1.05); }
  50%  { transform: translate(8%,4%) scale(.9); }
  100% { transform: translate(-5%,-6%) scale(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; }
}

/* ── 布局容器 ─────────────────────────────────────────────── */
.inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── 站点导航 ─────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 58px;
}
.site-header .logo {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-header .logo:hover { color: var(--sub); text-decoration: none; }
.site-header .logo-mark {
  display: inline-block;
  width: 28px; height: 28px;
  background: var(--gold);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.site-header .logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.3) 0%, transparent 70%);
}

.site-header nav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.site-header nav a {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--transition), background var(--transition);
  font-weight: 400;
  letter-spacing: .02em;
}
.site-header nav a:hover {
  color: var(--ink);
  background: var(--surface2);
  text-decoration: none;
}
.site-header nav a.active {
  color: var(--gold);
  background: rgba(184,150,46,.1);
  font-weight: 500;
}

/* ── Hub Hero ─────────────────────────────────────────────── */
.hub-hero {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
  overflow: hidden;
  text-align: center;
}
/* 背景水墨纹理 */
.hub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 15% 60%, rgba(184,150,46,.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 30%, rgba(74,124,196,.06) 0%, transparent 60%);
  pointer-events: none;
}
/* 浮动墨滴装饰 */
.hub-hero::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 12%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(184,150,46,.06);
  animation: yj-blob 18s ease-in-out infinite;
  pointer-events: none;
}

.hub-hero .inner { position: relative; z-index: 1; }

.hub-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0;
  animation: yj-rise .5s .1s ease both;
}
.hub-hero .eyebrow::before,
.hub-hero .eyebrow::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: .6;
}

.hub-hero h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
  line-height: 1.3;
  margin-bottom: 16px;
  opacity: 0;
  animation: yj-spring .6s .2s ease both;
}
.hub-hero .subtitle {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 400;
  opacity: 0;
  animation: yj-rise .5s .35s ease both;
}
.hub-hero .lead {
  font-size: 15px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
  opacity: 0;
  animation: yj-rise .5s .45s ease both;
}

/* 墨滴脉冲指示 */
.hub-hero .ink-dot {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: yj-breathe 2.4s ease-in-out infinite;
}

/* ── 模块卡片网格 ─────────────────────────────────────────── */
.module-section {
  padding: 48px 0 40px;
}
.module-section .inner { position: relative; }

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.module-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: yj-spring .55s ease both;
}
.module-card:nth-child(1) { animation-delay: .15s; }
.module-card:nth-child(2) { animation-delay: .25s; }
.module-card:nth-child(3) { animation-delay: .35s; }
.module-card:nth-child(4) { animation-delay: .45s; }

.module-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(184,150,46,.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.module-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  border-color: rgba(184,150,46,.3);
  text-decoration: none;
  color: var(--ink);
}
.module-card:hover::before { opacity: 1; }

.module-card .icon-wrap {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(184,150,46,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1;
  transition: background var(--transition);
}
.module-card:hover .icon-wrap { background: rgba(184,150,46,.18); }

.module-card h2 {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .02em;
  margin: 0;
}
.module-card p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  line-height: 1.65;
}
.module-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.module-card .count {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 8px;
}
.module-card .arrow {
  font-size: 13px;
  color: var(--gold);
  transition: transform var(--transition);
}
.module-card:hover .arrow { transform: translateX(3px); }

/* ── 最近更新 ─────────────────────────────────────────────── */
.recent-section {
  padding: 0 0 56px;
}
.recent-section .inner { position: relative; }

.section-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.recent-list { list-style: none; }
.recent-list li {
  border-bottom: 1px solid var(--line);
}
.recent-list li:first-child { border-top: 1px solid var(--line); }
.recent-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
}
.recent-list li a:hover { color: var(--gold); text-decoration: none; }
.recent-list .mod-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  background: var(--gold);
  color: var(--gold-ink);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}
.recent-list .title { font-size: 14px; flex: 1; }
.recent-list .date { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ── 索引页 ───────────────────────────────────────────────── */
.index-page { padding: 48px 0 64px; }
.index-page .page-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.index-page h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
  margin-bottom: 6px;
}
.index-page .page-desc { font-size: 14px; color: var(--muted); }

.article-list { list-style: none; }
.article-list li a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: color var(--transition);
}
.article-list li:first-child a { border-top: 1px solid var(--line); }
.article-list li a:hover { color: var(--gold); text-decoration: none; }
.article-list .title { font-size: 15px; font-weight: 500; flex: 1; }
.article-list .desc { font-size: 13px; color: var(--muted); max-width: 380px; }
.article-list .date { font-size: 12px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.article-list .reading-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ── 内容页 ───────────────────────────────────────────────── */
.content-page { padding: 48px 0 72px; }

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 52px 56px 56px;
  box-shadow: var(--shadow);
}

/* Prose 排版 */
.prose h1 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .03em;
  line-height: 1.35;
  margin-bottom: 10px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--line);
}
.prose .article-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.prose .article-meta .tag {
  font-size: 11px;
  background: rgba(184,150,46,.1);
  color: var(--gold);
  border: 1px solid rgba(184,150,46,.25);
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 500;
}

.prose h2 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .03em;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--gold);
  line-height: 1.4;
}
.prose h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
  line-height: 1.5;
}
.prose h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin: 20px 0 8px;
  letter-spacing: .02em;
}
.prose p { margin-bottom: 18px; color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose em { font-style: italic; color: var(--muted); }

.prose ul, .prose ol {
  margin: 0 0 18px 22px;
}
.prose li { margin-bottom: 6px; line-height: 1.75; }
.prose li::marker { color: var(--gold); }

.prose blockquote {
  border-left: 3px solid var(--gold);
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--surface2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  font-style: italic;
}
.prose blockquote p { margin: 0; color: var(--muted); }

/* 代码块 */
.prose pre {
  background: var(--imm-surf);
  color: var(--imm-text);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 20px 0;
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.7;
  border: 1px solid var(--imm-line);
}
.prose code {
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
  background: var(--surface2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .88em;
  color: var(--ink);
}
.prose pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* 表格 */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.prose th {
  background: var(--gold);
  color: var(--gold-ink);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  letter-spacing: .02em;
}
.prose td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose tr:nth-child(even) td { background: var(--surface2); }
.prose tr:hover td { background: rgba(184,150,46,.05); }

/* 图片/分隔线 */
.prose figure.content-img { margin: 24px 0; text-align: center; }
.prose figure.content-img img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.prose figure.content-img figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  text-align: center;
}
.prose hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 36px 0;
}

/* Callout 块 */
.prose .callout {
  background: rgba(184,150,46,.07);
  border: 1px solid rgba(184,150,46,.22);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 20px 0;
}
.prose .callout p { margin: 0; }

/* prev/next */
.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.prev-next a {
  background: var(--surface2);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--ink);
  max-width: 44%;
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.prev-next a:hover {
  background: var(--surface);
  border-color: rgba(184,150,46,.3);
  text-decoration: none;
  color: var(--ink);
}
.prev-next .label { font-size: 11px; color: var(--muted); }
.prev-next .title { font-weight: 500; }
.prev-next a:last-child { text-align: right; }

/* 相关推荐 */
.related { margin-top: 32px; }
.related h4 {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.related ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.related li a {
  font-size: 13px;
  color: var(--ink);
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 4px 12px;
  transition: all var(--transition);
}
.related li a:hover {
  background: rgba(184,150,46,.1);
  border-color: rgba(184,150,46,.3);
  color: var(--gold);
  text-decoration: none;
}

/* ── 搜索条 ───────────────────────────────────────────────── */
.search-bar {
  margin: 28px 0 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.search-bar input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar input::placeholder { color: var(--muted); }
.search-bar input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,150,46,.12);
}
.search-bar button {
  background: var(--gold);
  color: var(--gold-ink);
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.search-bar button:hover { background: var(--sub); }

/* ── 站点 Footer ──────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 28px 0;
  text-align: center;
}
.site-footer .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.site-footer .brand {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: .06em;
}
.site-footer p { font-size: 12px; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }

/* ── 加载状态 ──────────────────────────────────────────────── */
.loading {
  display: grid;
  place-items: center;
  min-height: 40vh;
  font-family: var(--serif);
  color: var(--muted);
  letter-spacing: 3px;
  font-size: 15px;
}
.loading::after {
  content: '';
  display: block;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  animation: yj-ink-rotate .8s linear infinite;
  margin-top: 16px;
}
@keyframes yj-ink-rotate {
  to { transform: rotate(360deg); }
}

/* ── 响应式 ───────────────────────────────────────────────── */
@media (max-width: 760px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .prose { padding: 32px 24px 36px; }
  .prose h1 { font-size: 22px; }
  .prose h2 { font-size: 17px; }
  .prose pre { padding: 14px 16px; font-size: 12.5px; }
  .hub-hero { padding: 52px 0 44px; }
  .hub-hero h1 { font-size: 26px; }
  .prev-next a { max-width: 48%; }
  .article-list .desc { display: none; }
}

@media (max-width: 480px) {
  .module-grid { grid-template-columns: 1fr; }
  .prose { padding: 24px 18px 28px; }
  .hub-hero h1 { font-size: 22px; }
  .site-header nav { gap: 2px; }
  .site-header nav a { padding: 6px 8px; font-size: 13px; }
}
