/*-----------------------------------*\
  #style.css — 流体首屏 + vcard 内容
\*-----------------------------------*/

/*-----------------------------------*\
  #CUSTOM PROPERTY  （改这里换主题色）
\*-----------------------------------*/
:root {
  /* 主背景 —— 米白色（暖调奶油白） */
  --bg: hsl(42, 45%, 96%);
  --surface: hsl(40, 55%, 99%);
  --surface-2: hsl(40, 38%, 93%);
  --border: hsl(38, 25%, 85%);
  --jet: hsl(38, 28%, 90%);

  /* 活泼强调色：青 -> 紫 渐变 */
  --accent-1: hsl(190, 95%, 45%);
  --accent-2: hsl(265, 85%, 60%);
  --accent-grad: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-soft: hsla(190, 95%, 45%, 0.12);

  /* 文本（浅色主题下改为深色） */
  --white-1: hsl(220, 30%, 14%);
  --white-2: hsl(220, 30%, 16%);
  --light-gray: hsl(220, 12%, 42%);
  --light-gray-70: hsla(220, 12%, 35%, 0.75);

  /* 字体 */
  --ff-poppins: 'Poppins', sans-serif;
  --fs-1: 32px;
  --fs-2: 24px;
  --fs-3: 22px;
  --fs-4: 18px;
  --fs-5: 16px;
  --fs-6: 15px;
  --fs-7: 14px;
  --fs-8: 12px;

  /* 阴影 */
  --shadow-1: -4px 8px 24px hsla(0, 0%, 0%, 0.35);
  --shadow-2: 0 16px 30px hsla(0, 0%, 0%, 0.35);
  --shadow-3: 0 16px 40px hsla(0, 0%, 0%, 0.35);

  --t1: 0.25s ease;
  --t2: 0.5s ease-in-out;
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; }
li { list-style: none; }
img, ion-icon, a, button, time, span { display: block; }
button { font: inherit; background: none; border: none; text-align: left; cursor: pointer; }
input, textarea { display: block; width: 100%; background: none; font: inherit; }
::selection { background: var(--accent-1); color: var(--bg); }
:focus { outline-color: var(--accent-1); }
html { font-family: var(--ff-poppins); scroll-behavior: smooth; }
body { background: var(--bg); color: var(--white-2); overflow-x: hidden; }

/*-----------------------------------*\
  #流体背景 Canvas
\*-----------------------------------*/
#fluid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: auto;
}

/*-----------------------------------*\
  #INTRO 首屏
\*-----------------------------------*/
#intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;            /* 让鼠标事件穿透到下面的流体 canvas */
}
#intro.hide {
  opacity: 0;
  transform: scale(1.15);
  pointer-events: none;
}
.intro-inner { text-align: center; padding: 20px; pointer-events: auto; }   /* 按钮区域恢复可点击 */
.intro-avatar {
  width: 130px; height: 130px;
  margin: 0 auto 26px;
  border-radius: 50%;
  padding: 4px;
  background: var(--accent-grad);
  box-shadow: 0 0 40px hsla(265, 90%, 68%, 0.45);
}
.intro-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.intro-name {
  font-size: 42px; font-weight: 600;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
.intro-tagline { color: var(--light-gray); margin-top: 8px; font-weight: 300; }
.start-btn {
  margin: 38px auto 0;
  padding: 14px 42px;
  border-radius: 50px;
  font-size: var(--fs-5);
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--bg);
  background: var(--accent-grad);
  box-shadow: 0 8px 30px hsla(190, 95%, 60%, 0.4);
  transition: transform var(--t1), box-shadow var(--t1);
  animation: pulse 2.4s ease-in-out infinite;
}
.start-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 40px hsla(265, 90%, 68%, 0.55); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 30px hsla(190, 95%, 60%, 0.4); }
  50% { box-shadow: 0 8px 44px hsla(265, 90%, 68%, 0.6); }
}
.intro-hint { color: var(--light-gray-70); font-size: var(--fs-8); margin-top: 18px; }

/*-----------------------------------*\
  #CONTENT 内容区
\*-----------------------------------*/
#content { position: relative; z-index: 1; opacity: 0; background: var(--bg); }
#content.show { opacity: 1; transition: opacity 0.8s ease 0.3s; }
.hidden { display: none !important; }

main {
  margin: 15px 12px;
  margin-bottom: 75px;
  min-width: 259px;
  max-width: 1280px;
}

.sidebar, article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-1);
  z-index: 1;
}
.separator { width: 100%; height: 1px; background: var(--border); margin: 16px 0; }

.icon-box {
  position: relative;
  background: var(--jet);
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; justify-content: center; align-items: center;
  font-size: 16px; color: var(--accent-1);
  box-shadow: var(--shadow-1); z-index: 1;
}

article { display: none; }
article.active { display: block; animation: fade 0.5s ease backwards; }
@keyframes fade { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: translateY(0); } }

.h2, .h3, .h4, .h5 { color: var(--white-2); text-transform: capitalize; }
.h2 { font-size: var(--fs-1); }
.h3 { font-size: var(--fs-2); }
.h4 { font-size: var(--fs-4); }
.h5 { font-size: var(--fs-7); font-weight: 500; }

.article-title { position: relative; padding-bottom: 7px; margin-bottom: 20px; }
.article-title::after {
  content: ""; position: absolute; bottom: 0; left: 0;
  width: 40px; height: 3px; border-radius: 3px;
  background: var(--accent-grad);
}

/*-----------------------------------*\
  #SIDEBAR
\*-----------------------------------*/
.sidebar { margin-bottom: 15px; max-height: 112px; overflow: hidden; transition: var(--t2); }
.sidebar.active { max-height: 420px; }
.sidebar-info { position: relative; display: flex; align-items: center; gap: 15px; }
.avatar-box { background: var(--jet); border-radius: 20px; overflow: hidden; }
.avatar-box img { width: 80px; height: auto; display: block; }
.info-content .name { color: var(--white-2); font-size: var(--fs-3); font-weight: 500; letter-spacing: -0.25px; margin-bottom: 8px; }
.info-content .title { color: var(--white-1); background: var(--jet); font-size: var(--fs-8); padding: 3px 12px; border-radius: 8px; width: max-content; }
.info_more-btn {
  position: absolute; top: -15px; right: -15px;
  border-radius: 0 15px; font-size: 13px; color: var(--accent-1);
  background: var(--jet); padding: 10px; box-shadow: var(--shadow-2);
  transition: var(--t1); z-index: 1;
}
.info_more-btn:hover { background: var(--accent-grad); color: var(--bg); }
.sidebar-info_more { opacity: 0; visibility: hidden; transition: var(--t2); }
.sidebar.active .sidebar-info_more { opacity: 1; visibility: visible; }
.contacts-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.contact-item { display: flex; align-items: center; gap: 16px; }
.contact-info { width: calc(100% - 46px); }
.contact-title { color: var(--light-gray-70); font-size: var(--fs-8); text-transform: uppercase; margin-bottom: 2px; }
.contact-info :is(.contact-link, time, address) { color: var(--white-2); font-size: var(--fs-7); overflow-wrap: anywhere; word-break: break-word; }
.social-list { display: flex; gap: 15px; padding-left: 7px; padding-bottom: 4px; }
.social-item .social-link { color: var(--light-gray-70); font-size: 18px; }
.social-item .social-link:hover { color: var(--accent-1); }

/*-----------------------------------*\
  #NAVBAR
\*-----------------------------------*/
.navbar {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: hsla(42, 45%, 98%, 0.85); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-2); z-index: 5;
}
.navbar-list { display: flex; flex-wrap: wrap; justify-content: center; padding: 0 10px; }
.navbar-link { color: var(--light-gray); font-size: var(--fs-8); padding: 20px 9px; transition: color var(--t1); }
.navbar-link:hover { color: var(--light-gray-70); }
.navbar-link.active { color: var(--accent-1); }

/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/
.about-text { color: var(--light-gray); font-size: var(--fs-6); font-weight: 300; line-height: 1.6; margin-bottom: 30px; }
.service { margin-bottom: 30px; }
.service-title { margin-bottom: 20px; }
.service-list { display: grid; grid-template-columns: 1fr; gap: 20px; }
.service-item {
  position: relative; background: var(--surface-2);
  padding: 20px; border-radius: 14px; box-shadow: var(--shadow-2); z-index: 1;
  border: 1px solid var(--border);
}
.service-icon-box { font-size: 30px; color: var(--accent-1); margin-bottom: 12px; }
.service-item-title { margin-bottom: 7px; }
.service-item-text { color: var(--light-gray); font-size: var(--fs-6); font-weight: 300; line-height: 1.6; }

/*-----------------------------------*\
  #TIMELINE（教育/实习/论文/获奖）
\*-----------------------------------*/
.timeline { margin-bottom: 30px; }
.timeline .title-wrapper { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.timeline-list { margin-left: 45px; font-size: var(--fs-6); }
.timeline-item { position: relative; }
.timeline-item:not(:last-child) { margin-bottom: 20px; }
.timeline-item-title { font-size: var(--fs-6); line-height: 1.3; margin-bottom: 7px; }
.timeline-list span { color: var(--accent-1); font-weight: 400; }
.timeline-item:not(:last-child)::before {
  content: ""; position: absolute; top: -25px; left: -30px;
  width: 1px; height: calc(100% + 50px); background: var(--border);
}
.timeline-item::after {
  content: ""; position: absolute; top: 5px; left: -33px;
  height: 6px; width: 6px; border-radius: 50%;
  background: var(--accent-grad); box-shadow: 0 0 0 4px var(--surface);
}
.timeline-text { color: var(--light-gray); font-weight: 300; line-height: 1.6; margin-top: 4px; }

/* 教育经历：校徽 + 标题行 */
.edu-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.edu-logo { width: 38px; height: auto; border-radius: 10px; flex-shrink: 0; background: var(--surface); padding: 4px; box-sizing: border-box; }
.edu-info { min-width: 0; flex: 1; }
.edu-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.edu-date { color: var(--accent-1); font-size: var(--fs-7); white-space: nowrap; flex-shrink: 0; font-weight: 400; }
.edu-major { color: var(--light-gray); font-size: var(--fs-7); font-weight: 300; margin-top: 3px; line-height: 1.45; }

/* Publications 论文卡片（左图右文 + 下方介绍） */
.publications { padding: 22px; }
.papers { margin-bottom: 10px; }
.paper-list { display: grid; grid-template-columns: 1fr; gap: 24px; margin-bottom: 10px; }
.paper-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow-2); transition: transform var(--t1), border-color var(--t1); position: relative; }
.paper-card:hover { transform: translateY(-3px); border-color: var(--accent-1); z-index: 5; }
.paper-top { display: flex; gap: 20px; align-items: flex-start; }
.paper-fig { flex: 0 0 40%; max-width: 40%; border-radius: 12px; background: var(--surface); position: relative; }
.paper-fig img { width: 100%; height: auto; display: block; border-radius: 12px; transition: transform 0.2s ease; will-change: transform; }
.paper-fig:hover { z-index: 20; }
.paper-fig:hover img { transform: scale(1.8); transform-origin: center; position: relative; z-index: 21; box-shadow: 0 18px 50px hsla(0, 0%, 0%, 0.45); }
.paper-meta { flex: 1; min-width: 0; padding-top: 2px; }
.paper-title { color: var(--white-2); font-size: var(--fs-5); font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.paper-venue { color: var(--accent-1); font-size: var(--fs-7); font-weight: 400; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; white-space: nowrap; }
.ccf { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px; color: var(--bg); }
.ccf-a { background: var(--accent-grad); }
.ccf-b { background: hsl(40, 85%, 52%); }
.author { color: var(--light-gray); font-size: var(--fs-7); }
.paper-desc { color: var(--light-gray); font-size: var(--fs-6); font-weight: 300; line-height: 1.65; margin-top: 16px; }
@media (max-width: 579px) {
  .paper-top { flex-direction: column; }
  .paper-fig { flex: none; max-width: 100%; }
  .paper-fig img { height: auto; }
}
.inline-link { color: var(--accent-1); display: inline; }
.inline-link:hover { text-decoration: underline; }

/*-----------------------------------*\
  #PROJECTS（含视频）
\*-----------------------------------*/
.filter-list { display: none; }
.filter-select-box { position: relative; margin-bottom: 25px; }
.project-list { display: grid; grid-template-columns: 1fr; gap: 30px; margin-bottom: 10px; }
.project-item { display: none; }
.project-item.active { display: block; animation: scaleUp 0.25s ease forwards; }
@keyframes scaleUp { 0% { transform: scale(0.6); } 100% { transform: scale(1); } }

.project-card, .project-card-link {
  position: relative; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; box-shadow: var(--shadow-2); z-index: 1;
  transition: transform var(--t1), border-color var(--t1);
}
.project-card:hover, .project-card-link:hover { border-color: var(--accent-1); }

.project-video {
  position: relative; width: 100%; background: var(--bg); border-radius: 16px 16px 0 0; overflow: hidden;
}
.project-video video { width: 100%; height: auto; border: none; display: block; }
.project-video iframe { width: 100%; height: 100%; border: none; display: block; aspect-ratio: 16/9; }
.video-hint { color: var(--light-gray-70); font-size: var(--fs-8); font-weight: 300; text-align: center; margin: 8px 0 0; padding: 0 20px; }
.project-body { padding: 20px; }
.project-title { color: var(--white-2); font-size: var(--fs-5); font-weight: 500; margin-bottom: 4px; }
.project-category { color: var(--accent-1); font-size: var(--fs-7); margin-bottom: 10px; }
.project-desc { color: var(--light-gray); font-size: var(--fs-6); font-weight: 300; line-height: 1.7; margin-bottom: 12px; }
.project-desc:last-child { margin-bottom: 0; }
.project-desc b { color: var(--accent-1); font-weight: 600; }
.project-body-text { border-top: 3px solid var(--accent-grad); border-image: var(--accent-grad) 1; }

.project-img { position: relative; width: 100%; height: 200px; border-radius: 16px; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t1); }
.project-card-link:hover .project-img img { transform: scale(1.08); }
.project-item-icon-box {
  background: var(--jet); color: var(--accent-1);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  font-size: 20px; padding: 18px; border-radius: 12px;
  opacity: 0; z-index: 1; transition: var(--t1);
}
.project-card-link:hover .project-item-icon-box { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.project-card-link .project-title, .project-card-link .project-category { margin-left: 14px; padding-bottom: 14px; }

/*-----------------------------------*\
  #CONTACT
\*-----------------------------------*/
.contact-form { margin-bottom: 10px; }
.form-title { margin-bottom: 20px; }
.input-wrapper { display: grid; grid-template-columns: 1fr; gap: 25px; margin-bottom: 25px; }
.form-input {
  color: var(--white-2); font-size: var(--fs-6); padding: 13px 20px;
  border: 1px solid var(--border); border-radius: 14px; outline: none; background: var(--surface-2);
}
.form-input::placeholder { font-weight: 500; }
.form-input:focus { border-color: var(--accent-1); }
textarea.form-input { min-height: 100px; height: 120px; max-height: 200px; resize: vertical; margin-bottom: 25px; }
.form-btn {
  position: relative; width: 100%; color: var(--accent-1);
  background: var(--jet); display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 13px 20px; border-radius: 14px; font-size: var(--fs-6);
  box-shadow: var(--shadow-3); transition: var(--t1);
}
.form-btn:hover { background: var(--accent-grad); color: var(--bg); }
.form-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/*-----------------------------------*\
  #RESPONSIVE
\*-----------------------------------*/
@media (min-width: 580px) {
  :root { --fs-1: 32px; --fs-2: 24px; }
  .sidebar, article { width: 520px; margin-inline: auto; padding: 30px; }
  .icon-box { width: 48px; height: 48px; border-radius: 12px; font-size: 18px; }
  .service-list { grid-template-columns: 1fr 1fr; }
  main { margin-top: 60px; margin-bottom: 100px; }
  .input-wrapper { grid-template-columns: 1fr 1fr; }
  .form-btn { width: max-content; margin-left: auto; }
}
@media (min-width: 768px) {
  .navbar-link { font-size: var(--fs-7); }
  .filter-select-box { display: none; }
  .filter-list { display: flex; gap: 25px; padding-left: 5px; margin-bottom: 30px; }
  .filter-item button { color: var(--light-gray); font-size: var(--fs-5); transition: color var(--t1); }
  .filter-item button.active { color: var(--accent-1); }
  .project-list { grid-template-columns: 1fr; }
}
@media (min-width: 1024px) {
  .service-list { grid-template-columns: 1fr 1fr; }
  .project-list { grid-template-columns: 1fr; }
}
@media (min-width: 1250px) {
  main { margin-inline: auto; display: flex; gap: 25px; }
  .main-content { min-width: 68%; width: 68%; margin: 0; }
  .sidebar { position: sticky; top: 60px; max-height: max-content; height: 100%; margin-bottom: 0; padding-top: 60px; }
  .sidebar-info { flex-direction: column; }
  .avatar-box img { width: 150px; height: auto; }
  .info-content .name { white-space: nowrap; text-align: center; }
  .info-content .title { margin: auto; }
  .info_more-btn { display: none; }
  .sidebar-info_more { opacity: 1; visibility: visible; }
  .navbar {
    position: absolute; bottom: auto; top: 0; left: auto; right: 0;
    width: max-content; border-radius: 0 20px; padding: 0 20px; box-shadow: none;
  }
  .navbar-list { gap: 22px; padding: 0 10px; }
}
