@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Serif+SC:wght@400;500;600;700&family=Space+Grotesk:wght@400;500&display=swap');

:root {
  --bg: #f6f4ee;
  --paper: #fbfaf6;
  --ink: #1a1815;
  --ink-soft: #4a463f;
  --muted: #8b8578;
  --line: rgba(26,24,21,.14);
  --line-soft: rgba(26,24,21,.08);
  --seal: #9c3a2f;
  --moss: #4a5c50;
  --indigo: #3c4a63;
  --gold: #a98a4b;
  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', system-ui, sans-serif;
  --mono: 'Space Grotesk', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 400; line-height: 1.7;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--seal); color: var(--paper); }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- 宣纸纹理 ---------- */
.paper-texture {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(26,24,21,.012) 3px, rgba(26,24,21,.012) 4px);
  opacity: .9;
}
main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--seal); z-index: 100; transition: width .1s linear;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6vw; position: sticky; top: 0; z-index: 50;
  background: rgba(246,244,238,.86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-seal {
  width: 30px; height: 30px; background: var(--seal); color: var(--paper);
  display: grid; place-items: center; font-family: var(--serif);
  font-size: 16px; font-weight: 600; line-height: 1;
}
.logo-text { font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: 2px; }
.nav { display: flex; gap: 36px; font-size: 14px; color: var(--ink-soft); }
.nav a { position: relative; padding: 4px 0; transition: color .2s; }
.nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--seal); transition: width .25s;
}
.nav a:hover { color: var(--seal); }
.nav a:hover::after { width: 100%; }
.header-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- 首屏 ---------- */
.hero {
  min-height: 86vh; display: flex; align-items: center;
  padding: 80px 6vw 90px; position: relative; overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow { display: flex; align-items: center; gap: 14px; font-size: 12px; letter-spacing: 4px; color: var(--muted); margin-bottom: 36px; }
.hero-eyebrow i { width: 22px; height: 1px; background: var(--line); }
.hero-name {
  font-family: var(--serif); font-size: clamp(72px, 13vw, 180px);
  font-weight: 600; letter-spacing: .06em; line-height: 1.05; color: var(--ink);
}
.hero-rule { width: 76px; height: 2px; background: var(--seal); margin: 32px 0 22px; }
.hero-en { font-family: var(--mono); font-size: 13px; letter-spacing: 3px; color: var(--ink-soft); }
.hero-en span { color: var(--seal); margin: 0 8px; }
.hero-desc { font-family: var(--serif); font-size: clamp(16px, 1.5vw, 19px); margin-top: 26px; max-width: 600px; color: var(--ink-soft); line-height: 2; }
.hl { color: var(--seal); border-bottom: 1px solid rgba(156,58,47,.35); padding-bottom: 2px; }
.scroll-hint { margin-top: 56px; display: inline-flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); letter-spacing: 1px; }
.scroll-hint:hover { color: var(--seal); }
.scroll-arrow {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 50%; transition: border-color .2s;
  animation: drift 2.2s infinite;
}
.scroll-hint:hover .scroll-arrow { border-color: var(--seal); }
@keyframes drift { 50% { transform: translateY(5px); } }
.hero-seal {
  position: absolute; right: 9vw; top: 22%; width: 76px; height: 76px;
  border: 2px solid var(--seal); color: var(--seal); display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; line-height: 1.15; letter-spacing: 1px;
  transform: rotate(6deg); opacity: .82;
}
.hero-vertical {
  position: absolute; right: 3vw; bottom: 12%; writing-mode: vertical-rl;
  font-family: var(--serif); font-size: 13px; letter-spacing: 8px; color: var(--muted); opacity: .7;
}

/* ---------- 通用区块 ---------- */
.section { padding: 88px 6vw; max-width: 1440px; margin: 0 auto; }
.section-compact { padding-top: 16px; }
.section-head { margin-bottom: 46px; }
.section-index { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--seal); }
.idx-line { width: 28px; height: 1px; background: var(--seal); }
.section-title { font-family: var(--serif); font-size: clamp(36px, 5vw, 60px); font-weight: 600; letter-spacing: .04em; margin-top: 12px; }
.accent { color: var(--seal); }
.section-sub { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* ---------- 项目卡片 ---------- */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.project-card {
  display: block; background: var(--paper); border: 1px solid var(--line);
  transition: transform .35s, border-color .35s, box-shadow .35s;
}
.project-card:hover {
  transform: translateY(-5px); border-color: rgba(156,58,47,.4);
  box-shadow: 0 16px 40px rgba(26,24,21,.07);
}
.card-visual { height: 270px; position: relative; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line-soft); }
.card-visual::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 11px, rgba(26,24,21,.02) 11px, rgba(26,24,21,.02) 12px);
  pointer-events: none;
}
.project-card:nth-child(1) .card-visual { background: #f0eee6; }
.project-card:nth-child(2) .card-visual { background: #eef0ec; }
.project-card:nth-child(3) .card-visual { background: #eceef1; }
.project-card:nth-child(4) .card-visual { background: #f2ede4; }
.card-badge {
  position: absolute; top: 18px; left: 18px; font-size: 11px; letter-spacing: 2px;
  padding: 4px 10px; background: var(--seal); color: var(--paper); z-index: 2;
}
.card-arrow { position: absolute; top: 16px; right: 20px; font-size: 20px; color: var(--ink-soft); transition: transform .3s, color .3s; z-index: 2; }
.project-card:hover .card-arrow { transform: translate(3px,-3px); color: var(--seal); }
.card-info { padding: 26px 28px 30px; position: relative; }
.card-num { position: absolute; top: 22px; right: 26px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-info h3 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin-bottom: 8px; letter-spacing: .02em; }
.card-info p { color: var(--ink-soft); font-size: 14px; }
.tags { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tags span { font-size: 11px; padding: 3px 10px; border: 1px solid var(--line); color: var(--muted); letter-spacing: .5px; }

/* 卡片内 CSS 插画 */
.visual-art { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.vr-ring { position: absolute; width: 168px; height: 168px; border: 1px solid var(--seal); border-radius: 50%; opacity: .5; animation: spin 20s linear infinite; }
.vr-ring.r2 { width: 122px; height: 122px; border-color: var(--moss); border-style: dashed; animation-direction: reverse; animation-duration: 15s; }
.vr-core { width: 68px; height: 68px; background: var(--seal); color: var(--paper); display: grid; place-items: center; font-family: var(--serif); font-size: 30px; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
.art-dash { display: flex !important; align-items: flex-end; justify-content: center; gap: 11px; padding-bottom: 52px; }
.dash-bar { width: 28px; height: var(--h); background: var(--moss); opacity: .75; border-radius: 2px 2px 0 0; animation: grow 1.1s ease backwards; }
.dash-bar:nth-child(even) { opacity: .45; }
@keyframes grow { from { height: 0; } }
.steam-id { font-family: var(--mono); font-size: 25px; letter-spacing: 2px; color: var(--indigo); }
.steam-id span { color: var(--seal); }
.steam-score { margin-top: 8px; font-family: var(--serif); font-size: 62px; font-weight: 600; color: var(--indigo); letter-spacing: -2px; }
.art-grid { grid-template-columns: repeat(3, 54px); grid-auto-rows: 54px; gap: 8px; }
.art-grid i { border: 1px solid var(--seal); opacity: .55; transition: background .25s, opacity .25s; }
.project-card:hover .art-grid i { background: var(--seal); opacity: .8; }
.art-grid i:nth-child(5) { background: var(--seal); opacity: .85; }

/* ---------- More projects ---------- */
.more-list { border-top: 1px solid var(--line); }
.more-list li { border-bottom: 1px solid var(--line-soft); }
.more-list a {
  display: grid; grid-template-columns: 60px 1fr 210px 40px; align-items: center;
  padding: 21px 8px; transition: background .2s, padding .2s;
}
.more-list a:hover { background: rgba(156,58,47,.035); padding-left: 18px; }
.more-list .num { font-family: var(--mono); font-size: 12px; color: var(--seal); }
.more-list .name { font-family: var(--serif); font-size: 18px; letter-spacing: .02em; }
.more-list .kind { color: var(--muted); font-size: 12px; }
.more-list .go { text-align: right; font-size: 18px; color: var(--muted); transition: color .2s, transform .2s; }
.more-list a:hover .go { color: var(--seal); transform: translate(3px,-3px); }

/* ---------- About ---------- */
.about-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 70px; align-items: start; }
.about-text p { color: var(--ink-soft); margin-bottom: 20px; font-size: 16px; max-width: 650px; line-height: 2; }
.about-lead { font-family: var(--serif) !important; font-size: 25px !important; font-weight: 600; color: var(--ink) !important; }
.about-stats { display: grid; gap: 14px; }
.stat { background: var(--paper); border: 1px solid var(--line); padding: 20px 24px; display: flex; align-items: baseline; gap: 18px; }
.stat-num { font-family: var(--serif); font-size: 44px; font-weight: 600; color: var(--seal); line-height: 1; }
.stat-label { color: var(--muted); font-size: 13px; letter-spacing: 1px; }

/* ---------- Skills ---------- */
.skills-layout { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.skill-col { background: var(--paper); border: 1px solid var(--line); padding: 42px; transition: border-color .3s; }
.skill-col:hover { border-color: rgba(156,58,47,.35); }
.skill-icon { width: 46px; height: 46px; border: 1px solid var(--seal); color: var(--seal); display: grid; place-items: center; font-family: var(--serif); font-size: 22px; margin-bottom: 24px; }
.skill-col h3 { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.skill-col h3 span { font-family: var(--mono); font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 1px; margin-left: 6px; }
.skill-col > p { color: var(--muted); margin: 8px 0 28px; font-size: 14px; }
.skill-col ul { display: flex; flex-wrap: wrap; gap: 9px; }
.skill-col li { padding: 6px 14px; background: rgba(26,24,21,.035); border: 1px solid var(--line-soft); font-size: 13px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { padding-bottom: 110px; }
.contact-box {
  border: 1px solid var(--line); padding: 68px 6vw; text-align: center; background: var(--paper);
  position: relative;
}
.contact-box::before, .contact-box::after {
  content: ''; position: absolute; width: 18px; height: 18px; border: 1px solid var(--seal); opacity: .6;
}
.contact-box::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.contact-box::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }
.contact-box .section-index { justify-content: center; }
.contact-title { font-family: var(--serif); font-size: clamp(34px, 5vw, 62px); font-weight: 600; letter-spacing: .03em; margin: 14px 0 16px; }
.contact-box > p { color: var(--muted); margin-bottom: 32px; font-size: 15px; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.contact-btn { padding: 12px 26px; border: 1px solid var(--line); font-size: 14px; transition: transform .2s, background .2s, color .2s, border-color .2s; }
.contact-btn:hover { transform: translateY(-3px); border-color: var(--seal); color: var(--seal); }
.contact-btn.primary { background: var(--seal); color: var(--paper); border-color: var(--seal); }
.contact-btn.primary:hover { background: #883025; color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; padding: 26px 6vw;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; letter-spacing: .5px;
}
.site-footer a:hover { color: var(--seal); }

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .project-grid, .skills-layout, .about-layout { grid-template-columns: 1fr; }
  .nav { display: none; }
  .header-meta { font-size: 11px; }
  .more-list a { grid-template-columns: 40px 1fr 30px; }
  .more-list .kind { display: none; }
  .card-visual { height: 210px; }
  .hero { min-height: 76vh; }
  .hero-seal { width: 56px; height: 56px; font-size: 14px; right: 7vw; top: 14%; }
  .hero-vertical { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
