:root {
  --bg: #f8f2e8;
  --panel: #f8f2e8;
  --panel-strong: #f8f2e8;
  --ink: #30284c;
  --muted: #8d879b;
  --soft: #b5adbf;
  --purple: #7057d8;
  --purple-2: #8d7ae6;
  --yellow: #ffc841;
  --card: rgba(255, 255, 255, 0.88);
  --line: rgba(68, 54, 96, 0.1);
  --shadow: 0 18px 44px rgba(70, 56, 92, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", "Microsoft YaHei", serif;
  letter-spacing: 0;
}

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

a,
button,
.project-card,
.stats-row article,
.content-grid article {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 max(24px, calc((100vw - 1040px) / 2));
  border-bottom: 1px solid rgba(68, 54, 96, 0.08);
  background: rgba(248, 242, 232, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand,
.nav,
.contact-line,
.hero-actions,
.logo-row,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
}

.avatar,
.mini-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #8d7ae6, #5e48c8);
  font-weight: 800;
}

.nav {
  gap: 8px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.nav a {
  padding: 8px 13px;
  border-radius: 999px;
  color: #8f88a2;
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--purple);
  background: rgba(112, 87, 216, 0.12);
  transform: translateY(-1px);
}

.page-section {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0;
  scroll-margin-top: 90px;
}

.hero {
  min-height: calc(100svh - 74px);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 76px;
  align-items: center;
  padding-top: 80px;
}

.hello,
.section-label {
  color: var(--purple);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 640px;
  margin-top: 22px;
  font-size: clamp(44px, 5.2vw, 68px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

h1 span {
  display: block;
  white-space: nowrap;
}

h1::after,
#contact-title::after {
  content: "";
  display: block;
  width: 132px;
  height: 18px;
  margin-top: -16px;
  margin-left: 4px;
  background: var(--yellow);
  opacity: 0.95;
  position: relative;
  z-index: -1;
}

.subtitle {
  margin-top: 20px;
  color: #7c748f;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 700;
}

.contact-line {
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
  color: #938da0;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions {
  gap: 14px;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 28px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #7a5ee8, #5b43c6);
  box-shadow: 0 12px 28px rgba(112, 87, 216, 0.28);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(112, 87, 216, 0.34);
}

.ghost-btn {
  color: var(--purple);
  background: rgba(255, 255, 255, 0.72);
}

.ghost-btn:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 14px 28px rgba(70, 56, 92, 0.12);
}

.logo-row {
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 56px;
  color: #b9b2c1;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 800;
}

.portrait-wrap {
  position: relative;
  min-height: 420px;
}

.download-pill {
  position: absolute;
  top: 14px;
  right: 0;
  z-index: 2;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 24px;
  color: #fff;
  background: #2d244f;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.portrait {
  position: absolute;
  top: 120px;
  right: 58px;
  width: 260px;
  aspect-ratio: 1;
  border: 9px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ede8f4;
  box-shadow: 0 24px 50px rgba(82, 70, 108, 0.16);
  overflow: hidden;
}

.portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 30%;
}

.status-badge {
  position: absolute;
  right: 42px;
  bottom: 88px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #8064e8, #5c44cf);
  box-shadow: 0 16px 30px rgba(112, 87, 216, 0.28);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
}

.pink-panel {
  width: 100%;
  margin: 0 auto;
  border-radius: 0;
  background: var(--bg);
  scroll-margin-top: 90px;
}

.about-panel {
  padding: 96px 0 72px;
}

.inner-narrow {
  width: min(720px, calc(100% - 44px));
  margin: 0 auto;
}

.inner-wide {
  width: min(960px, calc(100% - 44px));
  margin: 0 auto;
  padding: 96px 0;
}

h2 {
  margin-top: 14px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.14;
  font-weight: 900;
}

.about-text {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.about-text p,
.section-heading p,
.timeline-card p,
.project-body p,
.content-grid p,
.contact-inner > p {
  color: #7f778e;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  font-weight: 600;
}

.stats-row {
  width: min(720px, calc(100% - 44px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: -28px auto 80px;
  position: relative;
  z-index: 2;
}

.stats-row article {
  position: relative;
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.stats-row article:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(70, 56, 92, 0.17);
}

.stats-row strong {
  color: var(--purple);
  font-size: 32px;
  line-height: 1;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
  min-width: 4.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.stats-row span {
  color: #928ba1;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

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

.section-heading p:last-child {
  margin-top: 12px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.project-card {
  position: relative;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.66),
    rgba(255, 255, 255, 0.18) 34%,
    transparent 68%
  );
  transition: opacity 160ms ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 70px rgba(112, 87, 216, 0.2), 0 16px 36px rgba(70, 56, 92, 0.12);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card:nth-child(4) {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
}

.project-visual {
  position: relative;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 28px;
  font-weight: 900;
  overflow: hidden;
  transition: filter 220ms ease, transform 220ms ease;
}

.project-visual::before {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  top: -42px;
  right: -24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.14) 42%, transparent 70%);
  opacity: 0.42;
  transition: transform 420ms ease, opacity 220ms ease;
}

.project-visual span {
  position: relative;
  z-index: 1;
}

.project-card:hover .project-visual {
  filter: saturate(1.08) brightness(1.04);
}

.project-card:hover .project-visual::before {
  opacity: 0.82;
  transform: translate(-32px, 28px) scale(1.14);
}

.visual-math {
  background:
    linear-gradient(135deg, rgba(252, 185, 90, 0.16), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(45deg, rgba(112, 87, 216, 0.15) 0 2px, transparent 2px 18px),
    #e9d9b8;
  color: #6d55d8;
}

.visual-writing {
  background:
    radial-gradient(circle at 22% 30%, #fff 0 8px, transparent 9px),
    radial-gradient(circle at 65% 58%, #fff 0 8px, transparent 9px),
    linear-gradient(135deg, #f2b8a8, #e7d0c6);
}

.visual-growth {
  background:
    linear-gradient(135deg, #ff6f61 0 33%, #2366e8 33% 66%, #2cc6b0 66% 100%);
}

.visual-personal {
  background:
    radial-gradient(circle at 72% 20%, rgba(255, 255, 255, 0.7), transparent 26%),
    linear-gradient(135deg, #2d244f, #8064e8);
}

.project-body {
  padding: 24px;
}

.project-body h3 {
  font-size: 23px;
  line-height: 1.35;
  font-weight: 900;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--purple);
  background: rgba(112, 87, 216, 0.12);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.project-body small {
  display: block;
  margin-top: 28px;
  color: #aaa2b3;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.timeline {
  position: relative;
  display: grid;
  gap: 28px;
  width: min(760px, 100%);
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(112, 87, 216, 0.15);
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  margin-left: 50px;
  padding: 30px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.timeline-card::after,
blockquote::after,
.content-grid article::after,
.stats-row article::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.68),
    rgba(255, 255, 255, 0.2) 34%,
    transparent 70%
  );
  transition: opacity 160ms ease;
}

.timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(112, 87, 216, 0.16);
}

.timeline-card:hover::after,
blockquote:hover::after,
.content-grid article:hover::after,
.stats-row article:hover::after {
  opacity: 1;
}

.timeline-dot {
  position: absolute;
  left: -63px;
  top: 38px;
  width: 26px;
  height: 26px;
  border: 4px solid #d7cff8;
  border-radius: 50%;
  background: var(--purple);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.company-mark {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.purple { background: #7057d8; }
.coral { background: #e87472; }
.teal { background: #74a9a5; }
.orange { background: #ffad3f; }

.date {
  color: var(--purple) !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
}

.timeline-card h3 {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.35;
}

.timeline-card h4 {
  margin-top: 4px;
  color: #615877;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
}

.skills-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: start;
}

.skills-layout h3,
.quote-list h3 {
  font-size: 22px;
}

.radar {
  position: relative;
  width: min(330px, 100%);
  aspect-ratio: 1;
  margin: 38px auto 0;
  border-radius: 50%;
}

.radar-ring,
.radar-shape {
  position: absolute;
  inset: 40px;
  clip-path: polygon(50% 0, 95% 28%, 82% 85%, 18% 85%, 5% 28%);
}

.ring-1 {
  border: 3px solid rgba(112, 87, 216, 0.28);
}

.ring-2 {
  inset: 72px;
  border: 2px solid rgba(112, 87, 216, 0.16);
}

.radar-shape {
  inset: 54px 62px 54px 62px;
  background: rgba(112, 87, 216, 0.18);
  border: 3px solid rgba(112, 87, 216, 0.62);
}

.r-label {
  position: absolute;
  color: var(--purple);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 900;
}

.r-label.top { top: 6px; left: 42%; }
.r-label.right { right: 2px; top: 43%; }
.r-label.bottom { bottom: 6px; left: 42%; }
.r-label.left { left: 0; top: 43%; }

.quote-list {
  display: grid;
  gap: 18px;
}

blockquote {
  position: relative;
  margin: 0;
  padding: 24px 26px;
  border-left: 5px solid var(--purple);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(70, 56, 92, 0.08);
  color: #675b75;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  font-weight: 700;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

blockquote:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(112, 87, 216, 0.14);
}

cite {
  display: block;
  margin-top: 12px;
  color: #8d7ae6;
  font-style: normal;
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.content-grid article {
  position: relative;
  min-height: 210px;
  padding: 28px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.content-grid article:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 54px rgba(70, 56, 92, 0.16);
}

.content-grid article:nth-child(4) {
  grid-column: span 2;
}

.platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  padding: 0 12px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
}

.green { background: #28b26f; }
.red { background: #f04f5b; }
.pink { background: #ef7599; }

.content-grid h3 {
  margin-top: 22px;
  font-size: 22px;
}

.content-grid strong {
  display: block;
  margin-top: 14px;
  color: var(--purple);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

.content-grid a {
  display: inline-block;
  margin-top: 18px;
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 900;
}

.content-grid a:hover {
  color: var(--purple);
}

@media (prefers-reduced-motion: reduce) {
  a,
  button,
  .project-card,
  .stats-row article,
  .content-grid article {
    transition: none;
  }

  .primary-btn:hover,
  .ghost-btn:hover,
  .nav a:hover,
  .project-card:hover,
  .stats-row article:hover,
  .content-grid article:hover {
    transform: none;
  }
}

.contact-panel {
  margin-bottom: 0;
}

.contact-inner {
  width: min(620px, calc(100% - 44px));
  margin: 0 auto;
  padding: 108px 0 80px;
  text-align: center;
}

.contact-inner .section-label {
  display: block;
}

#contact-title {
  position: relative;
  display: inline-block;
}

#contact-title::after {
  width: 172px;
  margin-left: auto;
  margin-right: auto;
}

.contact-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 22px;
  align-items: center;
  max-width: 520px;
  margin: 42px auto 26px;
  padding: 30px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 5px solid var(--yellow);
  box-shadow: var(--shadow);
  text-align: left;
}

.mini-avatar {
  width: 72px;
  height: 72px;
  font-size: 28px;
}

.contact-card h3 {
  font-size: 24px;
}

.contact-card p,
.contact-card a,
.contact-card span {
  display: block;
  margin-top: 8px;
  color: #746b82;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.contact-actions {
  justify-content: center;
  gap: 14px;
  margin-bottom: 34px;
}

.contact-inner small {
  color: #a59daf;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

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

@media (max-width: 900px) {
  .topbar {
    height: auto;
    min-height: 74px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .page-section,
  .hero {
    width: min(100% - 28px, 1040px);
  }

  .hero,
  .skills-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .portrait-wrap {
    min-height: 310px;
  }

  .portrait {
    position: relative;
    top: auto;
    right: auto;
    margin: 0 auto;
    width: 220px;
  }

  .download-pill {
    right: 16px;
  }

  .status-badge {
    right: calc(50% - 138px);
    bottom: 20px;
  }

  .stats-row,
  .project-grid,
  .content-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card:nth-child(4),
  .content-grid article:nth-child(4) {
    grid-column: span 2;
    display: block;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-top: 54px;
  }

  h1 {
    font-size: clamp(34px, 10vw, 50px);
  }

  h1 span {
    white-space: normal;
  }

  h2 {
    font-size: clamp(32px, 10vw, 46px);
  }

  .contact-line,
  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .pink-panel {
    width: 100%;
    border-radius: 0;
  }

  .stats-row,
  .project-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .project-card:nth-child(4),
  .content-grid article:nth-child(4) {
    grid-column: auto;
  }

  .timeline-card {
    grid-template-columns: 42px 1fr;
    margin-left: 30px;
    padding: 22px;
  }

  .timeline-dot {
    left: -45px;
  }

  .company-mark {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .contact-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mini-avatar {
    margin: 0 auto;
  }
}
