/* ==========================================================
   高建群艺术社区 — 全局样式
   风格：宣纸 / 墨色 / 朱砂印章，简洁文艺大气
   ========================================================== */

:root {
  --paper: #f7f4ee;          /* 宣纸底色 */
  --paper-deep: #efeae0;     /* 深一度的纸色 */
  --ink: #26231f;            /* 墨色（正文/标题） */
  --ink-soft: #5a554c;       /* 淡墨（次要文字） */
  --ink-faint: #8c8578;      /* 极淡墨（辅助信息） */
  --cinnabar: #9e2b25;       /* 朱砂红（点睛色） */
  --cinnabar-soft: #b9564f;
  --line: #d8d1c3;           /* 分隔线 */
  --card: #fffdf8;           /* 卡片底 */
  --serif: "Noto Serif SC", "Source Han Serif SC", "SimSun", "宋体", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "微软雅黑", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-seal {
  width: 44px; height: 44px; flex: none;
  background: var(--cinnabar); color: #f7f4ee;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; letter-spacing: 2px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(158, 43, 37, 0.28);
  writing-mode: vertical-rl;
  padding: 4px 2px;
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: 3px; }
.brand-sub { font-size: 11px; color: var(--ink-faint); letter-spacing: 4px; font-family: var(--sans); }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  padding: 8px 13px; font-size: 15px; letter-spacing: 2px;
  color: var(--ink-soft); border-radius: 4px;
  transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--cinnabar); background: rgba(158,43,37,.07); }
.main-nav a.active { color: var(--cinnabar); font-weight: 700; }

/* ---------- 通用页头（栏目页） ---------- */
.page-hero { padding: 64px 0 36px; border-bottom: 1px solid var(--line); }
.page-hero .crumb { font-size: 13px; color: var(--ink-faint); font-family: var(--sans); letter-spacing: 2px; margin-bottom: 14px; }
.page-hero h1 { font-size: 34px; letter-spacing: 6px; font-weight: 700; }
.page-hero h1 em { font-style: normal; color: var(--cinnabar); }
.page-hero p.lead { margin-top: 12px; color: var(--ink-soft); font-size: 15px; max-width: 620px; }

/* ---------- 标签筛选 ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 30px; }
.tab {
  padding: 7px 22px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; letter-spacing: 2px; color: var(--ink-soft);
  background: var(--card); cursor: pointer; user-select: none;
  transition: all .2s;
}
.tab:hover { border-color: var(--cinnabar-soft); color: var(--cinnabar); }
.tab.on { background: var(--cinnabar); border-color: var(--cinnabar); color: #f7f4ee; }

/* ---------- 文章卡片列表 ---------- */
.article-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 70px; }
.article-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 26px 28px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(38, 35, 31, 0.10);
  border-color: var(--cinnabar-soft);
}
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-family: var(--sans); color: var(--ink-faint); }
.card-meta .cat { color: var(--cinnabar); border: 1px solid rgba(158,43,37,.35); padding: 1px 10px; border-radius: 999px; letter-spacing: 1px; }
.article-card h3 { font-size: 19px; line-height: 1.6; letter-spacing: 1px; }
.article-card h3 a:hover { color: var(--cinnabar); }
.article-card p.excerpt { font-size: 14px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; font-size: 12px; color: var(--ink-faint); font-family: var(--sans); }

/* ---------- 图片/作品网格 ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding-bottom: 70px; }
.work-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; transition: transform .22s, box-shadow .22s;
}
.work-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(38,35,31,.10); }
.work-thumb { aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; position: relative; }
.work-thumb svg { width: 100%; height: 100%; }
.work-info { padding: 16px 18px 18px; }
.work-info h3 { font-size: 16px; letter-spacing: 1px; }
.work-info span { font-size: 12px; color: var(--ink-faint); font-family: var(--sans); }

/* ---------- 章节标题 ---------- */
.sec-title { display: flex; align-items: baseline; gap: 14px; margin: 60px 0 26px; }
.sec-title h2 { font-size: 24px; letter-spacing: 4px; }
.sec-title .en { font-size: 12px; color: var(--ink-faint); font-family: var(--sans); letter-spacing: 3px; text-transform: uppercase; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-deep); padding: 46px 0 40px; margin-top: 20px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--cinnabar); }
.footer-note { font-size: 12px; color: var(--ink-faint); font-family: var(--sans); line-height: 2; }
.footer-icp a { color: var(--ink-faint); }
.footer-icp a:hover { color: var(--cinnabar); }
.footer-seal {
  width: 52px; height: 52px; background: var(--cinnabar); color: #f7f4ee;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; writing-mode: vertical-rl; letter-spacing: 3px;
  font-size: 14px; font-weight: 700;
}

/* 汉堡菜单按钮（仅手机端显示） */
.nav-toggle {
  display: none; width: 42px; height: 42px; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; flex: none;
}
.nav-toggle i { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle.open i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open i:nth-child(2) { opacity: 0; }
.nav-toggle.open i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    box-shadow: 0 16px 30px rgba(38, 35, 31, 0.10);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 4px; border-bottom: 1px dashed var(--line); border-radius: 0; font-size: 16px; }
  .main-nav a:last-child { border-bottom: none; }
  .article-list, .work-grid { grid-template-columns: 1fr; }
  .page-hero h1 { font-size: 26px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 18px; letter-spacing: 2px; }
  .header-inner { height: 62px; }
  .main-nav { top: 62px; }
}
@media (max-width: 480px) {
  .brand-name { font-size: 16px; }
  .page-hero h1 { font-size: 23px; }
}
