/* ===== 全局重置 & 基础 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg,#051225 0%,#071a33 45%,#04101f 100%);
  color: #dce9ff;
  overflow-x: hidden;
  line-height: 1.7;
}
::selection { background: rgba(110, 170, 255, 0.3); color: #fff; }

/* ===== 动态星空背景（星点 + 极光星云）===== */
.stars-bg {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: linear-gradient(180deg, #04102a 0%, #061a3c 40%, #04101f 100%);
}
#starfield {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
/* 全站动漫壁纸：铺满固定层，让每个区块都浮在插画上（呼应首屏） */
.bg-image {
  position: absolute; inset: 0;
  background-image: url('assets/bg-anime.jpg');
  background-size: cover;
  background-position: center;
  filter: saturate(1.10) hue-rotate(-6deg) brightness(0.82);
}
/* 柔暗 + 蓝调蒙版：保证下方文字/卡片可读，同时透出插画 */
.bg-image::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(20,50,110,0.28) 0%, rgba(10,30,70,0.14) 45%, rgba(30,70,150,0.24) 100%),
    linear-gradient(180deg, rgba(4,16,31,0.18) 0%, rgba(4,16,31,0.52) 100%);
}
/* 极光星云：大尺寸模糊色块缓慢漂移 */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  will-change: transform;
}
.nebula-a {
  width: 58vw; height: 46vh;
  left: -12vw; top: -8vh;
  background: radial-gradient(ellipse at center, rgba(40,130,255,0.35) 0%, transparent 70%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.nebula-b {
  width: 46vw; height: 42vh;
  right: -14vw; top: 22vh;
  background: radial-gradient(ellipse at center, rgba(0,190,255,0.26) 0%, transparent 70%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.nebula-c {
  width: 62vw; height: 48vh;
  left: 18vw; bottom: -18vh;
  background: radial-gradient(ellipse at center, rgba(90,80,255,0.24) 0%, transparent 70%);
  animation: drift-c 38s ease-in-out infinite alternate;
}
@keyframes drift-a {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(9vw, 6vh) scale(1.12); }
  100% { transform: translate(-4vw, 12vh) scale(0.94); }
}
@keyframes drift-b {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-10vw, -7vh) scale(1.18); }
  100% { transform: translate(5vw, -14vh) scale(0.9); }
}
@keyframes drift-c {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-8vw, -9vh) scale(1.1); }
  100% { transform: translate(7vw, -4vh) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) {
  .nebula { animation: none; }
}

/* ===== Hero 区 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  overflow: hidden;
}
.overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,26,0.15) 0%,
    rgba(10,10,26,0.30) 45%,
    rgba(5,16,31,0.78) 82%,
    rgba(4,16,31,0.92) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 20px;
}

/* ===== 头像 ===== */
.avatar-frame {
  width: 140px; height: 140px;
  margin: 0 auto 24px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, #4aa8ff, #7ceaff, #a5c8ff);
  animation: rotate-border 6s linear infinite;
}
@keyframes rotate-border {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #1a1a2e;
}

/* ===== 标题 ===== */
.title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.glow-text {
  background: linear-gradient(135deg, #9fd2ff, #4aa8ff, #6fe3f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(90,170,255,0.45));
}
.subtitle {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: rgba(224,216,240,0.7);
  font-weight: 300;
  letter-spacing: 0.15em;
  margin-bottom: 30px;
}

/* ===== 社交链接 ===== */
.social-links { display: flex; gap: 16px; justify-content: center; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  color: rgba(224,216,240,0.6);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
}
.social-icon svg { width: 22px; height: 22px; }
.social-icon:hover {
  color: #fff;
  background: rgba(90,160,255,0.22);
  border-color: rgba(110,180,255,0.45);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(70,140,255,0.3);
}

/* ===== 滚动提示 ===== */
.scroll-hint {
  position: absolute; bottom: 36px;
  left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; color: rgba(224,216,240,0.35);
  font-size: 0.75rem; letter-spacing: 0.1em;
}
.mouse {
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  position: relative;
}
.wheel {
  width: 3px; height: 8px;
  background: rgba(224,216,240,0.5);
  border-radius: 2px;
  position: absolute; top: 7px; left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.8s ease-in-out infinite;
}
@keyframes scroll-wheel {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(12px); }
}

/* ===== 通用容器 ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 60px 24px; }

/* ===== Section标题 ===== */
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  margin-bottom: 48px;
  background: linear-gradient(135deg, #9fd2ff, #4aa8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== 毛玻璃卡片 ===== */
.glass {
  background: rgba(8,20,45,0.5);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  border: 1px solid rgba(140,180,255,0.14);
  border-radius: 16px;
  padding: 28px;
}

/* ===== About Grid ===== */
.about { position: relative; z-index: 1; }
/* 相邻 section 各自 .container 的双 60px padding 叠加,会让时光轴(about 末)与画廊面板之间
   留出 160px 大空隙;取消邻接侧的 padding,由 .timeline 自身 margin-bottom 提供统一 40px 玻璃间距 */
.about .container { padding-bottom: 0; }
.gallery-section .container { padding-top: 0; }
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.about-card {
  text-align: center;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}
.about-card .card-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.4s ease;
  filter: saturate(1.05) brightness(0.92);
}
.about-card:hover .card-img {
  transform: scale(1.06);
  filter: saturate(1.15) brightness(1.0);
}
.about-card .card-body {
  padding: 20px 24px 28px;
}
.about-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 12px 40px rgba(70,140,255,0.2);
}
.card-icon { font-size: 2.8rem; margin-bottom: 16px; }
.about-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #bfe3ff, #56c8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.about-card p {
  font-size: 0.88rem;
  color: rgba(224,216,240,0.65);
  line-height: 1.7;
}
.card-tags {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  justify-items: stretch;
}
.card-tags span {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.7rem;
  color: rgba(160,190,255,0.85);
  background: rgba(90,120,220,0.12);
  border: 1px solid rgba(120,150,240,0.25);
  padding: 3px 6px;
  border-radius: 20px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.3s ease;
}
.about-card:hover .card-tags span {
  background: rgba(90,120,220,0.25);
  color: rgba(190,210,255,1);
}
.card-tags span.learning {
  color: rgba(255,214,140,0.9);
  background: rgba(230,170,80,0.1);
  border-color: rgba(240,190,110,0.3);
}
.about-card:hover .card-tags span.learning {
  background: rgba(230,170,80,0.22);
  color: rgba(255,228,180,1);
}
.domain-value a {
  color: #8fb4ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(143,180,255,0.4);
  transition: all 0.3s ease;
  font-family: Consolas, Monaco, monospace;
  letter-spacing: 0.5px;
}
.domain-value a:hover {
  color: #c8ddff;
  border-bottom-color: rgba(143,180,255,0.9);
  text-shadow: 0 0 12px rgba(143,180,255,0.5);
}

/* ===== Info Panel ===== */
.info-panel { margin-bottom: 40px; }
.panel-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
  color: rgba(224,216,240,0.85);
}
.info-table { max-width: 520px; margin: 0 auto; }
.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.info-row:last-child { border-bottom: none; }
.label {
  width: 80px;
  flex-shrink: 0;
  color: rgba(130,190,255,0.75);
  font-size: 0.88rem;
}
.value {
  color: rgba(224,216,240,0.75);
  font-size: 0.9rem;
}

/* ===== Timeline 时间轴 ===== */
.timeline { margin-bottom: 40px; }
.timeline-items {
  position: relative;
  max-width: 720px;
  margin: 8px auto 0;
  padding: 8px 0 8px 34px;
}
/* 中轴发光竖线 */
.timeline-items::before {
  content: '';
  position: absolute; left: 13px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom,
    rgba(110,180,255,0.75),
    rgba(60,130,230,0.35) 55%,
    transparent);
  box-shadow: 0 0 10px rgba(80,150,255,0.5);
}
.timeline-item {
  position: relative;
  padding: 18px 22px 18px 26px;
  margin-bottom: 14px;
  background: rgba(8,20,45,0.45);
  border: 1px solid rgba(90,150,240,0.22);
  border-radius: 12px;
  transition: all 0.25s ease;
}
/* 轴线节点：外圈光晕 + 内芯 */
.timeline-item::before {
  content: '';
  position: absolute; left: -27px; top: 28px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #eaf6ff 0%, #56c8f0 45%, rgba(40,120,220,0.15) 72%);
  box-shadow: 0 0 14px rgba(80,170,255,0.85), 0 0 3px rgba(210,240,255,0.9);
}
.timeline-item::after {
  content: '';
  position: absolute; left: -33px; top: 22px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(110,180,255,0.35);
}
/* 首尾端点 */
.timeline-item:first-child::after {
  border-color: rgba(140,200,255,0.6);
  box-shadow: 0 0 18px rgba(90,170,255,0.5);
}
.timeline-item:last-child::before {
  background: radial-gradient(circle, #fff 0%, #aee6ff 40%, transparent 75%);
}
.timeline-item:hover {
  border-color: rgba(110,180,255,0.45);
  background: rgba(60,130,230,0.09);
  transform: translateX(6px);
}
.tl-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #bfe3ff;
  background: rgba(70,140,240,0.2);
  border: 1px solid rgba(110,180,255,0.4);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.tl-text {
  color: rgba(224,216,240,0.8);
  font-size: 0.92rem;
  line-height: 1.75;
}
@media (max-width: 600px) {
  .timeline-items { padding-left: 26px; }
  .timeline-item { padding: 14px 16px; }
  .timeline-item::before { left: -23px; top: 24px; }
  .timeline-item::after { left: -29px; top: 18px; }
}

/* ===== Gallery Section（毛玻璃面板，与上方基本信息/足迹一致）===== */
.gallery-section { position: relative; z-index: 1; }
.gallery-panel {
  background: rgba(8,20,45,0.5);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  border: 1px solid rgba(140,180,255,0.14);
  border-radius: 16px;
  padding: 36px 28px 32px;
}
.gallery-panel .section-title { margin-bottom: 36px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  background: #151525;
  cursor: pointer;
  transition: all 0.35s ease;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(70,140,255,0.3);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-label {
  position: absolute; bottom: 10px; left: 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  padding: 3px 10px;
  border-radius: 20px;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 46px 24px 44px;
  color: rgba(210,228,255,0.5);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}
/* 底部引言：小一号、弱光，做点缀不做标语 */
.footer-quote {
  margin-top: 10px;
  font-style: normal;
  font-size: clamp(0.68rem, 0.9vw, 0.78rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: rgba(234,244,255,0.72);
  text-shadow:
    0 0 8px rgba(110,180,255,0.25),
    0 0 18px rgba(70,140,255,0.12);
}

/* ===== 相册查看器（封面单击放大 + 左右轮换切换）===== */
#albumViewer {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,10,22,0.93);
  backdrop-filter: blur(12px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
#albumViewer.open { opacity: 1; pointer-events: auto; }
#albumViewer #avImg {
  max-width: 90vw; max-height: 84vh;
  border-radius: 10px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.6);
  transform: scale(0.96);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#albumViewer.open #avImg { transform: scale(1); }
#albumViewer .av-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 72px;
  border: none; border-radius: 12px;
  background: rgba(70,140,240,0.16);
  color: rgba(225,240,255,0.95);
  font-size: 2rem; line-height: 1; cursor: pointer;
  transition: background 0.25s ease;
}
#albumViewer .av-nav:hover { background: rgba(70,150,255,0.42); }
#albumViewer .av-prev { left: 22px; }
#albumViewer .av-next { right: 22px; }
#albumViewer .av-bar {
  position: absolute; bottom: 26px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px;
  color: rgba(225,240,255,0.92);
  font-size: 0.9rem; letter-spacing: 1px;
  background: rgba(10,24,48,0.72);
  padding: 8px 20px; border-radius: 30px;
  backdrop-filter: blur(6px);
}
#albumViewer #avCount { color: rgba(150,220,255,0.98); font-weight: 700; }
#albumViewer #avClose {
  background: rgba(70,140,240,0.18);
  border: 1px solid rgba(110,180,255,0.45);
  color: rgba(225,240,255,0.9);
  padding: 4px 12px; border-radius: 16px;
  cursor: pointer; font-size: 0.8rem;
  transition: all 0.25s ease;
}
#albumViewer #avClose:hover { background: rgba(60,150,255,0.75); }
@media (max-width: 600px) {
  #albumViewer .av-nav { width: 38px; height: 58px; font-size: 1.5rem; }
  #albumViewer .av-prev { left: 8px; }
  #albumViewer .av-next { right: 8px; }
}

/* ===== 相册封面徽章 ===== */
.gallery-item.album .album-count {
  position: absolute; top: 10px; right: 12px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
  background: rgba(10,30,60,0.65);
  backdrop-filter: blur(4px);
  padding: 2px 10px;
  border-radius: 20px;
}

/* ===== 淡入动画 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
  .container { padding: 40px 16px; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
}
