/* ==========================================================
   个人主页 · 样式表（Apple 风格 / 支持深浅色切换）
   ========================================================== */

:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #e8e8ed;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, .10);
  --line-2: rgba(0, 0, 0, .06);
  --accent: #0071e3;
  --accent-2: #2997ff;
  --shadow: 0 8px 30px rgba(0, 0, 0, .08);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .14);
  --nav-bg: rgba(255, 255, 255, .72);
  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --bg-3: #161617;
  --card: #111113;
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #86868b;
  --line: rgba(255, 255, 255, .14);
  --line-2: rgba(255, 255, 255, .08);
  --accent: #2997ff;
  --accent-2: #5dafff;
  --shadow: 0 8px 30px rgba(0, 0, 0, .6);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .8);
  --nav-bg: rgba(0, 0, 0, .70);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 22px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 52px;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line-2);
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 22px;
  height: 52px; display: flex; align-items: center; gap: 6px;
}
.brand {
  font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  color: var(--text); margin-right: auto; display: flex; align-items: center; gap: 8px;
}
.brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: linear-gradient(135deg, #ff7a5a, #ff2d55, #af52de);
  box-shadow: 0 0 12px rgba(255, 90, 120, .7);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  font-size: 13.5px; color: var(--text-2); padding: 6px 12px; border-radius: 980px;
  transition: color .25s, background .25s;
}
.nav-links a:hover { color: var(--text); background: var(--line-2); }
.nav-links a.active { color: var(--text); font-weight: 500; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center; font-size: 15px;
  transition: background .25s, transform .25s;
}
.icon-btn:hover { background: var(--line-2); transform: scale(1.06); }
.burger { display: none; }

.mobile-menu {
  position: fixed; inset: 52px 0 auto 0; z-index: 99;
  background: var(--bg); border-bottom: 1px solid var(--line);
  padding: 10px 22px 20px; display: none; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 4px; color: var(--text); font-size: 17px; border-bottom: 1px solid var(--line-2); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; min-height: 92vh; display: grid; place-items: center;
  text-align: center; padding: 120px 22px 80px; overflow: hidden;
}
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
  pointer-events: none;
}
.orb.a { width: 620px; height: 620px; top: -160px; left: -120px;
  background: radial-gradient(circle at 30% 30%, #ff9f6e, #ff5f6d 45%, transparent 70%); }
.orb.b { width: 560px; height: 560px; bottom: -200px; right: -120px;
  background: radial-gradient(circle at 60% 40%, #6ea8ff, #af52de 50%, transparent 72%); }
.orb.c { width: 420px; height: 420px; top: 40%; left: 55%;
  background: radial-gradient(circle at 50% 50%, #5ee7c4, #2f80ed 55%, transparent 75%); opacity: .35; }
[data-theme="dark"] .orb { opacity: .38; }

.hero-inner { position: relative; z-index: 2; max-width: 900px; animation: rise 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 18px;
}
h1.display {
  font-size: clamp(42px, 8.2vw, 92px);
  line-height: 1.04; font-weight: 700; letter-spacing: -.028em;
  margin: 0 0 20px;
}
h1.display .grad {
  background: linear-gradient(100deg, #ff7a5a, #af52de 45%, #2997ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  font-size: clamp(18px, 2.4vw, 24px); color: var(--text-2); font-weight: 400;
  max-width: 660px; margin: 0 auto 34px; line-height: 1.5;
}
.hero-clock {
  display: flex; align-items: baseline; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin: 0 auto 34px; color: var(--text-2);
  font-variant-numeric: tabular-nums; -webkit-font-variant-numeric: tabular-nums;
}
.hero-clock .cd { font-size: clamp(15px, 1.8vw, 18px); letter-spacing: .04em; }
.hero-clock .ct {
  font-size: clamp(30px, 5vw, 46px); font-weight: 600; letter-spacing: -.01em;
  color: var(--text); line-height: 1;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 980px; font-size: 16px; font-weight: 500;
  background: var(--accent); color: #fff; border: 1px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s, opacity .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 113, 227, .35); color: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--line-2); box-shadow: none; }

.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 12.5px; color: var(--text-3); letter-spacing: .1em; z-index: 2;
  animation: bob 2.4s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); opacity: .5 } 50% { transform: translate(-50%, 7px); opacity: 1 } }

/* ---------------- 通用区块 ---------------- */
section { padding: 110px 0; position: relative; }
section.tight { padding: 70px 0; }
.section-dark { background: #000; color: #f5f5f7; }
.section-dark .sub { color: #a1a1a6; }
[data-theme="dark"] .section-dark { background: #060606; }

.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
h2.title {
  font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; font-weight: 700;
  letter-spacing: -.022em; margin: 0 0 16px;
}
.sub { font-size: clamp(16px, 1.8vw, 20px); color: var(--text-2); max-width: 720px; margin: 0 0 44px; }
.section-head.center { text-align: center; }
.section-head.center .sub { margin-inline: auto; }

/* ---------------- 卡片 ---------------- */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.card.hoverable:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card .meta { font-size: 12.5px; color: var(--text-3); letter-spacing: .04em; }
.card h3 { font-size: 21px; font-weight: 600; letter-spacing: -.012em; margin: 10px 0 10px; line-height: 1.3; }
.card p { color: var(--text-2); font-size: 15px; margin: 0 0 14px; }

.tile {
  position: relative; overflow: hidden; border-radius: var(--radius);
  padding: 34px; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff; box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.tile:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-lg); }
.tile h3 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 10px; color: #fff; }
.tile p { color: rgba(255, 255, 255, .82); font-size: 15.5px; margin: 0 0 18px; }
.tile .mesh { position: absolute; inset: 0; z-index: 0; }
.tile > * { position: relative; z-index: 1; }
.mesh-1 { background: linear-gradient(140deg, #ff9a6e, #ff4d6d 55%, #7b2ff7); }
.mesh-2 { background: linear-gradient(140deg, #0ea5e9, #2563eb 60%, #7c3aed); }
.mesh-3 { background: linear-gradient(140deg, #10b981, #0d9488 55%, #065f46); }
.mesh-4 { background: linear-gradient(140deg, #f59e0b, #ef4444 60%, #7c2d12); }
.mesh-5 { background: linear-gradient(140deg, #8b5cf6, #ec4899 60%, #be185d); }
.mesh-6 { background: linear-gradient(140deg, #334155, #0f172a 70%, #000); }

.pill {
  display: inline-block; font-size: 12px; padding: 4px 11px; border-radius: 980px;
  background: var(--line-2); color: var(--text-2); margin: 0 6px 6px 0;
}
.pill.solid { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag {
  border: 1px solid var(--line); background: transparent; color: var(--text-2);
  padding: 7px 15px; border-radius: 980px; font-size: 13.5px; cursor: pointer;
  transition: all .25s var(--ease);
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------------- 搜索 ---------------- */
.searchbar {
  display: flex; align-items: center; gap: 10px; padding: 13px 18px;
  border: 1px solid var(--line); border-radius: 980px; background: var(--bg-2);
  margin-bottom: 22px; transition: border-color .25s, box-shadow .25s;
}
[data-theme="dark"] .searchbar { background: #161617; }
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, .12); }
.searchbar input {
  flex: 1; border: 0; background: transparent; color: var(--text);
  font-size: 15.5px; outline: none; font-family: inherit;
}

/* ---------------- 时间线 ---------------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 8px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2.5px solid var(--accent);
}
.tl-date { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: .04em; }
.tl-item h3 { font-size: 20px; margin: 6px 0 8px; font-weight: 600; letter-spacing: -.01em; }
.tl-item p { color: var(--text-2); font-size: 15.5px; margin: 0 0 10px; }

/* ---------------- 数据条 ---------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; }
.stat .num {
  font-size: clamp(34px, 5vw, 56px); font-weight: 700; letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(120deg, #ff7a5a, #af52de 50%, #2997ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { font-size: 14px; color: var(--text-3); margin-top: 8px; }

/* ---------------- 弹窗 ---------------- */
.modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(8px);
  padding: 6vh 16px; overflow-y: auto;
}
.modal.open { display: block; animation: fade .3s var(--ease); }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal-box {
  max-width: 760px; margin: 0 auto; background: var(--bg); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-lg); animation: pop .4s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98) } to { opacity: 1; transform: none } }
.modal-close {
  float: right; border: 0; background: var(--line-2); color: var(--text);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px;
}
.prose h2 { font-size: 24px; margin: 30px 0 12px; letter-spacing: -.01em; }
.prose h3 { font-size: 19px; margin: 24px 0 10px; }
.prose p { color: var(--text-2); font-size: 16px; line-height: 1.78; }
.prose ul { color: var(--text-2); font-size: 16px; line-height: 1.78; padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--accent);
  background: var(--bg-2); color: var(--text-2); border-radius: 0 10px 10px 0;
}
.prose code {
  background: var(--bg-2); padding: 2px 7px; border-radius: 6px; font-size: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent);
}
.prose pre {
  background: var(--bg-3); padding: 16px 18px; border-radius: 12px; overflow-x: auto;
}
.prose pre code { background: transparent; color: var(--text); padding: 0; }
.prose strong { color: var(--text); }

/* ---------------- 人生字典 9 宫格 ---------------- */
.dict { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dict .cell {
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 20px;
  background: var(--card); transition: transform .35s var(--ease), border-color .3s;
}
.dict .cell:hover { transform: translateY(-4px); border-color: var(--accent); }
.dict .cell .k { font-size: 12px; color: var(--text-3); letter-spacing: .1em; }
.dict .cell .v { font-size: 18px; font-weight: 600; margin: 6px 0 8px; }
.dict .cell .d { font-size: 14px; color: var(--text-2); }

/* ---------------- 页脚 ---------------- */
footer {
  background: var(--bg-2); border-top: 1px solid var(--line-2);
  padding: 46px 22px 40px; font-size: 13.5px; color: var(--text-3);
}
[data-theme="dark"] footer { background: #0a0a0a; }
.foot-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--text-3); }
.foot-links a:hover { color: var(--accent); }
.foot-icp {
  flex-basis: 100%; text-align: center; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12.5px;
}
.foot-icp a { color: var(--text-3); text-decoration: none; }
.foot-icp a:hover { color: var(--accent); text-decoration: underline; }

/* ---------------- 滚动动效 ---------------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.page-head { padding: 130px 0 40px; }
.page-head h1 {
  font-size: clamp(34px, 6vw, 62px); font-weight: 700; letter-spacing: -.025em;
  line-height: 1.06; margin: 0 0 14px;
}

.empty { text-align: center; color: var(--text-3); padding: 50px 0; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  section { padding: 84px 0; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .burger { display: grid; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .dict { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; padding-top: 100px; }
  .tile { min-height: 250px; padding: 26px; }
  .modal-box { padding: 26px 20px; }
  .modal { padding: 3vh 10px; }
  .page-head { padding: 104px 0 30px; }
  .stats { gap: 30px 16px; }
}
