/* ===== site.css ===== */
/* 全站样式。尺寸用自己的一套规则：间距取 4 的倍数（8 12 16 24 32 48 64 96），
   字号分页面标题、区块标题、导语、正文、说明几档，按钮统一 44px 高。 */
:root {
  --wrap: 1600px;
  --gutter: clamp(20px, 4vw, 64px);
  --bg: #FBF7EE;
  /* 琥珀色只做填充、下划线和描边，文字一律用墨色，保证对比度 */
  --accent: #E8A33D;
  --accent-line: rgba(232, 163, 61, .6);
  --cream: #F3EADB;
  --line: #E6E0D4;
  --ink: #3A3226;
  /* 次要文字两档：在 #FFFDF8 / #FBF7EE / #F3EADB 上对比度都 ≥ 4.5:1（WCAG AA） */
  --ink-70: rgba(58, 50, 38, .8);
  --ink-55: rgba(58, 50, 38, .7);
  --foot: #141414;
  --font: "Figtree", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --display: "Shantell Sans", "LXGW WenKai Screen", "PingFang SC", cursive;
  /* 字号：导语、正文、说明；分区间距；页头高度（窄屏在下方媒体查询里改小） */
  --fs-lead: 22px;
  --fs-body: 16px;
  --fs-small: 14px;
  --sec: 96px;
  --hdr: 72px;
  /* 两档圆角：图片与内嵌面板 10，卡片 16 */
  --r-img: 10px;
  --r-card: 16px;
  /* 两级标题：页面主标题、区块标题 */
  --title: clamp(40px, 30px + 2.6vw, 64px);
  --section: clamp(30px, 24px + 1.5vw, 44px);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr) + 24px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.8 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4, .logo, .d-overview p, .d-hl b { font-family: var(--display); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* 按钮：44px 高，琥珀描边；实心款用于首要操作 */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: var(--r-img); outline: 1px solid var(--accent); outline-offset: -1px; color: var(--ink); font-size: 15px; letter-spacing: .02em; line-height: 1; white-space: nowrap; transition: background-color .3s; }
.btn .ico { width: 12px; height: 20px; stroke-width: 1.5; }
.btn:hover { background: var(--accent); }
.btn-solid { background: var(--accent); }
.btn-solid:hover { background: #D99430; }

/* 页头：logo 在左，导航在页面水平居中，GitHub 在右；左右两栏等宽，导航始终居中 */
/* 吸顶页头：页面顶部时透明、无分隔线；滚动后（.scrolled，site.js 切换）加半透明米色底与模糊，仍不加分隔线 */
.hdr { position: sticky; top: 0; z-index: 50; background: transparent; transition: background-color .3s ease; }
.hdr.scrolled { background: rgba(251, 247, 238, .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
/* 菜单展开时 html 锁定滚动会让 sticky 失效（页面滚动过后页头跑出视口），改为固定在顶部 */
html.menu-open .hdr { position: fixed; left: 0; right: 0; background: var(--bg); }
.hdr .wrap { height: var(--hdr); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px; }
.logo { justify-self: start; font-size: 24px; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.nav { display: flex; gap: 36px; }
.nav > a { font-size: 18px; letter-spacing: .04em; line-height: 28px; padding-block: 4px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; }
.nav a.on { border-bottom-color: var(--accent); }
.nav > a:hover { color: var(--ink-70); }
.acts { justify-self: end; display: flex; align-items: center; gap: 16px; }
.acts .soc { display: inline-flex; font-size: 20px; }
.acts .soc:hover { color: var(--ink-70); }
.burger { display: none; justify-self: end; font-size: 24px; }
.mnav { position: fixed; inset: var(--hdr) 0 0; z-index: 49; background: var(--bg); padding: 24px var(--gutter); display: none; flex-direction: column; gap: 8px; }
.mnav.open { display: flex; }
.mnav a { font-size: 20px; padding: 8px 0; border-bottom: 1px solid var(--line); }

/* 通用分区 */
.sec { padding-block: var(--sec); }
.sec-title { font-size: var(--title); line-height: 1.2; font-weight: 600; }
.sec-note { font-size: var(--fs-body); line-height: 1.8; color: var(--ink-70); margin-top: 12px; max-width: 45em; }
.sec-note a { border-bottom: 2px solid var(--accent-line); }
.links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; font-size: var(--fs-small); }
.links a { color: var(--ink); display: inline-flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--accent-line); }
.links a:hover { border-bottom-color: var(--accent); }
.links .ico { width: 14px; height: 14px; }
.links .muted { color: var(--ink-55); }

/* 首屏：文字为主，大标题、导语、操作，底部一行数字 */
/* 首屏：水彩背景铺满一屏并延伸到透明页头下方，标题与导语在上方留白处，输入框贴近下方 */
.hero { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; margin-top: calc(-1 * var(--hdr)); min-height: 100vh; min-height: 100svh; padding-block: calc(var(--hdr) + clamp(48px, 11vh, 136px)) clamp(96px, 18vh, 200px); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.hero-in { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero h1 { font-size: var(--title); line-height: 1.15; font-weight: 600; }
.hero-lead { margin: 20px 0 40px; font-size: var(--fs-lead); line-height: 1.7; color: var(--ink-70); max-width: 36em; text-wrap: balance; word-break: keep-all; } /* 中文只在标点与空格处换行，避免「负 / 责人」这类拆词 */
/* 向 venshine Agent 提问：输入框，发送后在浮层里打开会话 */
.ask { display: flex; align-items: center; gap: 8px; width: min(640px, 100%); margin-top: auto; padding: 6px 6px 6px 20px; border-radius: var(--r-card); background: rgba(255, 253, 248, .97); border: 1px solid var(--line); text-align: left; }
.ask:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ask input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); outline: none; }
.ask input::placeholder { color: var(--ink-55); }
.ask button { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-img); background: var(--accent); color: var(--ink); font-size: 20px; }
.ask button:hover { background: #D99430; }
/* 会话浮层：桌面居中窗口，手机铺满全屏 */
.ask-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ask-modal[hidden] { display: none; }
.ask-back { position: absolute; inset: 0; background: rgba(58, 50, 38, .45); }
.ask-panel { position: relative; display: flex; flex-direction: column; width: min(960px, 100%); height: min(780px, 100%); border-radius: var(--r-card); overflow: hidden; background: var(--bg); border: 1px solid var(--line); }
.ask-head { flex: none; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--line); font-size: var(--fs-body); }
.ask-x { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r-img); font-size: 20px; color: var(--ink); }
.ask-x:hover { background: var(--cream); }
.ask-panel iframe { flex: 1; width: 100%; border: 0; background: var(--bg); }

/* ===== 作品墙：按 katyowua6pxia.ok.kimi.link 的 Selected work 还原 =====
   列数和间距照搬参照站（<1024 两列、≥1024 三列；<640 间距 16、否则 24），版心沿用全局 --wrap。 */
.gallery { padding-block: var(--sec); }
.gallery h2 { font-size: var(--section); line-height: 1.2; font-weight: 600; color: var(--ink); }
.ink-underline { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 9 C 25 4, 55 3, 78 6 S 112 9, 118 6' fill='none' stroke='%23E8A33D' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 0 100%; background-size: 100% .32em; padding-bottom: .12em; }
.gallery .sub { margin-top: 16px; max-width: 36rem; font-size: var(--fs-body); line-height: 1.7; color: var(--ink-70); }
.mask-appear { overflow: hidden; display: block; }
.mask-appear-inner { display: block; transform: translateY(110%); transition: transform .9s cubic-bezier(.16, 1, .3, 1); }
.mask-appear.in .mask-appear-inner { transform: none; }
.masonry { margin-top: 48px; display: flex; gap: 24px; align-items: flex-start; }
.masonry .col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.tile-wrap { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .9s cubic-bezier(.16, 1, .3, 1); }
.tile-wrap.in { opacity: 1; transform: none; }
.work-tile { position: relative; display: block; width: 100%; overflow: hidden; border-radius: var(--r-img); background: var(--cream); outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .35s, transform .5s cubic-bezier(.16, 1, .3, 1); }
.work-tile img, .work-tile video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.work-tile video { position: absolute; inset: 0; opacity: 0; transition: opacity .35s, transform .7s cubic-bezier(.16, 1, .3, 1); }
.work-tile.playing video { opacity: 1; }
.work-tile:hover img, .work-tile:hover video { transform: scale(1.025); }
/* 竖屏作品统一成参照站竖图比例 1024:1416，手机录屏上下略裁 */
.work-tile.portrait { aspect-ratio: 1024 / 1416; }
.work-tile img, .work-tile video { position: absolute; inset: 0; }
.tile-caption { pointer-events: none; position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; background: linear-gradient(to top, rgba(38, 30, 20, .72), rgba(38, 30, 20, .12), transparent); opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s cubic-bezier(.16, 1, .3, 1); }
.tile-caption b { font-family: var(--display); font-size: 20px; font-weight: 500; line-height: 1.25; color: #FBF7EE; }
.tile-caption span { margin-top: 4px; font-size: 12.5px; letter-spacing: .025em; color: rgba(251, 247, 238, .85); }
.work-tile:focus-visible { outline-color: var(--accent); }
.work-tile:focus-visible .tile-caption { opacity: 1; transform: none; }
/* 触屏没有悬停：作品名常显 */
@media (hover: none) {
  .tile-caption { opacity: 1; transform: none; }
}
@media (hover: hover) {
  .work-tile:hover { outline-color: var(--accent); }
  .work-tile:hover .tile-caption { opacity: 1; transform: none; }
}
@media (max-width: 639px) {
  .masonry, .masonry .col { gap: 16px; }
  .tile-caption { padding: 16px; }
  .tile-caption b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile-wrap, .mask-appear-inner { opacity: 1; transform: none; transition: none; }
}

/* ===== 作品列表页 works.html：标题与计数、两行筛选、三列卡片 ===== */
.wl { padding-top: clamp(48px, 30px + 4vw, 96px); padding-bottom: var(--sec); }
.wl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.wl-head h1 { font-size: var(--title); line-height: 1.1; font-weight: 600; }
.wl-sub { margin-top: 16px; max-width: 36rem; font-size: 15.5px; line-height: 1.625; color: var(--ink-70); }
.wl-filters { margin-top: 40px; display: grid; gap: 14px; }
.wl-row { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; }
.wl-label { font-size: 14px; color: var(--ink-55); letter-spacing: .04em; }
.wl-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; outline: 1px solid var(--line); outline-offset: -1px; font-size: 14px; letter-spacing: .02em; transition: background-color .25s, outline-color .25s; }
.chip span { font-size: 12px; color: var(--ink-55); font-variant-numeric: tabular-nums; }
.chip:hover { outline-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); outline-color: var(--accent); }
.chip[aria-pressed="true"] span { color: var(--ink-70); }
.wl-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.wc { position: relative; display: flex; flex-direction: column; padding: 12px 12px 20px; border-radius: var(--r-card); background: #FFFDF8; outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color .35s, box-shadow .35s; }
.wc[hidden] { display: none; }
.wc-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-img); background: var(--cream); }
.wc-media img, .wc-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
/* 竖屏录屏在横向画框里完整显示，左右留奶油底 */
.wc-media.portrait img, .wc-media.portrait video { object-fit: contain; object-position: center; }
.wc-media video { opacity: 0; transition: opacity .35s, transform .7s cubic-bezier(.16, 1, .3, 1); }
.wc.playing video { opacity: 1; }
.wc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 8px 0; }
/* 「+N」按钮在铺满卡片的链接之上，点开显示全部语言 */
.tag-more { position: relative; z-index: 2; font-size: 12.5px; line-height: 1; padding: 6px 10px; border-radius: 999px; outline: 1px solid var(--line); outline-offset: -1px; color: var(--ink-70); transition: outline-color .25s; }
.tag-more:hover { outline-color: var(--accent); }
.tag-more::before { content: ""; position: absolute; inset: -8px -4px; }

.wc-tags span { font-size: 12.5px; line-height: 1; padding: 6px 10px; border-radius: 999px; outline: 1px solid var(--line); outline-offset: -1px; color: var(--ink-70); }
/* 状态标签（已上架、★ 1.4k、MIT 等）在最前，奶油底与语言标签区分 */
.wc-tags .st { background: var(--cream); outline-color: var(--cream); color: var(--ink); }
.wc h2 { margin: 14px 8px 0; font-size: 24px; line-height: 1.3; font-weight: 600; }
.wc h2 span { font-size: .72em; font-weight: 400; color: var(--ink-55); }
.wc-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--r-card); }
.wc-link:focus-visible { outline: none; }
.wc-link:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.wc p { margin: 8px 8px 0; font-size: 15px; line-height: 1.7; color: var(--ink-70); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wc-more { margin: auto 8px 0; padding-top: 18px; display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: 14px; letter-spacing: .02em; border-bottom: 2px solid transparent; transition: border-color .3s; }
@media (hover: hover) {
  .wc:hover { outline-color: var(--accent); box-shadow: 0 12px 32px -18px rgba(58, 50, 38, .35); }
  .wc:hover .wc-media img, .wc:hover .wc-media video { transform: scale(1.025); }
  .wc:hover .wc-more { border-bottom-color: var(--accent); }
  .wc:hover .wc-media.portrait img, .wc:hover .wc-media.portrait video { transform: none; }
}
.wl-empty { margin-top: 48px; display: grid; justify-items: start; gap: 20px; color: var(--ink-70); }
.wl-empty[hidden] { display: none; }
@media (max-width: 1023px) { .wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) {
  .wl-filters { margin-top: 28px; gap: 18px; }
  .wl-row { grid-template-columns: 1fr; gap: 8px; }
  .chip { padding: 0 13px; }
  .wl-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 32px; }
}
/* ===== Skills 页 skills.html：开场自述、技能地图、GitHub 成就、开源数据图表 ===== */
.sk { padding-top: clamp(48px, 30px + 4vw, 96px); padding-bottom: var(--sec); }
.sk-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px 64px; align-items: start; }
.sk-hero h1 { font-size: var(--title); line-height: 1.1; font-weight: 600; }
.sk-points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; max-width: 34em; }
.sk-points li { position: relative; padding-left: 22px; font-size: 16px; line-height: 1.8; color: var(--ink-70); }
.sk-points li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
/* 终端样式：奶油底、等宽字，与「会话」原型的 Porto 主题一致 */
.term { position: relative; border-radius: var(--r-img); background: var(--cream); font: 400 14px/1.75 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.term p { font-family: inherit; }
.term .cmd span { color: var(--ink-55); }
.term .out { color: var(--ink-70); }
.sk-whoami { padding: 24px 28px; }
.sk-whoami .cmd:not(:first-child) { margin-top: 14px; }
.sk-sec { padding-top: var(--sec); }
.sk-sec h2 { font-size: var(--section); line-height: 1.2; font-weight: 600; }
.sk-sub { margin-top: 12px; font-size: 15.5px; line-height: 1.625; color: var(--ink-70); max-width: 40em; }

/* 技能地图：左列分组列表，右列详情（宽屏吸顶） */
.skm { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 48px; align-items: start; }
.skm-group + .skm-group { margin-top: 28px; }
.skm-group > h3 { font-family: var(--font); font-size: 14px; font-weight: 500; color: var(--ink-55); letter-spacing: .04em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.skm-item { width: 100%; display: grid; grid-template-columns: 8em minmax(0, 1fr); gap: 4px 16px; align-items: baseline; text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; transition: background-color .25s; }
.skm-item b { font-family: var(--display); font-size: 19px; font-weight: 600; line-height: 1.35; }
.skm-item span { font-size: 13.5px; line-height: 1.5; color: var(--ink-55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skm-item:hover { background: #FFFDF8; }
.skm-item[aria-selected="true"] { background: var(--cream); box-shadow: inset 4px 0 0 var(--accent); }
.skm-side { position: sticky; top: calc(var(--hdr) + 24px); }
.skm-panel { padding: 28px 32px 32px; border-radius: var(--r-card); background: #FFFDF8; outline: 1px solid var(--line); outline-offset: -1px; }
.skm-group-name { font-size: 14px; color: var(--ink-55); }
.skm-panel h3 { margin-top: 4px; font-size: clamp(28px, 24px + 1vw, 36px); line-height: 1.25; font-weight: 600; }
.skm-desc { margin-top: 12px; font-size: 16px; line-height: 1.8; color: var(--ink-70); max-width: 38em; }
.skm-label { margin-top: 24px; font-size: 14px; color: var(--ink-55); }
.skm-works { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.skm-works a { display: grid; gap: 8px; }
.skm-works b { font-size: 14px; font-weight: 500; line-height: 1.4; }
.skm-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-img); background: var(--cream); outline: 2px solid transparent; outline-offset: -2px; transition: outline-color .3s; }
.skm-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.skm-thumb.portrait img { object-fit: contain; object-position: center; }
.skm-works a:hover .skm-thumb { outline-color: var(--accent); }

/* GitHub 成就：数字卡片与官方徽章（图片在 assets/github/，版权归 GitHub） */
.sk-nums { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.sk-num { display: grid; padding: 24px 28px; border-radius: var(--r-card); background: var(--cream); }
.sk-num b { font-family: var(--display); font-size: clamp(32px, 26px + 1.4vw, 44px); font-weight: 600; line-height: 1.15; }
.sk-num span { font-size: 15px; }
.sk-num small { margin-top: 6px; font-size: 13px; color: var(--ink-55); }
.sk-badges { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sk-badge { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 28px 20px 24px; text-align: center; border-radius: var(--r-card); background: #FFFDF8; outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color .3s; }
.sk-badge:hover { outline-color: var(--accent); }
.sk-medal { position: relative; width: 96px; height: 96px; margin-bottom: 10px; }
.sk-medal img { width: 96px; height: 96px; }
.sk-medal i { position: absolute; right: -6px; bottom: 2px; padding: 1px 8px; border-radius: 999px; background: #E6E9EE; outline: 2px solid #FFFDF8; font: 600 12.5px/1.6 var(--font); font-style: normal; color: #3A3F47; }
.sk-badge b { font-size: 16px; font-weight: 600; line-height: 1.35; }
.sk-badge small { font-size: 13.5px; line-height: 1.6; color: var(--ink-70); }

/* 图表：十二栏网格；配色经 dataviz 校验脚本检查（色阶单色相、深浅单调；分类色对卡片底色 ≥ 3:1） */
.charts { margin-top: 40px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.chart { margin: 0; padding: 24px 28px; border-radius: var(--r-card); background: #FFFDF8; outline: 1px solid var(--line); outline-offset: -1px; min-width: 0; }
.c-wide { grid-column: span 12; }
/* 主语言：宽屏时华夫格在左、图例在右 */
.c-lang { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); column-gap: 48px; align-items: center; }
.c-lang figcaption { grid-column: 1 / -1; }
.c-lang .legend { margin-top: 0; }
.chart figcaption { display: grid; gap: 2px; margin-bottom: 20px; }
.chart figcaption b { font-size: 16px; font-weight: 600; }
.chart figcaption span { font-size: 13.5px; line-height: 1.6; color: var(--ink-55); }
.ch-tip { position: fixed; z-index: 60; pointer-events: none; padding: 5px 10px; border-radius: 6px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.5; white-space: nowrap; }
.ch-tip[hidden] { display: none; }
/* 贡献日历 */
.cal-scroll { overflow-x: auto; padding-bottom: 4px; }
.cal { display: grid; grid-template-columns: 24px repeat(var(--weeks), minmax(11px, 1fr)); grid-template-rows: 18px repeat(7, auto); gap: 3px; min-width: calc(24px + var(--weeks) * 14px); font-size: 12px; color: var(--ink-55); }
.cal > span { line-height: 1; white-space: nowrap; align-self: center; }
.cal > i { aspect-ratio: 1; border-radius: 3px; }
.l0 { background: #EFE7D8; } .l1 { background: #DDAE5E; } .l2 { background: #C98A26; } .l3 { background: #9A6214; } .l4 { background: #5A380B; }
.cal > i:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.cal-legend { margin-top: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; color: var(--ink-55); }
.cal-legend i { width: 12px; height: 12px; border-radius: 3px; }
.cal-legend i:first-of-type { margin-left: 4px; } .cal-legend i:last-of-type { margin-right: 4px; }
/* 主语言华夫格 */
.waffle { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; max-width: 320px; }
.waffle i { aspect-ratio: 1; border-radius: 4px; }
.c1 { background: #B9771A; } .c2 { background: #3F7CC2; } .c3 { background: #5E9A2C; }
.waffle i:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; }
.legend li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.legend li > i { width: 12px; height: 12px; border-radius: 3px; align-self: center; }
.legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend small { width: 100%; padding-left: 20px; font-size: 12.5px; color: var(--ink-55); }

@media (max-width: 1023px) {
  .sk-hero, .skm { grid-template-columns: 1fr; }
  .skm-side { display: none; }
  .skm-panel { margin: 8px 0 12px; padding: 20px; }
  .sk-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .sk-whoami { padding: 18px; font-size: 13px; }
  .skm-item { grid-template-columns: 1fr; padding: 12px 10px; }
  .skm-works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sk-nums, .sk-badges { gap: 12px; }
  .sk-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 徽章为单数时最后一枚占满一行，不留半行空白 */
  .sk-badge:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .c-lang { display: block; }
  .c-lang .legend { margin-top: 18px; }
  .sk-num { padding: 18px 20px; }
  .sk-badge { padding: 20px 12px; }
  .chart { padding: 20px 16px; }
}

/* 首页作品墙下方的「查看全部作品」 */
.gallery .all { margin-top: 48px; display: flex; justify-content: center; }

/* 首页「技能与成就」入口：奶油底一行横排 */
.cream { background: var(--cream); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 48px; padding-block: 64px; }
.band h2 { font-size: var(--section); line-height: 1.2; font-weight: 600; }
.band p { margin-top: 8px; font-size: var(--fs-body); line-height: 1.7; color: var(--ink-70); max-width: 34em; }

/* 页脚 */
.ftr { background: var(--bg); }
.ftr .wrap { display: flex; align-items: center; padding-block: 24px; color: var(--foot); font-size: var(--fs-small); }
/* 回到顶部：琥珀描边的圆角方块，和按钮同一套 */
.totop { position: fixed; right: 16px; bottom: 24px; z-index: 40; width: 44px; height: 44px; border-radius: var(--r-img); background: var(--bg); color: var(--ink); outline: 1px solid var(--accent); outline-offset: -1px; display: grid; place-items: center; font-size: 20px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, background-color .3s; }
.totop.show { opacity: 1; visibility: visible; }
.totop:hover { background: var(--accent); }
.totop .ico { stroke-width: 1.75; }

/* 关于页：直接嵌入 venshine Agent 会话 */
.about { padding-block: 24px 40px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
.about-me { padding-top: clamp(16px, 4vh, 56px); }
.about-me h1 { font-size: var(--title); line-height: 1.15; font-weight: 600; }
.about-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 1023px) { .about { grid-template-columns: 1fr; gap: 32px; } .about-me { padding-top: 24px; } }
.about .chat { height: calc(100svh - var(--hdr) - 48px); min-height: 560px; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.about iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ===== 作品详情页：左信息右演示 → 导语 → 截图 → 功能卡片 → 特色 → 上一个 / 下一个 ===== */
.d-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px 64px; align-items: center; padding-block: 64px; }
.d-crumb { font-size: var(--fs-small); color: var(--ink-55); }
.d-crumb a { color: var(--ink-70); border-bottom: 1px solid var(--accent-line); }
.d-crumb a:hover { border-bottom-color: var(--accent); }
.d-tags { margin: 16px 0 0; }
.d-top h1 { margin-top: 12px; font-size: var(--title); line-height: 1.1; font-weight: 600; overflow-wrap: anywhere; }
.d-top h1 small { display: block; margin-top: 8px; font-family: var(--font); font-size: var(--fs-lead); line-height: 1.3; font-weight: 400; color: var(--ink-55); }
.d-tag { margin-top: 12px; font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-70); }
.d-meta { margin: 32px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 24px; font-size: 15px; line-height: 1.6; }
.d-meta dt { color: var(--ink-55); }
.d-meta dd { margin: 0; }
.d-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.d-links .muted { font-size: var(--fs-small); color: var(--ink-55); }
.d-demo { margin: 0; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-card); background: var(--cream); }
.d-demo.portrait { aspect-ratio: 4 / 3; }
.d-demo video { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.d-demo.portrait video { object-fit: contain; object-position: center; }
.d-overview { padding-block: 32px 64px; }
.d-overview p { font-size: var(--fs-lead); line-height: 1.7; max-width: 38em; }
.d-gal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: var(--sec); }
.d-gal figure { margin: 0; aspect-ratio: 16 / 10; background: var(--cream); overflow: hidden; position: relative; border-radius: var(--r-img); }
.d-gal img, .d-gal video { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.d-gal .contain img, .d-gal .contain video { object-fit: contain; object-position: center; }
.d-gal.one { grid-template-columns: 1fr; }
.d-gal.one figure { aspect-ratio: 2 / 1; }
.d-feats { padding-bottom: var(--sec); }
.d-feats h2 { font-size: var(--section); line-height: 1.2; font-weight: 600; }
.d-feat-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.d-feat { padding: 12px 12px 24px; border-radius: var(--r-card); background: #FFFDF8; outline: 1px solid var(--line); outline-offset: -1px; }
.d-feat .pic { aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-img); background: var(--cream); }
.d-feat .pic img, .d-feat .pic video { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.d-feat .pic.contain img, .d-feat .pic.contain video { object-fit: contain; object-position: center; }
.d-feat h3 { margin: 16px 8px 0; font-size: 22px; line-height: 1.35; font-weight: 600; }
.d-feat p { margin: 8px 8px 0; font-size: 15px; line-height: 1.7; color: var(--ink-70); }
.d-feat.text-only { padding: 24px 20px; }
.d-feat.text-only h3 { margin-top: 0; }
.d-feat.wide { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr auto auto 1fr; column-gap: 32px; padding-bottom: 12px; }
.d-feat.wide .pic { grid-row: 1 / -1; }
.d-feat.wide h3 { grid-column: 2; grid-row: 2; margin: 0 24px 0 0; }
.d-feat.wide p { grid-column: 2; grid-row: 3; align-self: start; margin: 8px 24px 0 0; }
/* 引言：奶油底卡片，琥珀色引号是图形（SVG 填充），文字保持墨色 */
.d-hl { padding-bottom: var(--sec); }
.d-hl h2 { font-size: var(--section); line-height: 1.2; font-weight: 600; }
.d-hl ul { margin-top: 32px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.d-hl li { padding-top: 20px; border-top: 2px solid var(--accent); }
.d-hl b { display: block; font-size: 22px; line-height: 1.35; font-weight: 600; }
.d-hl p { margin-top: 8px; font-size: var(--fs-body); line-height: 1.7; color: var(--ink-70); }
/* 上一个 / 下一个：带缩略图的两张卡片 */
.d-next { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: var(--sec); }
.d-nav { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 16px; padding: 12px; border-radius: var(--r-card); background: #FFFDF8; outline: 1px solid var(--line); outline-offset: -1px; transition: outline-color .3s; }
.d-nav:hover { outline-color: var(--accent); }
.d-nav.next { grid-template-columns: minmax(0, 1fr) 128px; text-align: right; }
.d-nav.next .d-thumb { order: 2; }
.d-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--r-img); background: var(--cream); }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.d-thumb.portrait img { object-fit: contain; object-position: center; }
.d-nav small { display: block; font-size: var(--fs-small); color: var(--ink-55); }
.d-nav b { display: block; margin-top: 4px; font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }

/* 进入视口时淡入上移 */
.rv { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 1023px) {
  .d-top { grid-template-columns: 1fr; gap: 32px; padding-block: 48px; }
}
@media (max-width: 767px) {
  .about { padding-block: 12px 24px; }
  :root { --hdr: 64px; --sec: 64px; --fs-lead: 18px; }
  .about .chat { height: calc(100svh - var(--hdr) - 32px); min-height: 480px; }
  .hdr .wrap { grid-template-columns: 1fr auto; }
  .nav, .acts { display: none; }
  .logo { font-size: 20px; }
  .burger { display: inline-flex; }
  .hero { padding-block: calc(var(--hdr) + 48px) clamp(96px, 18vh, 200px); }
  .ask-modal { padding: 0; }
  .ask-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
  .band .wrap { padding-block: 48px; }
  .d-top { padding-block: 32px; }
  .d-overview { padding-block: 16px 48px; }
  .d-gal, .d-feat-grid, .d-next { grid-template-columns: 1fr; gap: 16px; }
  .d-feat.wide { display: block; padding-bottom: 24px; }
  .d-feat.wide h3 { margin: 16px 8px 0; }
  .d-feat.wide p { margin: 8px 8px 0; }
  .d-hl ul { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
  .d-nav, .d-nav.next { grid-template-columns: 96px minmax(0, 1fr); text-align: left; }
  .d-nav.next .d-thumb { order: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 触控热区：小图标和文字链接外观不变，点击区扩到约 44px */
.logo, .burger, .acts .soc, .nav > a, .d-crumb a { position: relative; }
.burger::before, .acts .soc::before { content: ""; position: absolute; inset: -10px; }
.nav > a::before { content: ""; position: absolute; inset: -8px -6px; }
.d-crumb a::before { content: ""; position: absolute; inset: -12px -4px; }
.logo::before { content: ""; position: absolute; inset: -10px 0; }
/* 手机菜单打开时锁住背景页 */
html.menu-open, html.menu-open body, html.modal-open, html.modal-open body { overflow: hidden; }
/* 贡献日历：窄屏横向滑动，左侧渐隐提示还有更早的数据 */
.cal-hint { display: none; margin-top: 8px; font-size: 12px; color: var(--ink-55); }
@media (max-width: 639px) {
  .cal-scroll { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px); mask-image: linear-gradient(to right, transparent, #000 48px); }
  .cal-hint { display: block; }
}

/* ===== 404.css ===== */
/* 404 页：只放页面专属补充，其余沿用全站样式 */
.nf { padding-block: clamp(64px, 40px + 6vw, 140px); min-height: 50svh; }
.nf h1 { font-size: var(--title); line-height: 1.15; font-weight: 600; }
.nf p { margin-top: 24px; font-size: 16px; line-height: 1.8; color: var(--ink-70); max-width: 34em; }
.nf-links { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== chat.css ===== */
/* 会话页（/about/chat/）：Porto 主题的嵌入模式。全部限定在 .chat-page 下，避免影响其他页面；
   与全站同名的类（card、acts、term、out、cmd）改了名：cc、cc-acts、cterm、c-out、c-cmd。 */
.chat-page {
  --mute: #6A7280; --blue: #B9771A; --teal: #E8A33D; --tool: #F3EADB; --line: #E9DFCC; --term: #FBF7EE;
  margin: 0; background: var(--term); color: var(--ink); font: 400 16px/1.75 var(--font);
}
.chat-page :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.chat-page .chat-main { max-width: none; padding: 0; }

/* 终端窗口（嵌入时铺满 iframe） */
.chat-page .cterm { background: var(--term); border: 0; border-radius: 0; margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.chat-page .tbar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12.5px var(--mono); color: var(--mute); position: sticky; top: 0; background: rgba(251, 247, 238, .92); backdrop-filter: blur(8px); z-index: 5; }
.chat-page .tbar i { width: 11px; height: 11px; border-radius: 50%; background: #D6DAE1; }
.chat-page .tbar span { margin-left: 8px; }
.chat-page .tbar button { margin-left: auto; font: 12px var(--mono); border: 1px solid var(--line); padding: 4px 10px; border-radius: 6px; color: var(--ink); }
.chat-page .tbar button:disabled { color: var(--mute); cursor: default; }
.chat-page .log { padding: clamp(20px, 3vw, 40px); flex: 1; }

/* 首行欢迎块：项目路径和可问的问题 */
.chat-page .welcome { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 28px; font: 13px/1.7 var(--mono); color: var(--mute); max-width: 860px; margin-bottom: 28px; }
.chat-page .welcome .big { font: 700 clamp(28px, 4vw, 44px)/1 var(--mono); color: var(--ink); letter-spacing: -0.04em; align-self: center; }
.chat-page .welcome b { color: var(--ink); font-weight: 500; }

.chat-page .turn { margin-bottom: 30px; }
.chat-page .user { font: 15px/1.6 var(--mono); background: var(--tool); border-radius: 10px; padding: 10px 14px; display: inline-flex; gap: 10px; max-width: 100%; }
.chat-page .user::before { content: ">"; color: var(--blue); font-weight: 700; }
.chat-page .say { margin: 16px 0 0; padding-left: 24px; position: relative; max-width: 45em; }
.chat-page .say::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.chat-page .say .caret { display: inline-block; width: .55em; height: 1.1em; background: var(--ink); vertical-align: -.2em; margin-left: 2px; animation: chat-blink 1s steps(1) infinite; }
@keyframes chat-blink { 50% { opacity: 0; } }

.chat-page .tool { margin: 14px 0 0; padding-left: 24px; position: relative; font: 13.5px/1.65 var(--mono); }
.chat-page .tool::before { content: ""; position: absolute; left: 4px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.chat-page .tool.running::before { background: none; border: 2px solid var(--teal); border-right-color: transparent; width: 10px; height: 10px; left: 3px; animation: chat-spin .7s linear infinite; }
@keyframes chat-spin { to { transform: rotate(360deg); } }
.chat-page .tool .name { font-weight: 700; }
.chat-page .tool .c-cmd { color: var(--mute); word-break: break-all; }
.chat-page .tool .c-out { margin: 4px 0 0; padding-left: 22px; position: relative; color: var(--mute); white-space: pre; overflow-x: auto; }
.chat-page .tool .c-out::before { content: "⎿"; position: absolute; left: 2px; top: 0; }
.chat-page .tool .c-out b { color: var(--ink); font-weight: 500; }

.chat-page .result { margin: 16px 0 0 24px; }
.chat-page .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.chat-page .cc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.chat-page .cc .media { position: relative; background: var(--tool); }
.chat-page .cc .media img, .chat-page .cc .media video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.chat-page .cc.phone .media { display: grid; place-items: center; padding: 16px 0; }
.chat-page .cc.phone .media img, .chat-page .cc.phone .media video { width: auto; height: 300px; aspect-ratio: auto; border-radius: 16px; border: 5px solid var(--ink); }
.chat-page .cc .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.chat-page .cc h3 { margin: 0; font: 700 16px/1.3 var(--mono); display: flex; justify-content: space-between; gap: 8px; }
.chat-page .cc h3 small { font-weight: 500; color: var(--mute); font-size: 13px; white-space: nowrap; }
.chat-page .cc p { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.65; }
.chat-page .cc-acts { margin-top: auto; padding-top: 8px; display: flex; gap: 14px; flex-wrap: wrap; font: 13px var(--mono); }
.chat-page .cc-acts a { color: var(--blue); }
.chat-page .cc-acts a:hover { text-decoration: underline; }
.chat-page .cc-acts span { color: var(--mute); }
.chat-page .play { position: absolute; left: 10px; bottom: 10px; border-radius: 6px; padding: 5px 10px; background: #E8A33D; color: var(--ink); font: 12px var(--mono); }
.chat-page .play[hidden] { display: none; }
.chat-page .stats { display: flex; flex-wrap: wrap; gap: 12px; }
.chat-page .stats div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; min-width: 120px; }
.chat-page .stats b { display: block; font: 700 26px/1.2 var(--mono); letter-spacing: -0.03em; }
.chat-page .stats span { font-size: 13px; color: var(--mute); }
.chat-page .app .shots { display: flex; gap: 8px; overflow-x: auto; padding: 12px; background: var(--tool); }
.chat-page .app .shots img { height: 190px; width: auto; max-width: none; border-radius: 8px; border: 1px solid var(--line); }
.chat-page .app .head { display: flex; gap: 12px; align-items: center; }
.chat-page .app .head img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }

.chat-page .chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0 24px; }
.chat-page .chips button { font: 13px var(--mono); border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 14px; color: var(--ink); }
.chat-page .chips button:hover { border-color: var(--ink); }
.chat-page .chips button[disabled] { color: var(--mute); text-decoration: line-through; cursor: default; }

/* 输入框 */
.chat-page .prompt { border-top: 1px solid var(--line); padding: 14px clamp(20px, 3vw, 40px) 18px; position: sticky; bottom: 0; background: rgba(251, 247, 238, .95); backdrop-filter: blur(8px); }
.chat-page .prompt form { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 8px 14px; }
.chat-page .prompt form::before { content: ">"; font: 700 15px var(--mono); color: var(--blue); }
.chat-page .prompt input { flex: 1; min-width: 0; border: 0; outline: none; font: 15px var(--mono); background: none; color: var(--ink); }
.chat-page .prompt button { font: 13px var(--mono); border: 0; background: #E8A33D; color: var(--ink); border-radius: 7px; padding: 6px 12px; }

.chat-page .fade { animation: chat-fade .45s ease both; }
@keyframes chat-fade { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .chat-page .fade, .chat-page .say .caret, .chat-page .tool.running::before { animation: none; } }
@media (max-width: 640px) {
  .chat-page .welcome { grid-template-columns: minmax(0, 1fr); }
  .chat-page .welcome .big { grid-row: auto; }
  .chat-page .result, .chat-page .chips { margin-left: 0; }
  .chat-page .cc.phone .media img, .chat-page .cc.phone .media video { height: 240px; }
  .chat-page .tbar span { display: none; }
}
