:root {
  --bg: #000;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #6e6e73;
  --accent: #2997ff;
  --nav-text: #d3d3d3;
  --radius-lg: 18px;
  --radius-md: 14px;
  --pill: 980px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Noto Sans SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: 48px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(41, 151, 255, 0.32); }

main { min-height: 60vh; }

/* ---------- 固定毛玻璃导航（仿 apple.com） ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 48px;
  z-index: 60;
  display: flex;
  align-items: center;
  background: rgba(22, 22, 22, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line-soft);
}

.site-nav .wrap {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--text); }

.nav-links { display: flex; gap: 1.6rem; }

.nav-links a {
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 5.5rem 1.5rem 3rem;
  text-align: center;
}

.hero-avatar {
  display: flex;
  justify-content: center;
  opacity: 0;
  animation: avatar-in 1s cubic-bezier(0.21, 0.61, 0.35, 1) 0.1s forwards;
}

.avatar-frame {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 80px rgba(255, 255, 255, 0.07), 0 30px 60px -30px rgba(0, 0, 0, 0.95);
}

.avatar {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(circle at 50% 36%, #1a1a1c, #0a0a0a 72%);
}

@keyframes avatar-in {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 1.6rem 0 0;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  opacity: 0;
  animation: fade-up 0.9s cubic-bezier(0.21, 0.61, 0.35, 1) 0.4s forwards;
}

.hero-art { margin-top: 0.8rem; }

.ink-svg {
  width: min(92vw, 640px);
  height: auto;
  display: block;
  margin: 0 auto;
  overflow: visible;
}

.signature {
  color: var(--text-secondary);
  font-size: clamp(0.98rem, 2.2vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.17em;
  margin: 1.4rem 0 0;
}

.js .signature {
  opacity: 0;
  transform: translateY(10px);
  letter-spacing: 0.5em;
  transition: opacity 1s cubic-bezier(0.21, 0.61, 0.35, 1), transform 1s cubic-bezier(0.21, 0.61, 0.35, 1), letter-spacing 1s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.js .hero.writing-done .signature {
  opacity: 1;
  transform: none;
  letter-spacing: 0.34em;
  transition-delay: 0.1s;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.js .hero-actions {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.21, 0.61, 0.35, 1), transform 0.9s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.js .hero.writing-done .hero-actions {
  opacity: 1;
  transform: none;
  transition-delay: 0.28s;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: var(--pill);
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn svg { width: 16px; height: 16px; }

.btn:hover { background: var(--surface-hover); }

.btn:active { transform: scale(0.98); }

.btn.primary {
  background: var(--text);
  color: #000;
}

.btn.primary:hover { background: #fff; }

.hero-contacts {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
}

.js .hero-contacts {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.21, 0.61, 0.35, 1), transform 0.9s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.js .hero.writing-done .hero-contacts {
  opacity: 1;
  transform: none;
  transition-delay: 0.45s;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 1rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.chip svg { width: 14px; height: 14px; opacity: 0.9; }

.chip em {
  font-style: normal;
  color: var(--text);
}

.chip:hover {
  border-color: rgba(255, 255, 255, 0.24);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.copy-hint {
  color: var(--text-tertiary);
  font-size: 0.7rem;
}

.chip.copied { border-color: rgba(41, 151, 255, 0.5); }
.chip.copied .copy-hint { color: var(--accent); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 项目：仿 apple.com 双列 promo 磁贴 ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 12px 4rem;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.6rem;
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-note {
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

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

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 340px;
  padding: 3rem 2.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: linear-gradient(180deg, #101012, #0a0a0c);
  transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.project-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, #16161a, #0d0d10);
}

.card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.card-top h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.tag {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--pill);
  padding: 0.18rem 0.62rem;
}

.project-card p {
  margin: 0 0 1.1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 34rem;
}

.card-links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.95rem;
}

.card-links a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.card-links a::after { content: " >"; }

.card-links a:hover { text-decoration: underline; }

/* ---------- 滚动出现 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.21, 0.61, 0.35, 1), transform 0.9s cubic-bezier(0.21, 0.61, 0.35, 1);
}

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

.project-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.project-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.project-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.project-grid .reveal:nth-child(5) { transition-delay: 0.24s; }
.project-grid .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ---------- 文档页 ---------- */
.page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}

.page-kicker {
  margin: 0 0 0.6rem;
  color: var(--text-tertiary);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
}

.page-title {
  font-size: clamp(1.9rem, 4.4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: 0 0 1.8rem;
}

.prose {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.prose h2 {
  margin-top: 2.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-soft);
}

.prose h3 { margin-top: 2.1rem; }

.prose a {
  color: var(--accent);
  text-decoration: none;
}

.prose a:hover { text-decoration: underline; }

.prose code {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.85em;
  color: #f5f5f7;
  font-family: "SF Mono", ui-monospace, "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

.prose pre {
  background: #0d0d0f;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.3rem;
  overflow: auto;
  line-height: 1.65;
}

.prose pre code {
  background: none;
  padding: 0;
  color: #d5d5da;
  font-size: 0.84rem;
}

.prose blockquote {
  margin: 1.3rem 0;
  padding: 0.7rem 1.1rem;
  border-left: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 12px 12px 0;
  color: var(--text-secondary);
}

.prose blockquote p { margin: 0.2rem 0; }

.prose table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.3rem 0;
  font-size: 0.88rem;
}

.prose th,
.prose td {
  border: 1px solid var(--line-soft);
  padding: 0.55rem 0.8rem;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 600;
}

.prose img {
  max-width: 100%;
  border-radius: 14px;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 2.2rem 0;
}

.highlight .k,
.highlight .kd,
.highlight .kn { color: #ff7ab2; }
.highlight .s,
.highlight .s1,
.highlight .s2 { color: #a8d08d; }
.highlight .c,
.highlight .c1,
.highlight .cm { color: #6e6e73; font-style: italic; }
.highlight .m,
.highlight .mi,
.highlight .mf { color: #d2a8ff; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid #1d1d1f;
  margin-top: 2rem;
  padding: 2.2rem 1.5rem 2.6rem;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.site-footer .sig {
  color: var(--text-secondary);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  font-size: 0.82rem;
  margin: 0 0 0.7rem;
}

.site-footer .foot-links { margin: 0 0 0.6rem; }

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover { color: var(--text); }

.foot-links span {
  margin: 0 0.45rem;
  color: var(--text-tertiary);
}

.site-footer .copy {
  margin: 0;
  color: #48484d;
}

/* ---------- 响应式 ---------- */
@media (max-width: 800px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 280px; padding: 2.4rem 1.6rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-nav .wrap { padding: 0 16px; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: 0.74rem; }
  .hero { padding: 4rem 1.25rem 2.5rem; }
  .ink-svg { width: 94vw; }
  .section { padding-bottom: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ink-svg path { animation: none !important; stroke-dashoffset: 0 !important; }
  .hero-avatar,
  .eyebrow { animation: none; opacity: 1; transform: none; }
  .js .signature,
  .js .hero-actions,
  .js .hero-contacts { opacity: 1; transform: none; transition: none; }
  .js .signature { letter-spacing: 0.34em; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
