/* =========================================================
   小满的小站 · 清新彩色主题
   想换配色 / 圆角 / 阴影，改 :root 里的变量即可
   ========================================================= */

:root {
  --coral: #ff6b6b;
  --coral-deep: #fa5252;
  --mint: #2ec4b6;
  --mint-deep: #0ca678;
  --sun: #ffd93d;
  --lav: #9b5de5;
  --lav-deep: #845ef7;
  --sky: #4dabf7;
  --ink: #2b2d42;
  --ink-soft: #5c6076;
  --paper: #fffaf3;
  --card: #ffffff;
  --line: #f3e9dc;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(43, 45, 66, 0.08);
  --shadow-hover: 0 14px 34px rgba(43, 45, 66, 0.14);
  --grad-name: linear-gradient(90deg, var(--coral), var(--lav), var(--mint));
  --grad-btn: linear-gradient(135deg, var(--coral), #ff922b);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 217, 61, 0.5); }

a { color: var(--lav-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

main { min-height: 60vh; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo {
  font-weight: 800;
  font-size: 1.15rem;
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-menu { display: flex; gap: 6px; list-style: none; align-items: center; }
.nav-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.nav-menu a:hover { background: rgba(46, 196, 182, 0.12); color: var(--mint-deep); text-decoration: none; }
.nav-menu a.active { background: var(--grad-btn); color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #fff3e0 0%, #e6fbf6 48%, #f0e8ff 100%);
  padding: 96px 0 84px;
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 460px;
  height: 460px;
  top: -140px;
  right: -100px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.22), transparent 68%);
}
.hero::after {
  width: 380px;
  height: 380px;
  bottom: -140px;
  left: -90px;
  background: radial-gradient(circle, rgba(46, 196, 182, 0.2), transparent 68%);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero .hello { font-size: 1.15rem; color: var(--mint-deep); font-weight: 600; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.2; margin: 14px 0 10px; }
.hero h1 .name {
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .tagline { font-size: 1.1rem; color: var(--ink-soft); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35);
}
.btn-primary:hover { box-shadow: 0 12px 26px rgba(255, 107, 107, 0.45); }
.btn-outline {
  border-color: var(--mint);
  color: var(--mint-deep);
  background: rgba(46, 196, 182, 0.08);
}
.btn-outline:hover { background: rgba(46, 196, 182, 0.16); }

/* ---------- 通用区块 ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow {
  color: var(--coral-deep);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 2px;
}
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-top: 6px; }
.section-head p { color: var(--ink-soft); margin-top: 8px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid rgba(243, 233, 220, 0.6);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

/* ---------- 关于 ---------- */
.about-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: start; }
.about-text p + p { margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.chip {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.chip-mint { background: rgba(46, 196, 182, 0.14); color: var(--mint-deep); }
.chip-coral { background: rgba(255, 107, 107, 0.14); color: var(--coral-deep); }
.chip-lav { background: rgba(155, 93, 229, 0.14); color: var(--lav-deep); }
.chip-sun { background: rgba(255, 217, 61, 0.3); color: #a57d00; }
.chip-sky { background: rgba(77, 171, 247, 0.16); color: #1971c2; }

/* ---------- 技能条 ---------- */
.skills { list-style: none; display: grid; gap: 16px; }
.skills li span { display: flex; justify-content: space-between; font-size: 0.92rem; font-weight: 600; margin-bottom: 6px; }
.skills li i { font-style: normal; color: var(--ink-soft); }
.skill-track { height: 10px; border-radius: 999px; background: #f1eadf; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 999px; width: 0; transition: width 1.2s ease; }
.reveal.visible .skill-fill { width: var(--w); }

/* ---------- 作品 ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.project-card .emoji { font-size: 2rem; }
.project-card h3 { margin: 12px 0 8px; font-size: 1.12rem; }
.project-card p { color: var(--ink-soft); font-size: 0.95rem; }
.project-card .tags { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- 博客卡片 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.post-card { display: flex; flex-direction: column; }
.post-card .date { color: var(--coral-deep); font-size: 0.85rem; font-weight: 700; }
.post-card h3 { margin: 10px 0 8px; font-size: 1.15rem; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--lav-deep); }
.post-card p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }
.post-card .more { margin-top: 16px; font-weight: 600; font-size: 0.92rem; }
.center { text-align: center; margin-top: 36px; }

/* ---------- 联系 ---------- */
.contact-card { text-align: center; max-width: 640px; margin: 0 auto; }
.contact-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.contact-links a {
  padding: 10px 20px;
  border-radius: 999px;
  background: #f6efe3;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  transition: all 0.2s;
}
.contact-links a:hover {
  background: rgba(155, 93, 229, 0.16);
  color: var(--lav-deep);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: #cfd2e0;
  text-align: center;
  padding: 40px 20px;
  margin-top: 40px;
}
.site-footer .heart { color: var(--coral); }
.site-footer .brand {
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* ---------- 文章页 ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 48px 0 80px; }
.article .back { display: inline-block; margin-bottom: 24px; font-weight: 600; }
.article h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.3; }
.article .meta { color: var(--ink-soft); margin: 12px 0 28px; font-size: 0.92rem; }
.article .banner {
  height: 180px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--sun), var(--coral), var(--lav));
}
.article h2 { margin: 34px 0 12px; font-size: 1.35rem; }
.article h3 { margin: 26px 0 10px; font-size: 1.12rem; }
.article p { margin: 14px 0; color: #3c3f52; }
.article ul, .article ol { margin: 14px 0 14px 26px; }
.article blockquote {
  border-left: 4px solid var(--mint);
  background: rgba(46, 196, 182, 0.08);
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
  color: var(--ink-soft);
}
.article code {
  background: #f3ecdf;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: "JetBrains Mono", Consolas, monospace;
}
.article pre {
  background: var(--ink);
  color: #e8ecf5;
  padding: 18px 20px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 18px 0;
  font-size: 0.9rem;
}
.article pre code { background: none; padding: 0; color: inherit; }
.article .tag-list { margin-top: 34px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 120px 24px; }
.notfound .big {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 900;
  line-height: 1.1;
  background: var(--grad-name);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.notfound p { color: var(--ink-soft); margin: 18px 0 30px; }

/* ---------- 滚动动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

#backTop {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: var(--grad-btn);
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s;
}
#backTop.show { opacity: 1; pointer-events: auto; transform: none; }
#backTop:hover { transform: translateY(-3px); }

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

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    gap: 4px;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 12px 14px; border-radius: 12px; }
  .hero { padding: 64px 0 60px; }
  section { padding: 56px 0; }
  .project-grid, .post-grid { grid-template-columns: 1fr; }
}
