/* ============================================================
   ZenLeaf — spectral liquid glass
   ============================================================ */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg: #080b12;
  --fg: #f5f5f7;
  --dim: rgba(245, 245, 247, .62);
  --glass: linear-gradient(145deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .055) 46%, rgba(150, 205, 255, .075));
  --glass-control: linear-gradient(145deg, rgba(255, 255, 255, .145), rgba(255, 255, 255, .035) 50%, rgba(168, 216, 255, .065));
  --glass-reading: linear-gradient(145deg, rgba(27, 32, 46, .72), rgba(12, 16, 27, .62));
  --glass-edge: linear-gradient(135deg, rgba(255, 255, 255, .48), rgba(107, 202, 255, .22) 31%, rgba(255, 255, 255, .09) 52%, rgba(255, 105, 183, .19) 76%, rgba(91, 246, 218, .22));
  --glass-strong: rgba(255, 255, 255, .105);
  --item: rgba(255, 255, 255, .075);
  --border: rgba(220, 238, 255, .16);
  --border-hi: rgba(235, 246, 255, .36);
  --shadow: 0 24px 68px rgba(0, 0, 0, .34), 0 3px 20px rgba(59, 116, 255, .07);
  --accent1: #74c8ff;
  --accent2: #b69cff;
  --accent3: #55e4ce;
  --link: #64b5ff;
  --blob1: rgba(31, 111, 255, .48);
  --blob2: rgba(155, 81, 255, .34);
  --blob3: rgba(31, 221, 183, .30);
  --ribbon-one: linear-gradient(90deg, transparent, rgba(38, 173, 255, .72) 28%, rgba(117, 81, 255, .64) 62%, transparent);
  --ribbon-two: linear-gradient(90deg, transparent, rgba(37, 229, 190, .62) 29%, rgba(255, 91, 157, .57) 68%, transparent);
  --dispersion-blue: rgba(83, 198, 255, .12);
  --dispersion-pink: rgba(255, 107, 181, .10);
  --panel: rgba(16, 21, 34, .88);
  --primary-bg: #f5f5f7;
  --primary-fg: #1d1d1f;
}
[data-theme="light"] {
  --bg: #eef3fb;
  --fg: #1d1d1f;
  --dim: rgba(29, 29, 31, .60);
  --glass: linear-gradient(145deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .24) 48%, rgba(202, 231, 255, .28));
  --glass-control: linear-gradient(145deg, rgba(255, 255, 255, .52), rgba(255, 255, 255, .18) 52%, rgba(210, 237, 255, .24));
  --glass-reading: linear-gradient(145deg, rgba(255, 255, 255, .84), rgba(244, 248, 255, .72));
  --glass-edge: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(75, 169, 235, .25) 31%, rgba(255, 255, 255, .62) 53%, rgba(230, 103, 169, .20) 76%, rgba(43, 184, 157, .22));
  --glass-strong: rgba(255, 255, 255, .52);
  --item: rgba(255, 255, 255, .48);
  --border: rgba(46, 92, 137, .12);
  --border-hi: rgba(38, 86, 132, .23);
  --shadow: 0 22px 58px rgba(60, 83, 125, .14), 0 3px 16px rgba(61, 151, 211, .08);
  --accent1: #1d1d1f;
  --accent2: #7656a8;
  --accent3: #168c7a;
  --link: #0066cc;
  --blob1: rgba(74, 145, 255, .38);
  --blob2: rgba(164, 106, 238, .26);
  --blob3: rgba(54, 204, 177, .28);
  --ribbon-one: linear-gradient(90deg, transparent, rgba(48, 169, 239, .43) 28%, rgba(124, 92, 226, .38) 62%, transparent);
  --ribbon-two: linear-gradient(90deg, transparent, rgba(51, 198, 170, .38) 29%, rgba(241, 111, 166, .34) 68%, transparent);
  --dispersion-blue: rgba(38, 157, 226, .10);
  --dispersion-pink: rgba(225, 78, 151, .075);
  --panel: rgba(250, 252, 255, .88);
  --primary-bg: #1d1d1f;
  --primary-fg: #fff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s, color .4s;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(128, 128, 128, .35); }

.lang-en { display: none !important; }
[data-lang="en"] .lang-zh { display: none !important; }
[data-lang="en"] .lang-en { display: initial !important; }
[data-lang="en"] div.lang-en, [data-lang="en"] p.lang-en { display: block !important; }

/* ---------- 动态光谱背景 ---------- */
.bg {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(circle at 52% 42%, rgba(255,255,255,.055), transparent 24%),
    radial-gradient(circle at 50% 110%, rgba(70,102,170,.10), transparent 42%);
}
.blob {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(82px); will-change: transform;
  animation: drift 26s ease-in-out infinite alternate;
}
.b1 { width: 54vmax; height: 54vmax; left: -19vmax; top: -24vmax; background: var(--blob1); opacity: .74; animation-duration: 54s; }
.b2 { width: 44vmax; height: 44vmax; right: -16vmax; top: 9vmax; background: var(--blob2); opacity: .66; animation-duration: 66s; animation-delay: -14s; }
.b3 { width: 40vmax; height: 40vmax; left: 29vmax; bottom: -23vmax; background: var(--blob3); opacity: .58; animation-duration: 74s; animation-delay: -28s; }
.ribbon {
  position: absolute; display: block; width: 86vmax; height: 11vmax;
  border-radius: 50%; filter: blur(13px); opacity: .40;
  will-change: transform; pointer-events: none;
  animation: ribbon-drift 48s ease-in-out infinite alternate;
}
.ribbon-one {
  left: -24vmax; top: 21vh; background: var(--ribbon-one);
  transform: rotate(-24deg); box-shadow: 0 0 55px rgba(75,132,255,.16);
}
.ribbon-two {
  right: -31vmax; bottom: 13vh; background: var(--ribbon-two);
  transform: rotate(-25deg); animation-duration: 58s; animation-delay: -17s;
  box-shadow: 0 0 50px rgba(45,211,179,.13);
}
@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  50%  { transform: translate(4vmax,-3vmax) scale(1.08); }
  100% { transform: translate(-3vmax,3vmax) scale(.97); }
}
@keyframes ribbon-drift {
  0% { translate: -2vmax 1vmax; scale: .96 1; }
  50% { translate: 4vmax -3vmax; scale: 1.06 .9; }
  100% { translate: 8vmax 2vmax; scale: 1 1.05; }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .ribbon { animation: none; }
  html { scroll-behavior: auto; }
  .poster-track { scroll-behavior: auto; }
  .workposter, .poster-image { transition: none; }
}

/* ---------- 玻璃基底 ---------- */
.glass {
  background: var(--glass) padding-box, var(--glass-edge) border-box;
  -webkit-backdrop-filter: blur(22px) saturate(178%) contrast(106%);
  backdrop-filter: blur(22px) saturate(178%) contrast(106%);
  border: 1px solid transparent;
  border-radius: 22px;
  box-shadow:
    var(--shadow),
    inset 0 1px 1px rgba(255,255,255,.34),
    inset 1px 0 0 rgba(255,255,255,.09),
    inset 0 -1px 0 rgba(255,255,255,.035);
  position: relative;
}
.glass-reading,
.glass.prose,
form.glass,
.tablecard.glass,
.report.glass,
.navresults {
  background: var(--glass-reading) padding-box, var(--glass-edge) border-box;
  -webkit-backdrop-filter: blur(25px) saturate(145%) contrast(104%);
  backdrop-filter: blur(25px) saturate(145%) contrast(104%);
}
/* 鼠标跟随高光（JS 设置 --mx/--my） */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background:
    radial-gradient(330px circle at var(--mx,50%) var(--my,-35%), rgba(255,255,255,.25), transparent 53%),
    linear-gradient(115deg, var(--dispersion-blue), transparent 35%, transparent 64%, var(--dispersion-pink));
  opacity: .18; transition: opacity .35s; pointer-events: none;
}
.glass:hover::after { opacity: .78; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 14px; z-index: 50;
  margin: 14px auto 0; padding: 10px 22px;
  width: min(860px, calc(100% - 28px));
  display: flex; align-items: center; gap: 18px;
  border-radius: 999px;
  background: var(--glass-control) padding-box, var(--glass-edge) border-box;
}
.brand { font-weight: 800; font-size: 19px; letter-spacing: -.4px; }
.brand span { color: var(--link); }
.nav .links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav .links a {
  padding: 7px 14px; border-radius: 999px; font-size: 14.5px; color: var(--dim);
  transition: color .25s, background .25s;
}
.nav .links a:hover { color: var(--fg); }
.nav .links a.on { color: var(--fg); background: var(--glass-strong); box-shadow: inset 0 1px 0 var(--border-hi); }
.iconbtn {
  border: 1px solid var(--border); background: transparent; color: var(--fg);
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; transition: transform .3s, background .3s;
}
.iconbtn:hover { transform: rotate(40deg); background: var(--glass-strong); }
.langbtn { width: auto; min-width: 38px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .4px; }
.langbtn:hover { transform: none; }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }

/* ---------- Hero（双栏，信息密集） ---------- */
.hero2 {
  display: grid; grid-template-columns: .82fr 1.18fr; gap: 42px; align-items: center;
  padding: clamp(48px, 9vh, 110px) 0 30px; min-height: 74vh;
}
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .4px;
  color: var(--dim); padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--glass-strong);
}
.hero-left h1 { font-size: clamp(44px, 6vw, 68px); font-weight: 800; letter-spacing: -1.5px; line-height: 1.1; margin: 18px 0 4px; }
.hero-left h1 .en { display: block; font-size: .55em; font-weight: 700; letter-spacing: -.5px; }
.lead { color: var(--dim); font-size: 16px; margin: 16px 0 24px; max-width: 46ch; }
.cta.left { justify-content: flex-start; margin-top: 0; }

.ministats { display: grid; grid-template-columns: repeat(4, auto); gap: 30px; margin-top: 34px; justify-content: start; }
.mstat b { font-size: 26px; font-weight: 800; letter-spacing: -.5px; color: var(--fg); }
.mstat i { font-style: normal; font-weight: 800; color: var(--dim); }
.mstat span { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; }

.workshowcase { min-width: 0; padding: 16px; overflow: hidden; }
.showcase-head, .showcase-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.showcase-head { padding: 1px 2px 13px; }
.showcase-tabs {
  display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border);
  border-radius: 999px; background: rgba(127,127,127,.08);
}
.showcase-tab {
  border: 0; border-radius: 999px; padding: 7px 14px; color: var(--dim);
  background: transparent; cursor: pointer; font: 600 12.5px var(--font);
  transition: color .25s, background .25s, box-shadow .25s;
}
.showcase-tab.active {
  color: var(--fg); background: var(--glass-strong);
  box-shadow: 0 3px 12px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.15);
}
.showcase-tab:focus-visible, .showcase-arrows button:focus-visible, .showcase-dots button:focus-visible {
  outline: 2px solid var(--link); outline-offset: 2px;
}
.showcase-count { color: var(--dim); font: 11px var(--mono); letter-spacing: .5px; }
.showcase-count b { color: var(--fg); font-size: 13px; }
.poster-stage { min-width: 0; overflow: hidden; border-radius: 18px; }
.poster-track {
  display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none;
  padding: 1px 1px 4px; cursor: grab; -webkit-overflow-scrolling: touch;
}
.poster-track[hidden] { display: none; }
.poster-track::-webkit-scrollbar { display: none; }
.poster-track.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.workposter {
  flex: 0 0 calc((100% - 12px) / 2); min-width: 0; height: 410px;
  scroll-snap-align: start; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 14px 38px rgba(0,0,0,.24);
  transform: scale(.975); opacity: .82;
  transition: transform .38s cubic-bezier(.2,.7,.2,1), opacity .35s, border-color .35s;
}
.workposter.active { transform: scale(1); opacity: 1; border-color: var(--border-hi); }
.poster-link { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.poster-image, .poster-scrim { position: absolute; inset: 0; display: block; }
.poster-image {
  background-size: cover; background-position: center;
  filter: saturate(.78) contrast(1.03); transform: scale(1.025);
  transition: transform .65s cubic-bezier(.2,.7,.2,1), filter .45s;
}
.poster-image.plain { background: linear-gradient(145deg, #7f817d, #252827); }
.workposter:hover .poster-image { transform: scale(1.07); filter: saturate(.94) contrast(1.05); }
.poster-scrim {
  background:
    linear-gradient(180deg, rgba(5,7,8,.02) 14%, rgba(6,8,9,.30) 48%, rgba(5,7,8,.94) 100%),
    linear-gradient(115deg, rgba(194,158,107,.13), transparent 45%, rgba(97,137,137,.11));
}
.poster-content {
  position: absolute; inset: auto 0 0; z-index: 1; display: flex; flex-direction: column;
  padding: 22px 20px 20px; color: #fff;
}
.poster-meta { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: rgba(255,255,255,.68); font-size: 10px; font-weight: 700; letter-spacing: .45px; }
.poster-meta time { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
.poster-content strong {
  font-size: clamp(17px, 1.55vw, 22px); line-height: 1.28; letter-spacing: -.35px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.poster-summary {
  margin-top: 9px; color: rgba(255,255,255,.68); font-size: 11.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.poster-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.poster-tags i {
  padding: 3px 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px;
  background: rgba(255,255,255,.09); color: rgba(255,255,255,.78);
  font-size: 9.5px; font-style: normal;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.poster-more { margin-top: 14px; color: #fff; font-size: 11.5px; font-weight: 700; }
.poster-more b { color: #d9c39d; }
.poster-empty { width: 100%; padding: 100px 20px; color: var(--dim); text-align: center; }
.showcase-controls { padding: 12px 2px 0; }
.showcase-dots { display: flex; gap: 6px; }
.showcase-dots button {
  width: 6px; height: 6px; border: 0; border-radius: 999px; padding: 0;
  background: var(--dim); opacity: .35; cursor: pointer; transition: width .25s, opacity .25s, background .25s;
}
.showcase-dots button.active { width: 20px; opacity: .95; background: var(--fg); }
.showcase-arrows { display: flex; gap: 7px; }
.showcase-arrows button {
  display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--border);
  border-radius: 50%; background: var(--glass-strong); color: var(--fg); cursor: pointer;
  font: 16px var(--font); transition: transform .2s, border-color .2s, background .2s;
}
.showcase-arrows button:hover { transform: translateY(-1px); border-color: var(--border-hi); background: var(--item); }
.workkicker {
  display: block; margin-bottom: 3px; color: var(--dim); font-size: 10.5px;
  font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
}

.milestone-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px;
}
.milestone {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; align-items: center; gap: 18px;
  min-height: 142px; padding: 22px; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s, box-shadow .3s;
}
.milestone:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.milestone-mark {
  display: grid; place-items: center; width: 78px; height: 64px; border-radius: 17px;
  color: #fff; font-size: 13px; font-weight: 850; line-height: 1.05; text-align: center; letter-spacing: -.2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 10px 24px rgba(0,0,0,.16);
}
.mark-njfu { background: linear-gradient(145deg, #16704d, #0c3f31); }
.mark-ualberta { background: linear-gradient(145deg, #0a6644, #f2c230); color: #fff; }
.mark-xuexi { background: linear-gradient(145deg, #d71920, #8f0b10); font-size: 16px; letter-spacing: 2px; }
.mark-modern { background: linear-gradient(145deg, #20242b, #4d5665); font-size: 10px; letter-spacing: 1px; }
.milestone-copy { min-width: 0; }
.milestone h3 { margin: 3px 0 5px; font-size: 16.5px; line-height: 1.4; }
.milestone p { color: var(--dim); font-size: 12.5px; line-height: 1.55; }
.milestone-arrow {
  align-self: start; color: var(--dim); font-size: 15px; transition: transform .25s, color .25s;
}
.milestone:hover .milestone-arrow { color: var(--fg); transform: translate(2px, -2px); }

/* 登录页头像 */
.avatar {
  width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 26px;
  font-size: 36px; font-weight: 800; color: var(--primary-fg); position: relative;
  background: var(--primary-bg);
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.avatar.small { width: 72px; height: 72px; font-size: 24px; margin: 0 auto 18px; }
.grad { color: var(--dim); }
.cta { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--border); color: var(--fg);
  background: var(--glass-control); cursor: pointer;
  -webkit-backdrop-filter: blur(18px) saturate(175%); backdrop-filter: blur(18px) saturate(175%);
  box-shadow: inset 0 1px 0 var(--border-hi);
  transition: transform .25s, box-shadow .25s, background .25s;
  font-family: var(--font);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.3), inset 0 1px 0 var(--border-hi); }
.btn.primary {
  background: var(--primary-bg); border-color: transparent; color: var(--primary-fg);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.btn.primary:hover { box-shadow: 0 12px 30px rgba(0,0,0,.26); }
.btn.danger { color: #ff6b6b; }
.btn.wide { width: 100%; justify-content: center; }
.btn.slim { padding: 5px 12px; font-size: 13px; }

/* ---------- 导航搜索（玻璃条变形为搜索框） ---------- */
.navsearch { display: none; flex: 1; }
.navsearch input {
  width: 100%; background: none; border: none; outline: none;
  font: 15px var(--font); color: var(--fg); padding: 7px 2px;
}
.nav.searching .links, .nav.searching .brand { display: none; }
.nav.searching .navsearch { display: flex; animation: fadein .25s; }
.nav.searching #searchBtn svg { display: none; }
.nav.searching #searchBtn::before { content: "✕"; font-size: 14px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.navresults {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  border: 1px solid var(--border); border-radius: 20px;
  -webkit-backdrop-filter: blur(28px) saturate(170%); backdrop-filter: blur(28px) saturate(170%);
  box-shadow: var(--shadow), inset 0 1px 0 var(--border-hi);
  padding: 8px; max-height: min(58vh, 460px); overflow-y: auto;
}
.navresults a { display: block; padding: 11px 16px; border-radius: 13px; transition: background .2s; }
.navresults a:hover, .navresults a.sel { background: var(--glass-strong); }
.navresults b { display: block; font-size: 14.5px; font-weight: 600; }
.navresults p { font-size: 12.5px; color: var(--dim); margin-top: 1px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.navresults .empty { padding: 14px 16px; color: var(--dim); font-size: 13.5px; text-align: center; }

/* ---------- 滚动浮现 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; } .d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; } .d4 { transition-delay: .4s; } .d5 { transition-delay: .5s; }

/* ---------- 区块 ---------- */
.sect { padding: 56px 0; }
.sect h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -.8px; margin-bottom: 28px; }
.sect h2 .grad { font-size: .55em; font-weight: 700; margin-left: 10px; vertical-align: 3px; }
[data-lang="en"] .sect h2 .grad, [data-lang="en"] .pagehead h1 .grad { display: none; }
.narrow { width: min(640px, 100%); margin: 0 auto; }
.vcenter { min-height: 70vh; display: flex; align-items: center; }
.center { text-align: center; }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: .92em; }
.more { margin-top: 22px; text-align: center; }
.more a { color: var(--link); font-weight: 600; }
.more a:hover { text-decoration: underline; }

.card { padding: 30px 34px; }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 10px 0 0; }
.stat { padding: 24px 10px; text-align: center; }
.stat b { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -1px; color: var(--fg); }
.stat i { font-style: normal; font-size: 20px; color: var(--accent2); font-weight: 800; }
.stat span { display: block; margin-top: 4px; color: var(--dim); font-size: 13.5px; }

/* ---------- 方向 tiles ---------- */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile { padding: 26px 22px; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; display: flex; flex-direction: column; }
.tile:hover { transform: translateY(-4px); }
.ticon { font-size: 30px; margin-bottom: 12px; color: var(--fg); }
.tile h3 { font-size: 16.5px; margin-bottom: 8px; font-weight: 700; }
.tile p { font-size: 13.5px; color: var(--dim); }
.dimtile { opacity: .65; }
.rlinks { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.rlinks a {
  font-size: 12.5px; font-weight: 600; color: var(--link);
  padding: 6px 12px; border-radius: 999px; align-self: flex-start;
  border: 1px solid var(--border); background: var(--glass-strong);
  transition: border-color .2s, color .2s;
}
.rlinks a:hover { border-color: var(--link); }

/* ---------- 论文 ---------- */
.pubs { display: flex; flex-direction: column; gap: 12px; }
.pub {
  display: flex; align-items: center; gap: 18px; padding: 18px 24px;
  transition: transform .3s, border-color .3s;
}
.pub:hover { transform: translateX(6px); border-color: var(--border-hi); }
.pub .year { font-family: var(--mono); color: var(--dim); font-weight: 700; font-size: 14px; min-width: 44px; }
.pub .ptitle { flex: 1; font-weight: 600; font-size: 15px; }
.pub .ptitle em { display: block; font-style: normal; font-weight: 500; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.pub .cite {
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  padding: 4px 12px; border-radius: 999px; color: var(--primary-fg);
  background: var(--primary-bg);
}

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: var(--border-hi);
  border-radius: 2px;
}
.titem { position: relative; margin-bottom: 18px; }
.tdot {
  position: absolute; left: -26px; top: 26px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--fg); box-shadow: 0 0 0 4px var(--glass-strong);
}
.titem.featured .tdot { background: var(--fg); }
.titem.featured .tcard { border-color: var(--border-hi); }
.tcard { padding: 20px 26px; }
.tcard b { color: var(--dim); font-family: var(--mono); font-size: 13px; }
.tcard h3 { font-size: 17px; margin: 4px 0 6px; }
.tcard p { color: var(--dim); font-size: 14px; }

/* ---------- 文章卡片 ---------- */
.postgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.postgrid.wide { grid-template-columns: repeat(3, 1fr); }
.pcard { overflow: hidden; display: flex; flex-direction: column; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.pcard:hover { transform: translateY(-6px); }
.pcover { height: 150px; background-size: cover; background-position: center; }
.pbody { padding: 20px 22px; }
.pbody time { font-size: 12.5px; color: var(--dim); font-family: var(--mono); }
.pbody h3 { font-size: 16.5px; margin: 6px 0 8px; font-weight: 700; }
.pbody p { font-size: 13.5px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tags.center { justify-content: center; }
.tag {
  font-size: 12px; padding: 3px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--dim);
  background: var(--glass-strong); transition: color .2s, border-color .2s;
}
a.tag:hover { color: var(--fg); border-color: var(--border-hi); }
.pill {
  font-size: 11px; padding: 2px 9px; border-radius: 999px; vertical-align: 2px;
  background: var(--primary-bg); color: var(--primary-fg); font-weight: 700;
}

/* ---------- 页面头 ---------- */
.pagehead { padding: 64px 0 8px; text-align: center; }
.pagehead h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -1px; }
.pagehead h1 .grad { font-size: .55em; margin-left: 10px; }
.crumbs { margin: 10px 0; color: var(--dim); font-size: 14px; }
.crumbs a:hover { color: var(--fg); }

/* ---------- 文章页 ---------- */
.article { width: min(780px, 100%); margin: 0 auto; }
.prose { font-size: 16px; }
.prose h1, .prose h2, .prose h3 { margin: 1.6em 0 .6em; letter-spacing: -.4px; line-height: 1.35; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 19px; }
.prose p, .prose ul, .prose ol { margin: .9em 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose strong { font-weight: 700; }
.prose a { color: var(--link); }
.prose a:hover { text-decoration: underline; }
.prose img, .prose video {
  max-width: 100%; border-radius: 16px; margin: 14px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); display: block;
}
.prose blockquote {
  border-left: 3px solid var(--accent2); padding: 4px 18px; margin: 1em 0;
  color: var(--dim); background: var(--glass-strong); border-radius: 0 12px 12px 0;
}
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: rgba(127,127,127,.18); padding: 2px 7px; border-radius: 6px;
}
.prose pre {
  background: rgba(20, 20, 22, .92); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px; overflow-x: auto; margin: 1em 0;
}
[data-theme="light"] .prose pre { background: #1d1d1f; }
.prose pre code { background: none; padding: 0; color: #f5f5f7; font-size: 13.5px; line-height: 1.6; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 14.5px; }
.prose th, .prose td { padding: 9px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { color: var(--fg); font-weight: 700; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* ---------- 搜索 ---------- */
.searchbox {
  display: flex; align-items: center; gap: 12px; padding: 6px 20px;
  border-radius: 999px; margin-bottom: 26px;
}
.searchbox svg { color: var(--dim); flex: none; }
.searchbox input {
  flex: 1; background: none; border: none; outline: none;
  font: 16px var(--font); color: var(--fg); padding: 12px 0;
}
.results { display: flex; flex-direction: column; gap: 12px; }
.result { padding: 20px 26px; transition: transform .3s, border-color .3s; }
.result:hover { transform: translateX(6px); border-color: var(--border-hi); }
.result h3 { font-size: 16.5px; margin-bottom: 4px; }
.result p { font-size: 13.5px; color: var(--dim); }
.result time { font-size: 12px; color: var(--dim); font-family: var(--mono); }

/* ---------- 表单 / 后台 ---------- */
.input {
  width: 100%; padding: 11px 15px; margin-top: 5px;
  background: rgba(127,127,127,.10); border: 1px solid var(--border); border-radius: 12px;
  font: 14.5px var(--font); color: var(--fg); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.input:focus { border-color: var(--link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent); }
.input.slim { width: auto; padding: 6px 10px; margin: 0; font-size: 13px; }
textarea.input { resize: vertical; line-height: 1.6; }
label { display: block; margin-bottom: 14px; font-size: 13.5px; color: var(--dim); font-weight: 600; }
.checkrow { display: flex; align-items: center; gap: 10px; color: var(--fg); }
.checkrow input { width: 16px; height: 16px; accent-color: var(--fg); }
.formrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editform .btn { margin-top: 6px; }
.loginbox { width: 100%; max-width: 380px; margin: 0 auto; text-align: center; }
.loginbox .input { margin: 16px 0; text-align: center; }
.error { color: #ff6b6b; font-size: 14px; margin: 8px 0; }
.flash {
  width: min(640px, calc(100% - 36px)); margin: 18px auto 0;
  padding: 13px 22px; border-radius: 14px; font-size: 14.5px; text-align: center;
}
.adminnav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.tablecard { padding: 10px 18px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; color: var(--dim); font-size: 12.5px; font-weight: 600; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 13px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-family: var(--mono); color: var(--fg); }
.table.slim td { padding: 8px 6px; font-size: 13.5px; }
.actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }

/* ---------- 上传 ---------- */
.dropzone {
  display: block; border: 2px dashed var(--border); border-radius: 18px;
  padding: 36px 20px; text-align: center; cursor: pointer; margin-bottom: 16px;
  transition: border-color .25s, background .25s;
}
.dropzone:hover, .dropzone.over { border-color: var(--border-hi); background: var(--glass-strong); }
#filelist { margin-bottom: 14px; font-size: 13px; }
.report ul { list-style: none; }
.report li { padding: 5px 0; font-size: 13.5px; }

/* ---------- 图表 ---------- */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-top: 10px; }
.cbar { flex: 1; position: relative; height: 100%; display: flex; align-items: flex-end; gap: 2px; border-radius: 4px; }
.cbar:hover { background: rgba(127,127,127,.12); }
.cv, .cu { flex: 1; border-radius: 4px 4px 0 0; min-height: 2px; transition: height .6s cubic-bezier(.2,.7,.2,1); }
.cv { background: var(--fg); }
.cu { background: var(--accent2); }
.legend { margin-top: 14px; font-size: 12.5px; }
.legend .lv, .legend .lu { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; }
.legend .lv { background: var(--accent1); }
.legend .lu { background: var(--accent2); }

/* ---------- Footer ---------- */
.footer {
  margin: 70px auto 30px; text-align: center; color: var(--dim); font-size: 13.5px;
  display: flex; flex-direction: column; gap: 4px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .nav, .btn {
    background: linear-gradient(145deg, rgba(32,38,54,.96), rgba(15,19,30,.94)) padding-box,
                var(--glass-edge) border-box;
  }
  [data-theme="light"] .glass,
  [data-theme="light"] .nav,
  [data-theme="light"] .btn {
    background: linear-gradient(145deg, rgba(255,255,255,.97), rgba(239,245,253,.94)) padding-box,
                var(--glass-edge) border-box;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .grid4 { grid-template-columns: repeat(2, 1fr); }
  .postgrid, .postgrid.wide { grid-template-columns: 1fr 1fr; }
  .hero2 { grid-template-columns: 1fr; gap: 26px; min-height: 0; padding-top: 48px; }
  .ministats { gap: 22px; }
  .workposter { height: 440px; }
}
@media (max-width: 620px) {
  .blob { filter: blur(68px); }
  .ribbon { width: 112vmax; height: 16vmax; filter: blur(16px); opacity: .31; }
  .glass {
    -webkit-backdrop-filter: blur(17px) saturate(160%);
    backdrop-filter: blur(17px) saturate(160%);
    box-shadow: 0 16px 42px rgba(0,0,0,.25), inset 0 1px 1px rgba(255,255,255,.26);
  }
  .glass-reading, .glass.prose, form.glass, .tablecard.glass, .report.glass, .navresults {
    -webkit-backdrop-filter: blur(19px) saturate(140%);
    backdrop-filter: blur(19px) saturate(140%);
  }
  .nav { gap: 8px; padding: 8px 16px; }
  .nav .links a { padding: 6px 10px; font-size: 13.5px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid4, .grid2, .postgrid, .postgrid.wide, .formrow { grid-template-columns: 1fr; }
  .ministats { grid-template-columns: repeat(2, auto); row-gap: 18px; }
  .workshowcase { padding: 12px; }
  .showcase-head { padding-bottom: 10px; }
  .showcase-tab { padding: 6px 11px; font-size: 12px; }
  .workposter { flex-basis: 82%; height: 430px; }
  .poster-content { padding: 20px 18px 18px; }
  .poster-content strong { font-size: 19px; }
  .milestone { grid-template-columns: 68px minmax(0, 1fr) auto; padding: 20px; }
  .milestone-mark { width: 68px; height: 58px; }
  .pub { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; }
  .pub .year { grid-column: 1; grid-row: 1; }
  .pub .cite { grid-column: 2; grid-row: 1; }
  .pub .ptitle { grid-column: 1 / -1; grid-row: 2; }
  .card { padding: 22px 20px; }
}
@media (max-width: 430px) {
  main { width: min(100% - 24px, 1180px); }
  .nav { width: calc(100% - 16px); padding: 8px 10px; }
  .brand { font-size: 17px; }
  .nav .links { gap: 0; }
  .nav .links a { padding: 6px 7px; font-size: 12.5px; }
  .iconbtn { width: 32px; height: 32px; }
  .langbtn { min-width: 34px; padding: 0 7px; }
  .hero-left h1 { font-size: 42px; }
  .workposter { flex-basis: 86%; height: 420px; }
  .poster-summary { -webkit-line-clamp: 2; }
  .milestone-grid { grid-template-columns: 1fr; }
  .milestone { min-height: 0; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 14px; padding: 18px; }
  .milestone-mark { width: 62px; height: 54px; border-radius: 15px; }
}
