@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

/* ===== 变量 ===== */
:root {
  --bg: #c8e0f4;
  --bg2: #b8d4ec;
  --bg3: #d8ecff;
  --accent: #f5e0e8;
  --accent2: #e8c8d8;
  --ink: #171f26;
  --ink2: #2e3d4e;
  --ink3: #5a7080;
  --shadow-dark: rgba(23, 31, 38, 0.18);
  --shadow-light: rgba(255, 255, 255, 0.82);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --nav-h: 72px;
  --font-mono: 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --font-sans: 'Fira Sans', 'Fira Code', system-ui, sans-serif;
  --transition: 150ms ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ===== 软浮雕工具类 ===== */
.neu {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: -6px -6px 16px var(--shadow-light), 6px 6px 16px var(--shadow-dark);
}
.neu-inset {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: inset -4px -4px 10px var(--shadow-light), inset 4px 4px 10px var(--shadow-dark);
}
.neu-sm {
  border-radius: var(--radius-sm);
  box-shadow: -4px -4px 10px var(--shadow-light), 4px 4px 10px var(--shadow-dark);
}

/* ===== 页面包裹 ===== */
.page-wrap {
  padding-bottom: calc(var(--nav-h) + 16px);
}

/* ===== 英雄区 ===== */
.hero {
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 3rem;
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(245,224,232,0.35) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  text-align: center;
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}
.hero-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  box-shadow: -5px -5px 15px var(--shadow-light), 5px 5px 15px var(--shadow-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.hero-icon {
  font-size: 1.6rem;
  color: var(--ink2);
  font-family: var(--font-mono);
}
.hero-h1 {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hero-sub {
  font-size: 1rem;
  color: var(--ink3);
  max-width: 480px;
  font-weight: 400;
}

/* ===== 内容布局 ===== */
.content-layout {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
  align-items: flex-start;
}

/* ===== 侧边栏 ===== */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
}
.sidebar-inner {
  padding: 1.5rem 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: -5px -5px 15px var(--shadow-light), 5px 5px 15px var(--shadow-dark);
}
.sidebar-title {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
}
.sidebar .subtitle {
  font-size: 0.75rem;
  color: var(--ink3);
  margin-bottom: 1rem;
  line-height: 1.4;
}
.sidebar-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.sidebar-link {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--ink2);
  background: var(--bg);
  box-shadow: -3px -3px 8px var(--shadow-light), 3px 3px 8px var(--shadow-dark);
  transition: box-shadow var(--transition), transform var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 40px;
  line-height: 1.5;
}
.sidebar-link:hover {
  color: var(--ink);
  box-shadow: -2px -2px 6px var(--shadow-light), 2px 2px 6px var(--shadow-dark);
}
.sidebar-link:active {
  box-shadow: inset -2px -2px 6px var(--shadow-light), inset 2px 2px 6px var(--shadow-dark);
  transform: scale(0.97);
}
.sidebar-tag { margin-top: 0.75rem; }
.tag-pill {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--ink2);
  font-size: 0.72rem;
  font-family: var(--font-mono);
  box-shadow: -2px -2px 6px var(--shadow-light), 2px 2px 6px rgba(23,31,38,0.1);
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  min-width: 0;
}
.content-section {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: -5px -5px 15px var(--shadow-light), 5px 5px 15px var(--shadow-dark);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.content-deco {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}
.deco-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg2);
  box-shadow: inset -1px -1px 3px var(--shadow-light), inset 1px 1px 3px var(--shadow-dark);
  display: block;
}
.deco-dot:nth-child(1) { background: #f5c0c0; }
.deco-dot:nth-child(2) { background: #f5e0a0; }
.deco-dot:nth-child(3) { background: #a0d4b0; }

/* ===== 正文排版 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}
.prose h1 { display: none; }
.prose h2 {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--bg2);
  letter-spacing: -0.01em;
}
.prose h3 {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink2);
  margin: 1.5rem 0 0.4rem;
}
.prose p {
  margin-bottom: 1rem;
  color: var(--ink2);
}
.prose ul, .prose ol {
  margin: 0.75rem 0 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { color: var(--ink2); }
.prose a {
  color: var(--ink);
  border-bottom: 1px solid var(--accent2);
  transition: border-color var(--transition);
}
.prose a:hover { border-color: var(--ink2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg2);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  box-shadow: inset -1px -1px 3px var(--shadow-light), inset 1px 1px 3px var(--shadow-dark);
}
.prose section {
  margin-bottom: 2.5rem;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}
.prose section:last-child { margin-bottom: 0; }
.prose figure { margin: 1.5rem 0; }
.prose aside {
  background: linear-gradient(135deg, var(--accent), var(--bg));
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 0.9rem;
  color: var(--ink2);
  box-shadow: -3px -3px 8px var(--shadow-light), 3px 3px 8px var(--shadow-dark);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.prose th {
  background: var(--bg2);
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
}
.prose td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--bg2);
}
.prose blockquote {
  border-left: 3px solid var(--accent2);
  padding: 0.5rem 1rem;
  margin: 1rem 0;
  color: var(--ink3);
  font-style: italic;
}

/* ===== 页脚 ===== */
.site-footer {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 0 1.5rem 2rem;
}
.footer-cta {
  background: linear-gradient(145deg, var(--bg3), var(--accent));
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: -6px -6px 18px var(--shadow-light), 6px 6px 18px var(--shadow-dark);
}
.footer-cta-title {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.footer-cta .subtitle {
  color: var(--ink3);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: -5px -5px 12px var(--shadow-light), 5px 5px 12px var(--shadow-dark);
  transition: box-shadow var(--transition), transform var(--transition);
  min-height: 44px;
  line-height: 1.3;
}
.cta-btn:hover {
  box-shadow: -3px -3px 8px var(--shadow-light), 3px 3px 8px var(--shadow-dark);
}
.cta-btn:active {
  box-shadow: inset -3px -3px 8px var(--shadow-light), inset 3px 3px 8px var(--shadow-dark);
  transform: scale(0.97);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.footer-col { padding: 1.25rem; }
.footer-brand {
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
}
.footer-brand .logo-text { color: var(--ink); }
.site-logo { height: 32px; width: auto; }
.footer-desc {
  font-size: 0.85rem;
  color: var(--ink3);
  line-height: 1.6;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink3);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-nav-list a {
  font-size: 0.88rem;
  color: var(--ink2);
  transition: color var(--transition);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0;
}
.footer-nav-list a:hover { color: var(--ink); }
.footer-contact {
  font-size: 0.82rem;
  color: var(--ink3);
  margin-top: 0.75rem;
}
.footer-bottom {
  border-top: 1px solid var(--bg2);
  padding-top: 1.25rem;
  text-align: center;
}
.copyright {
  font-size: 0.8rem;
  color: var(--ink3);
  font-family: var(--font-mono);
}

/* ===== 底部固定导航 ===== */
.bottom-nav-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.6rem 0.75rem 0.75rem;
  background: linear-gradient(to top, rgba(200,224,244,0.98) 70%, rgba(200,224,244,0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.bottom-nav {
  max-width: 900px;
  margin: 0 auto;
}
.bottom-nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 0.25rem;
}
.bottom-nav-list::-webkit-scrollbar { display: none; }
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--ink2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  min-height: 40px;
  box-shadow: -3px -3px 8px var(--shadow-light), 3px 3px 8px var(--shadow-dark);
  transition: box-shadow var(--transition), transform var(--transition), color var(--transition);
}
.nav-pill:hover {
  color: var(--ink);
  box-shadow: -2px -2px 5px var(--shadow-light), 2px 2px 5px var(--shadow-dark);
}
.nav-pill:active {
  box-shadow: inset -2px -2px 6px var(--shadow-light), inset 2px 2px 6px var(--shadow-dark);
  transform: scale(0.95);
}
.brand-center { flex-shrink: 0; }
.brand-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  box-shadow: -5px -5px 12px var(--shadow-light), 5px 5px 12px var(--shadow-dark);
  transition: box-shadow var(--transition), transform var(--transition);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  min-height: 52px;
}
.brand-pill:active {
  box-shadow: inset -3px -3px 8px var(--shadow-light), inset 3px 3px 8px var(--shadow-dark);
  transform: scale(0.96);
}
.brand-pill .site-logo { height: 24px; width: auto; }
.brand-pill .logo-text { font-size: 0.55rem; line-height: 1.2; }

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner {
    animation: fadeUp 0.6s ease both;
  }
  .sidebar-inner {
    animation: fadeUp 0.55s 0.1s ease both;
  }
  .content-section {
    animation: fadeUp 0.55s 0.15s ease both;
  }
  .sidebar-link {
    animation: staggerFade 0.4s ease both;
  }
  .sidebar-nav-list li:nth-child(1) .sidebar-link { animation-delay: 0.18s; }
  .sidebar-nav-list li:nth-child(2) .sidebar-link { animation-delay: 0.24s; }
  .sidebar-nav-list li:nth-child(3) .sidebar-link { animation-delay: 0.30s; }
  .sidebar-nav-list li:nth-child(4) .sidebar-link { animation-delay: 0.36s; }
  .sidebar-nav-list li:nth-child(5) .sidebar-link { animation-delay: 0.42s; }
  .sidebar-nav-list li:nth-child(6) .sidebar-link { animation-delay: 0.48s; }
  .sidebar-nav-list li:nth-child(7) .sidebar-link { animation-delay: 0.54s; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes staggerFade {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .prose section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .prose section.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .content-layout {
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 1rem;
    margin: 1.5rem auto;
  }
  .sidebar {
    width: 100%;
    position: static;
  }
  .sidebar-nav-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .site-footer { padding: 0 1rem 1.5rem; }
  .hero { padding: 3rem 1rem 2rem; min-height: 38vh; }
  .nav-pill { font-size: 0.7rem; padding: 0.55rem 0.6rem; min-height: 40px; }
  .bottom-nav-list { gap: 0.25rem; }
  .content-section { padding: 1.25rem; }
  .footer-cta { padding: 1.75rem 1.25rem; }
}
@media (max-width: 480px) {
  .hero-h1 { font-size: 1.4rem; }
  .sidebar-nav-list { grid-template-columns: 1fr 1fr; }
  .footer-cols { padding: 0; }
  .nav-pill { font-size: 0.68rem; padding: 0.55rem 0.5rem; min-height: 40px; }
}

/* ===== 玻璃拟态卡片（prose 内部卡片） ===== */
.prose .card {
  border-radius: 0;
  background: rgba(200, 224, 244, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* ===== 工具 ===== */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}
