/* ===== 基础 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: #2c3e60;
  background: #fdfcf9;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img, video { max-width: 100%; }

img { height: auto; }

/* 键盘焦点：浅色页面用深蓝，深色子页用金色 */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #3d54b8;
  outline-offset: 3px;
}

.gallery-body a:focus-visible,
.gallery-body button:focus-visible,
.navbar a:focus-visible,
.hero a:focus-visible,
.footer a:focus-visible,
.time-card.future a:focus-visible {
  outline-color: #ffd86e;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  background: #ffd86e;
  color: #4a2d00;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s;
}

.skip-link:focus { top: 0; }

/* ===== 导航 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 5vw;
  background: rgba(20, 24, 55, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background .3s;
}

.navbar.solid {
  background: rgba(24, 30, 70, 0.92);
}

.logo {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
}

.logo:hover { color: #ffd86e; }

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: color .2s;
}

.nav-links a:hover { color: #ffd86e; }

/* ===== 首屏 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(180deg, #10153a 0%, #232a63 55%, #3b4a95 85%, #6f7fc4 100%);
  overflow: hidden;
}

#sky { position: absolute; inset: 0; width: 100%; height: 100%; }

.rain-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rain-drop {
  position: absolute;
  top: -10%;
  width: 2px;
  height: 26px;
  background: linear-gradient(180deg, rgba(180,205,255,0), rgba(180,205,255,.65));
  border-radius: 2px;
  animation: rainFall linear infinite;
}

@keyframes rainFall {
  to { transform: translateY(115vh); }
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 20px;
}

.hero-sub {
  font-size: 15px;
  letter-spacing: 6px;
  color: rgba(255,255,255,.7);
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(42px, 8vw, 84px);
  font-weight: 800;
  letter-spacing: 10px;
  line-height: 1.25;
  text-shadow: 0 4px 30px rgba(0,0,0,.35);
}

.hero-title span { display: block; }

.hero-title .accent {
  background: linear-gradient(90deg, #ffd86e, #ff9db1, #9be7ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 26px auto 34px;
  max-width: 560px;
  font-size: 16px;
  color: rgba(255,255,255,.82);
}

.btn {
  display: inline-block;
  padding: 13px 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd86e, #ffb46e);
  color: #4a2d00;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 200, 100, .35);
  transition: transform .2s, box-shadow .2s;
}

.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(255, 200, 100, .5); }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.7);
  font-size: 22px;
  animation: bounce 1.6s infinite;
  z-index: 2;
}

@keyframes bounce {
  0%,100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 10px); }
}

/* ===== 通用板块 ===== */
.section {
  padding: 90px 6vw;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-top: 84px;
}

.section.alt {
  max-width: none;
  background: #f2f6ff;
}

.section-title {
  text-align: center;
  font-size: 32px;
  color: #1c2a5e;
  letter-spacing: 3px;
}

.section-sub {
  text-align: center;
  color: #5f6a86;
  margin: 10px 0 48px;
  font-size: 15px;
}

/* ===== 关于我 ===== */
.about-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 44px;
  align-items: start;
}

.avatar-card {
  background: linear-gradient(160deg, #ffffff, #eef3ff);
  border-radius: 24px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(60, 80, 160, .12);
}

.avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9be7ff, #cdb2ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 58px;
  box-shadow: 0 6px 18px rgba(120, 130, 255, .3);
}

.avatar-card h3 { font-size: 22px; color: #1c2a5e; }
.avatar-card p { color: #5f6a86; font-size: 14px; }

.about-text p { margin-bottom: 14px; font-size: 16px; }

/* ===== 朗读按钮 ===== */
.read-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: -30px 0 40px;
  flex-wrap: wrap;
}

.read-btn {
  padding: 10px 26px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd86e, #ffb46e);
  color: #4a2d00;
  font-weight: 700;
  font-size: 14.5px;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 200, 100, .35);
  transition: transform .2s, box-shadow .2s;
}

.read-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255, 200, 100, .5); }

.read-btn.playing {
  background: linear-gradient(90deg, #ff9db1, #ffb46e);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(255, 157, 177, .35); }
  50% { box-shadow: 0 6px 26px rgba(255, 157, 177, .65); }
}

.tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }

.tag {
  background: #e8efff;
  color: #3d54b8;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
}

/* ===== 爱好 ===== */
.hobby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 6vw;
}

a.hobby-card,
a.work-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hobby-card {
  background: #fff;
  border-radius: 22px;
  padding: 30px 26px;
  box-shadow: 0 8px 26px rgba(60, 80, 160, .08);
  transition: transform .25s, box-shadow .25s;
}

.hobby-card:hover {
  transform: translateY(-8px) rotate(-0.5deg);
  box-shadow: 0 16px 36px rgba(60, 80, 160, .16);
}

.hobby-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.hobby-card h3 { color: #1c2a5e; margin-bottom: 8px; }
.hobby-card p { font-size: 14.5px; color: #66708f; }

.card-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #3d54b8;
}

.hobby-card:hover .card-more { color: #1c2a5e; }

/* 英语电台：从爱好网格里拿出来，单独做一条横条 CTA */
.radio-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 640px;
  margin: 26px auto 0;
  padding: 18px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #eef3ff);
  box-shadow: 0 8px 26px rgba(60, 80, 160, .1);
  color: #1c2a5e;
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
}

.radio-cta:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(60, 80, 160, .16);
}

.radio-icon { font-size: 40px; line-height: 1; flex-shrink: 0; }
.radio-text { flex: 1; }
.radio-text strong { display: block; font-size: 17px; margin-bottom: 2px; }
.radio-text small { color: #5f6a86; font-size: 14px; line-height: 1.6; }
.ext { color: #b45309; font-size: .9em; }

/* ===== 作品 ===== */
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.work-card {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(60, 80, 160, .1);
  transition: transform .25s, box-shadow .25s;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(60, 80, 160, .16);
}

.work-visual {
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  background: linear-gradient(135deg, #dfe8ff, #ffe8f0);
  overflow: hidden;
}

.work-visual picture {
  display: block;
  width: 100%;
  height: 100%;
}

.work-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .3s;
}

.work-card:hover .work-visual img { transform: scale(1.04); }

.work-card h3 {
  font-size: 17px;
  color: #1c2a5e;
  padding: 16px 20px 4px;
}

.work-card p {
  font-size: 14px;
  color: #5f6a86;
  padding: 0 20px 8px;
}

.work-card .card-more {
  display: block;
  padding: 0 20px 18px;
  margin-top: 0;
}

/* ===== 时间线 ===== */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 6vw;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(6vw + 22px);
  top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #9be7ff, #cdb2ff, #ffd86e);
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 22px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.time-point {
  position: relative;
  z-index: 1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #cdb2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.time-card {
  flex: 1;
  background: #fff;
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: 0 6px 20px rgba(60, 80, 160, .08);
}

.time-card h3 { color: #1c2a5e; font-size: 17px; margin-bottom: 4px; }
.time-card p { font-size: 14.5px; color: #66708f; }

/* 两段竖屏视频并排，避免把时间线撑得过长 */
.time-videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.time-card .time-video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #0d1024;
  box-shadow: 0 6px 18px rgba(60, 80, 160, .18);
}

.card-link {
  display: inline-block;
  margin-top: 10px;
  color: #3d54b8;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
}

.card-link:hover { color: #1c2a5e; text-decoration: underline; }

.time-card.future {
  background: linear-gradient(135deg, #1c2a5e, #3b4a95);
}

.time-card.future h3 { color: #ffd86e; }
.time-card.future p { color: rgba(255,255,255,.85); }
.time-card.future .card-link { color: #ffd86e; }
.time-card.future .card-link:hover { color: #fff; }

/* ===== 页脚 ===== */
.footer {
  background: linear-gradient(180deg, #232a63, #10153a);
  color: #fff;
  text-align: center;
  padding: 80px 20px 40px;
}

.quote-main {
  font-size: clamp(20px, 3.4vw, 30px);
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 2;
}

.quote-by {
  margin: 18px 0 40px;
  color: rgba(255,255,255,.6);
  font-size: 14px;
  letter-spacing: 3px;
}

.footer-line {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 24px;
  font-size: 13px;
  color: rgba(255,255,255,.55);
}

/* ===== 滚动浮现动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .avatar-card { max-width: 320px; margin: 0 auto; }
}

@media (max-width: 760px) {
  /* 导航：纵向堆叠，紧凑排布 */
  .navbar {
    flex-direction: column;
    gap: 8px;
    padding: 10px 4vw;
  }
  .logo { font-size: 16px; }
  .nav-links {
    gap: 6px 22px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-links a { font-size: 13px; }

  /* 首屏 */
  .hero { min-height: 100svh; }
  .hero-title { letter-spacing: 4px; font-size: clamp(34px, 10vw, 52px); }
  .hero-sub { letter-spacing: 3px; font-size: 13px; }
  .hero-desc { font-size: 14.5px; }
  .btn { padding: 11px 32px; font-size: 15px; }

  /* 板块 */
  .section { padding: 64px 5vw; }
  .section-title { font-size: 26px; }
  .section-sub { margin-bottom: 34px; }

  /* 爱好 & 作品卡片 */
  .hobby-grid { gap: 16px; padding: 0; }
  .hobby-card { padding: 22px 20px; }
  .works-grid { gap: 16px; }
  .work-card h3 { font-size: 16px; }
  .radio-cta { margin-top: 22px; padding: 16px 18px; }

  /* 时间线：竖线贴近头像，卡片留足空间 */
  .timeline { padding: 0; }
  .timeline::before { left: 20px; }
  .timeline-item { gap: 14px; }
  .time-point { width: 40px; height: 40px; font-size: 19px; }
  .time-card { padding: 14px 16px; }

  /* 页脚 */
  .footer { padding: 56px 16px 30px; }
  .quote-main { letter-spacing: 2px; }
}

/* 手机上把爱好/作品排成两列，页面短很多 */
@media (max-width: 560px) {
  .works-grid,
  .hobby-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .hobby-card { padding: 18px 15px; }
  .hobby-icon { font-size: 32px; margin-bottom: 8px; }
  .hobby-card h3 { font-size: 15px; }
  .hobby-card p { font-size: 13px; line-height: 1.65; }
  .card-more { font-size: 12px; margin-top: 10px; }

  .work-card h3 { font-size: 14.5px; line-height: 1.5; padding: 12px 12px 4px; }
  .work-card p { font-size: 12.5px; line-height: 1.65; padding: 0 12px 4px; }
  .work-card .card-more { font-size: 12px; padding: 0 12px 12px; }

  .radio-cta { gap: 12px; padding: 14px 16px; }
  .radio-icon { font-size: 32px; }
  .radio-text strong { font-size: 15px; }
  .radio-text small { font-size: 12.5px; }

  .time-videos { gap: 8px; }
}

@media (max-width: 420px) {
  .hero-title { letter-spacing: 2px; }
  .tags { gap: 8px; }
  .tag { font-size: 12.5px; padding: 5px 12px; }
}

/* 极窄屏：恢复单列，避免文字被挤成竖条 */
@media (max-width: 359px) {
  .works-grid,
  .hobby-grid { grid-template-columns: 1fr; }
  .nav-links { gap: 4px 12px; }
  .nav-links a { font-size: 12.5px; }
}

/* ===== 减少动态效果 ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ===== 打印 ===== */
@media print {
  .navbar, .scroll-hint, .rain-layer, #sky, .read-row, .skip-link { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero { min-height: auto; padding: 40px 0; background: none; color: #000; }
  .hero-title { color: #000; text-shadow: none; }
  .hero-title .accent { color: #000; background: none; -webkit-text-fill-color: currentColor; }
  .hero-desc, .hero-sub { color: #333; }
  .section { padding: 24px 0; page-break-inside: avoid; }
  .footer { background: none; color: #000; padding: 24px 0; }
  .footer-line, .quote-by { color: #333; }
  a { color: #000; text-decoration: underline; }
}
