/* 个人网站基础样式 · 极简无衬线体系：黑白基调，靠留白分区，不用分隔线。改风格 = 只改下面的 :root 变量 */
:root {
  --bg: #f8f9f6;
  --text: #202b25;
  --muted: #5c665f;
  --light: #66716a;
  --fill: rgba(12, 13, 16, .04);
  --fill-strong: rgba(12, 13, 16, .07);
  --link: var(--text);
  --link-underline: rgba(12, 13, 16, .3);
  --link-underline-hover: var(--text);
  --code-bg: #f1f2f4;
  --invert-bg: #0c0d10;
  --invert-text: #fafbfc;
  --max: 1240px;
  --surface: #ffffff;
  --accent: #1d67f9;
  --accent-fill: #e8f0fe;
  --border: #dce1d9;
  --sans: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #141a17;
  --text: #e9eee9;
  --muted: #b0bcb3;
  --light: #a7b5aa;
  --surface: #1c241f;
  --accent: #6b9bff;
  --accent-fill: #1a2d55;
  --border: #354339;
  --fill: rgba(255, 255, 255, .06);
  --fill-strong: rgba(255, 255, 255, .1);
  --link: var(--text);
  --link-underline: rgba(255, 255, 255, .32);
  --link-underline-hover: var(--text);
  --code-bg: #131315;
  --invert-bg: #f2f2f3;
  --invert-text: #0c0d10;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; color: var(--text); background: var(--bg);
  font-family: var(--sans); font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color 180ms ease, color 180ms ease;
}
.site { max-width: var(--max); margin: 0 auto; padding: 64px 22px 96px; }

h1, h2, h3, h4 { margin: 0; line-height: 1.28; font-weight: 700; letter-spacing: -0.01em; }
h1 { margin-bottom: 26px; font-size: 40px; }
h2 { margin-top: 76px; margin-bottom: 24px; font-size: 24px; }
h3 { margin-top: 30px; margin-bottom: 8px; font-size: 17px; }
p { margin: 0 0 18px; }
ul, ol { margin: 0 0 22px 1.35em; padding: 0; }
li { margin: 8px 0; padding-left: 2px; }
a {
  color: var(--link); text-decoration-line: underline; text-decoration-thickness: 1px;
  text-underline-offset: 3px; text-decoration-color: var(--link-underline);
  transition: text-decoration-color 140ms ease;
}
a:hover { text-decoration-color: var(--link-underline-hover); }
.meta { color: var(--muted); }
.small { color: var(--light); font-size: 14.5px; }
.kicker { color: var(--light); font-size: 13px; font-weight: 600; letter-spacing: 2px; margin: 0 0 16px; }

/* 联系按钮（首页）：实心反色胶囊，不用描边 */
.contact-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 30px 0 8px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border: none; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: opacity 160ms ease, background-color 160ms ease;
}
.contact-btn--dark { background: var(--invert-bg); color: var(--invert-text); }
.contact-btn--dark:hover { opacity: .82; color: var(--invert-text); }
.contact-btn--light { background: var(--fill); color: var(--text); }
.contact-btn--light:hover { background: var(--fill-strong); color: var(--text); }

/* 卡片列表（服务/产品/工具）：无边框，靠留白 + 悬浮底色分区 */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 8px 0 10px; }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  display: flex; flex-direction: column; gap: 6px; padding: 22px 20px;
  border-radius: 14px; text-decoration: none;
  color: var(--text); background: var(--fill);
  transition: background-color 160ms ease, transform 160ms ease;
}
.card:hover { background: var(--fill-strong); transform: translateY(-1px); color: var(--text); }

.cards--lines { display: block; }
.cards--lines .card {
  display: block; padding: 22px 2px; border-radius: 0; background: transparent;
  border-bottom: 1px solid var(--fill-strong);
}
.cards--lines .card:last-child { border-bottom: none; }
.cards--lines .card:hover { background: transparent; transform: none; }
.cards--lines .card .t { display: block; margin-top: 2px; }
.cards--lines .card .d { margin-top: 6px; }
.card .no { font-size: 12px; letter-spacing: 1.5px; color: var(--light); font-weight: 700; }
.card .t { font-size: 18px; font-weight: 700; }
.card .d { font-size: 14.5px; color: var(--muted); line-height: 1.65; margin: 0; }
.card .aud { font-size: 12.5px; color: var(--light); margin-top: 4px; }
.card .go {
  display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600;
  color: var(--text); text-decoration: none; margin-top: auto; padding-top: 6px;
  transition: gap 140ms ease;
}
.card:hover .go { gap: 7px; }

/* 行式列表（产品页 / 首页精选）：靠间距分区，不用分隔线 */
.rowitem { padding: 20px 0; border-bottom: 1px solid var(--fill-strong); }
.rowitem:last-child { border-bottom: none; }
.rowitem h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.rowitem p { margin: 0; color: var(--muted); font-size: 15.5px; }
.ext {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  color: var(--light); background: var(--fill); text-decoration: none; font-size: 13px;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.ext:hover { color: var(--text); background: var(--fill-strong); transform: translateY(-1px); text-decoration: none; }
.more-link {
  display: inline-flex; align-items: center; gap: 3px; margin-top: 14px;
  font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none;
  transition: gap 140ms ease;
}
.more-link:hover { gap: 7px; color: var(--text); }

.quote { margin: 30px 0; padding: 0; font-size: 21px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }

/* 标签切换（博客页：动态 / 沉思） */
.tabs { display: flex; gap: 6px; margin: 4px 0 30px; }
.tab-btn {
  border: none; border-radius: 999px; padding: 8px 18px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 14.5px; font-weight: 600;
  font-family: inherit; transition: background-color 140ms ease, color 140ms ease;
}
.tab-btn:hover { color: var(--text); background: var(--fill); }
.tab-btn.on { color: var(--invert-text); background: var(--invert-bg); }
.tab-btn.on:hover { color: var(--invert-text); background: var(--invert-bg); }

.reflect-item { padding: 18px 0; border-bottom: 1px solid var(--fill-strong); }
.reflect-item:last-child { border-bottom: none; }
.reflect-item .small { margin: 0 0 6px; }
.reflect-item p:last-child { margin: 0; }
footer.sitefoot { margin-top: 88px; color: var(--light); font-size: 14px; line-height: 1.65; }

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .site { padding: 48px 22px 80px; }
  h1 { font-size: 30px; }
  h2 { font-size: 21px; margin-top: 60px; }
}

/* ---- 模板补充：页脚 / 长文段落 ---- */
.site-footer { margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--fill-strong); }
.intro { font-size: 19px; }
.values li { margin: 10px 0; }

/* 项目简历：左侧个人资料，右侧完整项目索引。 */
body { font-size: 16px; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.skip-link { position: fixed; top: -90px; left: 20px; z-index: 30; padding: 12px 18px; background: var(--surface); }
.skip-link:focus { top: 12px; }
.topbar { max-width: var(--max); margin: 0 auto; padding: 23px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--border); }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-size: 15px; font-weight: 650; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; background: var(--accent); color: var(--bg); border-radius: 8px; font-size: 18px; }
.brand-note { color: var(--muted); font-size: 12px; font-weight: 400; }
.topbar nav { display: flex; align-items: center; gap: 26px; }
.topbar nav a { font-size: 13px; color: var(--muted); text-decoration: none; padding: 8px 0; }
.topbar nav a:hover { color: var(--accent); }
[data-theme-toggle] { border: 1px solid var(--border); background: transparent; color: var(--text); padding: 5px 12px; border-radius: 7px; cursor: pointer; font-size: 12px; min-height: 36px; }
.resume-layout { max-width: var(--max); margin: 0 auto; padding: 54px 32px 80px; display: grid; grid-template-columns: 246px minmax(0, 1fr); gap: 64px; align-items: start; }
.profile { position: sticky; top: 36px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: .15em; color: var(--muted); margin-bottom: 16px; }
.profile h1 { font-size: 42px; font-weight: 650; letter-spacing: -.05em; margin: 0 0 24px; }
.profile h1 span { display: block; font-size: 16px; letter-spacing: .02em; margin-top: 15px; font-weight: 500; }
.profile-intro { color: var(--muted); font-size: 14px; line-height: 1.9; }
.profile-facts { display: flex; gap: 24px; margin: 30px 0; color: var(--muted); font-size: 11px; }
.profile-facts strong { color: var(--text); font-size: 26px; font-weight: 500; padding-right: 3px; }
.profile-focus { border-left: 2px solid var(--accent); padding-left: 14px; display: grid; gap: 5px; font-size: 12px; }
.profile-contact { margin-top: 46px; padding-top: 25px; border-top: 1px solid var(--border); scroll-margin-top: 28px; }
.profile-contact .eyebrow, .education .eyebrow { margin-bottom: 12px; }
.profile-contact a { display: flex; justify-content: space-between; font-size: 12px; text-decoration: none; padding: 5px 0; overflow-wrap: anywhere; }
.profile-contact a:hover { text-decoration: underline; }
.education { margin-top: 28px; font-size: 12px; }
.education strong { font-weight: 550; }
.education p:last-child { margin-top: 6px; color: var(--muted); line-height: 1.8; }
.section-heading h2 { font-size: 26px; margin: 0; font-weight: 600; letter-spacing: -.03em; }
.section-heading .eyebrow { margin-bottom: 12px; }
.count { display: inline-block; font-size: 12px; margin-left: 12px; color: var(--muted); vertical-align: middle; border: 1px solid var(--border); border-radius: 20px; padding: 3px 9px; letter-spacing: 0; }
.section-lead { color: var(--muted); font-size: 13px; margin: 14px 0 28px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px; text-decoration: none; display: flex; flex-direction: column; min-width: 0; transition: border-color .15s ease, transform .15s ease; }
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.category { display: inline-block; background: var(--accent-fill); color: var(--accent); border-radius: 4px; padding: 3px 8px; font-size: 11px; font-weight: 600; }
.project-number { color: var(--light); font-size: 11px; font-variant-numeric: tabular-nums; }
.project-card h3 { display: flex; justify-content: space-between; gap: 10px; font-size: 17px; line-height: 1.7; margin: 0 0 10px; font-weight: 600; }
.card-arrow { color: var(--light); font-weight: 400; }
.project-summary { color: var(--muted); font-size: 12px; line-height: 1.85; margin-bottom: 18px; }
.tech-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.tech { font-size: 10px; color: var(--muted); border: 1px solid var(--border); padding: 2px 7px; border-radius: 4px; overflow-wrap: anywhere; }
.card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--border); }
.card-bottom time { color: var(--muted); }
.card-bottom > span { color: var(--accent); white-space: nowrap; }
.support-section { margin-top: 64px; scroll-margin-top: 24px; }
.support-section h2 { font-size: 24px; margin: 0 0 24px; }
.skill-row { display: grid; grid-template-columns: 145px 1fr; gap: 24px; border-top: 1px solid var(--border); padding: 18px 0; }
.skill-row h3 { font-size: 13px; line-height: 1.8; margin: 0; }
.skill-row p { font-size: 12px; line-height: 1.9; color: var(--muted); margin: 0; }
.career-row { padding: 20px 0; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.career-row time { font-size: 12px; color: var(--muted); }
.career-row h3 { font-size: 14px; margin: 0; line-height: 1.8; }
.career-note { font-size: 12px; color: var(--muted); margin-top: 12px; }
.page-footer { max-width: calc(var(--max) - 64px); margin: 0 auto; padding: 25px 0; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; gap: 20px; }
/* 独立项目详情：直达链接、上下项目导航和长段落排版。 */
.project-page { max-width: 850px; padding: 40px 32px 70px; margin: auto; }
.back-link { font-size: 13px; color: var(--muted); text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.project-header { margin-top: 44px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.project-header h1 { font-size: clamp(27px, 4vw, 38px); line-height: 1.4; margin: 20px 0 18px; }
.project-role { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.project-intro { font-size: 16px; line-height: 1.9; margin: 24px 0; }
.project-header .tech { font-size: 12px; }
.detail-section { padding: 32px 0 8px; overflow-wrap: anywhere; }
.detail-section h2 { font-size: 22px; margin: 0 0 24px; }
.detail-section h3 { font-size: 16px; margin: 30px 0 20px; color: var(--accent); }
.detail-section p { font-size: 14px; line-height: 1.95; margin-bottom: 20px; }
.detail-section:not(.responsibilities) p { color: var(--muted); }
code { font-size: .88em; padding: 2px 5px; border-radius: 4px; background: var(--code-bg); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.project-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 44px; border-top: 1px solid var(--border); padding-top: 28px; }
.project-pagination a { font-size: 14px; text-decoration: none; }
.project-pagination a:last-child { text-align: right; }
.project-pagination a span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 9px; }
@media (max-width: 1000px) {
  .resume-layout { grid-template-columns: 205px minmax(0, 1fr); gap: 32px; }
  .project-card { padding: 18px; }
  .project-grid { gap: 12px; }
}
@media (max-width: 800px) {
  .resume-layout { display: block; padding-top: 32px; }
  .profile { position: static; margin-bottom: 40px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .profile > .eyebrow, .profile h1, .profile-intro { grid-column: 1; }
  .profile-facts { grid-column: 2; grid-row: 2; margin: 0; align-items: center; }
  .profile-focus { grid-column: 2; grid-row: 3 / 5; align-self: start; }
  .profile-contact { grid-column: 1; margin-top: 10px; }
  .education { grid-column: 2; margin-top: 10px; padding-top: 25px; border-top: 1px solid var(--border); }
  .profile h1 { font-size: 36px; }
  .topbar nav { gap: 18px; }
}
@media (max-width: 540px) {
  .topbar { padding: 18px 20px; flex-wrap: wrap; gap: 12px; }
  .topbar nav { width: 100%; justify-content: space-between; gap: 8px; }
  .topbar nav a { min-width: 40px; min-height: 40px; text-align: center; }
  .brand-note { display: inline; }
  .resume-layout { padding: 30px 20px 50px; }
  .profile { display: block; margin-bottom: 30px; }
  .profile > .eyebrow { margin-bottom: 10px; }
  .profile h1 { font-size: 30px; margin-bottom: 10px; display: flex; align-items: baseline; gap: 16px; }
  .profile h1 span { font-size: 13px; margin: 0; letter-spacing: 0; }
  .profile-intro, .profile-focus { display: none; }
  .profile-facts { margin: 10px 0; gap: 24px; }
  .profile-facts strong { font-size: 19px; }
  .profile-contact { margin-top: 12px; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .profile-contact .eyebrow { display: none; }
  .profile-contact a { gap: 6px; }
  .education { margin-top: 18px; padding-top: 18px; }
  .education p:last-child { margin-bottom: 0; }
  .section-heading h2 { font-size: 23px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card { padding: 22px; }
  .project-summary { font-size: 13px; }
  .tech, .card-bottom { font-size: 11px; }
  .skill-row { grid-template-columns: 1fr; gap: 9px; }
  .career-row { display: block; }
  .career-row h3 { margin-top: 7px; }
  .page-footer { margin: 0 20px; flex-wrap: wrap; gap: 8px; }
  .project-page { padding: 28px 20px 50px; }
  .project-pagination { gap: 18px; }
}
@font-face {
  font-family: "HarmonyOS Sans";
  src: url("/fonts/HarmonyOS_Sans_Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+0041-005A, U+0061-007A;
}
html[data-intro-lock] { background: #000; overflow: hidden; }
html[data-intro-lock] body { overflow: hidden; height: 100%; }
html[data-skip-intro] #intro { display: none; }
#intro {
  position: fixed; inset: 0; z-index: 4000; background: #000;
  display: flex; align-items: center; justify-content: center;
  touch-action: none; cursor: pointer;
  transition: background-color .7s linear;
}
#intro.is-reveal { background-color: transparent; }
.intro-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.intro-logo {
  position: relative; z-index: 1; margin: 0;
  color: #fff;
  font-family: "HarmonyOS Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: clamp(34px, 10.6vw, 118px);
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  max-width: 94vw;
  opacity: 0;
}
#intro.is-ready .intro-logo { opacity: 1; transition: opacity .35s ease; }
.intro-pre, .intro-post, .intro-o { display: inline-block; }
.intro-o {
  position: relative;
  transform: scale(var(--o-scale, 1));
  transform-origin: 50% 58%;
  will-change: transform, opacity;
}
.intro-o::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -.12em;
  width: .4em;
  height: .068em;
  background: #1d67f9;
  transform: translateX(-50%);
}
#intro.is-expanding .intro-pre,
#intro.is-expanding .intro-post,
#intro.is-expanding .intro-o::after {
  opacity: 0;
  transition: opacity .32s ease;
}
#intro.is-expanding .intro-o {
  transition: transform 1.05s cubic-bezier(.22, 1, .36, 1);
}
#intro.is-expanding.is-dissolving .intro-o {
  opacity: 0;
  transition: transform 1.05s cubic-bezier(.22, 1, .36, 1), opacity .4s ease;
}
.intro-wave {
  position: absolute; display: block; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border-radius: 50%; pointer-events: none;
  border: 1.5px solid rgba(255, 255, 255, .3);
  animation: intro-wave 1.15s ease-out forwards;
}
.intro-wave.is-blue { border-color: rgba(29, 103, 249, .5); }
@keyframes intro-wave {
  to { transform: scale(22); opacity: 0; }
}
.intro-dot {
  position: absolute; display: block; width: 3px; height: 3px; margin: -1.5px 0 0 -1.5px;
  border-radius: 50%; pointer-events: none;
  animation: intro-dot .95s ease-out forwards;
}
@keyframes intro-dot {
  to { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}
.intro-hint {
  position: absolute; left: 0; right: 0; bottom: 72px; margin: 0;
  text-align: center; color: rgba(255, 255, 255, .38);
  font-size: 13px; letter-spacing: .12em; pointer-events: none;
  transition: opacity 200ms ease;
}
.intro-skip {
  position: absolute; right: 20px; bottom: 20px; z-index: 2;
  border: 1px solid rgba(255, 255, 255, .22); background: transparent;
  color: rgba(255, 255, 255, .55); font-size: 12px; padding: 8px 14px;
  border-radius: 7px; cursor: pointer; min-height: 36px;
}
.intro-skip:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
#intro.is-leaving .intro-hint,
#intro.is-leaving .intro-skip { opacity: 0; pointer-events: none; }
@media (max-width: 480px) {
  .intro-logo { font-size: 10vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  #intro { display: none !important; }
}
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --text: #111; --muted: #333; --light: #444; --accent: #222; --accent-fill: #f3f3f3; --border: #ccc; }
  .topbar nav, .back-link, .project-pagination, .skip-link, #intro { display: none; }
  .resume-layout { display: block; padding: 20px; }
  .profile { position: static; margin-bottom: 30px; }
  .project-card { break-inside: avoid; }
  .project-page { max-width: none; padding: 20px; }
}
