/* ==========================================================================
   个人网站首页 — 简洁专业风格
   设计基调：白底 + 深靛蓝主色 + 克制的卡片与分隔线
   断点：960px（平板 / 移动导航）、640px（手机）
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --color-bg: #ffffff;
  --color-bg-soft: #f6f8fb;
  --color-bg-alt: #f4f7fb;
  --color-text: #16202f;
  --color-text-soft: #5a6779;
  --color-text-faint: #8a95a6;
  --color-border: #e3e9f1;
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #eaf1ff;
  --color-building: #b45309;
  --color-building-soft: #fff5e6;
  --color-planned: #64748b;
  --color-planned-soft: #f1f5f9;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 6px 20px rgba(16, 24, 40, 0.07);
  --shadow-lg: 0 18px 44px rgba(16, 24, 40, 0.12);

  --container: 1140px;
  --header-h: 66px;

  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Source Han Sans SC", "Noto Sans CJK SC", system-ui,
               -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease,
              border-color 0.18s ease, transform 0.18s ease;
}

img, svg { display: block; max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 14px;
}
.skip-link:focus { top: 0; color: #fff; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 顶部建设提示条 ---------- */
.notice-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 16px;
  background: var(--color-building-soft);
  border-bottom: 1px solid #f3e0c2;
  color: #8a4b08;
  font-size: 13.5px;
  text-align: center;
}

.notice-bar__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e8930c;
  box-shadow: 0 0 0 3px rgba(232, 147, 12, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232, 147, 12, 0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(232, 147, 12, 0.06); }
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--color-text);
  flex: none;
}
.brand:hover { color: var(--color-text); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #4f8bff 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: 16px; letter-spacing: 0.01em; }
.brand__text small { font-size: 12px; color: var(--color-text-faint); }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--color-text-soft);
  font-size: 15px;
  font-weight: 500;
}
.primary-nav__link:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.primary-nav__link.is-active { color: var(--color-primary); }

.primary-nav__link--cta {
  margin-left: 6px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.primary-nav__link--cta:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.24s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  padding: 72px 0 84px;
  background:
    radial-gradient(900px 380px at 12% -10%, #eaf1ff 0%, rgba(234, 241, 255, 0) 62%),
    radial-gradient(700px 320px at 92% 8%, #eef7f4 0%, rgba(238, 247, 244, 0) 60%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: center;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13.5px;
  color: var(--color-text-faint);
  letter-spacing: 0.02em;
}

.hero__title {
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.25;
  margin-bottom: 20px;
}
.hero__title strong {
  background: linear-gradient(120deg, var(--color-primary) 0%, #4f8bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 560px;
  font-size: 17px;
  color: var(--color-text-soft);
  margin-bottom: 30px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 42px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; transform: translateY(-2px); }
.btn--ghost {
  background: #fff;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); transform: translateY(-2px); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin: 0;
  padding-top: 26px;
  border-top: 1px solid var(--color-border);
}
.hero__stat dt { font-size: 12.5px; color: var(--color-text-faint); margin-bottom: 2px; }
.hero__stat dd { margin: 0; font-size: 15px; font-weight: 600; }

.panel-card {
  padding: 30px 28px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.panel-card__label {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--color-text-faint);
  margin-bottom: 8px;
}
.panel-card__value {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 18px;
}
.progress {
  height: 8px;
  background: var(--color-bg-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}
.progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #5b9bff 100%);
}
.panel-card__list { display: grid; gap: 12px; }
.panel-card__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--color-text-soft);
}

.tick {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: #fff;
}
.tick--done {
  border-color: #34d399;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230f9d6e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E")
    center / 13px 13px no-repeat,
    #eafaf3;
}

/* ---------- 通用区块 ---------- */
.section { padding: 84px 0; }
.section--alt { background: var(--color-bg-soft); border-block: 1px solid var(--color-border); }

.section__head {
  max-width: 660px;
  margin-bottom: 44px;
}
.section__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.section__title {
  font-size: clamp(25px, 3.2vw, 34px);
  margin-bottom: 12px;
}
.section__desc { color: var(--color-text-soft); font-size: 16px; }

/* ---------- 个人简介 ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.intro-card {
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.intro-card__title {
  font-size: 18px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--color-primary);
}
.intro-card p { color: var(--color-text-soft); font-size: 15px; }
.intro-card p + p { margin-top: 12px; }

.tick-list { display: grid; gap: 12px; }
.tick-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--color-text-soft);
}
.tick-list .tick { margin-top: 6px; }

.meta-list { margin-top: 18px; display: grid; gap: 10px; }
.meta-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--color-border);
  font-size: 14.5px;
}
.meta-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list span { color: var(--color-text-faint); }
.meta-list strong { font-weight: 600; text-align: right; }
.text-building { color: var(--color-building); }

/* ---------- 主要内容入口 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
}
.content-card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #c9d8f5;
}
.content-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.content-card__title { font-size: 17.5px; margin-bottom: 9px; }
.content-card__desc {
  flex: 1;
  font-size: 14.5px;
  color: var(--color-text-soft);
  margin-bottom: 16px;
}

.badge {
  align-self: flex-start;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
}
.badge--building {
  color: var(--color-building);
  background: var(--color-building-soft);
  border: 1px solid #f2ddba;
}
.badge--planned {
  color: var(--color-planned);
  background: var(--color-planned-soft);
  border: 1px solid var(--color-border);
}

/* ---------- 技术方向 ---------- */
.stack-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 44px;
  align-items: start;
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack-tags li {
  padding: 8px 16px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--color-text-soft);
}
.stack-points { display: grid; gap: 16px; }
.stack-point {
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-primary);
}
.stack-point h3 { font-size: 16.5px; margin-bottom: 8px; }
.stack-point p { font-size: 14.5px; color: var(--color-text-soft); }

/* ---------- 关于本站 ---------- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}
.about-card {
  padding: 28px 26px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.about-card__title {
  font-size: 18px;
  margin-bottom: 14px;
  padding-left: 12px;
  border-left: 3px solid var(--color-primary);
}
.about-card p { color: var(--color-text-soft); font-size: 15px; }
.about-card p + p { margin-top: 12px; }
.about-card .meta-list { margin-top: 18px; }

/* ---------- 联系方式 ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 22px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #c9d8f5;
}
.contact-card__label { font-size: 13px; color: var(--color-text-faint); }
.contact-card__value { font-size: 16.5px; font-weight: 700; }
.contact-card__hint { font-size: 12.5px; color: var(--color-building); }

.contact-note {
  margin-top: 26px;
  padding: 14px 18px;
  background: var(--color-building-soft);
  border: 1px dashed #e8cf9f;
  border-radius: var(--radius-sm);
  color: #8a4b08;
  font-size: 14px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: #0f172a;
  color: #c3ccdb;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 40px;
  padding-top: 56px;
  padding-bottom: 40px;
}
.site-footer__brand {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.site-footer__desc { font-size: 14.5px; margin-bottom: 18px; }
.site-footer__status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13.5px;
}
.site-footer__nature {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  line-height: 1.7;
  color: #8494ab;
}
.site-footer__nav-title {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #8494ab;
  margin-bottom: 14px;
}
.site-footer__nav ul { display: grid; gap: 9px; }
.site-footer__nav a { font-size: 14.5px; color: #c3ccdb; }
.site-footer__nav a:hover { color: #fff; text-decoration: underline; }

/* 页脚备案条 —— 独立深色底 + 上边框，保证醒目 */
.icp-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #0b1220;
}
.icp-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 26px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.icp-bar__item {
  display: flex;
  align-items: center;
  font-size: 13.5px;
  line-height: 1.6;
}
.icp-bar__item--muted { color: #8494ab; }
.icp-bar__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  color: #a9c6ff;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.icp-bar__link:hover {
  background: rgba(37, 99, 235, 0.3);
  color: #fff;
  border-color: rgba(169, 198, 255, 0.55);
}
.icp-bar__placeholder {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12.5px;
}

/* 浅色页脚场景下的备案样式（备用） */
.site-footer--light .icp-bar { background: var(--color-bg-soft); border-top-color: var(--color-border); }
.site-footer--light .icp-bar__item--muted { color: var(--color-text-faint); }
.site-footer--light .icp-bar__link { background: var(--color-primary-soft); border-color: #c9d8f5; color: var(--color-primary-dark); }

/* ---------- 提示浮层 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  background: #10192b;
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  font-size: 14.5px;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 标签 / 药丸 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.7;
}
.pill--building {
  color: var(--color-building);
  background: var(--color-building-soft);
  border: 1px solid #f2ddba;
}
.site-footer .pill--building {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

/* ---------- 滚动渐显 ----------
   仅在 html.js 存在（即脚本已执行）时隐藏元素，
   避免脚本失败 / IntersectionObserver 不触发时内容永久不可见 */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero { padding: 56px 0 64px; }
  .stack-layout { grid-template-columns: 1fr; gap: 30px; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 30px; padding-top: 46px; }
  .section { padding: 64px 0; }

  /* 移动端导航抽屉 */
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    max-height: 0;
    overflow: hidden;
    background: #fff;
    border-bottom: 1px solid transparent;
    transition: max-height 0.3s ease, border-color 0.3s ease;
  }
  .primary-nav.is-open {
    max-height: 340px;
    border-bottom-color: var(--color-border);
    box-shadow: var(--shadow);
  }
  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 24px 20px;
  }
  .primary-nav__link {
    display: block;
    padding: 11px 12px;
    font-size: 15.5px;
  }
  .primary-nav__link--cta {
    margin: 6px 0 0;
    text-align: center;
  }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }

  .container { padding: 0 18px; }

  .notice-bar { font-size: 12.5px; padding: 8px 12px; }
  .notice-bar__text { text-align: left; }

  .hero { padding: 44px 0 52px; }
  .hero__lead { font-size: 15.5px; }
  .hero__actions { gap: 10px; }
  .btn { flex: 1 1 100%; padding: 12px 20px; }

  .hero__stats { gap: 14px 22px; }
  .hero__stat { min-width: 44%; }

  .section { padding: 52px 0; }
  .section__head { margin-bottom: 30px; }

  .intro-card, .content-card, .stack-point { padding: 22px 18px; }

  .meta-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .meta-list strong { text-align: left; }

  .icp-bar__inner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .icp-bar__link { font-size: 13px; padding: 5px 14px; }
}

@media (max-width: 380px) {
  .brand__text small { display: none; }
  .icp-bar__link { font-size: 12.5px; letter-spacing: 0; }
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
