/* ============================================
   小萍 · 个人作品集  复古杂志风
   ============================================ */
:root {
  --paper: #F7F2E9;      /* 纸底 */
  --paper-deep: #F0E8D8; /* 深一号纸色 */
  --ink: #2B2620;        /* 墨色 */
  --cinnabar: #A8402E;   /* 朱砂强调 */
  --ochre: #8A7E6D;      /* 赭石灰 */
  --hairline: #D8CFBF;   /* 分隔线 */
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background-color: var(--paper);
  color: var(--ink);
  line-height: 1.8;
  /* 极浅噪点纸纹 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

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

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 10px 28px;
  font-size: 15px;
  letter-spacing: 2px;
  border: 1px solid var(--ink);
  transition: all .25s ease;
}
.btn-primary { background: var(--cinnabar); border-color: var(--cinnabar); color: var(--paper); }
.btn-primary:hover { background: #8E3526; border-color: #8E3526; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ---------- 印章 ---------- */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: var(--cinnabar);
  color: #FBF6EC;
  font-weight: 900;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
  border-radius: 6px;
  transform: rotate(-4deg);
  box-shadow: 2px 2px 0 rgba(43, 38, 32, .25);
  writing-mode: vertical-rl;
  letter-spacing: 2px;
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(247, 242, 233, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow .25s ease;
}
.nav.scrolled { box-shadow: 0 2px 12px rgba(43, 38, 32, .08); }
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-weight: 900; font-size: 20px; letter-spacing: 4px; }
.nav-logo span { color: var(--cinnabar); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px; letter-spacing: 2px; color: var(--ochre);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-links a:hover { color: var(--cinnabar); border-bottom-color: var(--cinnabar); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero-vertical {
  position: absolute; right: 40px; top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  letter-spacing: 10px;
  font-size: 15px;
  color: var(--ochre);
  opacity: .55;
  user-select: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.2fr .8fr;
  gap: 60px; align-items: center; width: 100%;
}
.hero-kicker {
  font-size: 13px; letter-spacing: 6px; color: var(--cinnabar);
  margin-bottom: 24px;
}
.hero-title {
  font-size: 64px; font-weight: 900; line-height: 1.25;
  letter-spacing: 4px; margin-bottom: 24px;
}
.hero-title em { font-style: normal; color: var(--cinnabar); }
.hero-slogan { font-size: 18px; color: var(--ochre); margin-bottom: 40px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .seal { position: absolute; top: -24px; right: 8px; z-index: 2; }
.hero-frame {
  width: 320px; height: 400px;
  border: 3px double var(--ink);
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 24px 16px;
  background: var(--paper-deep);
}
.hero-frame-no { font-size: 13px; letter-spacing: 4px; color: var(--ochre); }
.hero-frame-word {
  font-size: 160px; font-weight: 900; color: var(--ink); line-height: 1;
}
.hero-frame-sub { font-size: 12px; letter-spacing: 5px; color: var(--ochre); }

.hero-scroll {
  position: absolute; left: 50%; bottom: 28px;
  transform: translateX(-50%);
  font-size: 13px; letter-spacing: 3px; color: var(--ochre);
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,8px); } }

/* ---------- 板块通用 ---------- */
.section { padding: 110px 0; }
.section-alt { background: var(--paper-deep); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
section[id], footer[id] { scroll-margin-top: 72px; }

.section-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 56px;
}
.section-no {
  font-size: 56px; font-weight: 900; color: var(--cinnabar);
  line-height: 1; opacity: .9;
}
.section-title { font-size: 36px; font-weight: 700; letter-spacing: 6px; }
.section-rule { flex: 1; border-top: 3px double var(--hairline); transform: translateY(-8px); }
.section-en { font-size: 12px; letter-spacing: 4px; color: var(--ochre); }

/* ---------- 关于我 ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; }
.about-intro { font-size: 17px; text-align: justify; }
.about-intro::first-letter {
  font-size: 52px; font-weight: 900; color: var(--cinnabar);
  float: left; line-height: 1; padding: 4px 10px 0 0;
}
.about-tags { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.tag {
  font-size: 13px; letter-spacing: 2px;
  padding: 6px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ochre);
  transition: all .2s ease;
}
.tag:hover { border-color: var(--cinnabar); color: var(--cinnabar); }

/* ---------- 作品集 ---------- */
.works-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(43, 38, 32, .12); }
.card-img { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-bottom: 1px solid var(--hairline); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.card-no {
  position: absolute; top: 12px; left: 12px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cinnabar); color: #FBF6EC;
  font-size: 16px; font-weight: 700; border-radius: 4px;
  box-shadow: 1px 1px 0 rgba(43, 38, 32, .25);
}
.card-body { padding: 24px 28px 28px; }
.card-title { font-size: 21px; font-weight: 700; letter-spacing: 2px; margin-bottom: 10px; }
.card-desc { font-size: 14.5px; color: var(--ochre); margin-bottom: 16px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.card-tags span {
  font-size: 12px; letter-spacing: 1px; color: var(--cinnabar);
  border: 1px solid var(--cinnabar); border-radius: 999px; padding: 2px 12px;
  opacity: .85;
}

/* ---------- 时间线 ---------- */
.timeline { list-style: none; position: relative; padding-left: 36px; max-width: 720px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  border-left: 1px solid var(--hairline);
}
.timeline-item { position: relative; padding-bottom: 44px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: -33px; top: 10px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--cinnabar);
}
.timeline-date {
  display: inline-block; font-size: 13px; letter-spacing: 3px;
  color: var(--cinnabar); margin-bottom: 6px;
}
.timeline-item h3 { font-size: 19px; font-weight: 700; letter-spacing: 2px; margin-bottom: 6px; }
.timeline-item p { font-size: 14.5px; color: var(--ochre); }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--ink); color: var(--paper);
  padding: 100px 0 48px; text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.seal-footer { width: 72px; height: 72px; font-size: 22px; }
.footer-title { font-size: 34px; font-weight: 700; letter-spacing: 8px; }
.footer-sub { color: #B8AE9E; font-size: 15px; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.footer .btn-ghost { color: var(--paper); border-color: var(--paper); }
.footer .btn-ghost:hover { background: var(--paper); color: var(--ink); }
.footer-copy { margin-top: 40px; font-size: 12.5px; letter-spacing: 2px; color: #7D7365; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 28px; bottom: 28px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--paper);
  color: var(--ink); font-size: 18px; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 4px 12px rgba(43, 38, 32, .12);
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); color: var(--cinnabar); border-color: var(--cinnabar); }

/* ---------- 滚动淡入 ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; letter-spacing: 1px; }
  .hero { padding: 110px 0 90px; min-height: auto; }
  .hero-vertical { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-title { font-size: 42px; }
  .hero-slogan { font-size: 16px; }
  .hero-art .seal { right: 0; }
  .hero-frame { width: 260px; height: 330px; }
  .hero-frame-word { font-size: 120px; }
  .section { padding: 72px 0; }
  .section-no { font-size: 40px; }
  .section-title { font-size: 26px; letter-spacing: 4px; }
  .section-en { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .works-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding: 72px 0 40px; }
  .footer-title { font-size: 26px; letter-spacing: 5px; }
}
