/* 全局变量定义站点色彩、阴影、半径和布局尺度。 */
:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #edf5f7;
  --text: #17212b;
  --muted: #5e6a75;
  --line: #dce5eb;
  --primary: #1769aa;
  --primary-strong: #0e4f85;
  --accent: #e85d4f;
  --accent-soft: #fff0ed;
  --green: #16866c;
  --green-soft: #e7f6f1;
  --warning: #aa6a17;
  --shadow: 0 16px 40px rgba(26, 39, 52, 0.12);
  --radius: 8px;
  --max-wide: 1180px;
  --max-read: 780px;
  --header-h: 72px;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

/* 深色主题覆盖核心变量，并保持正文对比度。 */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111417;
  --surface: #1a2026;
  --surface-soft: #202a31;
  --text: #edf3f7;
  --muted: #a8b5bf;
  --line: #2d3a43;
  --primary: #65b5f1;
  --primary-strong: #9ed1f7;
  --accent: #ff8a76;
  --accent-soft: #3a2422;
  --green: #73d2b4;
  --green-soft: #18342d;
  --warning: #f0b867;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

/* 基础盒模型和滚动行为为响应式布局提供稳定起点。 */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

body.lock-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
video,
iframe {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

/* 键盘跳转链接默认隐藏，聚焦时显示在页面顶部。 */
.skip-link {
  position: fixed;
  left: 18px;
  top: 14px;
  z-index: 1000;
  transform: translateY(-140%);
  background: var(--text);
  color: var(--surface);
  padding: 10px 14px;
  border-radius: var(--radius);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* 顶部导航使用半透明背景增强滚动时的层次感。 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(20, 28, 36, 0.08);
}

.nav-shell {
  width: min(100% - 32px, var(--max-wide));
  min-height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 4px;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, var(--primary), var(--green), var(--accent)) border-box;
  color: #ffffff;
  cursor: zoom-in;
  font-size: 14px;
  box-shadow:
    0 12px 26px rgba(20, 28, 36, 0.2),
    0 0 0 1px color-mix(in srgb, var(--surface) 78%, transparent);
  transition:
    filter 0.2s ease,
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.2s ease;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 4px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 4px 10px rgba(22, 134, 108, 0.36);
}

.brand-mark:hover,
.brand-mark:focus-visible {
  box-shadow:
    0 16px 34px rgba(20, 28, 36, 0.26),
    0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent);
  filter: saturate(1.08);
  transform: translateY(-2px) scale(1.03);
  outline: none;
}

.brand-avatar-frame {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-soft);
}

.brand-avatar-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.brand-text {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0;
}

body.avatar-preview-open {
  overflow: hidden;
}

/* 头像灯箱使用固定层级和蒙层，让放大预览不受页面内容遮挡。 */
.avatar-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 9, 14, 0);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    background 0.28s ease;
}

.avatar-lightbox.is-active {
  background: rgba(5, 9, 14, 0.78);
  opacity: 1;
  pointer-events: auto;
}

.avatar-lightbox-image {
  display: block;
  max-width: min(86vw, 760px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
  transform-origin: top left;
  transition:
    transform 0.48s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.48s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.48s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, border-radius;
}

.avatar-lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1001;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(13, 20, 27, 0.72);
  color: #ffffff;
  backdrop-filter: blur(12px);
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.avatar-lightbox-close:hover,
.avatar-lightbox-close:focus-visible {
  background: rgba(13, 20, 27, 0.92);
  transform: translateY(-1px);
  outline: none;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-panel a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-panel a:hover,
.nav-panel a.is-active {
  background: var(--surface-soft);
  color: var(--text);
}

.icon-button {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.nav-toggle {
  display: none;
}

.page-shell {
  min-height: calc(100vh - 180px);
}

/* 通用容器限制正文宽度，保证桌面端阅读行长适中。 */
.section {
  width: min(100% - 32px, var(--max-wide));
  margin: 0 auto;
  padding: 64px 0;
}

.section.compact {
  padding: 42px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2,
.section-heading h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading p {
  margin: 10px 0 0;
  max-width: 650px;
  color: var(--muted);
}

/* 首屏使用真实图片背景，文字覆盖在视觉焦点区域。 */
.hero {
  position: relative;
  min-height: min(640px, calc(100vh - 76px));
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(10, 18, 27, 0.82), rgba(10, 18, 27, 0.48), rgba(10, 18, 27, 0.2)),
    url("../images/site/unsplash-1499750310107-5fef28a66643-1800.jpg") center / cover;
  color: #ffffff;
}

.hero-inner {
  width: min(100% - 32px, var(--max-wide));
  margin: 0 auto;
  padding: 72px 0 64px;
}

.hero-content {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #cbeeff;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #eef6fa;
  font-size: clamp(17px, 2.4vw, 21px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.metric {
  min-width: 128px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.metric span {
  color: #d7e7ef;
  font-size: 14px;
}

/* 按钮样式保证触控热区不小于 48px。 */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.button.primary {
  background: var(--primary);
  color: #ffffff;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.button.neutral {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary:hover {
  background: var(--primary-strong);
}

.button.neutral:hover {
  border-color: var(--primary);
  color: var(--primary-strong);
}

/* 卡片网格用于项目和推荐内容展示。 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.project-card,
.article-row,
.recommend-card,
.info-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(20, 28, 36, 0.06);
}

.project-card {
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: var(--shadow);
}

.project-cover {
  aspect-ratio: 16 / 10;
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--surface-soft);
}

.project-body {
  padding: 20px;
}

.project-body h3,
.recommend-card h3,
.article-row h3 {
  margin: 0;
  line-height: 1.25;
}

.project-body p,
.recommend-card p,
.article-row p {
  margin: 10px 0 0;
  color: var(--muted);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.tag.accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

.tag.green {
  border-color: transparent;
  background: var(--green-soft);
  color: var(--green);
}

/* 列表和侧边栏布局用于文章页与详情页。 */
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.article-row:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 45%, var(--line));
  box-shadow: var(--shadow);
}

.article-row img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  background: var(--surface-soft);
}

.article-row-body {
  padding: 20px 20px 20px 0;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: grid;
  gap: 18px;
}

.info-card,
.recommend-card,
.timeline-card {
  padding: 20px;
}

.info-card h2,
.info-card h3,
.timeline-card h3 {
  margin: 0 0 14px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.info-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-list span {
  color: var(--muted);
}

/* 筛选条使用可换行布局，适配移动端宽度。 */
.filter-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.filter-label {
  margin-right: 2px;
  color: var(--muted);
  font-weight: 800;
}

.chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.chip:hover,
.chip.is-active {
  border-color: var(--primary);
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

/* 详情页标题区域强调发布时间、标签和外链操作。 */
.detail-hero {
  width: min(100% - 32px, var(--max-wide));
  margin: 0 auto;
  padding: 56px 0 28px;
}

.detail-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-hero p {
  max-width: 760px;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.detail-layout {
  width: min(100% - 32px, var(--max-wide));
  margin: 0 auto;
  padding: 16px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 32px;
  align-items: start;
}

.rich-content {
  max-width: var(--max-read);
}

.rich-content.wide {
  max-width: none;
}

.rich-content > *:first-child {
  margin-top: 0;
}

.rich-content h2,
.rich-content h3 {
  scroll-margin-top: 96px;
  line-height: 1.22;
}

.rich-content h2 {
  margin: 42px 0 12px;
  font-size: 30px;
}

.rich-content h3 {
  margin: 30px 0 10px;
  font-size: 22px;
}

.rich-content p,
.rich-content li {
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

.rich-content a {
  color: var(--primary-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.rich-content blockquote {
  margin: 26px 0;
  border-left: 4px solid var(--primary);
  padding: 10px 18px;
  background: var(--surface-soft);
  color: var(--muted);
}

.rich-content pre {
  overflow-x: auto;
  border-radius: var(--radius);
  padding: 18px;
  background: #101820;
}

.rich-content code {
  border-radius: 5px;
  padding: 2px 5px;
  background: var(--surface-soft);
}

.rich-content pre code {
  padding: 0;
  background: transparent;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--surface-soft);
}

/* 视频容器承载加载状态、错误状态和不同来源播放器。 */
.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 26px 0;
  background: #0d141b;
}

.video-frame,
.video-shell iframe,
.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-placeholder,
.video-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: #ffffff;
  background: rgba(13, 20, 27, 0.78);
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.video-shell.is-ready .video-placeholder {
  opacity: 0;
}

.video-error {
  display: none;
  background: rgba(79, 18, 18, 0.86);
}

.video-shell.has-error .video-error {
  display: grid;
}

.video-caption {
  padding: 12px 16px;
  color: #d6e1e8;
  font-size: 14px;
  background: #101820;
}

/* 文章目录由 Tocbot 生成，侧边栏跟随滚动。 */
.toc-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--surface);
}

.toc-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.js-toc {
  font-size: 14px;
}

.js-toc .toc-list,
.js-toc .toc-list ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.js-toc .toc-list .toc-list {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.js-toc .toc-list-item {
  margin: 7px 0;
  list-style: none;
}

.js-toc .toc-list-item::marker {
  content: "";
}

.js-toc .toc-link {
  display: block;
  min-width: 0;
  padding: 4px 0 4px 10px;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.js-toc .toc-list a {
  color: var(--muted);
}

.js-toc .toc-list a.is-active-link {
  color: var(--primary-strong);
  font-weight: 900;
}

/* 分页按钮保持稳定尺寸，避免动态内容造成布局跳动。 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.page-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
}

.page-button.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

/* 关于页模块用时间线和技能条呈现个人信息。 */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  border-left: 3px solid var(--primary);
  padding-left: 16px;
}

.timeline-item h3 {
  margin: 0;
}

.timeline-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-list a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-strong);
  font-weight: 800;
}

/* 页脚使用低对比层级承载辅助链接。 */
.site-footer {
  width: min(100% - 32px, var(--max-wide));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
  color: var(--muted);
}

.site-footer strong {
  color: var(--text);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer a {
  font-weight: 800;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 中等屏幕下减少列数，保证卡片和正文不拥挤。 */
@media (max-width: 980px) {
  .card-grid,
  .content-layout,
  .detail-layout,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .detail-layout {
    padding-bottom: 54px;
  }
}

/* 移动端导航转为抽屉，按钮热区保持 48px。 */
@media (max-width: 760px) {
  :root {
    --header-h: 66px;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .nav-panel {
    position: fixed;
    inset: var(--header-h) 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-panel a,
  .nav-panel button {
    width: 100%;
    justify-content: flex-start;
  }

  .section,
  .section.compact {
    padding: 42px 0;
  }

  .section-heading {
    display: block;
  }

  .hero {
    min-height: 560px;
  }

  .hero-inner {
    padding: 54px 0 46px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .article-row {
    grid-template-columns: 1fr;
  }

  .article-row-body {
    padding: 0 18px 20px;
  }

  .article-row img {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .filter-group {
    align-items: stretch;
    flex-direction: column;
  }

  .chip {
    justify-content: center;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* 小屏幕继续压缩字号和间距，避免文字溢出按钮或卡片。 */
@media (max-width: 430px) {
  .nav-shell,
  .section,
  .hero-inner,
  .detail-hero,
  .detail-layout,
  .site-footer {
    width: min(100% - 24px, var(--max-wide));
  }

  .hero h1 {
    font-size: 40px;
  }

  .metric {
    width: 100%;
  }

  .detail-actions {
    flex-direction: column;
  }
}

/* 减少动效设置尊重系统无障碍偏好。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
