/* ─────────────────────────────────────────────
   Tearice Studio · 纸质工坊风 (Inspired by oiloil.org)
   底色 #f4efe4 / 墨 #1f1b16 / 朱红 #b3372a / 金色 #e29c21
   ───────────────────────────────────────────── */

:root {
  --paper: #f4efe4;
  --paper-2: #efe8d9;
  --paper-3: #e7deca;
  --paper-card: #faf7f0;
  --ink: #1f1b16;
  --ink-2: #4a4339;
  --ink-3: #6b6154;
  --rule: #d3c8b4;
  --rule-strong: #b3a58b;
  --seal: #b3372a;
  --seal-soft: #efd8d1;
  --accent-gold: #e29c21;
  --accent-gold-soft: rgba(226, 156, 33, 0.88);
  --dark: #211d18;
  --dark-ink: #efe7d8;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, serif;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --ease-paper: cubic-bezier(0.19, 1, 0.22, 1);
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 纸张纤维质感：轻微底纹 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

main, header, footer { position: relative; z-index: 1; }

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(31, 27, 22, 0.06);
  padding: 1px 5px;
  border-radius: 2px;
  overflow-wrap: anywhere;
}

/* ── 报头 ───────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 228, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter) 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.wordmark-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--seal);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  transform: rotate(-2deg);
}

.wordmark-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-2);
}
.wordmark-dot { color: var(--seal); margin: 0 4px; }

.nav {
  display: flex;
  gap: 26px;
  font-size: 14px;
}
.nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav a:hover { color: var(--ink); border-color: var(--seal); }

.masthead-rule {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 8px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

/* ── 00 封面 ────────────────────────────────── */
.cover {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 68px) var(--gutter) clamp(52px, 5vw, 76px);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 40px);
  min-height: auto;
  align-content: center;
}

.cover-ruler {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  border-right: 1px solid var(--rule);
  padding: 4px 0;
}
.cover-ruler span { position: relative; }
.cover-ruler span::after {
  content: "";
  position: absolute;
  right: -14px;
  top: 50%;
  width: 7px;
  height: 1px;
  background: var(--rule-strong);
}

.cover-body { min-width: 0; }

.cover-kicker {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--seal);
  text-transform: uppercase;
}

.cover-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(42px, 8.6vw, 112px);
  line-height: 1.12;
  letter-spacing: 0.02em;
}
.cover-title .line {
  display: block;
  padding-bottom: 0.08em;
}
.cover-title .line > * { display: inline-block; }
.cover-title .line--brand {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 18px;
}
.cover-title .line--brand .cover-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--ink-2);
  white-space: nowrap;
}
.cover-title .line--brand .cover-status i {
  width: 7px;
  height: 7px;
  background: #2f7d5a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(47, 125, 90, 0.16);
  animation: pulse 2.6s ease-in-out infinite;
}
.cover-title em {
  font-style: normal;
  position: relative;
  z-index: 0;
  white-space: nowrap;
}
.cover-title em::after {
  content: "";
  position: absolute;
  left: -0.04em;
  right: -0.04em;
  bottom: 0.08em;
  height: 0.32em;
  background: var(--seal);
  opacity: 0.16;
  z-index: -1;
}

.cover-lead {
  margin: 0 0 clamp(32px, 5vw, 56px);
  max-width: 32em;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 2;
  color: var(--ink-2);
  text-wrap: pretty;
}

.text-nowrap {
  white-space: nowrap;
}

.cover-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.meta-cell {
  padding: 12px 14px 14px 0;
}
.meta-cell + .meta-cell { padding-left: 14px; border-left: 1px solid var(--rule); }
.meta-label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.meta-value { display: block; font-size: 14px; }
.meta-live { display: flex; align-items: center; gap: 7px; }
.meta-live i {
  width: 7px; height: 7px;
  background: #2f7d5a;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(47, 125, 90, 0.16);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.scroll-cue {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(20px, 4vw, 40px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-decoration: none;
}
.scroll-arrow { animation: bob 2.4s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* ── 章节通用 ───────────────────────────────── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
}

#projects.section {
  padding-top: clamp(32px, 4vw, 56px);
}

.section-head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 16px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: clamp(32px, 4vw, 52px);
}
.section-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--seal);
  letter-spacing: 0.1em;
}
.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.section-en {
  justify-self: end;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.section--tinted {
  background: var(--paper-2);
  max-width: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section--tinted > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section--tinted .section-head { max-width: var(--max); }

.section--dark {
  background: var(--dark);
  color: var(--dark-ink);
  max-width: none;
}
.section--dark > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section--dark .section-head { border-color: rgba(239, 231, 216, 0.28); }
.section--dark .section-no { color: #d96b5c; }
.section--dark .section-en { color: rgba(239, 231, 216, 0.72); }

/* ── 01 项目卡片库 (借鉴 oiloil.org 紧凑卡片矩阵) ─────── */
.project-cards-stream {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
}

.project-card {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 24px 28px 26px;
  box-shadow: 0 4px 18px rgba(31, 27, 22, 0.05), 3px 4px 0 rgba(31, 27, 22, 0.04);
  transition: transform 0.22s var(--ease-paper), box-shadow 0.22s var(--ease-paper), border-color 0.22s;
}

.project-card:hover {
  border-color: var(--ink);
  box-shadow: 0 8px 24px rgba(31, 27, 22, 0.08), 5px 6px 0 rgba(31, 27, 22, 0.06);
}

.project-card--lead {
  border-left: 4px solid var(--seal);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1px dashed var(--rule);
}

.project-card-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  font-weight: 600;
}

.project-card-tab {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
}
.project-card--lead .project-card-tab {
  background: var(--seal);
}

.project-card-main {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.35fr);
  gap: clamp(24px, 3.5vw, 40px);
  align-items: center;
}

/* 左侧预览舞台 (参考 oiloil.org 交互微缩区) */
.card-preview-stage {
  background: var(--dark);
  color: #efe7d8;
  border-radius: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  font-family: var(--mono);
  font-size: 12px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-terminal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.terminal-dots {
  display: flex;
  gap: 5px;
}
.terminal-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(239, 231, 216, 0.22);
}
.terminal-dots span:nth-child(1) { background: #d96b5c; }
.terminal-dots span:nth-child(2) { background: #e29c21; }
.terminal-dots span:nth-child(3) { background: #4ba377; }

.terminal-screen {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  line-height: 1.6;
}

.term-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.term-dim { color: rgba(239, 231, 216, 0.45); }
.term-cmd { color: #f4efe4; font-weight: 600; }
.term-arg { color: #d4a034; }
.term-ok { color: #9fd6b7; }
.term-flow { color: rgba(239, 231, 216, 0.85); font-size: 11px; }
.term-pill {
  background: rgba(239, 231, 216, 0.12);
  padding: 0 4px;
  border-radius: 2px;
  color: #f4efe4;
  font-size: 10px;
}
.term-reward {
  color: #ffd072;
  font-weight: 600;
  border-top: 1px dashed rgba(239, 231, 216, 0.15);
  padding-top: 4px;
  margin-top: 2px;
}

.stage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(239, 231, 216, 0.12);
  font-size: 10px;
  color: rgba(239, 231, 216, 0.6);
}
.stage-tag { color: #ffd072; }

/* 右侧产品信息 */
.project-card-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.project-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.project-ver-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 7px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.project-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0;
}

.chip {
  font-family: var(--mono);
  font-size: 11px;
  padding: 2px 8px;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.chip-safe {
  border-color: #24614a;
  color: #24614a;
  background: rgba(36, 97, 74, 0.06);
}

/* 融合在卡片内部的版本详情行 */
.project-version-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  padding: 8px 12px;
  background: rgba(31, 27, 22, 0.03);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.project-version-meta code {
  font-size: 11px;
  background: none;
  padding: 0;
  color: var(--ink);
}
.meta-sep { opacity: 0.45; }
.dl-update {
  color: var(--seal);
  border: 1px solid var(--seal);
  padding: 0 5px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
}

.project-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: transform 0.16s var(--ease-paper), background 0.16s, color 0.16s, box-shadow 0.16s;
  will-change: transform;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 rgba(31, 27, 22, 0.16);
}
.btn-primary:hover { background: var(--seal); border-color: var(--seal); }
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(31, 27, 22, 0.16);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--paper-3); }
.btn-ghost:active { transform: translate(1px, 1px); }

/* 抽屉式折叠手册与更新日志 */
.project-drawer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  opacity: 0;
}

.project-drawer.is-open {
  max-height: 1600px;
  opacity: 1;
}

.drawer-inner {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.drawer-header h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}
.drawer-hint {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--seal);
}

/* 版本发布记录卡片 */
.version-log-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 14px 16px;
}
.log-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.log-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
}
.log-tag {
  font-size: 11.5px;
  font-weight: bold;
  color: var(--seal);
  background: rgba(179, 55, 42, 0.08);
  padding: 1px 6px;
  border-radius: 2px;
}
.log-date {
  font-size: 11px;
  color: var(--ink-3);
}
.log-notes {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.8;
}
.log-notes li {
  margin-bottom: 2px;
}

/* 抽屉步骤网格 */
.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.drawer-step {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
}

.step-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: bold;
  color: var(--seal);
  border: 1px solid var(--seal);
  height: 20px;
  line-height: 18px;
  padding: 0 4px;
  border-radius: 2px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
  min-width: 0;
}
.step-content h5 {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
}
.step-tip {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--ink-2);
}
.code {
  margin: 0 0 8px;
  background: var(--dark);
  color: #e7dcc6;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  border-left: 3px solid var(--seal);
}
.code code { background: none; padding: 0; font-size: inherit; }

.drawer-footer {
  padding-top: 10px;
  border-top: 1px dashed var(--rule);
}
.safety-notes {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.8;
}
.safety-notes strong {
  color: var(--seal);
}

/* ── 02 社交与动态 (借鉴 oiloil.org 的精髓设计与交互手感) ─── */
.socials-container {
  max-width: var(--max);
  margin: 0 auto;
}
.socials-lead {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--ink-2);
}
.socials {
  border-top: 1px solid var(--rule);
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.social {
  min-width: 0;
  color: inherit;
  border-bottom: 1px solid var(--rule);
  transition: padding-left 0.38s var(--ease-paper), background-color 0.25s ease;
  grid-template-columns: 42px 28px max-content minmax(0, 1fr) 24px;
  align-items: center;
  gap: clamp(14px, 2.5vw, 24px);
  padding: 24px 6px;
  text-decoration: none;
  display: grid;
  position: relative;
}
.social:hover {
  padding-left: 20px;
  background: rgba(226, 156, 33, 0.04);
}
.social .s-ico {
  border: 1px solid var(--rule-strong);
  width: 40px;
  height: 40px;
  color: var(--ink);
  transition: background 0.35s var(--ease-paper), border-color 0.35s, transform 0.4s var(--ease-paper), box-shadow 0.35s;
  border-radius: 10px;
  flex: none;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  background: var(--paper-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.social .s-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}
.social .s-ico.douyin {
  background: #161823;
  border-color: #161823;
  color: #fff;
}
.social .s-ico.xiaohongshu {
  background: #ff2442;
  border-color: #ff2442;
  color: #fff;
}
.social .s-ico.github {
  background: #1f1b16;
  border-color: #1f1b16;
  color: #f4efe4;
}
.social:hover .s-ico {
  transform: rotate(-7deg) scale(1.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.social .s-idx {
  color: var(--ink-3);
  letter-spacing: 0.12em;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}
.social .s-name {
  white-space: nowrap;
  letter-spacing: -0.01em;
  background-image: linear-gradient(var(--accent-gold), var(--accent-gold));
  transition: background-size 0.45s var(--ease-paper);
  background-position: 0 88%;
  background-repeat: no-repeat;
  background-size: 0 35%;
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 700;
  color: var(--ink);
}
.social:hover .s-name {
  background-size: 100% 35%;
}
.social .s-val {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  color: var(--ink-2);
  transition: color 0.3s ease;
  font-family: var(--sans);
  font-size: 14px;
  overflow: hidden;
}
.social:hover .s-val {
  color: var(--ink);
}
.social .s-arr {
  color: var(--ink-3);
  opacity: 0.2;
  transition: opacity 0.35s var(--ease-paper), transform 0.4s var(--ease-paper), color 0.35s;
  font-size: 20px;
  font-family: var(--mono);
  transform: translate(-6px);
  text-align: right;
}
.social:hover .s-arr {
  opacity: 1;
  color: var(--seal);
  transform: translate(0);
}

/* ── 02 PPT 资源 (夸克网盘分享) ─────────────────── */
.resources-container {
  max-width: var(--max);
  margin: 0 auto;
}
.resources-lead {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-2);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 16px;
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 3px 12px rgba(31, 27, 22, 0.04);
  transition: transform 0.2s var(--ease-paper), border-color 0.2s, box-shadow 0.2s;
}
.resource-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.resource-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 8px 20px rgba(31, 27, 22, 0.08), 3px 4px 0 rgba(31, 27, 22, 0.05);
}
.resource-card:active { transform: translateY(0); }
.timeline-entry { border-left: 4px solid var(--seal); }

.resource-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.resource-no {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--seal);
  letter-spacing: 0.1em;
}
.resource-name {
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 23px);
  font-weight: 700;
  line-height: 1.3;
  background-image: linear-gradient(var(--accent-gold), var(--accent-gold));
  background-position: 0 88%;
  background-repeat: no-repeat;
  background-size: 0 32%;
  transition: background-size 0.4s var(--ease-paper);
}
.resource-card:hover .resource-name { background-size: 100% 32%; }

.resource-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.resource-meta code {
  font-size: 11.5px;
  background: none;
  padding: 0;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.resource-size { white-space: nowrap; color: var(--ink-3); }

.resource-action {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(31, 27, 22, 0.14);
  transition: background 0.18s, border-color 0.18s;
}
.resource-card:hover .resource-action {
  background: var(--seal);
  border-color: var(--seal);
}

/* ── 03 关于 ─────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.about-name {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.about-role {
  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: #d96b5c;
  text-transform: uppercase;
}
.about-text {
  margin: 0;
  max-width: 26em;
  color: rgba(239, 231, 216, 0.86);
  font-size: 16px;
}

.about-links { border-top: 1px solid rgba(239, 231, 216, 0.24); }
.about-links a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(239, 231, 216, 0.24);
  text-decoration: none;
  transition: padding-left 0.2s var(--ease-paper), color 0.2s;
}
.about-links a:hover { padding-left: 8px; color: #f0a294; }
.link-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(239, 231, 216, 0.72);
}
.link-value { font-size: 15px; }

/* ── 页脚 ───────────────────────────────────── */
.colophon {
  border-top: 1px solid var(--rule);
  padding: 22px var(--gutter);
}
.colophon-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.colophon-rule { flex: 1; height: 1px; background: var(--rule); }

/* ── 全局智能圆圈跟随光标 (借鉴 oiloil.org) ────────── */
@media (hover: hover) and (pointer: fine) {
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease, width 0.25s var(--ease-paper), height 0.25s var(--ease-paper);
    will-change: transform, width, height;
  }

  .cursor-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-gold-soft);
    border: 1.5px solid #b87b12;
    transform: scale(0.4);
    opacity: 0.85;
    mix-blend-mode: multiply;
    transition: transform 0.22s var(--ease-paper), background 0.22s, border-color 0.22s;
  }

  .custom-cursor.is-visible {
    opacity: 1;
  }

  /* 悬停聚焦放大圆圈指示器 */
  .custom-cursor.is-hovering {
    width: 38px;
    height: 38px;
  }
  .custom-cursor.is-hovering .cursor-circle {
    transform: scale(1);
    background: #e29c21;
    border-color: #b87b12;
    opacity: 0.9;
    box-shadow: 0 0 12px rgba(226, 156, 33, 0.4);
  }

  /* 点击按压瞬间紧缩反馈 */
  .custom-cursor.is-clicking .cursor-circle {
    transform: scale(0.72);
    background: var(--seal);
    border-color: var(--seal);
  }
}

/* ── 置顶卡片：纯稚桌宠无框透明舞台 ───────────────── */
.card-preview-stage--pet {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 4px;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  min-height: auto;
  min-width: 0;
  max-width: 100%;
}

.pet-stage-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.pet-stage-img {
  display: block;
  width: min(360px, 100%);
  max-width: 100%;
  height: auto;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: transform 0.18s var(--ease-paper);
}

.pet-stage-btn:hover .pet-stage-img {
  transform: translateY(-2px);
}

.pet-stage-btn:active .pet-stage-img {
  transform: scale(0.975);
}

.pet-stage-btn.is-popped .pet-stage-img {
  animation: petStagePop 0.32s var(--ease-paper);
}

.pet-stage-bubble {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translate(-50%, 6px) scale(0.94);
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--paper-card);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 6px 18px rgba(31, 27, 22, 0.12);
  font-size: 13px;
  font-weight: 600;
  color: var(--seal);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.22s var(--ease-paper);
}

.pet-stage-bubble.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.pet-stage-hint {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  transition: color 0.18s ease;
}

.pet-stage-btn:hover .pet-stage-hint {
  color: var(--seal);
}

@keyframes petStagePop {
  0% { transform: scale(1); }
  35% { transform: scale(0.965, 1.025); }
  70% { transform: scale(1.02, 0.985); }
  100% { transform: scale(1); }
}

/* ── 响应式适配 ───────────────────────────────── */
@media (max-width: 960px) {
  .project-card-main { grid-template-columns: minmax(0, 1fr); }
  .project-card-info { min-width: 0; }
  .drawer-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .social {
    grid-template-columns: 36px 1fr 20px;
    gap: 12px;
    padding: 18px 4px;
  }
  .social .s-idx { display: none; }
  .social .s-name { font-size: 17px; }
  .social .s-val {
    grid-column: 2 / -1;
    font-size: 12px;
  }
  .social .s-arr { font-size: 16px; }
  .resource-card { padding: 16px 16px 14px; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .cover { grid-template-columns: 1fr; min-height: auto; padding-top: 44px; }
  .cover-ruler { display: none; }
  .cover-title { font-size: clamp(38px, 12vw, 64px); }
  .cover-meta { grid-template-columns: 1fr 1fr; }
  .meta-cell:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .meta-cell:nth-child(4) { border-top: 1px solid var(--rule); }
  .scroll-cue { display: none; }
  .nav { gap: 14px; font-size: 13px; }
  .masthead-inner { flex-wrap: wrap; gap: 10px; }
  .masthead-rule { font-size: 9px; }
  .about-name { font-size: 44px; }
  .colophon-inner { flex-wrap: wrap; font-size: 9.5px; }
  .colophon-rule { display: none; }
  .project-card { padding: 18px 16px 20px; }
  .cover-title .line--brand .cover-status { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal,
  .js .cover-title .line > *,
  .js .cover-meta,
  .js .cover-lead,
  .js .cover-kicker { opacity: 1; transform: none; }
}
