/*
 * 个人技术分享站 · 视觉对齐 marketing（design-tokens 同源色板）
 * 强制浅色（备案截图稳定）；无产品/品牌词。
 */
:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f3f7;
  --border: #e6e8ee;
  --text: #1a1d24;
  --text-soft: #5b6472;
  --text-muted: #929ba8;
  --primary: #0ea5a4;
  --primary-hover: #0d9488;
  --primary-active: #0c8079;
  --primary-soft: #ecfdf5;
  --primary-start: #0ea5a4;
  --primary-end: #10b981;
  --gradient-primary: linear-gradient(135deg, var(--primary-start), var(--primary-end));
  --gradient-ambient: linear-gradient(135deg, rgba(14, 165, 164, 0.09), rgba(16, 185, 129, 0.06));
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-card: 20px;
  --radius-pill: 9999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-card: 0 12px 32px rgba(31, 41, 55, 0.08);
  --shadow-raised: 0 16px 40px rgba(31, 41, 55, 0.14);
  --ring: rgba(14, 165, 164, 0.30);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur-slow: 320ms;
  --max: 1080px;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--primary-soft); color: var(--primary-active); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: 6px; }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 720px; }

/* ---------- Header（对齐 marketing 顶栏玻璃感） ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
nav a {
  margin-left: 22px;
  color: var(--text-soft);
  font-size: 14.5px;
  font-weight: 500;
  position: relative;
}
nav a:hover { color: var(--primary); text-decoration: none; }
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: right 0.22s var(--ease-out);
}
nav a:hover::after,
nav a[aria-current="page"]::after { right: 0; }
nav a[aria-current="page"] { color: var(--primary); }

/* ---------- Hero（marketing 同构：ambient + 主视觉） ---------- */
.hero-band {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-ambient);
  pointer-events: none;
}
.hero-band::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -20%;
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.18;
  filter: blur(48px);
  pointer-events: none;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  padding: 72px 0 56px;
}
.hero-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-active);
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero .lead {
  margin: 0;
  max-width: 34em;
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.7;
}
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  justify-self: end;
  width: min(100%, 480px);
}
.hero-visual img {
  width: 100%;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 18px 40px rgba(14, 165, 164, 0.18));
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.16s var(--ease-out), box-shadow 0.16s var(--ease-out), filter 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(14, 165, 164, 0.28);
}
.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14, 165, 164, 0.34);
}
.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */
main { padding: 0 0 8px; }
.section {
  padding: 56px 0 8px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 22px;
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-head .count { font-size: 13px; color: var(--text-muted); }
.section-blurb {
  margin: -8px 0 28px;
  max-width: 36em;
  color: var(--text-soft);
  font-size: 15px;
}

/* 三格兴趣区 */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.pillar img { width: 48px; height: 48px; margin-bottom: 14px; }
.pillar h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.pillar p { margin: 0; color: var(--text-soft); font-size: 13.5px; line-height: 1.65; }

/* ---------- Note cards ---------- */
.note-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.note-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.note-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
  text-decoration: none;
}
.note-card .icon { width: 48px; height: 48px; }
.note-card .date { font-size: 12.5px; color: var(--text-muted); letter-spacing: 0.04em; }
.note-card .title {
  display: block;
  margin: 6px 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.note-card .excerpt { display: block; color: var(--text-soft); font-size: 14.5px; line-height: 1.7; }
.note-card .more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--primary);
}
.note-card .more .arrow { transition: transform 0.18s var(--ease-out); display: inline-block; }
.note-card:hover .more .arrow { transform: translateX(4px); }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-active);
  background: var(--primary-soft);
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  margin: 0 8px 4px 0;
}

/* ---------- Article ---------- */
.note-page { padding-top: 28px; padding-bottom: 24px; }
.note-page h1 { margin: 18px 0 8px; font-size: clamp(26px, 3vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.lead { color: var(--text-soft); margin: 0 0 24px; font-size: 16px; }
article p { margin: 14px 0; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  margin-bottom: 8px;
}
.back-link:hover { color: var(--primary); border-color: var(--primary); text-decoration: none; }
article h2 {
  position: relative;
  padding-left: 14px;
  font-size: 19px;
  margin: 34px 0 10px;
  font-weight: 700;
}
article h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  bottom: 0.32em;
  width: 4px;
  border-radius: 4px;
  background: var(--gradient-primary);
}
pre {
  background: #0e1116;
  color: #e6eaf0;
  border: 1px solid #262c36;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
}
code { font-family: var(--mono); font-size: 0.92em; }
:not(pre) > code {
  background: var(--primary-soft);
  color: var(--primary-active);
  padding: 2px 6px;
  border-radius: 5px;
}
blockquote {
  margin: 16px 0;
  padding: 12px 18px;
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--primary-active);
}

/* ---------- About ---------- */
.about-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 40px 0 8px;
}
.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  box-shadow: var(--shadow-card);
}
.about-hero h1 { margin: 0; font-size: 28px; font-weight: 800; }
.about-hero p { margin: 4px 0 0; color: var(--text-soft); }
.about-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px 26px;
  margin-top: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.about-card p { margin: 12px 0; }
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 18px 0 8px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.feature .f-title {
  font-weight: 700;
  font-size: 14.5px;
  margin-bottom: 6px;
}
.feature .f-title::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--gradient-primary);
  vertical-align: middle;
}
.feature .f-desc { color: var(--text-soft); font-size: 13px; line-height: 1.6; }
.contact-line {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
}

h2.page-h { font-size: 20px; margin: 36px 0 12px; font-weight: 700; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 72px;
}
footer.site .wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 32px 20px 48px;
  color: var(--text-muted);
  font-size: 13px;
}
footer.site p { margin: 0; }
footer .nature { color: var(--text-soft); max-width: 36em; line-height: 1.6; }

/* ---------- Motion ---------- */
@keyframes mkt-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.mkt-fade-up { animation: mkt-fade-up var(--dur-slow) var(--ease-out) both; }
.mkt-fade-up-delay { animation: mkt-fade-up var(--dur-slow) var(--ease-out) 70ms both; }
.mkt-fade-up-delay-2 { animation: mkt-fade-up var(--dur-slow) var(--ease-out) 140ms both; }
.zy-press { transition: transform 0.14s var(--ease-out); }
.zy-press:active { transform: scale(0.955); }
@media (hover: hover) and (pointer: fine) {
  .zy-hover-lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-raised); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  .mkt-fade-up, .mkt-fade-up-delay, .mkt-fade-up-delay-2 { animation: none; opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 48px 0 40px;
    gap: 28px;
  }
  .hero-visual { justify-self: stretch; order: -1; max-width: 420px; margin: 0 auto; }
  .pillars, .features { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  nav a { margin-left: 14px; font-size: 14px; }
  .note-card { grid-template-columns: 44px 1fr; padding: 18px; gap: 14px; }
  .note-card .icon { width: 40px; height: 40px; }
}
