:root {
  color-scheme: light;
  --bg: #faf9f6;
  --surface: #fff;
  --text: #252623;
  --muted: #6d7069;
  --line: #e5e5df;
  --soft: #f1f1eb;
  --accent: #b9542b;
  --accent-soft: #f9e8de;
  --green: #356347;
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #181b18;
  --surface: #212521;
  --text: #eeeee7;
  --muted: #b1b7ac;
  --line: #383e36;
  --soft: #2c322a;
  --accent: #f5a37d;
  --accent-soft: #463026;
  --green: #a7d4ae;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 var(--font); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 20px; z-index: 10; padding: 12px 20px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.eyebrow { font: 11px/1.5 var(--mono); letter-spacing: .16em; color: var(--muted); }
.arrow { font-size: 21px; font-weight: 400; line-height: 1; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) { .wrap { width: calc(100% - 40px); } }

.site-header { height: 98px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 17px; }
.header-right, .site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a { color: var(--muted); font-size: 13px; padding-block: 12px; }
.site-nav a:hover { color: var(--accent); }
.theme-toggle { border: 1px solid var(--line); background: var(--surface); padding: 10px; border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; font-size: 20px; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 80px; align-items: center; padding-block: 76px 66px; }
.hello { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; font-size: 12px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #719168; box-shadow: 0 0 0 4px var(--soft); }
h1 { font-size: clamp(42px, 5vw, 62px); line-height: 1.2; font-weight: 750; letter-spacing: -.05em; }
h1 span { color: var(--accent); }
.hero-title { margin-top: 22px; font-size: 17px; }
.hero-copy { color: var(--muted); margin-top: 9px; max-width: 470px; line-height: 1.9; }
.interests { display: flex; gap: 9px; margin-top: 23px; }
.interest { border: 1px solid var(--line); border-radius: 7px; font: 11px/1.5 var(--mono); padding: 6px 10px; }
.interest b { color: var(--accent); margin-right: 5px; }
.creed { display: flex; align-items: baseline; gap: 10px; margin-top: 15px; padding: 11px 14px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 9px 9px 0; background: var(--surface); font-size: 13px; }
.creed b { color: var(--accent); font-size: 16px; align-self: center; }
.creed strong { font-weight: 700; letter-spacing: .01em; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 46px; padding: 10px 20px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; }
.button.primary { color: var(--bg); background: var(--text); border-color: var(--text); }
.button:hover { transform: translateY(-2px); }
.hero-portrait { position: relative; width: 100%; max-width: 345px; justify-self: center; }
.portrait-frame { padding: 13px 13px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; transform: rotate(4deg); box-shadow: 0 14px 35px #2526230c; }
.portrait-frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 3px; }
.portrait-caption { display: flex; justify-content: space-between; padding: 15px 4px 0; font: 10px/1.5 var(--mono); color: var(--muted); letter-spacing: .1em; }
.portrait-label { position: absolute; bottom: 51px; left: -33px; padding: 11px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 30px; color: var(--green); font-size: 12px; transform: rotate(-5deg); box-shadow: 0 5px 16px #00000006; }
.quote-strip { display: flex; align-items: center; justify-content: space-between; padding: 23px 0; border-block: 1px solid var(--line); gap: 20px; }
.quote-strip blockquote { margin: 0; font: 20px/1.6 'Songti SC', 'STSong', Georgia, serif; }
.quote-strip blockquote span { color: var(--accent); margin-right: 15px; font-size: 30px; vertical-align: middle; }
.quote-strip .eyebrow { font-size: 10px; }
.section { padding-top: 56px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { font-size: 25px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; }
.section-note { color: var(--muted); font-size: 12px; }
.social-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.social-card { min-width: 0; display: flex; align-items: center; text-align: left; padding: 20px; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.social-icon { flex-shrink: 0; width: 38px; height: 38px; display: grid; place-items: center; background: var(--soft); border-radius: 11px; }
/* 图标使用各平台官方品牌色 logo（本地自托管），不再做灰度处理 */
.social-icon img { width: 23px; height: 23px; object-fit: contain; }
/* X 官方纯黑标在深色主题下反白 */
html[data-theme='dark'] .social-card--x .social-icon img { filter: invert(1); }
.social-text { min-width: 0; flex: 1; }
.social-text strong { font-size: 14px; display: block; font-weight: 650; }
.social-text small { color: var(--muted); display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; }
.social-card .arrow { font-size: 17px; color: var(--muted); }
/* 比特币场景专用点缀：BTC 橙 #F7931A 仅用于比特币语义卡片（品牌规范允许） */
.social-card--btc .social-icon { background: rgba(247, 147, 26, .15); }
.social-card--btc .social-icon img { filter: none; }
.social-card--btc:hover { border-color: #f7931a; }
.social-card:hover, .project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.social-card, .project-card, .button { transition: transform .18s ease, border-color .18s ease; }
.projects-heading { margin-top: 8px; }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filter { background: transparent; border: 0; border-radius: 7px; color: var(--muted); padding: 11px 14px; font-size: 12px; min-height: 44px; }
.filter[aria-pressed='true'] { background: var(--text); color: var(--bg); }
.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--surface); border-radius: 15px; overflow: hidden; min-width: 0; }
.project-art { height: 136px; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: 1px solid var(--line); color: #45604e; background: #eaf0e7; }
.project-art::before { content: ''; position: absolute; width: 100px; height: 100px; border: 1px solid currentColor; opacity: .09; border-radius: 50%; transform: scale(1.7); }
.project-art .project-mark { font: 700 34px/1 var(--mono); letter-spacing: -.05em; position: relative; }
.project-art .art-label { position: absolute; left: 14px; bottom: 12px; font: 9px/1 var(--mono); letter-spacing: .12em; opacity: .65; }
.project-art .arrow { position: absolute; right: 14px; top: 13px; font-size: 17px; opacity: .6; }
.project-card:nth-child(4n+2) .project-art { background: #e9e9f2; color: #5a587c; }
.project-card:nth-child(4n+3) .project-art { background: #f3e9dc; color: #976641; }
.project-card:nth-child(4n+4) .project-art { background: #e6edf2; color: #4a687c; }
.project-info { padding: 20px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.project-info h3 { font-size: 14px; font-weight: 650; line-height: 1.65; }
.project-info p { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: 8px; flex: 1; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 19px; }
.project-tags span { color: var(--muted); font-size: 10px; background: var(--soft); padding: 2px 6px; border-radius: 4px; }
.project-count { margin-top: 16px; font-size: 11px; color: var(--muted); text-align: right; }
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; padding-bottom: 54px; }
.book-card { display: flex; align-items: center; gap: 32px; background: #eaece3; color: #343d30; border: 1px solid #dce0d1; padding: 30px; border-radius: var(--radius); }
.book { width: 106px; height: 150px; flex-shrink: 0; background: #324a3a; color: #f3f0de; border-radius: 2px 5px 5px 2px; border-left: 5px solid #243c2c; box-shadow: 6px 6px 0 #c9cebe; padding: 18px 12px; transform: rotate(-7deg); display: flex; flex-direction: column; justify-content: space-between; }
.book strong { font: 22px/1.4 'Songti SC', serif; letter-spacing: .13em; }
.book small { font-size: 7px; letter-spacing: .08em; }
.book-copy h3, .coffee-card h3 { font-size: 21px; font-weight: 650; margin: 8px 0; }
.book-copy p { font-size: 12px; color: #5d6654; }
.text-link { display: inline-flex; align-items: center; gap: 24px; margin-top: 18px; font-size: 12px; min-height: 40px; font-weight: 600; }
.book-card .eyebrow { color: #5d6654; }
.coffee-card { padding: 28px 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.coffee-card p { color: var(--muted); font-size: 13px; }
.coffee-card .text-link { color: var(--accent); }
.mystery-card { position: relative; overflow: hidden; padding: 28px 30px; background: #21261f; color: #eeeee4; border: 1px solid #3a4237; border-radius: var(--radius); }
html[data-theme='dark'] .mystery-card { background: #0f120e; border-color: #3a4237; }
.mystery-card::before { content: ''; position: absolute; inset: -40% -10%; background: radial-gradient(circle at 82% 18%, #b9542b2e 0%, transparent 55%); pointer-events: none; }
.mystery-glyph { position: absolute; right: 18px; top: 6px; font: 700 96px/1 var(--mono); color: #b9542b; opacity: .3; user-select: none; }
.mystery-card .eyebrow { color: #9aa690; }
.mystery-card h3 { font-size: 21px; font-weight: 650; margin: 8px 0; letter-spacing: .01em; }
.mystery-card p { font-size: 13px; color: #c2c9ba; }
.mystery-badge { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 7px 14px; border: 1px dashed #b9542b99; border-radius: 999px; color: #f0a582; font: 11px/1.5 var(--mono); letter-spacing: .08em; animation: mystery-pulse 2.4s ease-in-out infinite; }
@keyframes mystery-pulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mystery-badge { animation: none; } }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 25px 0; border-block: 1px solid var(--line); }
.footer-top strong { font-size: 14px; font-weight: 600; }
.footer-top p { color: var(--muted); font-size: 11px; margin-top: 4px; }
.btc-trigger { display: flex; align-items: center; gap: 13px; background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 12px 15px; font: 11px/1.5 var(--mono); max-width: 100%; min-width: 0; }
.btc-trigger b { color: var(--accent); font-size: 17px; }
.btc-full { font: 12px/1.5 var(--mono); letter-spacing: .01em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding: 24px 0 36px; font-size: 11px; color: var(--muted); }
.footer-bottom a:hover { color: var(--accent); }
dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 20px; width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 30px; }
dialog::backdrop { background: #12181088; }
dialog h2 { font-size: 22px; margin-bottom: 12px; }
dialog p { color: var(--muted); font-size: 13px; }
.dialog-close { float: right; background: var(--soft); border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 21px; }
.address { display: block; overflow-wrap: anywhere; font: 13px/1.8 var(--mono); padding: 15px; background: var(--soft); border-radius: 8px; margin: 16px 0; user-select: all; }
.qr { min-height: 200px; display: grid; place-items: center; padding: 16px 0; }
.qr img { width: 180px; height: 180px; background: #fff; }
dialog .button { width: 100%; }
.toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); border-radius: 9px; padding: 13px 22px; z-index: 100; width: max-content; max-width: calc(100% - 32px); font-size: 13px; box-shadow: 0 4px 20px #0002; }
@media (max-width: 1000px) {
  .hero { gap: 40px; } .hero-portrait { max-width: 285px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .social-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-card { gap: 22px; padding: 24px; }
}
@media (max-width: 700px) {
  .site-header { height: 78px; } .header-right, .site-nav { gap: 19px; }
  .hero { grid-template-columns: 1fr; gap: 45px; padding-block: 44px; }
  .hero-portrait { max-width: 240px; margin-block: 3px 15px; }
  .hero-copy { max-width: none; } .hero-title { font-size: 16px; }
  .quote-strip .eyebrow { display: none; } .quote-strip blockquote { font-size: 18px; }
  .section { padding-top: 40px; } .section-heading { align-items: start; } .section-note { display: none; }
  .projects-heading { flex-direction: column; gap: 16px; }
  .about-grid { grid-template-columns: 1fr; padding-bottom: 40px; }
  .footer-top { flex-direction: column; align-items: start; }
  .btc-trigger { max-width: 100%; }
  .btc-full { font-size: 11px; overflow-wrap: anywhere; }
  .footer-bottom { flex-direction: column; gap: 4px; }
}
@media (max-width: 440px) {
  .brand { gap: 9px; font-size: 14px; } .site-nav { gap: 15px; } .header-right { gap: 13px; }
  .site-nav a { font-size: 12px; } .site-nav a:last-child { display: none; }
  .theme-toggle { width: 38px; height: 38px; }
  .social-grid { grid-template-columns: 1fr; } .social-card { padding: 16px 18px; }
  .project-grid { gap: 11px; } .project-art { height: 116px; }
  .project-info { padding: 14px 12px; } .project-info h3 { font-size: 13px; }
  .project-info p { font-size: 11px; } .project-tags { gap: 4px; }
  .project-tags span { font-size: 9px; padding: 2px 4px; }
  .filter { padding-inline: 12px; } .book-card { gap: 23px; }
  .book { width: 87px; height: 135px; } .book strong { font-size: 20px; }
}
