@charset "UTF-8";

/* 01 全站统一使用原站 Mulish 字体；标题通过字重建立层级。
   使用本地 WOFF2；授权文件在 static/assets/fonts/。 */
@font-face { font-family: Mulish; font-style: normal; font-weight: 300; font-display: swap; src: url('../assets/fonts/mulish-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: Mulish; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/mulish-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: Mulish; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/mulish-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: Mulish; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/mulish-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: Kanit; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/kanit-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: Newsreader; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/newsreader-latin-600-normal.woff2') format('woff2'); }

/* 02 文字主色 #7f1769，搭配近白背景；颜色变量表见 docs/PALETTE.md。 */
:root {
  color-scheme: light;
  --pink: #7f1769;
  --pink-hover: #a02e84;
  --card-surface: #fef7fb;
  --rose: var(--card-surface);
  --line: #eee0ea;
  --divider: #d2b4c9;
  --card-border: #ead7e5;
  --card-shadow: #f8edf4;
  --page-surface: #fffcfe;
  --hero-surface: var(--page-surface);
  --ink: #282127;
  --muted: #786d75;
  --gutter: clamp(24px, 6vw, 110px);
  --body-font: Mulish, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
  --heading-font: var(--body-font);
  font-family: var(--body-font);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page-surface); color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.85; overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--heading-font); font-weight: 400; line-height: 1.35; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 5px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 8px 14px; background: var(--page-surface); color: var(--pink); z-index: 100; }
.skip-link:focus { top: 12px; }
.content-width { width: calc(100% - 2 * var(--gutter)); max-width: 1320px; margin-inline: auto; }
.text-link { color: var(--pink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.text-link:hover { color: var(--pink-hover); }
/* 链接公共组件：只给文字下划线，箭头单独排版。 */
.arrow-link { text-decoration: none; }
.link-label { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.link-arrow { margin-left: .45em; display: inline-block; text-decoration: none; }
.eyebrow { font-weight: 600; font-size: 11px; letter-spacing: .13em; color: var(--pink); margin: 0 0 12px; }

/* 03 顶部导航与人物分层横幅：浅粉主题，完整人物透明前景独立排版。 */
.site-header { min-height: 80px; padding: 12px var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 36px; background: var(--page-surface); border-bottom: 1px solid var(--line); }
.site-brand { display: flex; align-items: center; gap: 14px; color: var(--pink); font-weight: 700; font-size: 19px; white-space: nowrap; }
.site-brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-en { font-weight: 300; font-size: 14px; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: 15px; font-weight: 600; padding-block: 8px; border-bottom: 1px solid transparent; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--pink); border-bottom-color: var(--pink); }
.menu-toggle { display: none; }
/* 人物层使用透明素材；滤镜只应用于画面图层，0.75 即原饱和度的 75%。 */
.hero { position: relative; background: var(--hero-surface); overflow: hidden; isolation: isolate; }
.hero--home { padding-top: 24px; border-bottom: 1px solid var(--line); }
.hero--home::before { content: ''; position: absolute; width: 600px; height: 600px; right: -190px; top: -190px; border-radius: 50%; background: #faf1f7; filter: saturate(var(--hero-saturation)); z-index: -1; }
.hero-inner { position: relative; }
.hero-stage { position: relative; min-height: 390px; display: flex; align-items: center; }
.hero-copy { position: relative; width: 34%; padding: 24px 0; color: var(--pink); z-index: 3; }
.hero-kicker { margin: 0 0 12px; font-size: 13px; letter-spacing: .12em; font-weight: 600; }
.hero-copy h1 { font-size: clamp(42px, 4.6vw, 68px); margin: 0 0 20px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.hero-art { position: absolute; inset: 0 -20px 0 29%; filter: saturate(var(--hero-saturation)); }
.hero-characters { position: absolute; z-index: 3; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; bottom: -4px; right: 0; }
.hero-orbit { position: absolute; display: block; border-radius: 50%; z-index: 0; }
.hero-orbit--one { width: 250px; height: 250px; top: 45px; right: 14%; background: #f6edf4; }
.hero-orbit--two { width: 120px; height: 120px; bottom: 30px; left: 1%; background: #f9f1f7; }
.hero-spark { position: absolute; color: #ceafc3; font-size: 38px; }
.hero-spark--one { left: 3%; top: 15px; transform: rotate(12deg); }
.hero-spark--two { right: 5%; bottom: 30px; font-size: 48px; }
.hero--compact { height: 115px; border-bottom: 1px solid var(--line); }
.hero-compact-art { position: absolute; height: 235px; width: auto; right: 10%; bottom: -80px; opacity: .25; filter: saturate(var(--hero-saturation)); }
.category-bar { background: var(--page-surface); border-bottom: 1px solid var(--line); }
.category-links { min-height: 76px; display: flex; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 82px); padding: 15px var(--gutter); }
.category-links a { color: var(--muted); font-size: 15px; font-weight: 500; padding-block: 5px; border-bottom: 1px solid transparent; white-space: nowrap; }
.category-links a:hover, .category-links a[aria-current] { color: var(--pink); border-bottom-color: var(--pink); }
.category-links .category-ai { color: var(--pink); }

/* 04 首页作品区：封面及文案分开；具体比例来自 projects.json → home。 */
.portfolio-section { padding-top: 34px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; gap: 20px; }
.section-heading h2 { font-size: 27px; margin: 0; }
.filter-status { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.work-entry { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 4vw, 54px); margin-bottom: 24px; padding: 0 0 24px; border-bottom: 2px solid var(--divider); }
.work-entry:last-of-type { margin-bottom: 38px; border-bottom: 0; }
.work-entry:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.work-entry:nth-of-type(even) .entry-media { grid-column: 2; grid-row: 1; }
.work-entry:nth-of-type(even) .entry-copy { grid-column: 1; grid-row: 1; }
.entry-media { display: block; position: relative; width: 100%; aspect-ratio: var(--cover-aspect, 4 / 3); background: var(--rose); overflow: hidden; border: 1px solid var(--card-border); border-radius: 16px; box-shadow: 5px 6px 0 var(--card-shadow); max-height: 300px; }
.entry-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--cover-position, center); transition: transform 500ms ease; }
.entry-media:hover img { transform: scale(1.025); }
.entry-copy { max-width: 490px; padding: 12px 8px; color: var(--pink); }
.entry-copy h3 { font-size: clamp(25px, 2vw, 29px); margin: 0 0 9px; font-family: var(--body-font); font-weight: 500; letter-spacing: .025em; line-height: 1.6; }
.entry-copy h3 a:hover { color: var(--pink); }
.entry-subtitle { font-family: var(--body-font); font-weight: 500; font-size: 17px; line-height: 1.5; margin: 0 0 14px; color: var(--pink); }
.entry-summary { font-size: 15px; font-weight: 300; letter-spacing: .025em; line-height: 1.95; margin: 0 0 18px; color: var(--pink); }
.entry-link .link-arrow { margin-left: 15px; }
.entry-link { font-size: 14px; font-weight: 500; text-decoration: none; }
/* 首页“查看项目”的横线仅覆盖文字宽度，箭头保持无横线。 */
.entry-link .link-label { display: inline-block; padding-bottom: 3px; border-bottom: 1px solid currentColor; text-decoration: none; }
.placeholder-badge { position: absolute; left: 14px; bottom: 14px; padding: 4px 9px; background: var(--page-surface); color: var(--pink); font-size: 11px; font-weight: 600; }
.about-section { border-top: 1px solid var(--line); padding-top: 40px; padding-bottom: 40px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 15%; }
.about-section h2 { font-size: 26px; margin: 0 0 22px; }
.about-section p { font-size: 18px; line-height: 2; }
.about-section .text-link { font-size: 17px; }

/* 05 项目页：标题与说明分栏；媒体每项独占一行。 */
.project-page { max-width: 1480px; padding-top: 64px; }
.project-heading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: start; margin: 0 0 48px; }
.project-title { min-width: 0; }
.project-intro { min-width: 0; }
.project-heading h1 { font-family: var(--body-font); font-weight: 300; font-size: clamp(42px, 4.5vw, 72px); letter-spacing: -.035em; margin: 0 0 10px; line-height: 1.15; }
.project-subtitle { font-size: clamp(18px, 1.4vw, 23px); font-weight: 500; line-height: 1.5; margin: 0; }
.project-summary { margin: 4px 0 0; font-size: 15px; line-height: 1.8; }
.tool-list { display: flex; flex-wrap: wrap; padding: 0; margin: 22px 0 0; gap: 10px 18px; list-style: none; }
.tool-list li { color: var(--pink); font-size: 12px; }
.project-figure { margin: 0; min-width: 0; position: relative; }
.project-figure > a { display: block; cursor: zoom-in; background: var(--page-surface); }
.project-figure img { width: 100%; height: auto; margin-inline: auto; object-fit: contain; }
.project-figure figcaption { padding: 13px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.8; }
.media-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.media-full { grid-column: 1 / -1; }
/* 顶部说明按内容自然增高，不限高、不截断；层级紧凑，段落保留阅读间距。 */
.project-description { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.project-description h2 { font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.project-description .project-focus { margin: 0; }
.project-description .tool-list { margin: 12px 0 24px; gap: 6px 18px; }
.project-description h3 { font-size: 15px; font-weight: 600; line-height: 1.6; margin: 0 0 6px; }
.project-description p { font-size: 14px; line-height: 1.9; }
.project-steps p { margin: 0; }
.project-steps section + section { margin-top: 20px; }
.project-sources { margin-top: 24px; font-size: 13px; }
.project-description .source-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.project-sources > .text-link + .text-link, .project-sources > p + .text-link { display: inline-block; margin-top: 12px; }
.project-status { padding: 18px 24px; background: var(--rose); border-left: 2px solid var(--pink); margin: 0 0 34px; font-size: 13px; }
.project-status strong { font-weight: 600; color: var(--pink); }
.project-status p { margin: 6px 0 0; }
.media-placeholder-label { display: block; text-align: center; padding: 8px 12px; font-size: 12px; color: var(--pink); background: var(--rose); }
.project-figure video { width: 100%; height: auto; background: #1c141a; }
.video-placeholder { position: relative; overflow: hidden; background: var(--rose); }
.video-placeholder img { width: 100%; opacity: .32; }
.video-placeholder > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--pink); }
.video-placeholder span { font-size: 12px; letter-spacing: .08em; font-weight: 600; }
.video-placeholder p { font-size: clamp(18px, 3vw, 34px); margin: 10px 0 0; }
.project-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin: 64px 0 0; padding-block: 24px; border-block: 1px solid var(--line); font-size: 14px; }
.project-pagination a { justify-self: start; }
.project-pagination a:nth-child(2) { justify-self: center; }
.project-pagination a:last-child { justify-self: end; }
.project-pagination a:last-child { text-align: right; }
.project-pagination a:hover { color: var(--pink); }

/* 06 图片大图：Esc 关闭、方向键切换；视频使用浏览器原生播放与全屏。 */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 56px 72px; background: var(--page-surface); color: var(--ink); }
.lightbox::backdrop { background: var(--page-surface); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; text-align: center; min-width: 0; }
.lightbox-image { width: auto; height: auto; max-width: calc(100vw - 144px); max-height: calc(100dvh - 160px); object-fit: contain; margin-inline: auto; }
.lightbox-caption { padding-top: 18px; font-size: 13px; color: var(--muted); }
.lightbox button { position: fixed; border: 0; background: var(--page-surface); color: var(--pink); padding: 8px 14px; font-family: var(--body-font); font-size: 40px; line-height: 1; }
.lightbox-close { top: 12px; right: 15px; }
.lightbox-prev { top: calc(50% - 32px); left: 7px; }
.lightbox-next { top: calc(50% - 32px); right: 7px; }
.lightbox button:disabled { opacity: .22; cursor: default; }
.lightbox-count { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 12px; color: var(--muted); }
.has-lightbox { overflow: hidden; }

/* 07 简历与联系：资料来自 site.json / resume.html，避免背景干扰阅读。 */
.resume-page, .contact-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 90px; padding-top: 70px; }
.profile { font-size: 14px; }
.profile > img { width: 150px; height: 150px; object-fit: cover; margin-bottom: 26px; }
.profile h1 { margin: 0 0 5px; font-size: 26px; }
.profile p { margin: 5px 0; }
.profile .profile-role { color: var(--pink); margin-top: 20px; }
.profile .text-link { display: block; margin-top: 15px; overflow-wrap: anywhere; }
.print-button { border: 1px solid var(--line); background: var(--rose); color: var(--pink); padding: 9px 12px; font-size: 13px; margin-top: 24px; }
.resume-body { min-width: 0; }
.resume-body h2 { font-size: 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin: 40px 0 24px; }
.resume-body > h2:first-child { margin-top: 0; }
.resume-body h3 { font-size: 18px; line-height: 1.8; margin-top: 28px; }
.resume-body h4 { font-size: 14px; color: var(--muted); }
.resume-body ul { padding-left: 20px; }
.resume-body li { margin-bottom: 10px; font-size: 15px; }
.resume-body code { font-family: var(--body-font); display: block; color: var(--muted); font-size: 13px; }
.contact-content h2 { font-size: 30px; margin: 0 0 22px; }
.contact-details { margin: 0; border-top: 1px solid var(--line); }
.contact-details > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-details dt { font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.contact-details dd { margin: 0; font-size: 17px; overflow-wrap: anywhere; }

/* 08 学习笔记：每条笔记配原作品/文档缩略图。 */
.notes-page { padding-top: 65px; max-width: 1180px; }
.page-heading { margin-bottom: 65px; max-width: 680px; }
.page-heading h1 { font-size: 40px; margin: 0 0 20px; }
.page-heading > p:last-child { font-size: 18px; }
.note-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 65px; align-items: center; padding: 0 0 55px; margin-bottom: 55px; border-bottom: 1px solid var(--line); }
.note-image img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.note-entry h2 { font-size: 26px; margin: 0 0 14px; }
.note-entry > div > p { font-size: 16px; }
.note-entry .eyebrow { font-size: 11px; }

/* 09 页脚与备案：内容来源 site.json → footer。 */
.site-footer { margin-top: 70px; padding-top: 35px; padding-bottom: 35px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 11px; }
.site-footer > a { font-size: 13px; color: var(--pink); }
.site-footer p { margin: 20px 0 10px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 20px; }
.site-footer a:hover { color: var(--pink); }

/* 10 响应式与打印：仅改变排列，内容仍来自同一配置。 */
@media (max-width: 1050px) {
  .site-nav { gap: 22px; }
  .work-entry { gap: 32px; }
  .work-entry:nth-of-type(even) .entry-copy { padding-left: 0; }
  .resume-page, .contact-page { grid-template-columns: 210px minmax(0, 1fr); gap: 45px; }
  /* 文字较多时在平板提前上下排列，避免挤进狭窄的右栏。 */
  .project-heading { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .project-intro { max-width: 760px; }
}
@media (max-width: 759px) {
  :root { --gutter: 24px; }
  body { font-size: 15px; }
  .site-header { min-height: 74px; flex-wrap: wrap; padding-block: 12px; gap: 0; }
  .site-brand { font-size: 17px; }
  .site-brand img { width: 42px; height: 42px; }
  .site-nav { flex: 0 0 100%; flex-wrap: wrap; justify-content: flex-start; gap: 22px; padding-top: 20px; }
  .site-nav a { font-size: 14px; }
  .menu-toggle { display: block; border: 0; padding: 10px 0 10px 20px; background: transparent; font-size: 14px; color: var(--pink); }
  .menu-toggle span { margin-left: 8px; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: flex; }
  html:not(.js) .menu-toggle { display: none; }
  .hero--home { padding-top: 16px; }
  .hero-stage { min-height: 350px; align-items: flex-start; }
  .hero-copy { width: 100%; padding-top: 22px; }
  .hero-kicker { font-size: 11px; margin-bottom: 6px; }
  .hero-copy h1 { font-size: 39px; margin-bottom: 8px; }
  .hero-art { inset: 115px -10px 0; }
  .hero-orbit--one { width: 150px; height: 150px; top: 15px; }
  .hero-orbit--two { width: 80px; height: 80px; }
  .hero-spark { font-size: 22px; }
  .hero-spark--two { font-size: 28px; bottom: 12px; }
  .hero--compact { height: 85px; }
  .hero-compact-art { height: 170px; right: -10%; bottom: -65px; }
  .category-links { min-height: 65px; gap: 30px; justify-content: flex-start; overflow-x: auto; scrollbar-width: thin; }
  .category-links a { font-size: 14px; }
  .portfolio-section { padding-top: 28px; }
  .section-heading { margin-bottom: 24px; align-items: start; }
  .section-heading h2 { font-size: 26px; }
  .filter-status { max-width: 85px; text-align: right; padding-top: 25px; font-size: 11px; }
  .work-entry, .work-entry:nth-of-type(even) { display: flex; flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 24px; padding-bottom: 24px; }
  .entry-media { width: 100%; aspect-ratio: 16 / 10; max-height: none; }
  .entry-copy { max-width: 100%; padding: 0 3px; }
  .entry-copy h3 { font-size: 26px; margin-bottom: 8px; }
  .entry-subtitle { margin-bottom: 12px; font-size: 16px; }
  .entry-summary { font-size: 14px; }
  .about-section { display: block; padding-top: 45px; padding-bottom: 10px; }
  .about-section > div + div { margin-top: 45px; }
  .about-section p { font-size: 16px; }
  .project-page { padding-top: 35px; }
  .project-heading { grid-template-columns: minmax(0, 1fr); gap: 22px; margin: 0 0 32px; }
  .project-heading h1 { font-size: 42px; margin-bottom: 12px; }
  .project-summary { font-size: 16px; }
  .tool-list { margin-top: 16px; }
  .media-grid { display: block; }
  .media-grid .project-figure + .project-figure { margin-top: 35px; }
  .project-pagination { gap: 12px; font-size: 12px; margin-top: 45px; }
  .resume-page, .contact-page { display: block; padding-top: 40px; }
  .profile { margin-bottom: 45px; }
  .resume-body li { font-size: 14px; }
  .notes-page { padding-top: 40px; }
  .page-heading { margin-bottom: 45px; }
  .page-heading h1 { font-size: 34px; }
  .note-entry { display: block; padding-bottom: 40px; margin-bottom: 40px; }
  .note-image { display: block; margin-bottom: 25px; }
  .lightbox { padding: 50px 40px; }
  .lightbox-image { max-width: calc(100vw - 80px); }
  .lightbox button { padding-inline: 8px; font-size: 36px; }
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
  .site-footer { margin-top: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .site-header, .hero, .category-bar, .site-footer, .print-button, .skip-link { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .resume-page { display: block; width: 100%; max-width: none; padding: 0; }
  .profile { margin-bottom: 15px; }
  .profile img { display: none; }
  .profile h1 { font-size: 20pt; }
  .profile .text-link { display: inline; margin-right: 16px; }
  .profile .profile-role, .text-link, .resume-body h4, .resume-body code { color: #000; }
  .resume-body h2 { font-size: 15pt; margin-top: 20px; border-color: #000; }
  .resume-body h3 { font-size: 12pt; break-after: avoid; }
  .resume-body li { font-size: 10pt; margin-bottom: 5px; }
}
