/* ============================================
   陆大伟文集 - 极简学术风
   ============================================ */

:root {
  --brand: #2c3e50;
  --brand-light: #3a5a7a;
  --brand-bg: #f7f8fa;
  --brand-border: #e4e7eb;
  --brand-text: #2c3e50;
  --brand-text-2: #5a6c7d;
  --brand-text-3: #8995a1;
}

/* 字体 */
html {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
               Helvetica, Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   顶部导航栏
   ============================================ */
.VPNav {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: rgba(255, 255, 255, 0.55) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--brand-border) !important;
  box-shadow: none !important;
}
.VPNavBarTitle .title {
  font-weight: 700 !important;
  letter-spacing: 0.03em;
  color: var(--brand) !important;
}
.VPNavBarMenuLink {
  font-weight: 500 !important;
  color: var(--brand-text-2) !important;
  transition: color 0.15s;
}
.VPNavBarMenuLink:hover,
.VPNavBarMenuLink.active {
  color: var(--brand) !important;
}

/* ============================================
   首页 Hero
   ============================================ */
.VPHero {
  padding: 6rem 0 1.5rem !important;
}
.VPHero,
.VPHero .container,
.VPHero .main,
.VPHero .name,
.VPHero .name .clip {
  text-align: center !important;
}
.VPHero .name {
  font-size: 3rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  max-width: none !important;
  margin: 0 auto !important;
  color: var(--brand) !important;
  -webkit-text-fill-color: var(--brand) !important;
  background: none !important;
}
.VPHero .name .clip {
  background: none !important;
  -webkit-text-fill-color: var(--brand) !important;
}
.VPHero .main {
  justify-content: center !important;
}

/* Hero 下方分隔线 */
.VPFeatures {
  position: relative;
  padding: 1rem 0 3rem !important;
}
.VPFeatures::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--brand);
  margin: 0 auto 2.5rem;
  border-radius: 2px;
}

/* ============================================
   首页分类卡片
   ============================================ */
.VPFeature {
  border-radius: 8px !important;
  padding: 1.5rem !important;
  background: #fff !important;
  border: 1px solid var(--brand-border) !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.VPFeature:hover {
  border-color: var(--brand) !important;
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08) !important;
  transform: none !important;
}
.VPFeature .icon {
  font-size: 1.8rem !important;
  margin-bottom: 0.5rem !important;
}
.VPFeature .title {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--brand) !important;
}
.VPFeature .details {
  font-size: 0.88rem !important;
  color: var(--brand-text-3) !important;
}

/* ============================================
   文章正文
   ============================================ */
.vp-doc {
  font-size: 16px;
  line-height: 1.85;
  color: var(--brand-text);
}
.vp-doc p {
  line-height: 1.85;
  margin: 1em 0;
}
.vp-doc h1 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  border-bottom: 2px solid var(--brand) !important;
  padding-bottom: 0.4rem !important;
  margin: 1.5rem 0 1.2rem !important;
  color: var(--brand) !important;
}
.vp-doc h2 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: var(--brand) !important;
  border-bottom: 1px solid var(--brand-border) !important;
  padding-bottom: 0.3rem !important;
  margin: 2rem 0 1rem !important;
}
.vp-doc h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: var(--brand-text) !important;
  margin: 1.5rem 0 0.8rem !important;
}
.vp-doc h4 {
  font-size: 1.08rem !important;
  font-weight: 600 !important;
  color: var(--brand-text) !important;
  margin: 1.3rem 0 0.6rem !important;
}
.vp-doc h5, .vp-doc h6 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--brand-text-2) !important;
}
.vp-doc a {
  color: var(--brand) !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(44, 62, 80, 0.15);
  transition: border-color 0.15s;
}
.vp-doc a:hover {
  border-bottom-color: var(--brand);
}
.vp-doc blockquote {
  border-left: 3px solid var(--brand-border) !important;
  background: var(--brand-bg) !important;
  padding: 0.7rem 1.1rem !important;
  margin: 1.2rem 0 !important;
  border-radius: 0 6px 6px 0;
  color: var(--brand-text-2);
}
.vp-doc code {
  background: var(--brand-bg) !important;
  color: var(--brand) !important;
  padding: 2px 5px !important;
  border-radius: 3px;
  font-size: 0.9em;
}
.vp-doc pre {
  background: #1e2a2a !important;
  border-radius: 8px !important;
}
.vp-doc pre code {
  background: transparent !important;
  color: #e4e7eb !important;
}
.vp-doc img {
  border-radius: 6px;
  max-width: 100%;
}
.vp-doc table {
  border-collapse: collapse;
  font-size: 0.92rem;
}
.vp-doc table th {
  background: var(--brand) !important;
  color: #fff !important;
  font-weight: 600;
  padding: 0.6rem 1rem !important;
}
.vp-doc table td {
  padding: 0.5rem 1rem !important;
  border: 1px solid var(--brand-border) !important;
}
.vp-doc table tr:hover td {
  background: var(--brand-bg) !important;
}

/* ============================================
   侧边栏
   ============================================ */
.VPSidebar {
  border-right: 1px solid var(--brand-border) !important;
  background: #fff !important;
}
.VPSidebar .VPSidebarItem.level-0 > .item > .text {
  font-weight: 600 !important;
  font-size: 1.02rem !important;
  color: var(--brand) !important;
}
.VPSidebar .VPSidebarItem .item {
  font-size: 0.9rem;
  color: var(--brand-text-2);
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.VPSidebar .VPSidebarItem .item:hover {
  background: var(--brand-bg) !important;
  color: var(--brand) !important;
}
.VPSidebar .VPSidebarItem .item.is-active {
  color: var(--brand) !important;
  font-weight: 600 !important;
  background: var(--brand-bg) !important;
}

/* ============================================
   右侧大纲
   ============================================ */
.VPDocOutline .outline-link {
  white-space: normal !important;
  word-break: break-all;
  line-height: 1.55;
  padding: 4px 0 4px 10px;
  font-size: 0.87rem;
  color: var(--brand-text-3);
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.VPDocOutline .outline-link:hover {
  color: var(--brand);
  border-left-color: var(--brand-border);
}
.VPDocOutline .outline-link.active {
  color: var(--brand) !important;
  font-weight: 600;
  border-left-color: var(--brand);
}
.VPDocOutline .outline-link.outline-level-3 { padding-left: 18px; }
.VPDocOutline .outline-link.outline-level-4 { padding-left: 26px; font-size: 0.84rem; }
.VPDocOutline .outline-link.outline-level-5 { padding-left: 34px; font-size: 0.82rem; }
.VPDocOutline .outline-link.outline-level-6 { padding-left: 42px; font-size: 0.82rem; }
.VPDocOutline .content {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.VPDocOutline .title {
  font-weight: 600;
  color: var(--brand);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

/* ============================================
   底部
   ============================================ */
.VPDocFooter {
  border-top: 1px solid var(--brand-border) !important;
  margin-top: 3rem !important;
  padding-top: 1.5rem !important;
}
.VPDocFooter .pager-link .title,
.VPDocFooter .pager-link .desc {
  color: var(--brand-text) !important;
  transition: color 0.15s;
}
.VPDocFooter .pager-link:hover .title,
.VPDocFooter .pager-link:hover .desc {
  color: var(--brand) !important;
}
.VPDocFooter .pager-link {
  border-color: var(--brand-border) !important;
  transition: border-color 0.15s;
}
.VPDocFooter .pager-link:hover {
  border-color: var(--brand) !important;
}

/* ============================================
   分类列表页
   ============================================ */
.vp-doc p strong {
  color: var(--brand-text-3);
  font-weight: 500;
  font-family: "SF Mono", Consolas, Monaco, monospace;
  font-size: 0.85rem;
  margin-right: 0.75rem;
}
.vp-doc p a {
  font-weight: 500;
  color: var(--brand-text) !important;
  border-bottom: 1px solid transparent;
}
.vp-doc p a:hover {
  color: var(--brand) !important;
  border-bottom-color: var(--brand);
}

/* ============================================
   滚动条
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--brand-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-text-3); }

/* 选中文字 */
::selection {
  background: rgba(44, 62, 80, 0.12);
}

/* ============================================
   暗色模式
   ============================================ */
.dark { --brand-bg: #1a1a1a; --brand-border: #333; }
.dark .vp-doc { color: #d4d4d4; }
.dark .vp-doc h1 { color: #e4e7eb !important; border-color: #e4e7eb !important; }
.dark .vp-doc h2 { color: #e4e7eb !important; border-color: #333 !important; }
.dark .vp-doc h3, .dark .vp-doc h4 { color: #c4c7cb !important; }
.dark .vp-doc a { color: #7ab8e0 !important; }
.dark .VPFeature { background: #1a1a1a !important; border-color: #333 !important; }
.dark .VPFeature .title { color: #e4e7eb !important; }
.dark .VPFeature .details { color: #8995a1 !important; }
.dark .VPSidebar { background: #1a1a1a !important; }
.dark .VPSidebar .VPSidebarItem .item:hover { background: #252525 !important; }
.dark .VPSidebar .VPSidebarItem .item.is-active { background: #252525 !important; }

/* 移动端菜单修复 */
.VPNavScreen {
  display: block !important;
  position: fixed !important;
  top: calc(var(--vp-nav-height, 64px) + var(--vp-layout-top-height, 0px)) !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: calc(100vh - var(--vp-nav-height, 64px) - var(--vp-layout-top-height, 0px)) !important;
  overflow-y: auto !important;
  pointer-events: auto !important;
  background-color: var(--vp-nav-screen-bg-color, #fff) !important;
  z-index: 200 !important;
}
.dark .VPNavScreen {
  background-color: #1a1a1a !important;
}

/* ============================================
   移动端自适应
   ============================================ */
@media (max-width: 768px) {
  .VPFeature {
    padding: 0.8rem !important;
  }
  .VPFeature .icon {
    font-size: 1.3rem !important;
    margin-bottom: 0.3rem !important;
  }
  .VPFeature .title {
    font-size: 0.95rem !important;
  }
  .VPFeature .details {
    font-size: 0.78rem !important;
  }
  .VPFeatures .container .items {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
  }

  .VPHero .name {
    font-size: 1.8rem !important;
    letter-spacing: 0.06em !important;
  }
  .VPHero {
    padding: 4rem 0 0.5rem !important;
  }

  .VPFeatures::before {
    margin: 0 auto 1.5rem !important;
  }

  .vp-doc {
    font-size: 15px !important;
    line-height: 1.75 !important;
  }
  .vp-doc h1 {
    font-size: 1.5rem !important;
  }
  .vp-doc h2 {
    font-size: 1.25rem !important;
  }
  .vp-doc h3 {
    font-size: 1.1rem !important;
  }
  .vp-doc p {
    margin: 0.8em 0 !important;
  }

  .VPDoc .aside {
    display: none !important;
  }

  .VPSidebar {
    padding: 0.5rem !important;
  }
  .VPSidebar .VPSidebarItem.level-0 > .item > .text {
    font-size: 0.95rem !important;
  }
  .VPSidebar .VPSidebarItem .item {
    font-size: 0.82rem !important;
  }

  .VPNavBarMenuLink {
    font-size: 0.85rem !important;
    padding: 0 0.6rem !important;
  }
}

/* ============================================
   底部
   ============================================ */
.VPFooter {
  border-top: 1px solid var(--brand-border) !important;
  background: var(--brand-bg) !important;
  padding: 2rem 0 !important;
  text-align: center !important;
}
.VPFooter .message {
  font-size: 0.95rem !important;
  color: var(--brand-text) !important;
  margin-bottom: 0.5rem !important;
}
.VPFooter .copyright {
  font-size: 0.82rem !important;
  color: var(--brand-text-3) !important;
  line-height: 1.8 !important;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.VPFooter .copyright a {
  color: var(--brand-text-3) !important;
  text-decoration: none !important;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
}
.VPFooter .copyright a:hover {
  color: var(--brand-text) !important;
}
.VPFooter .copyright img {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
}
.dark .VPFooter {
  background: #1a1a1a !important;
}
