/* ===== 小小周的个人中心 · 正式版样式 ===== */
:root {
  --primary: #2b6de0;
  --primary-dark: #1f56b8;
  --primary-soft: #eaf2ff;
  --ink: #1f2733;
  --ink-soft: #5b6675;
  --line: #e4e9f1;
  --bg: #f7f9fc;
  --card: #ffffff;
  --ok: #16a34a;
  --ok-soft: #e9f9ef;
  --warn: #e0820f;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(31, 39, 51, .07);
  --max: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(var(--max), 92%); margin: 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s, border-color .2s, color .2s;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 6px 18px rgba(43, 109, 224, .28);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), #6aa4ff);
  color: #fff; font-weight: 700; font-size: 17px;
  flex: none;
}
.brand-name { font-weight: 700; font-size: 17px; }

.site-nav { display: flex; gap: 26px; }
.site-nav a {
  color: var(--ink-soft); font-size: 15px; font-weight: 500;
  text-decoration: none !important;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--primary); border-color: var(--primary); }

.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ===== 状态徽章 ===== */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
  padding: 5px 14px; border-radius: 999px;
}
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-info { background: var(--primary-soft); color: var(--primary); }
.pill-warn { background: #fff3e6; color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.dot-live { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } }

/* ===== 首页首屏 ===== */
.hero {
  background:
    radial-gradient(1000px 420px at 85% -10%, #dfeaff 0%, transparent 60%),
    radial-gradient(700px 380px at -10% 20%, #eef4ff 0%, transparent 55%),
    #fff;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: center;
  padding: 68px 0 60px;
}
.hero h1 {
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.28;
  margin: 18px 0 14px;
  letter-spacing: -.5px;
}
.hero h1 .accent {
  background: linear-gradient(90deg, var(--primary), #63a4ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: 17px; color: var(--ink-soft); margin: 0 0 26px; max-width: 34em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-facts {
  list-style: none; margin: 32px 0 0; padding: 22px 0 0;
  border-top: 1px dashed var(--line);
  display: grid; gap: 10px;
}
.hero-facts li { display: flex; gap: 14px; font-size: 14px; }
.hero-facts strong { color: var(--ink); min-width: 84px; font-weight: 600; }
.hero-facts span { color: var(--ink-soft); }

.hero-visual img { width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(31, 39, 51, .12)); }

/* ===== 子页面横幅 ===== */
.sub-hero {
  background:
    radial-gradient(900px 360px at 90% -20%, #dfeaff 0%, transparent 60%),
    linear-gradient(180deg, #f4f8ff, #fff);
  border-bottom: 1px solid var(--line);
  padding: 54px 0 46px;
}
.sub-hero h1 { margin: 12px 0 10px; font-size: clamp(28px, 4vw, 40px); }
.sub-hero p { margin: 0; color: var(--ink-soft); max-width: 44em; }
.crumbs { font-size: 13.5px; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs span { margin: 0 6px; color: #a8b1bf; }

/* ===== 通用区块 ===== */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(25px, 3.2vw, 32px); margin: 0 0 10px; position: relative; display: inline-block; }
.section-head h2::after {
  content: ""; position: absolute; left: 50%; bottom: -10px;
  transform: translateX(-50%);
  width: 46px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), #7db1ff);
}
.section-head p { color: var(--ink-soft); margin: 18px 0 0; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head-row h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); }
.section-head-row p { margin: 6px 0 0; color: var(--ink-soft); font-size: 15px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

/* ===== 关于我（首页摘要）===== */
.about-grid { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center; }
.about-avatar { width: 100%; border-radius: 18px; box-shadow: var(--shadow); }
.about-copy h3 { margin: 0 0 6px; font-size: 24px; }
.about-copy .meta { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 14px; }
.about-copy p { color: var(--ink-soft); margin: 0 0 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
.chip {
  font-size: 13px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 12px; border-radius: 999px;
}
.chip.alt { color: var(--ok); background: var(--ok-soft); }
.chip.warm { color: var(--warn); background: #fff3e6; }

/* ===== 作品卡片 ===== */
.works-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.work-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.work-card:hover { transform: translateY(-5px); box-shadow: 0 18px 42px rgba(31, 39, 51, .12); }
.work-thumb { aspect-ratio: 16 / 10; width: 100%; height: auto; object-fit: cover; background: #eef3fb; }
.work-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.work-body h3 { margin: 0; font-size: 18px; }
.work-body p { margin: 0; color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.work-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: #8b96a7; }
.work-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.work-tags span {
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: #f1f4f9; padding: 2px 9px; border-radius: 6px;
}

/* ===== 动态 / 文章列表 ===== */
.post-list { display: grid; gap: 0; }
.post-item {
  display: grid; grid-template-columns: 110px 1fr auto; gap: 18px;
  align-items: baseline;
  padding: 20px 4px;
  border-bottom: 1px dashed var(--line);
  text-decoration: none !important;
  color: inherit;
  transition: background .2s;
}
.post-item:last-child { border-bottom: 0; }
.post-item:hover { background: #f2f7ff; }
.post-item:hover h3 { color: var(--primary); }
.post-date { font-size: 14px; color: #8b96a7; font-variant-numeric: tabular-nums; }
.post-item h3 { margin: 0; font-size: 17px; font-weight: 600; transition: color .2s; }
.post-item p { margin: 5px 0 0; color: var(--ink-soft); font-size: 14.5px; }
.post-tag {
  font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); white-space: nowrap;
}
.post-tag.t-notice { background: var(--ok-soft); color: var(--ok); }
.post-tag.t-life { background: #fff3e6; color: var(--warn); }

/* ===== 备案信息 ===== */
.beian-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.beian-card { display: flex; gap: 18px; align-items: flex-start; }
.beian-badge { height: 56px; width: auto; flex: none; }
.card-tag {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 12px; border-radius: 999px;
}
.beian-number { font-size: 20px; font-weight: 700; margin: 12px 0 6px; word-break: break-all; }
.beian-desc { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 12px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; text-decoration: none !important; }
.card-link:hover { text-decoration: underline !important; }

/* ===== 关于我页 ===== */
.prose { max-width: 760px; }
.prose h2 { font-size: 26px; margin: 46px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #3d4756; margin: 0 0 14px; }

.skill-groups { display: grid; gap: 22px; }
.skill-group h3 { margin: 0 0 10px; font-size: 16.5px; color: var(--ink); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: linear-gradient(180deg, var(--primary), #bcd4fb);
}
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4px solid var(--primary);
}
.timeline time { display: block; font-size: 13.5px; color: var(--primary); font-weight: 700; }
.timeline strong { display: block; font-size: 16.5px; margin: 2px 0 4px; }
.timeline p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

.hobby-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.hobby { text-align: center; padding: 24px 14px; }
.hobby .plan-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.hobby h3 { margin: 0 0 6px; font-size: 16.5px; }
.hobby p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }

/* ===== 作品页筛选 ===== */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 34px; }
.filter-btn {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  background: #fff; border: 1px solid var(--line);
  padding: 8px 20px; border-radius: 999px; cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.work-card.hidden { display: none; }

/* ===== 联系页 ===== */
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-card { text-align: center; padding: 34px 24px; }
.contact-card .plan-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.contact-card h3 { margin: 0 0 8px; font-size: 18px; }
.contact-card p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14.5px; word-break: break-all; }
.contact-card .value { color: var(--ink); font-weight: 600; font-size: 15.5px; }

.contact-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, #f2f7ff, #fbfdff);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px;
}
.contact-copy h2 { margin: 0 0 12px; font-size: 28px; }
.contact-copy p { color: var(--ink-soft); margin: 0 0 10px; }

.notify-form { display: grid; gap: 12px; }
.notify-form input, .notify-form textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px; font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.notify-form input:focus, .notify-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 109, 224, .15);
}
.notify-form .btn { width: 100%; }
.form-hint { margin: 0; font-size: 13px; color: var(--ink-soft); }
.form-hint.error { color: #dc2626; }
.form-hint.ok { color: var(--ok); }

/* ===== 页脚 ===== */
.site-footer { background: #131a26; color: #aab4c2; padding: 46px 0 34px; font-size: 14px; }
.footer-inner { display: grid; gap: 18px; justify-items: center; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-title { margin: 0; color: #fff; font-weight: 700; font-size: 16px; }
.footer-tagline { margin: 2px 0 0; font-size: 13px; color: #7d8794; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { color: #aab4c2; text-decoration: none !important; }
.footer-nav a:hover { color: #fff; }
.footer-beian { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
.footer-beian a {
  display: inline-flex; align-items: center; gap: 7px;
  color: #cfd8e3; text-decoration: underline !important; text-underline-offset: 3px;
}
.footer-beian a:hover { color: #fff; }
.footer-beian img { height: 20px; width: auto; }
.footer-sep { color: #495363; }
.footer-copy { margin: 0; color: #6d7787; font-size: 13px; }
.footer-update { margin: 0; color: #57616f; font-size: 12.5px; }

/* ===== 滚动出现动画（仅在 JS 可用时隐藏，保证无 JS 也能看到全部内容）===== */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.visible { opacity: 1; transform: none; }

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

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .works-grid, .contact-cards { grid-template-columns: repeat(2, 1fr); }
  .hobby-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 200px 1fr; gap: 26px; }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 44px; gap: 30px; }
  .hero-visual { order: -1; max-width: 440px; margin: 0 auto; }
  .beian-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; padding: 32px 24px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0;
    padding: 8px 0;
    display: none;
    box-shadow: 0 12px 24px rgba(31, 39, 51, .08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 6%; border-bottom: 0; }
  .section { padding: 52px 0; }

  .works-grid, .contact-cards, .hobby-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-avatar { max-width: 220px; margin: 0 auto; }

  .post-item { grid-template-columns: 1fr auto; }
  .post-date { grid-column: 1 / -1; }

  .hero-facts li { flex-direction: column; gap: 2px; }
  .beian-card { flex-direction: column; }
}
