/* Linear / Vercel / Raycast Dark Aesthetic Design System */
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-page: #0A0A0B;
  --bg-surface: #111113;
  --bg-code: #161618;
  --text-primary: #EDEDED;
  --text-secondary: #8B8B8E;
  --text-muted: #5A5A5E;
  --accent-primary: #3B82F6;
  --accent-secondary: #22D3EE;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --divider: rgba(255, 255, 255, 0.06);
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* 版心宽度：唯一来源，详见下方 .shell 注释与 AGENTS.md 第 4 节 */
  --shell: 720px;
  --shell-detail: 1000px;
}

* {
  box-sizing: border-box;
}

.search-status { padding: 12px; color: var(--text-secondary); font: 12px var(--font-mono); }
.search-result { display: block; padding: 10px; border-radius: 6px; transition: background-color 180ms ease-out; }
.search-result:hover, .search-result.is-active { background: var(--bg-code); }
.search-result-title { display: block; color: var(--text-primary); font-size: 14px; overflow-wrap: anywhere; }
.search-result.is-active .search-result-title { color: var(--accent-primary); }
.search-result-meta { display: block; margin-top: 3px; color: var(--text-muted); font: 12px var(--font-mono); }
.search-result-snippet { display: block; margin-top: 6px; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
.search-result mark { color: var(--accent-primary); background: transparent; }
.post-item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--text-muted); font: 12px var(--font-mono); }
/* PINNED 徽章与专栏名是元信息行里仅有的两个「需要跳出来」的元素：
   徽章用主强调蓝（描边 + 淡底 + 着色文字），专栏是可点链接用次强调青。 */
.post-item-badge {
  padding: 2px 6px; border-radius: 4px;
  color: var(--accent-primary);
  border: 1px solid color-mix(in srgb, var(--accent-primary) 35%, transparent);
  background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
  font-weight: 500; letter-spacing: 0.04em;
}
.post-item-meta a {
  color: var(--accent-secondary);
  transition: color 150ms ease-out;
}
.post-item-meta a:hover { color: var(--text-primary); }
.post-item-excerpt { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-item-tags, .about-section-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill.is-selected { border-color: var(--accent-primary); color: var(--accent-primary); }
.about-section-nav { margin-bottom: 32px; gap: 16px; color: var(--text-secondary); font-size: 13px; }
.about-section-nav button:hover { color: var(--text-primary); }
.heading-link { margin-left: 10px; color: var(--text-muted); font: 14px var(--font-mono); opacity: 0; transition: opacity 180ms ease-out; }
.markdown-body :is(h1,h2,h3,h4,h5,h6):hover .heading-link, .heading-link:focus-visible { opacity: 1; }
@media (hover: none) { .heading-link { opacity: 1; } }
.btn-secondary { padding: 6px 12px; border-radius: 8px; background: var(--bg-surface); border: 1px solid var(--border-subtle); color: var(--text-primary); font-size: 13px; transition: border-color 180ms ease-out; }
.btn-secondary:hover { border-color: var(--border-hover); }
.btn-primary { padding: 6px 14px; border: 1px solid var(--accent-primary); border-radius: 8px; background: var(--accent-primary); color: var(--text-primary); font-size: 13px; transition: background-color 180ms ease-out; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-primary) 88%, black); }
.view-status { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }

html {
  scroll-behavior: smooth;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

html, body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* Subtle Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.24); }

/* Background Ultra-subtle Grid (<4% opacity) */
.subtle-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Utility: Hide scrollbar while preserving scroll capability */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ---------------------------------------------------------------------------
   版心宽度与列表布局 (Layout Shell & List Layout)
   ---------------------------------------------------------------------------
   版心宽度只有两档，页面里禁止再写裸 max-w-[...] —— 改宽度只需改这里。
     .shell         720px  —— 全站所有标准页面的统一宽度：首页、About、Posts 列表、
                              Archive、Tags、Columns 列表与详情、页脚。
     .shell-detail 1000px  —— 仅文章详情页。它要在同一行内放下「正文列 680px +
                              常驻目录 230px」，720px 装不下（会把正文挤成 402px 窄栏）。
   除文章详情页外，全站版心必须保持一致，不得再新增第三档宽度。

   列表页一律单栏堆叠（.ruled-list）—— 不做多栏平铺。
*/
.shell        { max-width: var(--shell); }
.shell-detail { max-width: var(--shell-detail); }

/* 细线列表：单栏堆叠，横向分隔线由条目自身的 border-bottom（1px --divider）提供。
   目前 Tags（.post-item）与 Columns（.series-item）使用；Archive 刻意不画任何分割线，
   直接用 Tailwind 的 space-y + flex 排布，不套这个容器。
   子项必须 min-width:0，否则长标题会把容器撑破。 */
.ruled-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.ruled-list > * { min-width: 0; }

/* 标签云：紧凑胶囊，换行排列（与全站 720px 统一版心下的密度匹配）。
   曾经尝试过桌面端整行磁贴形态，会撑出一排「大方框」，已废弃 —— 标签是控件，
   保持小尺寸胶囊，不要变成占满整行的容器。 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-tile {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
  transition: all 150ms ease-out;
}
.tag-tile:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.tag-tile.is-active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.08);
}

/* 关于页作者名片：头像（支持任意图片链接）+ 名字 + 头衔。
   头像用「容器带首字母、图片绝对定位覆盖」的写法：图片加载成功则盖住占位，
   加载失败或被安全策略拒绝时自动露出首字母，不会出现破图图标。 */
.about-eyebrow {
  user-select: none;
}
.about-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font: 500 22px var(--font-mono);
  color: var(--text-muted);
  user-select: none;
}
/* 首字母由 data-initial 提供；图片加载失败时它自然露出，不会显示破图图标 */
.about-avatar-wrap::before {
  content: attr(data-initial);
}
.about-avatar-wrap img.about-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 专栏条目：与 Tags 列表同构的「细线分隔」语言 —— 无底色、无边框、无圆角。
   列表页的容器型块一律不加框，方框/圆角只留给可交互控件（如标签胶囊 .tag-tile）。
   因此这里不做卡片抬升，悬浮反馈交给标题链接自身变色。内距与 .post-item 对齐。
   （Archive 页是唯一例外：它整页不画分割线，见 js/app.js#renderArchivesView 注释。） */
.series-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--divider);
}

/* Navbar */
.nav-blur {
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 150ms ease-out;
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link.active {
  color: var(--accent-primary);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-primary);
  border-radius: 1px;
}

.mobile-nav-link.active {
  color: var(--text-primary);
  border-left: 2px solid var(--accent-primary);
}

/* Navbar Dropdown (数组导航项折叠为下拉菜单)
   使用显式 CSS 类而非 Tailwind 命名 group 变体，避免动态注入内容时样式丢失；
   支持 hover / 键盘 focus-within / 点击(触屏) 三种展开方式。 */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 150ms ease-out;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle,
.nav-dropdown:focus-within .nav-dropdown-toggle {
  color: var(--accent-primary);
}
.nav-dropdown-chevron {
  width: 12px;
  height: 12px;
  transition: transform 150ms ease-out;
}
.nav-dropdown:hover .nav-dropdown-chevron,
.nav-dropdown.open .nav-dropdown-chevron,
.nav-dropdown:focus-within .nav-dropdown-chevron {
  transform: rotate(180deg);
}
.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  display: none;
  z-index: 60;
}
.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown.open .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  display: block;
}
.nav-dropdown-menu {
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  background: rgba(17, 17, 19, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.nav-dropdown-item {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  color: var(--text-secondary);
  transition: color 150ms ease-out, background-color 150ms ease-out;
}
.nav-dropdown-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}
.nav-dropdown-item.active {
  color: var(--accent-primary);
}

/* Base Card / Surface */
.linear-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: border-color 180ms ease-out, transform 180ms ease-out;
}
.linear-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Tag Pill (Bordered, Not filled) */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-subtle);
  transition: all 150ms ease-out;
  text-decoration: none;
}
.tag-pill:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Button */
.linear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 150ms ease-out;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}
.linear-btn:hover {
  border-color: var(--border-hover);
  background-color: rgba(255, 255, 255, 0.04);
}
.linear-btn-primary {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--text-primary);
}
.linear-btn-primary:hover {
  background-color: color-mix(in srgb, var(--accent-primary) 88%, black);
  border-color: color-mix(in srgb, var(--accent-primary) 88%, black);
}

/* Article List Item */
.post-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--divider);
  transition: transform 180ms ease-out;
}
.post-item:hover {
  transform: translateX(2px);
}
.post-item:hover .post-item-title {
  color: var(--accent-primary);
}
.post-item-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 150ms ease-out;
  letter-spacing: -0.01em;
}

/* Typography & Markdown Body */
.markdown-body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: -0.02em;
  scroll-margin-top: 5rem;
}
.markdown-body h1 { font-size: 30px; margin-top: 40px; margin-bottom: 16px; }
.markdown-body h2 { font-size: 24px; margin-top: 48px; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--divider); }
.markdown-body h3 { font-size: 18px; margin-top: 32px; margin-bottom: 12px; }
.markdown-body p { margin-top: 16px; margin-bottom: 16px; color: var(--text-primary); }
.markdown-body a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 150ms ease-out;
}
.markdown-body a:hover {
  color: var(--accent-secondary);
}

/* 站内互链 (Wiki-style Cross Links) */
.markdown-body a.wiki-link {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.45);
  transition: color 150ms ease-out, border-color 150ms ease-out;
}
.markdown-body a.wiki-link:hover {
  color: var(--accent-secondary);
  border-bottom-color: var(--accent-secondary);
}
.markdown-body .wiki-link.is-missing {
  color: var(--text-muted);
  border-bottom: 1px dashed var(--text-muted);
  text-decoration: none;
  cursor: help;
}
.markdown-body ul, .markdown-body ol { margin: 16px 0; padding-left: 24px; color: var(--text-primary); }
.markdown-body li { margin: 6px 0; }
.markdown-body hr { margin: 40px 0; border: 0; height: 1px; background: var(--divider); }

/* Blockquote */
.markdown-body blockquote {
  margin: 24px 0;
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--accent-primary);
  background: transparent;
  color: var(--text-secondary);
  font-style: normal;
}
.markdown-body blockquote p { margin: 4px 0; }

/* 正文图片与多媒体：绝不撑破 680px 正文列。
   此前 img 没有任何约束，宽图会直接溢出版心；现在统一 max-width + 等比缩放，
   圆角与 1px 细边对齐全站「方框只包内容」的卡片语言（幻灯片画布同款）。 */
.markdown-body img,
.markdown-body video {
  max-width: 100%;
  height: auto;
}
.markdown-body img {
  display: inline-block;
  vertical-align: middle;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}
.markdown-body audio { max-width: 100%; }
.markdown-body figure { margin: 24px 0; }
.markdown-body figure img { display: block; margin: 0 auto; }
.markdown-body figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* Inline Code */
.markdown-body code:not([class*="language-"]) {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-radius: 4px;
}

/* Callout
   4 种类型各自区分颜色与底色 —— 此前 tip / note / warning 共用同一个 accent，
   读者无法从视觉上分辨语义，等于白写了类型标记。 */
.callout {
  margin: 24px 0;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  border-left-width: 3px;
  background: var(--bg-surface);
  display: flex;
  gap: 12px;
}
.callout-body { flex: 1; min-width: 0; }
.callout-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.callout-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; color: var(--text-primary); }
.callout-content { font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.callout-content > :first-child { margin-top: 0; }
.callout-content > :last-child { margin-bottom: 0; }

.callout-tip {
  border-left-color: var(--accent-secondary);
  background: rgba(34, 211, 238, 0.06);
}
.callout-tip .callout-icon { color: var(--accent-secondary); }

.callout-note {
  border-left-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.06);
}
.callout-note .callout-icon { color: var(--accent-primary); }

.callout-warning {
  border-left-color: var(--accent-secondary);
  background: color-mix(in srgb, var(--accent-secondary) 6%, transparent);
}
.callout-warning .callout-icon { color: var(--accent-secondary); }

.callout-danger {
  border-left-color: var(--accent-primary);
  background: color-mix(in srgb, var(--accent-primary) 6%, transparent);
}
.callout-danger .callout-icon { color: var(--accent-primary); }

/* Code Block Container */
.code-container {
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-code);
  position: relative;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--divider);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.code-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 150ms ease-out;
  border: none;
  opacity: 0;
}
.code-container:hover .code-copy-btn {
  opacity: 1;
}
.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}
.code-container pre {
  margin: 0 !important;
  padding: 16px !important;
  background: transparent !important;
  font-family: var(--font-mono) !important;
  font-size: 13.5px !important;
  line-height: 1.65 !important;
  overflow-x: auto;
  color: var(--text-primary) !important;
}

/* Math Container (KaTeX Block) - Linear Grade Academic Simplicity */
.quantum-math-block {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 8px;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.katex-display { margin: 0 !important; padding: 4px 0 !important; }
.katex { color: var(--text-primary); font-size: 1.05em; }

/* Prism Code Tokens */
/* .token.key / .token.important 为 yaml 语法产出（键名 / 文档分隔符与锚点），
   其余类为 javascript/python/bash/typescript/bibtex 语法产出。 */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--text-muted); font-style: italic; }
.token.punctuation { color: var(--text-secondary); }
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.key { color: var(--accent-secondary); }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin { color: var(--text-primary); }
.token.operator, .token.entity, .token.url, .token.keyword, .token.important { color: var(--accent-primary); }
.token.function, .token.class-name { color: var(--accent-secondary); }

/* Permanent Floating Outline Sidebar on the Right (Active Scrollspy & Responsive Dock) */
.outline-floating-sidebar,
.toc-floating-sidebar {
  display: none;
}
@media (min-width: 900px) {
  .outline-floating-sidebar,
  .toc-floating-sidebar {
    display: block !important;
  }
  .outline-floating-fab,
  .toc-floating-fab {
    display: none !important;
  }
}
@media (max-width: 899px) {
  .outline-floating-sidebar,
  .toc-floating-sidebar {
    display: none !important;
  }
  .outline-floating-fab,
  .toc-floating-fab {
    display: flex !important;
  }
}

/* Active Heading Highlight Line in Outline */
#desktop-outline-nav button,
#desktop-toc-nav button {
  position: relative;
  transition: all 150ms ease-out;
}
#desktop-outline-nav button.active,
#desktop-toc-nav button.active {
  color: var(--accent-primary) !important;
  font-weight: 500 !important;
  border-left: 2px solid var(--accent-primary) !important;
  padding-left: 10px !important;
  margin-left: -13px !important;
}
#desktop-outline-nav button:hover,
#desktop-toc-nav button:hover {
  color: var(--accent-primary) !important;
}
/* focus 行：不带边框与底色 —— Hero 是「纯文字身份区」，方框胶囊会显得
   突兀（用户实测否决）。只保留呼吸圆点 + 强调色文字，与头衔行同一视觉语言。 */
.about-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-primary);
}
.about-status-dot-pulse {
  position: relative;
  display: flex;
  height: 7px;
  width: 7px;
}
.about-status-dot-ping {
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
  position: absolute;
  display: inline-flex;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  background-color: var(--accent-primary);
  opacity: 0.75;
}
.about-status-dot-core {
  position: relative;
  display: inline-flex;
  border-radius: 9999px;
  height: 7px;
  width: 7px;
  background-color: var(--accent-primary);
}

/* Hero Contact Links (Pure text, zero border, easy to extend) */
.about-contacts-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.about-contact-text-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  border: none;
  background: transparent;
  padding: 2px 0;
  transition: color 150ms ease-out, transform 150ms ease-out;
}
.about-contact-text-link:hover {
  color: var(--accent-primary);
  transform: translateY(-1px);
}
.about-contact-arrow {
  font-size: 11px;
  color: var(--text-muted);
  transition: color 150ms ease-out, transform 150ms ease-out;
}
.about-contact-text-link:hover .about-contact-arrow {
  color: var(--accent-primary);
  transform: translate(1px, -1px);
}

/* Quote Banner */
.about-quote-box {
  padding: 18px 22px;
  margin-bottom: 32px;
  border-radius: 12px;
  background-color: rgba(17, 17, 19, 0.85);
  backdrop-filter: blur(8px);
  border-left: 2px solid var(--accent-primary);
  border-top: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}

/* Section Header */
.about-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--divider);
}

/* Linear Timeline Track */
.about-timeline-track {
  position: relative;
  border-left: 1px solid var(--border-subtle);
  margin: 0 0 48px 10px;
  padding-left: 28px;
}
.about-timeline-item {
  position: relative;
  padding-bottom: 36px;
}
.about-timeline-item:last-child {
  padding-bottom: 0;
}
.about-timeline-node {
  position: absolute;
  left: -33px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background-color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 0 4px var(--bg-page);
  transition: all 150ms ease-out;
}
.about-timeline-item:first-child .about-timeline-node {
  background-color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  box-shadow: 0 0 0 4px var(--bg-page), 0 0 10px rgba(59, 130, 246, 0.6);
}
.about-timeline-period {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.about-timeline-item:not(:first-child) .about-timeline-period {
  color: var(--text-muted);
}
.about-timeline-heading {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.about-timeline-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}
.about-contact-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  transition: all 150ms ease-out;
}
/* ---------------------------------------------------------------------------
   Publications / 可展开条目 (Publications & Collapsible Entries)
   --------------------------------------------------------------------------- */

/* 折叠触发器归零为「看起来是标题、行为是按钮」：保留键盘可达性，但不带按钮外观 */
.entry-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}
.entry-toggle-text { display: inline; }
.entry-chevron {
  display: inline-block;
  vertical-align: -2px;
  width: 13px;
  height: 13px;
  margin-left: 6px;
  color: var(--text-muted);
  transition: transform 180ms ease-out, color 150ms ease-out;
}
.entry-toggle:hover .entry-chevron { color: var(--text-primary); }
.entry-toggle:hover .entry-toggle-text { color: var(--accent-primary); }
.is-expanded .entry-chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

@keyframes entry-panel-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.entry-panel {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--divider);
  animation: entry-panel-in 180ms ease-out;
}
.entry-panel[hidden],
.pub-panel[hidden],
.pub-preview-slot[hidden] { display: none; }

.entry-detail {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* 关联资源筹码 (PAPER / POST / CODE / DOI ...) */
.entry-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.entry-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  transition: all 150ms ease-out;
}
.entry-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}
.entry-chip-label {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.entry-chip:hover .entry-chip-label { color: var(--accent-primary); }
.entry-chip-text {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-chip-arrow { color: var(--text-muted); }
.entry-chip-paper .entry-chip-label { color: var(--accent-secondary); }

/* 关注领域条目：与时间线条目共用展开交互 */
.about-focus-item { transition: color 150ms ease-out; }
.about-focus-item.is-expandable { cursor: pointer; }

/* --- 论著列表 --- */
.pub-year-group { margin-bottom: 24px; }
.pub-year-group:last-child { margin-bottom: 0; }
.pub-year-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pub-year-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
}
.pub-year-rule { flex: 1; height: 1px; background: var(--divider); }
.pub-year-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
}

.pub-card {
  position: relative;
  border-bottom: 1px solid var(--divider);
  border-radius: 0;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.pub-card:last-child { border-bottom-color: transparent; }
.pub-card.is-expanded {
  border-radius: 8px;
  border-color: var(--border-subtle);
  background: rgba(255, 255, 255, 0.015);
}
.pub-card.is-expanded:last-child { border-bottom-color: var(--border-subtle); }
.pub-card.is-highlighted {
  border-radius: 8px;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.pub-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 8px;
  transition: background-color 150ms ease-out;
}
.pub-card.is-expandable .pub-card-head { cursor: pointer; }
.pub-card.is-expandable .pub-card-head:hover { background: rgba(255, 255, 255, 0.02); }

.pub-seq {
  flex-shrink: 0;
  min-width: 18px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.pub-card-main { flex: 1; min-width: 0; }
.pub-title {
  margin: 0 0 5px 0;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.pub-authors {
  margin: 0 0 5px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.pub-author-self { color: var(--text-primary); font-weight: 600; }
.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.pub-venue { color: var(--text-secondary); }
.pub-meta-sep { opacity: 0.5; }
.pub-cite { color: var(--accent-secondary); }

/* 资源徽章（PDF / DOI / arXiv / CODE ...） */
.pub-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  flex-shrink: 0;
  max-width: 38%;
  padding-top: 2px;
}
.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  transition: all 150ms ease-out;
}
.pub-badge:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
}
.pub-badge-pdf {
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
}
.pub-badge-pdf:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.pub-badge-arrow { font-size: 9px; opacity: 0.7; }

.pub-panel {
  padding: 0 12px 16px 42px;
  animation: entry-panel-in 180ms ease-out;
}
.pub-abstract {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.pub-preview { margin-top: 12px; }
.pub-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pub-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 150ms ease-out;
}
.pub-preview-btn svg { width: 12px; height: 12px; }
.pub-preview-btn:hover { color: var(--accent-primary); border-color: var(--accent-primary); }
.pub-preview-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  transition: color 150ms ease-out;
}
.pub-preview-link:hover { color: var(--accent-primary); }
.pub-preview-slot { margin-top: 10px; }
.pub-preview-frame {
  width: 100%;
  height: min(72vh, 620px);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-surface);
}

@media (max-width: 640px) {
  .pub-card-head { flex-wrap: wrap; }
  .pub-badges {
    order: 3;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    padding-left: 30px;
  }
  .pub-panel { padding-left: 12px; }
  .entry-chip-text { max-width: 150px; }
  .pub-preview-frame { height: 58vh; }
}

/* Slide Deck / PDF Presentation Player (Linear & Raycast Aesthetic) */
.slide-player-root {
  background: var(--bg-page);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.slide-player-header {
  background: var(--bg-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.slide-stage {
  background: var(--bg-page);
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-canvas {
  display: block;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 画布本身即全屏入口：常态下给出缩放光标，进入演示后收回 */
.slide-canvas-wrapper { cursor: zoom-in; }
.slide-player-root:fullscreen .slide-canvas-wrapper,
.slide-player-root:-webkit-full-screen .slide-canvas-wrapper,
.theater-presentation-mode .slide-canvas-wrapper { cursor: default; }

/* 悬停引导：只在鼠标停在舞台上时淡入，纯视觉、不抢点击 */
.slide-expand-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(17, 17, 19, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-out;
}
.slide-expand-hint svg { width: 12px; height: 12px; color: var(--accent-primary); }
.slide-stage:hover .slide-expand-hint { opacity: 1; }
.slide-player-root:fullscreen .slide-expand-hint,
.slide-player-root:-webkit-full-screen .slide-expand-hint,
.theater-presentation-mode .slide-expand-hint { display: none !important; }

/* 触屏设备没有 hover，常驻显示引导 */
@media (hover: none) {
  .slide-expand-hint { opacity: 0.85; }
}

.slide-hotspot {
  transition: opacity 150ms ease-out;
}

.slide-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 150ms ease-out;
}
.slide-tool-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}

.slide-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  transition: all 150ms ease-out;
}

/* Presentation Mode / Native Fullscreen Mode */
.slide-player-root:fullscreen,
.slide-player-root:-webkit-full-screen {
  background: var(--bg-page) !important;
  border: none !important;
  border-radius: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}

.slide-player-root:fullscreen .slide-player-header,
.slide-player-root:-webkit-full-screen .slide-player-header {
  display: none !important;
}

/* 放映模式下的舞台：吃满整个视口（min-height 清零，高度完全交给 flex 分配）。
   此前写的 height: 100vh 会让舞台比容器高出进度线那 2px，把进度线挤出屏幕外。 */
.slide-player-root:fullscreen .slide-stage,
.slide-player-root:-webkit-full-screen .slide-stage,
.theater-presentation-mode .slide-stage {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  background: var(--bg-page) !important;
}

/* 放映模式下画布零装饰：去掉内距、圆角与投影，幻灯片直接铺到屏幕边缘，
   宽高比之外的空隙由深色舞台充当信箱边 —— 与 PowerPoint 放映一致。 */
.slide-player-root:fullscreen .slide-canvas-wrapper,
.slide-player-root:-webkit-full-screen .slide-canvas-wrapper,
.theater-presentation-mode .slide-canvas-wrapper { padding: 0; }
.slide-player-root:fullscreen .slide-canvas,
.slide-player-root:-webkit-full-screen .slide-canvas,
.theater-presentation-mode .slide-canvas { border-radius: 0; box-shadow: none; }

/* 放映模式下进度线改为贴底悬浮层：不再占据 flex 高度，并与控制岛同步淡入淡出。 */
.slide-player-root:fullscreen .slide-progress-track,
.slide-player-root:-webkit-full-screen .slide-progress-track,
.theater-presentation-mode .slide-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  opacity: 1;
  transition: opacity 300ms ease-out;
}
.slide-player-root:fullscreen .slide-progress-track.slide-chrome-hidden,
.slide-player-root:-webkit-full-screen .slide-progress-track.slide-chrome-hidden,
.theater-presentation-mode .slide-progress-track.slide-chrome-hidden { opacity: 0; }

/* 放映静置时隐藏鼠标指针（PowerPoint 行为）：移动鼠标即恢复，见 showFullscreenIsland。 */
.slide-player-root.slide-cursor-hidden,
.slide-player-root.slide-cursor-hidden * { cursor: none !important; }

/* Fallback Theater Mode (if browser denies native fullscreen) */
.theater-presentation-mode {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background: var(--bg-page) !important;
  border: none !important;
  border-radius: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
}
.theater-presentation-mode .slide-player-header {
  display: none !important;
}

/* Floating Fullscreen Island */
.slide-fs-island {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
