/* ===== 字体 ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

/* ===== 变量 ===== */
:root {
  --ink: #1a1a1a;
  --mid: #4a4a4a;
  --canvas: #fafaf8;
  --canvas-warm: #f3f2ee;
  --border: #1a1a1a;
  --nav-w: 240px;
  --gap: 1.5rem;
  --radius: 0;
  --font-head: 'Outfit', 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', system-ui, sans-serif;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--mid); }
ul, ol { list-style: none; }
dl, dt, dd { margin: 0; padding: 0; }

/* ===== 纸张纹理伪效果 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(26,26,26,0.4) 2px, rgba(26,26,26,0.4) 3px),
    repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(26,26,26,0.1) 4px, rgba(26,26,26,0.1) 5px);
}

/* ===== 布局骨架 ===== */
.site-wrap {
  display: flex;
  min-height: 100vh;
}

/* ===== 侧边导航 ===== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--ink);
  color: var(--canvas);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 200;
  border-right: 3px solid var(--ink);
  transform: translateX(0);
  transition: none;
}

.sidenav__brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 2px solid rgba(250,250,248,0.15);
}

.sidenav__logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--canvas);
}

.sidenav__logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.sidenav__brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.sidenav__nav {
  flex: 1;
  padding: 1rem 0;
}

.sidenav__dl { display: block; }

.sidenav__group-label {
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,250,248,0.45);
  padding: 0.75rem 1rem 0.35rem;
}

.sidenav__item { display: block; }

.sidenav__link {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(250,250,248,0.82);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: none;
  line-height: 1.4;
}
.sidenav__link:hover,
.sidenav__link--active {
  color: var(--canvas);
  border-left-color: var(--canvas);
  background: rgba(250,250,248,0.07);
}
.sidenav__link--active { font-weight: 700; }

.sidenav__slogan {
  padding: 1rem;
  font-size: 0.68rem;
  color: rgba(250,250,248,0.3);
  border-top: 1px solid rgba(250,250,248,0.1);
  letter-spacing: 0.05em;
}

/* ===== 页面主体 ===== */
.page-body {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== 移动端顶栏 ===== */
.mobile-header {
  display: none;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--canvas);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--ink);
}

.mobile-brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--canvas);
  text-decoration: none;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-toggle {
  background: none;
  border: 2px solid var(--canvas);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 40px;
  min-height: 40px;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--canvas);
}

/* ===== Hero（首页） ===== */
.hero {
  position: relative;
  min-height: 70vh;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__texture {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image:
    repeating-linear-gradient(45deg, rgba(250,250,248,0.5) 0px, rgba(250,250,248,0.5) 1px, transparent 1px, transparent 8px),
    repeating-linear-gradient(-45deg, rgba(250,250,248,0.3) 0px, rgba(250,250,248,0.3) 1px, transparent 1px, transparent 12px);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 3rem 2rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-block;
  border: 2px solid var(--canvas);
  color: var(--canvas);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.25rem;
  transform: rotate(-1deg);
}

.hero__h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--canvas);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.hero__sub {
  font-size: 1rem;
  color: rgba(250,250,248,0.7);
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn-ink {
  display: inline-block;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.65rem 1.4rem;
  border: 2px solid var(--canvas);
  text-decoration: none;
  letter-spacing: 0.03em;
  min-height: 44px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.btn-ink:hover {
  background: transparent;
  color: var(--canvas);
}
.btn-ink--ghost {
  background: transparent;
  color: var(--canvas);
}
.btn-ink--ghost:hover {
  background: var(--canvas);
  color: var(--ink);
}

/* 正文区内的 btn-ink（深色背景外） */
.main-content .btn-ink {
  background: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}
.main-content .btn-ink:hover {
  background: transparent;
  color: var(--ink);
}
.main-content .btn-ink--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.main-content .btn-ink--ghost:hover {
  background: var(--ink);
  color: var(--canvas);
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  padding: 2rem var(--gap);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.main-content--with-aside {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

/* ===== aside（内容左侧） ===== */
.content-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: sticky;
  top: 2rem;
}

.aside-box {
  border: 2px solid var(--ink);
  padding: 1rem;
  background: var(--canvas-warm);
}

.aside-box__title {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.aside-box hr {
  border: none;
  border-top: 2px solid var(--ink);
  margin-bottom: 0.75rem;
}

.aside-nav__dl { display: block; }

.aside-nav__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: block;
}

.aside-nav__dl dd {
  margin-bottom: 0.25rem;
}

.aside-nav__dl a {
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(26,26,26,0.08);
}
.aside-nav__dl a:hover {
  text-decoration: underline;
}

.aside-parent {
  margin-bottom: 0.75rem;
}
.aside-parent a {
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}

/* ===== 内容文章 ===== */
.content-article {
  min-width: 0;
}

/* ===== 页面头部 ===== */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid var(--ink);
}

.page-header__eyebrow {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.5rem;
}

.page-header__breadcrumb a {
  font-size: 0.8rem;
  color: var(--mid);
  text-decoration: none;
}
.page-header__breadcrumb a:hover { text-decoration: underline; }
.page-header__breadcrumb { margin-bottom: 0.5rem; }

.page-header__h1 {
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.page-header__meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.meta-item {
  font-size: 0.8rem;
  color: var(--mid);
}

.page-header__date {
  font-size: 0.82rem;
  color: var(--mid);
  margin-top: 0.4rem;
}

/* ===== 正文 ===== */
.prose-section {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 2.5rem;
}
.prose-section h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
}
.prose-section h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.4rem;
}
.prose-section p { margin-bottom: 1rem; }
.prose-section ul, .prose-section ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose-section ol { list-style: decimal; }
.prose-section li { margin-bottom: 0.4rem; }
.prose-section a { color: var(--ink); font-weight: 600; }
.prose-section blockquote {
  border-left: 4px solid var(--ink);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--mid);
  font-style: italic;
}
.prose-section hr {
  border: none;
  border-top: 2px solid var(--ink);
  margin: 1.5rem 0;
}

/* ===== 标题装饰 hr ===== */
.section-heading {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.section-heading + hr {
  border: none;
  border-top: 2px solid var(--ink);
  margin-bottom: 1.25rem;
}
hr {
  border: none;
  border-top: 2px solid var(--ink);
  margin: 1rem 0;
}

/* ===== 专题卡片网格 ===== */
.topics-section {
  margin-bottom: 2.5rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.zine-card {
  border: 2px solid var(--ink);
  padding: 1.25rem;
  background: var(--canvas-warm);
  transform: rotate(-0.3deg);
}
.zine-card:nth-child(even) { transform: rotate(0.4deg); }

.zine-card__eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}

.zine-card__title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}
.zine-card__title a {
  text-decoration: none;
  color: var(--ink);
}
.zine-card__title a:hover { text-decoration: underline; }

.zine-card__desc {
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.zine-card__date {
  font-size: 0.75rem;
  color: var(--mid);
}

/* ===== 近期文章列表 ===== */
.recent-section { margin-bottom: 2.5rem; }

.recent-list { display: flex; flex-direction: column; gap: 0; }

.recent-item {
  border-bottom: 1px solid rgba(26,26,26,0.15);
  padding: 0.75rem 0;
}

.recent-item__title {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.recent-item__title a {
  text-decoration: none;
  color: var(--ink);
}
.recent-item__title a:hover { text-decoration: underline; }

.recent-item__desc {
  font-size: 0.8rem;
  color: var(--mid);
}

/* ===== 子页列表（topic/tag 页） ===== */
.children-section { margin-bottom: 2.5rem; }

.child-list { display: block; }

.child-list__title {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.75rem;
  margin-bottom: 0.2rem;
}
.child-list__title a {
  text-decoration: none;
  color: var(--ink);
}
.child-list__title a:hover { text-decoration: underline; }

.child-list__desc {
  font-size: 0.82rem;
  color: var(--mid);
  line-height: 1.6;
  border-bottom: 1px solid rgba(26,26,26,0.1);
  padding-bottom: 0.6rem;
  margin-bottom: 0;
}

.child-list__date {
  font-size: 0.75rem;
  color: rgba(74,74,74,0.7);
}

/* ===== 文章标签 ===== */
.article-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}

.tag-chip {
  display: inline-block;
  border: 2px solid var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  min-height: 28px;
  line-height: 1.6;
}
.tag-chip:hover {
  background: var(--ink);
  color: var(--canvas);
}

/* ===== 导航 CTA 行 ===== */
.nav-cta-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.article-footer-nav,
.about-links-section,
.privacy-nav-section,
.default-footer-nav {
  margin-bottom: 2rem;
}

/* ===== 页脚（仅 p + small） ===== */
.site-footer {
  padding: 1.5rem var(--gap);
  border-top: 3px solid var(--ink);
  background: var(--canvas-warm);
  margin-top: auto;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.footer-copy a {
  color: var(--ink);
  font-weight: 600;
}

.footer-note {
  font-size: 0.72rem;
  color: rgba(74,74,74,0.65);
  display: block;
}

/* ===== 首页专用 ===== */
.page-home .main-content {
  max-width: 900px;
}

/* ===== 简洁正文（about/privacy） ===== */
.content-article--solo .prose-section {
  max-width: 680px;
}

/* ===== 加载动效（stagger + scroll reveal） ===== */
@media (prefers-reduced-motion: no-preference) {
  .zine-card {
    opacity: 0;
    transform: translateY(16px) rotate(-0.3deg);
    animation: cardReveal 0.4s ease forwards;
  }
  .zine-card:nth-child(even) {
    transform: translateY(16px) rotate(0.4deg);
  }
  .zine-card:nth-child(1) { animation-delay: 0.05s; }
  .zine-card:nth-child(2) { animation-delay: 0.12s; }
  .zine-card:nth-child(3) { animation-delay: 0.19s; }
  .zine-card:nth-child(4) { animation-delay: 0.26s; }
  .zine-card:nth-child(5) { animation-delay: 0.33s; }
  .zine-card:nth-child(6) { animation-delay: 0.40s; }

  @keyframes cardReveal {
    to { opacity: 1; transform: translateY(0) rotate(var(--rot, -0.3deg)); }
  }

  .js-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .js-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .main-content--with-aside {
    grid-template-columns: 1fr;
  }
  .content-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .aside-box {
    flex: 1 1 200px;
  }
}

@media (max-width: 700px) {
  .sidenav {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidenav.is-open {
    transform: translateX(0);
  }
  .mobile-header {
    display: flex;
  }
  .page-body {
    margin-left: 0;
  }
  .hero {
    min-height: 60vh;
  }
  .hero__inner {
    padding: 2rem 1rem;
  }
  .main-content {
    padding: 1.5rem 1rem;
  }
  .topic-grid {
    grid-template-columns: 1fr;
  }
  .nav-cta-row {
    flex-direction: column;
  }
  .content-aside {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .hero__h1 { font-size: 1.35rem; }
  .page-header__h1 { font-size: 1.2rem; }
}
