:root {
  --cream: #F7F1E8;
  --cream-2: #FFF8F0;
  --ink: #2A2622;
  --ink-soft: #6B625A;
  --ink-faint: #9A8F82;
  --coral: #FF6A4D;
  --purple: #7C5CBF;
  --purple-soft: #B8A7E0;
  --line: #ECE3D5;
  --card: #FFFFFF;
  --shadow: 0 12px 32px rgba(72, 52, 32, 0.08);
  --shadow-sm: 0 4px 14px rgba(72, 52, 32, 0.06);
  --radius: 22px;
  --radius-sm: 12px;
  --font-display: "ZCOOL XiaoWei", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { width: min(1080px, 100% - 48px); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 232, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(72, 52, 32, 0.08);
  background: rgba(247, 241, 232, 0.95);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand img { display: block; height: 40px; width: auto; }
.site-nav { display: flex; gap: 28px; }
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  padding: 4px 2px;
  position: relative;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--coral), var(--purple));
  transition: left .25s ease, right .25s ease;
}
.site-nav a:hover::after, .site-nav a.is-active::after { left: 0; right: 0; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}

.hero {
  min-height: calc(100vh - 76px);
  display: flex;
  align-items: center;
  padding: 64px 0;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 48px;
}
.hero-greeting { font-size: 20px; color: var(--ink-soft); margin: 0 0 8px; }
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 16px;
}
.hero-sub { font-size: 18px; color: var(--ink-soft); margin: 0 0 32px; max-width: 34ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; animation: float 7s ease-in-out 1.6s infinite; }
.hero-visual .blob { position: absolute; width: 130%; max-width: 460px; height: auto; }
.hero-visual .avatar {
  position: relative;
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--cream-2);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--coral), var(--purple));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: var(--shadow); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: var(--cream-2); }

.section { padding: 72px 0; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400;
  margin: 0 0 32px;
  display: inline-block;
}
.section-title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--coral), var(--purple));
  margin-top: 8px;
}
.about-copy { max-width: 640px; }
.about-copy p { font-size: 17px; color: var(--ink-soft); margin: 0 0 16px; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.skill-card h3 { margin: 0 0 16px; font-size: 17px; font-weight: 700; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cream-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}
.tags li:hover { color: var(--ink); border-color: var(--coral); background: var(--cream); }

.project-empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
}
.project-empty p { margin: 0; font-size: 17px; }
.project-empty .muted { font-size: 14px; color: var(--ink-faint); margin-top: 6px; }

.section-quote { padding: 48px 0; }
.quote { margin: 0; text-align: center; }
.quote p { margin: 0; font-size: 15px; color: var(--ink-faint); }

.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; }
.footer-title { font-size: 16px; font-weight: 700; margin: 0 0 16px; }
.contact-list { list-style: none; margin: 0 0 24px; padding: 0; }
.contact-list li { font-size: 14px; color: var(--ink-soft); padding: 4px 0; }
.contact-list .muted { color: var(--ink-faint); margin-right: 12px; }
.contact-list a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.contact-list a:hover { color: var(--coral); border-color: var(--coral); }
.copyright { font-size: 13px; color: var(--ink-faint); margin: 0; }
.muted { color: var(--ink-faint); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes blobIn {
  from { opacity: 0; transform: scale(.7) rotate(-12deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
.hero-text > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero-text > *:nth-child(2) { animation-delay: .1s; }
.hero-text > *:nth-child(3) { animation-delay: .2s; }
.hero-text > *:nth-child(4) { animation-delay: .3s; }
.hero-visual .blob { animation: blobIn 1s cubic-bezier(.2, .7, .2, 1) .2s both; }
.hero-visual .avatar { animation: rise .8s cubic-bezier(.2, .7, .2, 1) .3s both; }

.reveal { opacity: 0; }
.reveal.is-visible { animation: riseIn .6s cubic-bezier(.2, .7, .2, 1) forwards; }
.fade { opacity: 0; }
.fade.is-visible { animation: fadeIn .6s ease forwards; }
.skills-grid .skill-card:nth-child(2).fade.is-visible { animation-delay: .08s; }
.skills-grid .skill-card:nth-child(3).fade.is-visible { animation-delay: .16s; }
.skills-grid .skill-card:nth-child(4).fade.is-visible { animation-delay: .24s; }
.skills-grid .skill-card:nth-child(5).fade.is-visible { animation-delay: .32s; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (max-width: 860px) {
  .hero { min-height: auto; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
  .hero-visual .avatar { width: 200px; height: 200px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: 76px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream-2);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 16px 24px; border-top: 1px solid var(--line); }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .reveal, .fade { opacity: 1 !important; transform: none !important; }
}
