/* 多页面可调整参数集中维护，继承原站的色彩与正文字体。 */
:root {
  --page-title-size: 64px;
  --page-section-space: 48px;
  --control-height: 44px;
}

/* 渐进增强的隐藏状态必须优先于原有 grid/flex 显示规则。 */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 12px; z-index: 50; padding: 12px 18px; background: var(--paper); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* 导航在所有页面一致，当前栏目以钢蓝文字和下划线标识。 */
.nav-links a[aria-current] { color: var(--accent); }
.nav-links a[aria-current]::after { transform: scaleX(1); }
.nav-toggle { cursor: pointer; }
.site-footer { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin: 0 auto; padding: 26px 0; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.site-footer a { color: var(--accent); text-decoration: none; white-space: nowrap; }

/* 栏目页采用短标题区，保留原站衬线标题和克制的暖色分区。 */
.section-page { padding-bottom: 64px; }
.section-hero { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; padding: 66px 0 42px; border-bottom: 1px solid var(--line-strong); }
.section-hero h1 { font-size: var(--page-title-size); line-height: 1.2; }
.section-hero .section-label { margin-bottom: 18px; letter-spacing: 0; }
.section-intro { max-width: 38em; margin: 0; font-size: 16px; line-height: 1.9; color: var(--muted); }
.section-page > .detail-section, .section-page > .people-lead, .collection { margin-top: var(--page-section-space); }
.section-page > .detail-section h2, .collection-heading h2 { font-size: 30px; line-height: 1.35; }
.section-page > .detail-section .detail-grid { margin-top: 24px; }
.section-page .team-lead-content { grid-template-columns: minmax(0, 1fr) minmax(230px, 0.75fr); }

/* 筛选工具条与结果计数：表单语义明确，窄屏允许自然换行。 */
.collection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.collection-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
[data-results-heading] { scroll-margin-top: 92px; outline: none; }
.collection-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 28px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-tabs a { display: inline-flex; align-items: center; min-height: var(--control-height); padding: 10px 16px; text-decoration: none; font-size: 14px; border: 1px solid var(--line); color: var(--muted); background: rgba(var(--paper-rgb), 0.65); transition: color var(--fast), background var(--fast); }
.filter-tabs a:hover { color: var(--accent); border-color: var(--accent); }
.filter-tabs a[data-active] { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.filter-select { display: inline-flex; align-items: center; gap: 16px; font-size: 14px; }
.filter-select select { min-height: var(--control-height); min-width: 150px; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); padding: 10px 34px 10px 14px; font: inherit; }
.collection-search { display: flex; width: 330px; max-width: 100%; min-width: 0; }
.collection-search input { width: 100%; min-width: 0; min-height: var(--control-height); border: 1px solid var(--line-strong); border-right: 0; border-radius: 0; padding: 10px 14px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.collection-search button, .collection-empty button { flex-shrink: 0; min-height: var(--control-height); border: 1px solid var(--accent); padding: 10px 18px; background: var(--accent); color: var(--paper); font: inherit; font-size: 14px; cursor: pointer; }
.collection-search button:hover, .collection-empty button:hover { background: var(--surface-deep); }

/* 分页有明确当前页和边界状态，空结果提供直接清除入口。 */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line-strong); background: var(--paper); font-size: 14px; text-decoration: none; }
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination a[aria-current] { background: var(--accent); border-color: var(--accent); color: white; }
.pagination [aria-disabled] { color: var(--muted); opacity: 0.5; }
.collection-empty { padding: 56px 24px; text-align: center; border: 1px solid var(--line); background: var(--paper); }
.collection-empty h3 { margin-bottom: 12px; }
.collection-empty p { color: var(--muted); margin-bottom: 22px; }

/* 研究主题使用原视觉板的分栏图像，并将每个方向独立为可切换正文。 */
.research-collection > .filter-tabs { margin-bottom: 26px; }
.topic-list { display: grid; gap: 28px; }
.topic-panel { display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; overflow: hidden; background: var(--surface-deep); color: var(--paper); }
.topic-art { min-height: 350px; background-image: url('../images/research/research-directions-board.png'); background-size: 400% auto; background-repeat: no-repeat; background-position: 0 0; background-color: #020914; }
.topic-excitons .topic-art { background-position: 33.333% 0; }
.topic-devices .topic-art { background-position: 66.667% 0; }
.topic-spin .topic-art { background-position: 100% 0; }
.topic-copy { align-self: center; padding: 48px; }
.topic-number { display: block; margin-bottom: 30px; color: #b5cddd; font-size: 14px; }
.topic-copy h2 { margin-bottom: 24px; font-size: 34px; line-height: 1.45; }
.topic-copy p { color: #dae1e6; font-size: 16px; line-height: 1.9; }
.text-link { display: inline-flex; align-items: center; gap: 28px; padding-top: 18px; color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 8px; font-size: 14px; }

/* 论文列表每条显示年份、完整署名，代表成果保留原链接与中文介绍。 */
.paper-list { border-top: 1px solid var(--line-strong); }
.paper-entry { position: relative; padding: 30px 28px 30px 100px; background: rgba(var(--paper-rgb), 0.8); border-bottom: 1px solid var(--line); }
.paper-year { position: absolute; top: 32px; left: 24px; color: var(--accent); font-weight: 700; font-size: 15px; }
.paper-entry h3 { font-family: "Inter", "Noto Sans SC", sans-serif; font-size: 19px; line-height: 1.55; margin-bottom: 12px; }
.paper-entry h3 a { text-decoration-color: var(--line-strong); text-underline-offset: 5px; }
.paper-entry h3 a:hover { color: var(--accent); }
.paper-entry p { margin: 0; font-size: 14px; line-height: 1.85; color: var(--muted); overflow-wrap: anywhere; }
.paper-entry .paper-summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink); }

/* 新闻使用原始图文，不为历史动态推测发布日期。 */
.news-list { display: grid; gap: 24px; }
.news-entry { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 32px; padding: 24px; border: 1px solid var(--line); background: var(--paper); }
.news-entry > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.news-entry-copy { align-self: center; }
.news-entry-copy .news-date { display: block; margin-bottom: 14px; letter-spacing: 0; }
.news-entry-copy h3 { font-size: 24px; line-height: 1.5; margin-bottom: 16px; }
.news-entry-copy p { color: var(--muted); line-height: 1.9; margin-bottom: 0; }

/* 平板：压缩栏目标题与工具条，同时保留可访问的菜单关闭状态。 */
@media (max-width: 1100px) {
  .section-page .team-lead-content { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  :root { --page-title-size: 48px; --page-section-space: 32px; }
  .nav-links { visibility: hidden; }
  .nav-links.is-open { visibility: visible; }
  .nav-links a[aria-current] { background: var(--soft-blue); }
  .section-hero { grid-template-columns: 1fr; gap: 24px; padding: 42px 0 30px; }
  .collection-toolbar { align-items: stretch; }
  .topic-panel { grid-template-columns: 1fr 1fr; min-height: 350px; }
  .topic-copy { padding: 28px; }
  .topic-copy h2 { font-size: 26px; }
  .news-entry { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
}

/* 手机：减少嵌套留白，输入与按钮保留触控尺寸，正文不横向溢出。 */
@media (max-width: 640px) {
  :root { --page-title-size: 40px; }
  .section-hero .section-label { margin-bottom: 12px; }
  .section-intro { font-size: 14px; }
  .collection-heading { display: block; }
  .collection-status { margin-top: 10px; }
  .collection-search { width: 100%; }
  .filter-tabs { gap: 6px; }
  .filter-tabs a { padding: 10px 12px; font-size: 13px; }
  .section-page .team-lead-portrait { max-width: 220px; }
  .section-page .member-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-panel { grid-template-columns: 1fr; }
  .topic-art { min-height: 220px; height: 240px; }
  .topic-copy { padding: 28px 24px; }
  .topic-number { margin-bottom: 14px; }
  .topic-copy h2 { font-size: 28px; }
  .topic-copy p { font-size: 14px; }
  .paper-entry { padding: 22px 18px; }
  .paper-year { position: static; display: block; margin-bottom: 12px; }
  .paper-entry h3 { font-size: 17px; }
  .news-entry { grid-template-columns: 1fr; padding: 18px; gap: 20px; }
  .news-entry-copy h3 { font-size: 22px; }
  .news-entry-copy p { font-size: 14px; }
  .site-footer { flex-direction: column; gap: 10px; }
}
