:root {
  --blue-980: #0d2440;
  --blue-850: #16446f;
  --blue-700: #236aa0;
  --blue-520: #49a6dc;
  --blue-330: #91d7f5;
  --blue-180: #c9eeff;
  --blue-90: #e8f8ff;
  --blue-40: #f7fdff;
  --glass: rgba(247, 253, 255, .76);
  --line: rgba(73, 166, 220, .24);
  --shadow: 0 24px 70px rgba(35, 106, 160, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--blue-980);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 14%, rgba(145, 215, 245, .7), transparent 28rem),
    radial-gradient(circle at 88% 20%, rgba(73, 166, 220, .3), transparent 30rem),
    radial-gradient(circle at 50% 96%, rgba(201, 238, 255, .75), transparent 26rem),
    linear-gradient(135deg, var(--blue-40), var(--blue-90) 52%, #dff5ff);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -1;
  width: 34vw;
  min-width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(145, 215, 245, .25);
  filter: blur(4px);
  animation: drift 13s ease-in-out infinite alternate;
}

body::before {
  left: -8vw;
  top: 18vh;
}

body::after {
  right: -10vw;
  bottom: 8vh;
  animation-duration: 16s;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  color: var(--blue-980);
  background: rgba(232, 248, 255, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  font-weight: 700;
  letter-spacing: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-size: 14px;
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--blue-520);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav a:nth-child(5)::after {
  background: #ffd45f;
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 52px 0;
}

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .72fr);
  align-items: center;
  gap: clamp(28px, 5vw, 70px);
  padding-top: 34px;
}

.hero h1 {
  margin: 0;
  color: var(--blue-850);
  font-size: clamp(56px, 8vw, 112px);
  line-height: .95;
  letter-spacing: 0;
  text-shadow: 0 14px 38px rgba(73, 166, 220, .2);
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin: 12px 0 8px;
  font-size: 22px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.tagline {
  max-width: 720px;
  margin: 26px 0 0;
  color: var(--blue-850);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.55;
}

.hero-actions,
.music-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.button,
.filters button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 20px;
  color: var(--blue-850);
  background: rgba(247, 253, 255, .78);
  cursor: pointer;
  font: inherit;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

.button:hover,
.filters button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(35, 106, 160, .16);
}

.button.primary,
.filters button.active {
  color: var(--blue-40);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-520));
  border-color: transparent;
}

.button.ghost {
  background: rgba(201, 238, 255, .58);
}

.hero-panel,
.project-card,
.timeline-item,
.skill,
.contact,
.music-player {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.float-card {
  animation: float-card 5s ease-in-out infinite;
}

.stat {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(201, 238, 255, .95), rgba(247, 253, 255, .72));
}

.stat span,
.muted,
.contact-grid span,
.music-status {
  display: block;
  color: var(--blue-700);
  font-size: 14px;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.music-player {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
  padding: clamp(24px, 4vw, 40px);
}

.disc {
  width: min(220px, 58vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--blue-40) 0 13%, transparent 14%),
    repeating-radial-gradient(circle, var(--blue-850) 0 8px, #123a61 9px 14px);
  box-shadow: inset 0 0 0 18px rgba(145, 215, 245, .28), 0 22px 60px rgba(13, 36, 64, .22);
}

.disc span {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-180), var(--blue-520));
}

.playing .disc {
  animation: spin 7s linear infinite;
}

.sound-bars {
  display: inline-flex;
  align-items: end;
  gap: 5px;
  height: 28px;
}

.sound-bars span {
  width: 6px;
  height: 12px;
  border-radius: 99px;
  background: var(--blue-520);
  animation: bars 1s ease-in-out infinite;
  animation-play-state: paused;
}

.playing .sound-bars span {
  animation-play-state: running;
}

.sound-bars span:nth-child(2) {
  animation-delay: .12s;
}

.sound-bars span:nth-child(3) {
  animation-delay: .24s;
}

.sound-bars span:nth-child(4) {
  animation-delay: .36s;
}

.music-copy p {
  line-height: 1.8;
}

.split {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 52px;
}

.text-list p {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.8;
}

.section-heading {
  margin-bottom: 22px;
}

.highlight-grid,
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.method-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.highlight-card,
.method-card,
.extra-list {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.highlight-card,
.method-card {
  padding: 22px;
}

.highlight-card p,
.method-card p,
.extra-list p {
  margin: 0;
  color: var(--blue-850);
  line-height: 1.7;
}

.method-card strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--blue-40);
  background: linear-gradient(135deg, var(--blue-700), var(--blue-520));
}

.extra-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 20px;
}

.section-heading.row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 24px;
  transition: transform .22s ease;
}

.timeline-item:hover,
.skill:hover,
.project-card:hover {
  transform: translateY(-5px);
}

.time {
  color: var(--blue-700);
  font-weight: 700;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--blue-850);
  background: var(--blue-180);
  font-size: 13px;
  font-weight: 700;
}

ul {
  margin: 16px 0 0;
  padding-left: 18px;
  line-height: 1.8;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-card {
  padding: 22px;
  min-height: 220px;
  transition: transform .22s ease, box-shadow .22s ease;
}

.project-card:hover {
  box-shadow: 0 28px 80px rgba(35, 106, 160, .23);
}

.project-card p {
  line-height: 1.7;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tags span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--blue-850);
  background: rgba(201, 238, 255, .78);
  font-size: 13px;
}

.skills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skill {
  padding: 20px;
  transition: transform .22s ease;
}

.skill div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.meter {
  height: 12px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(145, 215, 245, .28);
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-700), var(--blue-330));
  transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}

.contact {
  padding: clamp(26px, 4vw, 42px);
  margin-bottom: 34px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-top: 28px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-self: start;
}

.contact-grid p {
  margin: 0;
  min-height: 96px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(201, 238, 255, .58);
  overflow-wrap: anywhere;
}

.qr-card {
  padding: 16px;
  border-radius: 22px;
  background: rgba(201, 238, 255, .58);
  text-align: center;
}

.qr-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 16px;
  background: var(--blue-40);
}

.qr-card p {
  margin: 12px 0 0;
  color: var(--blue-850);
  line-height: 1.5;
}

.qr-card span {
  display: block;
  color: var(--blue-700);
  font-size: 14px;
}

.web-pet {
  position: fixed;
  right: clamp(14px, 3vw, 34px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 20;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(180px, calc(100vw - 28px));
  padding: 0;
  pointer-events: none;
}

.pet-bubble {
  max-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 4px 18px;
  color: var(--blue-850);
  background: rgba(247, 253, 255, .9);
  box-shadow: 0 12px 30px rgba(35, 106, 160, .16);
  font-size: 13px;
  line-height: 1.5;
  pointer-events: auto;
}

.pet-stage {
  position: relative;
  width: 132px;
  height: 148px;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 86%;
  animation: pet-idle 3.2s ease-in-out infinite;
}

.pet-face {
  position: absolute;
  left: 18px;
  top: 8px;
  width: 96px;
  height: 94px;
  overflow: hidden;
  border: 4px solid rgba(247, 253, 255, .92);
  border-radius: 50%;
  background: var(--blue-40);
  box-shadow: 0 16px 34px rgba(35, 106, 160, .18);
}

.pet-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
}

.pet-wink {
  position: absolute;
  right: 23px;
  top: 44px;
  width: 20px;
  height: 9px;
  border-radius: 999px;
  background: rgba(13, 36, 64, .82);
  opacity: 0;
  transform: rotate(-8deg);
  animation: wink-flash 4s infinite;
}

.pet-ear {
  position: absolute;
  top: 50px;
  z-index: 2;
  color: #ffde62;
  font-size: 22px;
  text-shadow: 0 2px 8px rgba(255, 212, 95, .48);
}

.pet-ear.left {
  left: -10px;
}

.pet-ear.right {
  right: -10px;
}

.pet-heart {
  position: absolute;
  right: 4px;
  top: 8px;
  z-index: 3;
  color: #ffcf4d;
  font-size: 34px;
  transform: rotate(12deg);
  animation: heart-pop 1.8s ease-in-out infinite;
}

.pet-body {
  position: absolute;
  left: 28px;
  bottom: 7px;
  width: 76px;
  height: 58px;
  border-radius: 34px 34px 28px 28px;
  background: linear-gradient(135deg, var(--blue-180), var(--blue-330));
  box-shadow: inset 0 -12px 0 rgba(73, 166, 220, .18);
}

.pet-body::before,
.pet-body::after {
  content: "";
  position: absolute;
  bottom: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-850);
  opacity: .65;
}

.pet-body::before {
  left: 20px;
}

.pet-body::after {
  right: 20px;
}

.pet-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  pointer-events: auto;
}

.pet-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--blue-850);
  background: rgba(247, 253, 255, .9);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pet-name {
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-850);
  background: rgba(247, 253, 255, .9);
  font-size: 12px;
  pointer-events: auto;
}

.pet-stage.is-nodding {
  animation: pet-nod .8s ease;
}

.pet-stage.is-spinning {
  animation: pet-spin .9s ease;
}

.pet-stage.is-hello .pet-heart {
  animation: hello-heart .7s ease 2;
}

.pet-stage.is-dancing {
  animation: pet-dance 1.1s ease-in-out;
}

.pet-stage.is-dancing .pet-body::before,
.pet-stage.is-dancing .pet-body::after {
  animation: pet-feet .28s ease-in-out 4;
}

.pet-stage.is-jumping {
  animation: pet-jump .75s cubic-bezier(.2, .9, .2, 1);
}

.pet-stage.is-shaking {
  animation: pet-shake .72s ease-in-out;
}

.pet-stage.is-sparkling .pet-heart {
  animation: hello-heart .45s ease 4;
}

.pet-stage.is-sparkling::before,
.pet-stage.is-sparkling::after {
  content: "✦";
  position: absolute;
  z-index: 4;
  color: #ffde62;
  font-size: 24px;
  text-shadow: 0 2px 10px rgba(255, 212, 95, .55);
  animation: sparkle-burst .9s ease both;
}

.pet-stage.is-sparkling::before {
  left: 3px;
  top: 18px;
}

.pet-stage.is-sparkling::after {
  right: 2px;
  top: 70px;
  animation-delay: .12s;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}

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

.pop-in {
  animation: pop-in .42s ease both;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(38px, -26px, 0) scale(1.08);
  }
}

@keyframes float-card {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bars {
  0%, 100% {
    height: 9px;
  }
  50% {
    height: 28px;
  }
}

@keyframes pet-idle {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

@keyframes pet-nod {
  0%, 100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(9deg) translateY(6px);
  }
  55% {
    transform: rotate(-6deg) translateY(2px);
  }
}

@keyframes pet-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes wink-flash {
  0%, 86%, 100% {
    opacity: 0;
  }
  90%, 95% {
    opacity: .9;
  }
}

@keyframes heart-pop {
  0%, 100% {
    transform: rotate(12deg) scale(1);
  }
  50% {
    transform: rotate(18deg) scale(1.18);
  }
}

@keyframes hello-heart {
  50% {
    transform: rotate(18deg) scale(1.45);
  }
}

@keyframes pet-dance {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }
  18% {
    transform: translateY(-4px) rotate(-12deg);
  }
  36% {
    transform: translateY(2px) rotate(11deg);
  }
  54% {
    transform: translateY(-8px) rotate(-9deg) scale(1.03);
  }
  72% {
    transform: translateY(1px) rotate(10deg);
  }
}

@keyframes pet-feet {
  50% {
    transform: translateY(7px);
  }
}

@keyframes pet-jump {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-54px) scale(1.04);
  }
  78% {
    transform: translateY(4px) scale(1.08, .92);
  }
}

@keyframes pet-shake {
  0%, 100% {
    transform: translateX(0) rotate(0);
  }
  15% {
    transform: translateX(-10px) rotate(-8deg);
  }
  30% {
    transform: translateX(9px) rotate(8deg);
  }
  45% {
    transform: translateX(-8px) rotate(-6deg);
  }
  60% {
    transform: translateX(7px) rotate(6deg);
  }
}

@keyframes sparkle-burst {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.4) rotate(0);
  }
  45% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-22px) scale(1.45) rotate(90deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

@media (max-width: 840px) {
  .site-header,
  .section-heading.row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .split,
  .timeline-item,
  .project-grid,
  .highlight-grid,
  .method-grid,
  .skills,
  .contact-grid,
  .contact-layout,
  .music-player {
    grid-template-columns: 1fr;
  }

  .qr-card {
    max-width: 240px;
  }

  .hero {
    min-height: auto;
  }

  .music-player {
    justify-items: start;
  }

  .project-card {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .section {
    width: min(100% - 28px, 1120px);
    padding: 40px 0;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 56px;
  }

  .hero-panel,
  .project-card,
  .timeline-item,
  .skill,
  .contact,
  .music-player {
    border-radius: 22px;
  }

  .web-pet {
    right: 10px;
    bottom: 10px;
    transform: scale(.86);
    transform-origin: right bottom;
  }
}
