/* 同一布局使用共享语义色板，日间为冷白棱镜，夜间为深蓝光场。 */
:root {
  --light-bg: var(--bg);
  --light-ink: var(--text);
  --light-muted: var(--muted);
  --light-line: var(--line);
  --light-accent: var(--blue);
  --light-font: "Segoe UI", "Microsoft YaHei", sans-serif;
  /* 浪尖与导航之间留出少量安全距离，不拉伸背景或改变浪潮比例。 */
  --scene-top-gap: 24px;
}
:root, :root[data-theme="dark"] {
  --hero-gradient: linear-gradient(110deg, #77ddff 12%, #9cafff 66%, #c195ff 100%);
  --hero-title-shadow: 0 2px 26px rgba(2,7,18,.65);
  /* 薄底色透出光场；正文使用较厚的磨砂层，嵌套卡片只轻微着色。 */
  --surface-glass: rgba(18,30,50,.24);
  --surface-panel: rgba(8,17,32,.69);
  --surface-hover: rgba(171,211,255,.09);
  --surface-header: rgba(8,15,28,.52);
  --surface-footer: rgba(8,15,28,.38);
  --control-bg: rgba(30,51,78,.42);
  --control-hover: rgba(83,121,167,.28);
  --input-bg: rgba(7,16,31,.44);
  --dialog-bg: rgba(12,23,41,.66);
  --dialog-backdrop: rgba(2,7,17,.28);
  --entry-ice: linear-gradient(145deg, rgba(21,45,65,.46), rgba(9,20,37,.34));
  --entry-electric: linear-gradient(145deg, rgba(28,43,73,.46), rgba(10,19,37,.34));
  --entry-violet: linear-gradient(145deg, rgba(44,34,71,.46), rgba(15,19,37,.34));
  --knowledge-surface: linear-gradient(120deg, rgba(15,27,47,.46), rgba(8,17,33,.36));
  --bookmark-surface: linear-gradient(135deg, rgba(22,41,62,.46), rgba(19,24,44,.36));
  --glass-wash: linear-gradient(145deg, rgba(231,243,255,.085), rgba(166,200,247,.012) 42%, rgba(175,210,255,.055));
  --glass-border: rgba(188,214,250,.2);
  --glass-rim: linear-gradient(135deg, rgba(234,248,255,.7), rgba(174,211,255,.12) 25%, rgba(151,178,245,.035) 50%, rgba(139,196,255,.32) 76%, rgba(235,245,255,.42));
  --glass-shadow: 0 16px 45px rgba(0,4,15,.22), inset 0 1px 0 rgba(240,248,255,.13), inset 0 -1px 0 rgba(173,206,255,.055);
  --glass-brightness: .72;
  --glass-muted: #c5d4e8;
  --glass-text-shadow: 0 1px 3px rgba(2,8,20,.38);
  --glass-fallback: #111e32;
  --paw-gradient: linear-gradient(140deg, #83dcff, #b29bff);
  --paw-shadow: drop-shadow(0 0 5px rgba(115,190,255,.4));
  /* 海天层次保留完整亮度，阅读页只退后少许；正文由自己的玻璃底承托。 */
  --scene-image-opacity: 1;
  --scene-page-image-opacity: .8;
  --scene-canvas-opacity: 1;
  --scene-page-canvas-opacity: .8;
  --scene-image-mask: none;
  --scene-mobile-mask: none;
  --tide-scrim: linear-gradient(90deg, rgba(6,9,20,.08), transparent 62%);
  --tide-label-shadow: 0 1px 3px rgba(6,9,20,.95), 0 0 12px rgba(6,9,20,.8);
}

:root[data-theme="light"] {
  --hero-gradient: linear-gradient(110deg, #087fbe 12%, #3657d6 62%, #7643c6 100%);
  --hero-title-shadow: 0 2px 26px rgba(246,251,255,.8);
  /* 日间保留清透冷白与淡蓝折射，避免面板变成灰色或实心白块。 */
  --surface-glass: rgba(248,253,255,.24);
  --surface-panel: rgba(248,252,255,.69);
  --surface-hover: rgba(249,253,255,.45);
  --surface-header: rgba(245,251,255,.52);
  --surface-footer: rgba(239,248,255,.4);
  --control-bg: rgba(248,252,255,.48);
  --control-hover: rgba(216,233,255,.62);
  --input-bg: rgba(248,252,255,.52);
  --dialog-bg: rgba(245,251,255,.7);
  --dialog-backdrop: rgba(25,54,97,.15);
  --entry-ice: linear-gradient(145deg, rgba(252,255,255,.5), rgba(202,232,252,.29));
  --entry-electric: linear-gradient(145deg, rgba(251,253,255,.5), rgba(212,225,252,.29));
  --entry-violet: linear-gradient(145deg, rgba(254,252,255,.5), rgba(229,219,250,.29));
  --knowledge-surface: linear-gradient(120deg, rgba(239,250,255,.38), rgba(248,252,255,.22));
  --bookmark-surface: linear-gradient(135deg, rgba(228,246,255,.42), rgba(249,243,255,.26));
  --glass-wash: linear-gradient(145deg, rgba(255,255,255,.2), rgba(255,255,255,.02) 42%, rgba(221,236,255,.08));
  --glass-border: rgba(142,171,207,.28);
  --glass-rim: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.48) 26%, rgba(179,203,235,.06) 50%, rgba(158,192,233,.36) 76%, rgba(255,255,255,.86));
  --glass-shadow: 0 16px 45px rgba(54,91,148,.1), inset 0 1px 0 rgba(255,255,255,.7), inset 0 -1px 0 rgba(255,255,255,.25);
  --glass-brightness: 1.03;
  --glass-muted: #344d70;
  --glass-text-shadow: 0 1px 2px rgba(255,255,255,.32);
  --glass-fallback: #eff6ff;
  --paw-gradient: linear-gradient(140deg, #2762b9, #7850bd);
  --paw-shadow: none;
  --scene-image-opacity: 1;
  --scene-page-image-opacity: .85;
  --scene-canvas-opacity: 1;
  --scene-page-canvas-opacity: .85;
  --scene-image-mask: none;
  --scene-mobile-mask: none;
  --tide-scrim: linear-gradient(90deg, rgba(237,245,255,.04), transparent 62%);
  --tide-label-shadow: 0 1px 3px rgba(245,250,255,.95), 0 0 12px rgba(245,250,255,.85);
}

body { isolation: isolate; background: var(--light-bg); color: var(--light-ink); }
button { -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .48; }
img { max-width: 100%; }
/* 单色功能图标按主题反转；图片与站点图标保持原色。 */
img[src^="assets/icons/"] { filter: var(--icon-filter); }
input::placeholder { color: var(--placeholder); opacity: 1; }
input { caret-color: var(--focus); }
::selection { color: var(--selection-text); background: var(--selection-bg); }
main, .site-footer { position: relative; z-index: 1; }
.site-light-background { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
/* 仅在文字侧加轻薄遮光层，海浪和雾光仍能贯穿全部页面。 */
.site-light-background::after { content: ""; position: absolute; inset: 0; background: var(--tide-scrim); pointer-events: none; }
.global-scene-fallback { position: absolute; inset: var(--scene-top-gap) 0 auto; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--scene-position-x, 50%) top; opacity: var(--scene-image-opacity); mask-image: var(--scene-image-mask); transition: opacity .8s; }
#light-canvas { display: block; position: absolute; inset: var(--scene-top-gap) 0 auto; width: 100%; height: 100%; opacity: 0; transition: opacity 1s; }
.site-light-background[data-state="ready"] #light-canvas { opacity: var(--scene-canvas-opacity); }
/* 实时背景首帧呈现后才隐藏静态底图，加载失败时继续保留主题图片。 */
.site-light-background[data-state="ready"][data-ambient="ready"] .global-scene-fallback { opacity: 0; }
body:not([data-page="home"]) .global-scene-fallback { opacity: var(--scene-page-image-opacity); }
body:not([data-page="home"]) .site-light-background[data-state="ready"][data-ambient="ready"] .global-scene-fallback { opacity: 0; }
body:not([data-page="home"]) .site-light-background[data-state="ready"] #light-canvas { opacity: var(--scene-page-canvas-opacity); }
.light-container { width: min(1320px, calc(100% - 112px)); margin-inline: auto; }
/* 导航悬浮于光场之上，只保留实际入口与搜索。 */
.site-header { min-height: 80px; padding-inline: 48px; border-color: var(--line); background: var(--surface-header); backdrop-filter: blur(24px); box-shadow: var(--header-shadow); }
.brand { font: 600 27px/1.1 Georgia, "Times New Roman", serif; letter-spacing: -1.2px; color: var(--text); }
.nav-links { gap: 22px; }
.nav-links a { position: relative; padding: 10px 7px; border-radius: 8px; color: var(--control-text); font-size: 13px; }
.nav-links a:hover { background: var(--control-hover); color: var(--blue); }
.nav-links a.is-active { background: transparent; color: var(--blue); }
.nav-links a.is-active::after { content: ""; position: absolute; width: 17px; height: 2px; background: var(--blue); border-radius: 2px; left: calc(50% - 8.5px); bottom: 3px; box-shadow: 0 0 9px var(--blue-soft); }
.header-search { display: inline-flex; align-items: center; gap: 9px; padding: 9px 0 9px 17px; border: 0; border-left: 1px solid var(--light-line); background: none; color: var(--control-text); cursor: pointer; font-size: 12px; }
.header-search kbd { border: 1px solid var(--light-line); border-radius: 5px; padding: 1px 5px; font: 10px/1.7 var(--mono); }
.light-hero { position: relative; overflow: hidden; background: transparent; border-bottom: 1px solid var(--line); }
.hero-layout { display: grid; grid-template-columns: 47% 53%; align-items: center; min-height: 640px; }
.hero-copy { position: relative; z-index: 2; padding-block: 55px 44px; }
.hero-copy h1 { margin: 0; font: 750 clamp(54px, 5.2vw, 82px)/1.22 var(--light-font); letter-spacing: -4.5px; color: var(--text); text-shadow: var(--hero-title-shadow); }
/* 渐变字取消继承的暗色阴影，避免阴影盖住冰蓝高光。 */
/* 两行共用一段流光行程；底字始终可读，光带依次走过逗号和句号。 */
/* 日间深底字配珍珠亮光，夜间浅底字配湖蓝与淡金，整句流光保持明显对比。 */
#light-title { color: #dee9eb; --title-flow-blue: #2585a8; --title-flow-green: #63caaa; --title-flow-gold: #ffe4ad; }
:root[data-theme="light"] #light-title { color: #35576b; --title-flow-blue: #cef4ff; --title-flow-green: #d2f1de; --title-flow-gold: #fff0c6; }
.hero-title-line { display: inline-block; position: relative; white-space: nowrap; }
.hero-title-flow { position: absolute; inset: 0; pointer-events: none; text-shadow: none; }
.hero-title-flow::before {
  content: attr(data-text);
  display: block;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* 光带以整句字宽为重复周期，句末仍在流动时下一段已从句首进入。 */
  background-image: linear-gradient(90deg, transparent 0px, var(--title-flow-blue) calc(var(--title-band, 90px) * .24), var(--title-flow-green) calc(var(--title-band, 90px) * .50), var(--title-flow-gold) calc(var(--title-band, 90px) * .73), transparent var(--title-band, 90px), transparent 100%);
  background-size: var(--title-loop, 400px) 100%;
  background-repeat: repeat-x;
  background-position: -200px 0;
  background-clip: text;
  -webkit-background-clip: text;
}
/* 浅色流光经过白云时用细湖蓝边缘保住字形，不遮挡光带内部的颜色。 */
:root[data-theme="light"] .hero-title-flow::before { -webkit-text-stroke: .45px rgba(53,87,107,.46); }
#light-title[data-flow-ready="true"] .hero-title-flow::before { animation: title-light-travel 9s linear infinite; }
#light-title[data-flow-paused="true"] .hero-title-flow::before { animation-play-state: paused; }
@keyframes title-light-travel {
  0% { background-position: var(--title-start) 0; }
  100% { background-position: var(--title-end) 0; }
}
@media (prefers-reduced-motion: reduce), (forced-colors: active) {
  #light-title .hero-title-flow { display: none; }
}
.hero-description { color: var(--muted); font-size: 15px; line-height: 1.95; margin: 29px 0 31px; letter-spacing: .7px; }
.hero-description > span { display: block; }
.light-actions { display: flex; align-items: center; gap: 21px; flex-wrap: wrap; }
.light-button { min-height: 49px; padding: 14px 21px; display: inline-flex; align-items: center; justify-content: center; gap: 19px; border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.light-button img { width: 18px; height: 18px; }
.light-button.primary { background: var(--primary-bg); color: var(--primary-text); border-color: var(--primary-border); box-shadow: var(--primary-shadow); }
.light-button.primary img { filter: var(--primary-icon-filter); }
.light-button.primary:hover { transform: translateY(-2px); box-shadow: var(--primary-hover-shadow); }
.light-button.quiet { padding-inline: 0; background: none; color: var(--reading-text); gap: 9px; font-weight: 500; }
.light-button.quiet:hover { color: var(--blue); transform: translateX(2px); }
/* 紧凑记录列表与光核并列，真实内容始终先于手机上的装置留白。 */
.hero-latest { --glass-blur: 10px; display: block; max-width: 440px; border: 1px solid var(--glass-border); border-radius: 16px; margin-top: 30px; padding: 12px 14px 4px; }
.mini-label { display: block; font-size: 11px; font-weight: 500; line-height: 1.5; color: var(--muted); margin: 0 0 4px; }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li + li { border-top: 1px solid var(--line); }
/* 紧凑列表借用面板内留白，亮边离开文字而不挤窄标题。 */
.latest-link { display: grid; grid-template-columns: auto minmax(0, 1fr) 14px; align-items: center; gap: 11px; min-height: 44px; margin-inline: -8px; padding: 9px 8px; border-radius: 7px; }
.latest-kind { font-size: 10px; color: var(--blue); }
.latest-title { min-width: 0; font-size: 13px; line-height: 1.65; color: var(--text); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.latest-link > img { width: 14px; height: 14px; opacity: .8; }
.latest-link:hover .latest-title, .latest-link:focus-visible .latest-title { color: var(--blue); }
/* 首页右侧给玻璃浪潮留白，实际光场由全站画布统一管理。 */
.light-installation { position: relative; min-width: 0; height: 610px; margin-right: -34px; pointer-events: none; }
/* 玻璃底铺满横条，内层只负责文字对齐，不在两侧形成截断的色块。 */
.hero-foot-band { border-top: 1px solid var(--line); background: var(--surface-header); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hero-foot { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; gap: 20px; font-size: 11px; color: var(--muted); }
.hero-topics { display: flex; align-items: center; gap: 19px; }
.hero-topics span { opacity: .35; }
.hero-topics a:hover { color: var(--blue); }
.scroll-link { display: inline-flex; align-items: center; gap: 9px; }
.scroll-link img { width: 13px; height: 13px; opacity: .7; }
.light-section { padding-block: 62px 65px; }
.light-section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
/* 湖水加深后，裸露的分区标题用薄玻璃承托，日夜小字都保持清晰。 */
.light-section > .light-section-head { padding: 12px 16px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--surface-header); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); text-shadow: none; }
.light-section-head h2, .topic-intro h2 { margin: 0; font-weight: 650; font-size: 29px; line-height: 1.45; letter-spacing: -.7px; }
.section-count { display: inline-block; vertical-align: top; font: 11px var(--mono); margin: 5px 0 0 12px; color: var(--muted); }
.view-all { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; padding-block: 5px; }
.view-all img { width: 16px; height: 16px; }
.view-all:hover { color: var(--blue); }
.light-entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
/* 卡片边缘承接冷色折射，正文区域保持稳定对比度。 */
.light-entry { position: relative; display: flex; flex-direction: column; min-height: 265px; padding: 27px 25px 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-glass); box-shadow: inset 0 1px 0 var(--inset-highlight), var(--card-shadow); backdrop-filter: blur(17px); transition: transform .25s, box-shadow .25s, border-color .25s; overflow: hidden; }
.light-entry::before { content: ""; position: absolute; inset: 0 17% auto; height: 1px; background: linear-gradient(90deg, transparent, var(--blue), transparent); }
.light-entry:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--card-hover-shadow), inset 0 1px 0 var(--inset-highlight); }
.tone-ice { background: var(--entry-ice); }
.tone-electric { background: var(--entry-electric); }
.tone-violet { background: var(--entry-violet); }
.entry-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--blue); margin-bottom: 24px; }
.entry-copy h3 { font-size: 18px; line-height: 1.6; font-weight: 650; margin: 0 0 12px; letter-spacing: -.2px; color: var(--text); }
.entry-copy p { margin: 0 0 24px; font-size: 13px; line-height: 1.85; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; color: var(--muted); font: 10px/1.6 var(--mono); }
.entry-arrow { width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; background: var(--control-bg); }
.entry-arrow img { width: 15px; height: 15px; opacity: .8; }
.light-entry:hover .entry-arrow { background: var(--control-hover); border-color: var(--line-strong); }
.knowledge-section { display: grid; grid-template-columns: 37% 63%; padding: 39px; border: 1px solid var(--line); border-radius: 19px; background: var(--knowledge-surface); box-shadow: inset 0 1px 0 var(--inset-highlight); backdrop-filter: blur(20px); }
.topic-intro { padding: 11px 15px 0 0; }
.topic-intro h2 { font-size: 32px; line-height: 1.6; }
.topic-intro .view-all { margin-top: 26px; }
.light-topic { display: grid; grid-template-columns: minmax(0, 1fr) auto 17px; align-items: center; gap: 21px; padding: 20px 12px; border-bottom: 1px solid var(--light-line); border-radius: 7px; transition: transform .2s, background .2s; }
.light-topic:last-child { border-bottom: 0; }
.light-topic h3 { margin: 0 0 5px; font-size: 16px; font-weight: 600; }
.light-topic p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.light-topic-count { font: 11px var(--mono); color: var(--muted); white-space: nowrap; }
.light-topic > img { width: 16px; height: 16px; opacity: .7; }
.light-topic:hover { transform: translateX(4px); background: var(--surface-hover); }
.notes-bookmarks { display: grid; grid-template-columns: 1.3fr 1fr; gap: 62px; padding-block: 66px 80px; }
/* 笔记的小字不直接压在流动亮水纹上，以日夜磨砂承托，和右侧收藏保持统一。 */
.notes-column {
  padding: 28px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: var(--surface-panel);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(110%) brightness(var(--glass-brightness));
  backdrop-filter: blur(18px) saturate(110%) brightness(var(--glass-brightness));
  --muted: var(--glass-muted);
}
/* 裸露的分区标题与导航文字保持清晰边缘，不对整个海面增加暗层。 */
.light-section-head, .hero-foot { text-shadow: var(--tide-label-shadow); }
.light-section-head .view-all, .hero-foot { color: var(--reading-text); }
.notes-bookmarks h2 { font-size: 26px; }
/* 笔记保留原文字列宽；首尾也留出边内距离，避免亮框紧贴标签和日期。 */
.light-note { display: block; margin-inline: -12px; border-bottom: 1px solid var(--light-line); border-radius: 9px; padding: 19px 12px 20px; }
.light-note:first-child { padding-top: 12px; }
.light-note:last-child { border-bottom: 0; padding-bottom: 12px; }
.note-type { font-size: 11px; color: var(--blue); }
.light-note h3 { font-size: 16px; font-weight: 550; margin: 8px 0 12px; line-height: 1.65; }
.light-note:hover h3 { color: var(--blue); }
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font: 10px var(--mono); }
.note-meta > span { display: flex; align-items: center; gap: 7px; }
.note-dot { width: 4px; height: 4px; background: var(--blue); border-radius: 50%; }
.bookmarks-column { padding: 30px; align-self: start; background: var(--bookmark-surface); border-radius: 16px; border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--inset-highlight), var(--card-shadow); backdrop-filter: blur(17px); scroll-margin-top: 110px; }
.section-icon { width: 22px; height: 22px; opacity: .6; }
.bookmarks-column .light-section-head { margin-bottom: 25px; }
/* 旧收藏条目沿用同样的边内距离，真实收藏组件仍由自身样式控制。 */
.bookmark-link { display: flex; align-items: center; gap: 14px; margin-inline: -12px; padding: 18px 12px; border-top: 1px solid var(--line); border-radius: 9px; }
.bookmark-link:last-child { padding-bottom: 12px; }
.bookmark-monogram { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 10px; background: var(--control-bg); color: var(--blue); font: 11px var(--mono); flex: 0 0 37px; }
.bookmark-copy { min-width: 0; }
.bookmark-copy strong { display: block; font-size: 13px; font-weight: 600; }
.bookmark-copy small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; line-height: 1.8; }
.bookmark-link > img { width: 15px; height: 15px; opacity: .6; margin-left: auto; }
.bookmark-link:hover strong { color: var(--blue); }
.site-footer { padding: 27px 48px; font: 11px/1.6 var(--mono); border-color: var(--light-line); color: var(--muted); background: var(--surface-footer); backdrop-filter: blur(14px); }
.site-footer a:hover { color: var(--blue); }
#entries { scroll-margin-top: 84px; }
.light-empty { color: var(--muted); font-size: 14px; }
/* 四趾轮廓显示半秒，再用三百毫秒渐隐；效果层不拦截操作。 */
.click-paw { position: fixed; width: 28px; height: 28px; z-index: 100; pointer-events: none; filter: var(--paw-shadow); opacity: .7; animation: paw-fade .8s ease-out forwards; }
/* 蒙版放在子层，外层夜间微光才能保留在四趾轮廓之外。 */
.click-paw::before { content: ""; position: absolute; inset: 0; background: var(--paw-gradient); mask: url("assets/icons/paw-four.svg") center/contain no-repeat; }
@keyframes paw-fade { 0% { opacity: .66; scale: .8; } 14%, 62.5% { opacity: .72; scale: 1; } 100% { opacity: 0; scale: 1.08; } }
/* 两种主题的栏目均透出光场，正文面板隔离动态光线以便阅读。 */
.page:not(.page-home) { min-height: calc(100dvh - 155px); padding-block: 68px 100px; }
.page:not(.page-home) > .container.narrow, .about-layout { padding: 38px 42px; border: 1px solid var(--line); border-radius: 21px; background: var(--surface-panel); box-shadow: var(--panel-shadow), inset 0 1px 0 var(--inset-highlight); backdrop-filter: blur(19px); }
.page-title { font-size: 39px; letter-spacing: -1px; }
.article-tools { margin-block: 31px 35px; gap: 14px; }
.article-list { border-color: var(--line); }
.article-item { padding: 28px 12px; border-color: var(--line); border-radius: 9px; transition: background .2s; }
.article-item:hover { background: var(--surface-hover); }
.article-item h2 { line-height: 1.5; font-size: 22px; }
.article-meta { color: var(--blue); font-size: 12px; font-weight: 500; line-height: 1.8; }
.article-item p { line-height: 1.9; font-size: 14px; }
.search-box { min-width: 210px; background: var(--input-bg); border-color: var(--control-border); }
.search-box:focus-within { border-color: var(--focus); box-shadow: var(--focus-shadow); }
.filter-row { gap: 7px; }
.chip { padding: 7px 10px; font-weight: 500; font-size: 11px; border-radius: 7px; }
.article-tag { border-color: var(--control-border); background: var(--blue-soft); color: var(--control-text); font-weight: 500; }
.detail-shell { background: var(--surface-panel); border-color: var(--line); border-radius: 19px; box-shadow: var(--panel-shadow), inset 0 1px 0 var(--inset-highlight); backdrop-filter: blur(20px); }
.detail-shell h1 { font-size: 41px; line-height: 1.35; letter-spacing: -.8px; }
.detail-shell h2 { line-height: 1.5; }
.detail-shell p, .detail-shell li { color: var(--reading-text); line-height: 1.95; }
.back-link { color: var(--blue); font-weight: 500; }
.topic-page-grid { margin-top: 34px; }
.topic-card, .note-card, .project-row, .terminal-card, .soft-card, .career-summary, .contact-panel { background: var(--surface-glass); border-color: var(--line); box-shadow: var(--card-shadow), inset 0 1px 0 var(--inset-highlight); border-radius: 13px; }
/* 联系区留出导航高度，姓名独立显示，窄屏邮箱可自然换行。 */
#about-contact { scroll-margin-top: 110px; padding: clamp(20px, 3vw, 36px); }
#about-contact .contact-name { margin: 18px 0 0; color: var(--text); font-size: 22px; font-weight: 500; }
#about-contact .hero-actions a { max-width: 100%; overflow-wrap: anywhere; }
.topic-card { padding: 23px 23px 45px; }
.topic-copy h3 { font-size: 18px; line-height: 1.5; }
.topic-copy p { font-size: 13px; line-height: 1.8; }
.topic-count { color: var(--muted); font-weight: 500; }
.practice-section { margin-top: 49px; padding-top: 40px; }
.practice-section h2 { font-size: 29px; }
.project-list, .note-list { margin-top: 33px; }
.project-row { grid-template-columns: 1fr; gap: 14px; padding: 28px; }
.project-status { margin: 0; font-size: 11px; font-weight: 500; }
.note-card h2, .project-row h2 { line-height: 1.5; }
.note-card header { font-weight: 500; font-size: 12px; margin-bottom: 13px; }
.note-state span { font-weight: 500; background: var(--control-bg); }
.code-block { background: var(--code-bg); border-color: var(--line); border-radius: 9px; }
.code-toolbar { border-color: var(--line); background: var(--code-toolbar-bg); }
.detail-shell pre { color: var(--code-text); }
/* 搜索沿用原生弹层，键盘焦点与长列表滚动独立于背景。 */
.knowledge-search { width: min(620px, calc(100% - 32px)); max-height: min(80dvh, 650px); margin-top: max(9vh, 40px); padding: 27px; border: 1px solid var(--control-border); border-radius: 17px; background: var(--dialog-bg); color: var(--light-ink); box-shadow: var(--dialog-shadow), inset 0 1px 0 var(--inset-highlight); backdrop-filter: blur(25px); }
.knowledge-search::backdrop { background: var(--dialog-backdrop); backdrop-filter: blur(9px); }
.search-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.search-dialog-head h2 { font-size: 23px; font-weight: 600; margin: 0; }
.search-dialog-head button { display: grid; place-items: center; width: 31px; height: 31px; border: 0; background: transparent; cursor: pointer; }
.search-dialog-head img { width: 18px; height: 18px; }
.knowledge-search-input { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--input-bg); border: 1px solid var(--control-border); border-radius: 9px; }
.knowledge-search-input img { width: 18px; height: 18px; opacity: .7; }
.knowledge-search-input input { min-width: 0; width: 100%; color: var(--light-ink); outline: 0; border: 0; background: transparent; font-size: 14px; }
.knowledge-search-input:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search-results { max-height: 42dvh; overflow-y: auto; margin-top: 16px; }
.search-result { display: block; padding: 13px 10px; border-bottom: 1px solid var(--line); border-radius: 7px; }
.search-result:hover, .search-result:focus-visible { background: var(--surface-hover); }
.search-result small { color: var(--blue); font-size: 11px; }
.search-result strong { display: block; font-size: 14px; font-weight: 600; margin-top: 4px; }
.search-result p { color: var(--muted); margin: 5px 0 0; font-size: 12px; line-height: 1.7; }
.search-dialog-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: 10px; color: var(--muted); }
.note-card[data-note-slug] { scroll-margin-top: 100px; }
/* 共享玻璃层只模糊背后的画面，文字与交互元素保持完全不透明。 */
.light-entry, .knowledge-section, .bookmarks-column, .hero-latest,
.page:not(.page-home) > .container.narrow, .about-layout, .detail-shell, .knowledge-search {
  position: relative;
  background: var(--glass-wash), var(--glass-fill, var(--surface-panel));
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--glass-blur, 16px)) saturate(125%) brightness(var(--glass-brightness));
  backdrop-filter: blur(var(--glass-blur, 16px)) saturate(125%) brightness(var(--glass-brightness));
}
.light-entry { --glass-blur: 13px; border-radius: 23px; }
.tone-ice { --glass-fill: var(--entry-ice); }
.tone-electric { --glass-fill: var(--entry-electric); }
.tone-violet { --glass-fill: var(--entry-violet); }
/* 导航型面板使用较轻的磨砂，让流动光带仍能辨认出轮廓。 */
.knowledge-section { --glass-fill: var(--knowledge-surface); --glass-blur: 10px; border-radius: 28px; }
.bookmarks-column { --glass-fill: var(--bookmark-surface); --glass-blur: 10px; border-radius: 24px; }
.page:not(.page-home) > .container.narrow, .about-layout, .detail-shell { --glass-blur: 20px; }
/* 原生对话框仍固定在视口内，玻璃装饰不改变弹层定位。 */
.knowledge-search { position: fixed; --glass-fill: var(--dialog-bg); --glass-blur: 22px; border-radius: 25px; }
.knowledge-search::backdrop { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }

/* 一圈渐变亮边模拟玻璃厚度；蒙版挖空中心，不遮挡内容或点击。 */
.light-entry::after, .knowledge-section::after, .bookmarks-column::after, .hero-latest::after,
.page:not(.page-home) > .container.narrow::after, .about-layout::after, .detail-shell::after, .knowledge-search::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  border-radius: inherit;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
/* 透明面板的小字使用更强对比，光带经过时仍清楚可读。 */
.knowledge-section, .light-entry, .bookmarks-column, .hero-latest { --muted: var(--glass-muted); text-shadow: var(--glass-text-shadow); }
.light-entry:hover { box-shadow: var(--glass-shadow), 0 20px 45px var(--soft-glow); border-color: var(--glass-border); }
/* 卡片嵌在阅读面板内时不重复模糊，避免层层叠色变回实心面板。 */
.topic-card, .note-card, .project-row, .terminal-card, .soft-card, .career-summary, .contact-panel {
  background: var(--glass-wash), var(--surface-glass);
  border-color: var(--glass-border);
  box-shadow: 0 5px 18px rgba(28,56,99,.045), inset 0 1px 0 var(--inset-highlight);
}
.site-header, .site-footer {
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}
.theme-toggle, .mobile-nav-toggle, .chip, .search-box, .knowledge-search-input {
  box-shadow: inset 0 1px 0 var(--inset-highlight);
}
/* 无背景模糊或用户要求降低透明度时，恢复稳定底色以保证可读性。 */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .light-entry, .knowledge-section, .bookmarks-column, .hero-latest,
  .page:not(.page-home) > .container.narrow, .about-layout, .detail-shell, .knowledge-search, .notes-column {
    background: var(--glass-fallback);
  }
}
@media (prefers-reduced-transparency: reduce) {
  .light-entry, .knowledge-section, .bookmarks-column, .hero-latest,
  .page:not(.page-home) > .container.narrow, .about-layout, .detail-shell, .knowledge-search,
  .site-header, .site-footer, .notes-column, .hero-foot-band {
    background: var(--glass-fallback);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
/* 小屏保留完整光核空间，导航与内容适配手指点击。 */
@media (min-width: 1600px) { .hero-layout { min-height: 690px; } .light-installation { height: 660px; } }
@media (max-width: 1100px) {
  .light-container { width: calc(100% - 72px); }
  .site-header { padding-inline: 32px; }
  .nav-links { gap: 14px; }
  .header-search kbd { display: none; }
  .hero-layout { min-height: 590px; grid-template-columns: 47% 53%; }
  .hero-copy h1 { font-size: 62px; letter-spacing: -3px; }
  .light-installation { height: 570px; margin-right: -18px; }
  .light-entry { padding: 23px; }
  .notes-bookmarks { gap: 37px; }
  .knowledge-section { padding: 29px; }
}
@media (max-width: 900px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; min-height: 67px; gap: 10px; padding: 10px 26px; }
  .brand { font-size: 25px; }
  .header-actions { display: flex; grid-column: 2; grid-row: 1; }
  .header-search { border: 0; padding: 8px; }
  .header-actions { gap: 6px; }
  .header-actions .theme-toggle { width: 34px; min-width: 34px; min-height: 34px; padding: 7px; }
  .header-actions .theme-label { display: none; }
  .header-search span, .header-search kbd { display: none; }
  .mobile-nav-toggle { grid-column: 3; grid-row: 1; width: 34px; height: 34px; background: var(--control-bg); border-color: var(--control-border); font-size: 17px; }
  .nav-links { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; border-color: var(--light-line); }
  .nav-links a { font-size: 12px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .light-container { width: calc(100% - 52px); }
  .hero-layout { grid-template-columns: 49% 51%; min-height: 550px; }
  .hero-copy { padding-block: 48px 36px; }
  .hero-copy h1 { font-size: 53px; letter-spacing: -2.8px; }
  .hero-description { font-size: 13px; }
  .light-actions { gap: 13px; }
  .light-button { font-size: 12px; min-height: 45px; padding: 12px 14px; gap: 12px; }
  .light-button.quiet { font-size: 11px; }
  .hero-latest { margin-top: 29px; }
  .latest-title { font-size: 12px; }
  .light-installation { height: 515px; }
  .hero-foot { font-size: 10px; }
  .hero-topics { gap: 12px; }
  .light-entry-grid { gap: 12px; }
  .light-entry { padding: 20px; min-height: 291px; }
  .entry-copy h3 { font-size: 16px; }
  .entry-copy p { font-size: 12px; }
  .entry-bottom { font-size: 9px; flex-wrap: wrap; }
  .knowledge-section { grid-template-columns: 36% 64%; padding: 25px; }
  .topic-intro h2 { font-size: 27px; }
  /* 窄屏仍保留十像素边内留白，不让局部亮边贴住专题文字。 */
  .light-topic { gap: 12px; padding-inline: 10px; }
  .light-topic h3 { font-size: 15px; }
  .light-topic p { font-size: 11px; }
  .notes-bookmarks { gap: 25px; }
  .bookmarks-column { padding: 24px; }
  .notes-bookmarks h2 { font-size: 23px; }
  .site-footer { padding-inline: 26px; }
  .page:not(.page-home) > .container.narrow, .about-layout { padding: 29px; }
}
@media (max-width: 620px) {
  /* 六个栏目在手机上排为两行，避免联系入口单独挤在末行。 */
  .nav-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #about-contact .hero-actions a { font-size: 14px; }
  /* 手机只留薄文字遮光，避免旧深蒙层改变生成素材的亮度和通透感。 */
  :root, :root[data-theme="dark"] { --scene-top-gap: 0px; --tide-scrim: linear-gradient(180deg, rgba(6,9,20,.14), rgba(6,9,20,.06) 47%, transparent 78%); }
  /* 日间保留原取景，减少白雾以露出玻璃折射细纹。 */
  :root[data-theme="light"] { --scene-top-gap: 20px; --tide-scrim: linear-gradient(180deg, rgba(237,245,255,.07), rgba(237,245,255,.025) 42%, transparent 68%); }
  .light-container { width: calc(100% - 40px); }
  .site-header { padding-inline: 20px; min-height: 64px; }
  .hero-layout { display: flex; flex-direction: column; min-height: 0; }
  /* 手机先呈现可阅读的内容，标题和光核按竖屏比例收紧。 */
  .hero-copy { width: 100%; padding: 24px 0 0; }
  .hero-copy h1 { font-size: clamp(42px, 12vw, 48px); letter-spacing: -2px; line-height: 1.16; }
  .hero-description { margin-block: 14px 18px; font-size: 13px; line-height: 1.75; }
  .hero-description .hero-description-detail { display: none; }
  .light-actions { gap: 20px; }
  .light-button { padding: 12px 17px; }
  .light-button.quiet { font-size: 12px; }
  .hero-latest { max-width: 100%; margin-top: 18px; padding-top: 10px; }
  .latest-title { font-size: 12px; }
  .light-installation { width: calc(100% + 12px); height: 160px; margin: 0 -6px; }
  .hero-foot { padding-block: 14px; }
  .hero-topics { font-size: 10px; gap: 9px; }
  .scroll-link { font-size: 10px; gap: 5px; }
  .light-section { padding-block: 37px; }
  .light-section-head { gap: 10px; margin-bottom: 22px; }
  .light-section-head h2 { font-size: 26px; }
  .view-all { font-size: 11px; gap: 7px; }
  .light-entry-grid { grid-template-columns: 1fr; gap: 15px; }
  .light-entry { min-height: 230px; padding: 24px; }
  .entry-topline { margin-bottom: 17px; }
  .entry-copy h3 { font-size: 18px; }
  .entry-copy p { font-size: 13px; margin-bottom: 20px; }
  .entry-bottom { font-size: 10px; }
  .knowledge-section { display: block; padding: 27px 23px; }
  .topic-intro { margin-bottom: 22px; padding: 0; }
  .topic-intro h2 { font-size: 29px; }
  .topic-intro .view-all { margin-top: 15px; }
  .light-topic { grid-template-columns: minmax(0, 1fr) auto 15px; gap: 10px; padding-block: 20px; }
  .light-topic p { line-height: 1.8; }
  .light-topic-count { font-size: 10px; }
  .notes-bookmarks { grid-template-columns: 1fr; gap: 37px; padding-block: 39px 48px; }
  .bookmarks-column { padding: 27px 24px; }
  .site-footer { font-size: 10px; gap: 12px; padding: 22px 20px; flex-direction: row; align-items: center; }
  .knowledge-search { padding: 22px; }
  .knowledge-search-input input { font-size: 16px; }
  .page:not(.page-home) { padding-block: 28px 55px; }
  .page:not(.page-home) > .container.narrow, .about-layout { padding: 26px 20px; border-radius: 16px; }
  .page-title { font-size: 31px; }
  .article-tools { margin-block: 25px 29px; }
  .article-item { padding: 24px 12px; }
  .article-item h2 { font-size: 20px; }
  .article-meta { font-size: 11px; }
  .article-item p { font-size: 13px; }
  .article-detail { width: calc(100% - 28px); }
  .detail-shell { padding: 26px 22px; border-radius: 16px; }
  .detail-shell h1 { font-size: 30px; line-height: 1.4; }
  .detail-shell p, .detail-shell li { font-size: 14px; }
  .detail-shell h2 { font-size: 23px; }
  .note-card, .project-row { padding: 23px 20px; }
  .note-card h2, .project-row h2 { font-size: 20px; }
  .note-card p, .project-row p { font-size: 14px; }
  .global-scene-fallback { mask-image: var(--scene-mobile-mask); object-position: var(--scene-position-x, 83%) top; }
}
@media (max-width: 360px) {
  .hero-copy h1 { font-size: 42px; }
  .light-actions { gap: 13px; }
  .hero-topics { gap: 6px; font-size: 9px; }
  .scroll-link { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
  .click-paw { animation: none; }
}
