/* =========================================================
   人工智能简史 · 静态页面样式
   ========================================================= */

:root {
  --ink: #171713;
  --ink-soft: #3d3b33;
  --muted: #6f6a5d;
  --paper: #f7f3ea;
  --paper-deep: #efe8da;
  --card: #fffdf8;
  --line: #d9d1c0;
  --green: #0e7a5f;
  --green-soft: #e5f2ec;
  --amber: #b96a2b;
  --amber-soft: #f7e9d9;
  --dark: #0c1512;
  --dark-soft: #13231d;
  --serif: "Noto Serif SC", "Songti SC", STSong, "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --header-h: 64px;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(23, 23, 19, 0.1);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
blockquote,
figure {
  margin: 0;
}

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

::selection {
  background: var(--green);
  color: #fff;
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(14, 122, 95, 0.45);
  outline-offset: 3px;
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(247, 243, 234, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 209, 192, 0.7);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(23, 23, 19, 0.08);
  background: rgba(247, 243, 234, 0.95);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: #9ff0c9;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-name {
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  text-decoration: none;
  background: rgba(23, 23, 19, 0.06);
}

.site-nav a.is-active {
  background: var(--ink);
  color: var(--paper);
}

.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 0.08s linear;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: min(860px, 96vh);
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 72px) 0 96px;
  background: var(--dark);
  color: #f3f1e8;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 480px at 18% -10%, rgba(14, 122, 95, 0.55) 0%, rgba(12, 21, 18, 0) 60%),
    radial-gradient(700px 500px at 100% 20%, rgba(185, 106, 43, 0.34) 0%, rgba(12, 21, 18, 0) 55%),
    radial-gradient(800px 600px at 50% 120%, rgba(60, 110, 90, 0.25) 0%, rgba(12, 21, 18, 0) 60%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px, 26px 26px;
  background-position: 0 0, 13px 13px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 78%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9ff0c9;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: #9ff0c9;
  opacity: 0.7;
}

.hero h1 {
  margin-top: 22px;
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 6.4rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #fbf9f2;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 26px;
  max-width: 660px;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.85;
  color: rgba(243, 241, 232, 0.78);
}

.hero-stats {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 54px;
}

.hero-stats .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stats strong {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.hero-stats strong em {
  font-style: normal;
  color: #9ff0c9;
}

.hero-stats .stat > span {
  font-size: 12.5px;
  letter-spacing: 0.12em;
  color: rgba(243, 241, 232, 0.55);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 52px;
  padding: 13px 24px;
  border: 1px solid rgba(159, 240, 201, 0.4);
  border-radius: 999px;
  color: #d9f7e8;
  font-size: 14px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.hero-cta:hover {
  text-decoration: none;
  background: rgba(159, 240, 201, 0.1);
  border-color: rgba(159, 240, 201, 0.7);
  transform: translateY(-1px);
}

.hero-cta span {
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

/* ---------- 通用章节 ---------- */

.section {
  padding: clamp(72px, 10vw, 128px) 0;
}

.section-alt {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head > p:last-child {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15.5px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: start;
}

.split-title {
  position: sticky;
  top: calc(var(--header-h) + 40px);
}

.prose p {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.95;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.prose em {
  font-style: normal;
  color: var(--green);
  font-weight: 600;
}

.prose blockquote {
  margin: 32px 0 0;
  padding: 22px 26px;
  border-left: 3px solid var(--green);
  background: var(--card);
  border-radius: 0 14px 14px 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
}

.prose blockquote cite {
  display: block;
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-style: normal;
  color: var(--muted);
}

/* ---------- 三次浪潮 ---------- */

.wave-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.wave-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.wave-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.wave-no {
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 4px 12px;
}

.wave-card h3 {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 800;
}

.wave-years {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--amber);
}

.wave-card > p:last-of-type {
  margin-top: 16px;
  font-size: 14.5px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.wave-tags,
.tl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
}

.wave-tags span,
.tl-tags span {
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---------- 时间线 ---------- */

.timeline {
  position: relative;
  padding-left: 12px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 125px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--line), var(--green) 35%, var(--amber) 75%, var(--line));
}

.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 52px;
  padding: 0 0 44px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-year {
  font-family: var(--serif);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: right;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.tl-item::after {
  content: "";
  position: absolute;
  left: 120px;
  top: 9px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--green);
  box-shadow: 0 0 0 4px var(--paper);
}

.tl-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl-body:hover {
  transform: translateX(3px);
  box-shadow: 0 14px 40px rgba(23, 23, 19, 0.08);
}

.tl-body h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.tl-body p {
  margin-top: 10px;
  font-size: 14.8px;
  line-height: 1.95;
  color: var(--ink-soft);
}

.tl-tags {
  padding-top: 16px;
}

/* ---------- 人物 ---------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.person {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.person:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.person-initials {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: #9ff0c9;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
}

.person h3 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.person h3 span {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.person p {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

/* ---------- 影响与未来 ---------- */

.future-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.future-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.future-card h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.future-card p {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-soft);
}

.closing {
  margin-top: clamp(48px, 7vw, 86px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
  max-width: 900px;
}

.closing p {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 2;
  color: var(--ink-soft);
}

.closing .closing-sign {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--green);
}

/* ---------- 页脚 / 回到顶部 ---------- */

.site-footer {
  background: var(--dark);
  color: rgba(243, 241, 232, 0.62);
  padding: 54px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-inner p:first-child {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: #f3f1e8;
}

.footer-meta,
.footer-copy {
  font-size: 12.5px;
  color: rgba(243, 241, 232, 0.45);
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(23, 23, 19, 0.16);
  transition: transform 0.18s ease, background 0.18s ease;
}

.back-top:hover {
  transform: translateY(-2px);
  background: var(--green-soft);
}

/* ---------- 滚动显现（渐进增强） ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .people-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wave-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .wave-card > p:last-of-type {
    margin-bottom: 0;
  }
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split-title {
    position: static;
  }

  .site-nav a {
    padding: 7px 10px;
    font-size: 12.5px;
  }

  .brand-name {
    display: none;
  }

  .timeline::before {
    left: 8px;
  }

  .tl-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding-left: 34px;
    padding-bottom: 30px;
  }

  .tl-year {
    text-align: left;
    font-size: 21px;
    color: var(--green);
  }

  .tl-item::after {
    left: 2px;
    top: 8px;
  }

  .tl-body {
    padding: 20px 22px;
  }

  .future-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .site-nav {
    gap: 0;
  }

  .site-nav a {
    padding: 6px 8px;
    font-size: 12px;
  }

  .hero {
    min-height: 92vh;
    padding: calc(var(--header-h) + 56px) 0 72px;
  }

  .hero-stats {
    gap: 14px 32px;
  }

  .people-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding: 64px 0;
  }

  .prose blockquote {
    padding: 18px 20px;
  }

  .back-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
