/* lab-enhance.css — 轻量动效与学术氛围增强（全站主要页面共用） */

/* 滚动淡入（.lab-reveal 由 JS 添加，JS 不可用时内容不受影响） */
.lab-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
.lab-reveal.lab-in { opacity: 1; transform: none; }

/* 成员卡片 hover 浮起 + 头像微放大 */
.member-card { transition: transform .35s ease, box-shadow .35s ease; border-radius: 10px; padding: 12px 6px; }
.member-card:hover { transform: translateY(-6px); box-shadow: 0 10px 24px rgba(40, 60, 90, .13); }
.member-card .member-photo, .pi-row .member-photo { transition: box-shadow .35s ease; }
.member-card .member-photo img { transition: transform .45s ease; }
.member-card:hover .member-photo { box-shadow: 0 0 0 3px rgba(36, 103, 141, .18); }
.member-card:hover .member-photo img { transform: scale(1.06); }

/* 研究配图 hover 轻放大 */
.wsite-image img { transition: transform .45s ease, box-shadow .45s ease; }
.wsite-image:hover img { transform: scale(1.02); }

/* 页角 DNA 双螺旋水印（学术氛围，极低透明度） */
body::after {
  content: "";
  position: fixed;
  right: -30px;
  bottom: -50px;
  width: 300px;
  height: 520px;
  pointer-events: none;
  z-index: 9990;
  opacity: .05;
  background-repeat: no-repeat;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 400' fill='none' stroke='%232c3e50' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M120 10 C40 70 40 130 120 190 C200 250 200 310 120 370'/%3E%3Cpath d='M60 10 C140 70 140 130 60 190 C-20 250 -20 310 60 370'/%3E%3Cpath d='M78 40 L102 40'/%3E%3Cpath d='M70 85 L110 85'/%3E%3Cpath d='M70 135 L110 135'/%3E%3Cpath d='M78 185 L102 185'/%3E%3Cpath d='M90 235 L90 235'/%3E%3Cpath d='M70 260 L110 260'/%3E%3Cpath d='M70 310 L110 310'/%3E%3Cpath d='M78 355 L102 355'/%3E%3C/svg%3E");
}

/* ---- 全页动态背景：粒子连线 canvas + 漂移光晕（浅色主题配色，位于内容层之下） ---- */
#lab-bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.lab-blob { position: fixed; border-radius: 50%; filter: blur(90px); opacity: .16; pointer-events: none; z-index: -1; }
.lab-blob.b1 { width: 480px; height: 480px; left: -140px; top: -160px; background: radial-gradient(circle, rgba(141, 36, 36, .55), transparent 65%); animation: lab-drift 16s ease-in-out infinite alternate; }
.lab-blob.b2 { width: 540px; height: 540px; right: -160px; bottom: -200px; background: radial-gradient(circle, rgba(36, 103, 141, .55), transparent 65%); animation: lab-drift 20s ease-in-out infinite alternate-reverse; }
@keyframes lab-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.12); } }

/* body 白底会上浮为根画布背景（位于 z-index:-1 之下），只需让内容区透明即可透出动效 */
.main-wrap { background: transparent; }

/* 用户偏好减少动效时全部禁用 */
@media (prefers-reduced-motion: reduce) {
  .lab-reveal, .lab-reveal.lab-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .member-card, .member-card .member-photo img, .wsite-image img { transition: none !important; }
  .member-card:hover, .wsite-image:hover img, .member-card:hover .member-photo img { transform: none !important; }
  body::after, #lab-bg-canvas, .lab-blob { display: none !important; }
}
