/* 一溜烟尘 - navbar brand & menu 自定义样式 */

/* === Brand 标题 === */
.navbar .navbar-brand {
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif !important;
  font-size: 2.3rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.25em !important;
  color: rgba(245, 235, 220, 0.95) !important;
  text-shadow: 0 0 12px rgba(255, 200, 120, 0.35), 0 1px 3px rgba(0, 0, 0, 0.6) !important;
  transition: color 0.3s ease, text-shadow 0.3s ease !important;
}

.navbar .navbar-brand:hover {
  color: #ffd89b !important;
  text-shadow: 0 0 16px rgba(255, 216, 155, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

/* === 导航菜单项 - 字号还原，间距保持放大 === */
.navbar .nav-item .nav-link {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

/* 下拉菜单间距 */
.navbar .dropdown-menu {
  min-width: 12rem !important;
}

.navbar .dropdown-item {
  padding: 0.75rem 1.5rem !important;
}

/* === 导航栏高度适配 === */
@media (min-width: 600px) {
  .navbar.scrolling-navbar {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }
  .navbar.scrolling-navbar.top-nav-collapse {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}

/* === 移动端折叠按钮 === */
.navbar .navbar-toggler .animated-icon {
  width: 36px !important;
  height: 24px !important;
}

/* === 暗色模式适配 === */
html[data-color-scheme="dark"] .navbar .navbar-brand {
  color: rgba(245, 235, 220, 0.92) !important;
}

/* Hide typing cursor */
.typed-cursor {
    display: none !important;
}

/* === 页面全局背景：星空图固定铺满 === */
body {
  background-image: url('/img/banner-horizon.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-attachment: fixed !important;
  background-size: cover !important;
  background-color: transparent !important;
}

/* === Header、Banner、full-bg-img 全部强制使用星空背景 === */
.header-inner,
.banner,
.banner .full-bg-img {
  background-image: url('/img/banner-horizon.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  background-color: transparent !important;
}

/* 确保 Banner 高度正确 */
.banner {
  min-height: 100vh !important;
  height: 100vh !important;
  position: relative !important;
}

.banner .full-bg-img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* === 导航栏半透明深色 === */
.navbar.scrolling-navbar {
  background-color: rgba(10, 14, 39, 0.6) !important;
  backdrop-filter: blur(8px) !important;
}

.navbar.scrolling-navbar.top-nav-collapse {
  background-color: rgba(10, 14, 39, 0.95) !important;
  backdrop-filter: blur(10px) !important;
}

/* === Banner 文字和滚动箭头 === */
.banner .banner-text {
  position: relative !important;
  z-index: 2 !important;
}

.banner .scroll-down-bar {
  position: absolute !important;
  bottom: 30px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 3 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  cursor: pointer !important;
  animation: bounce 2s infinite !important;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-15px); }
  60% { transform: translateX(-50%) translateY(-7px); }
}

/* === 内容区 (#board) 保持白色卡片风格 === */
#board {
  background-color: #fff !important;
  position: relative;
  z-index: 1;
}

/* 分类页（/categories/）#board 透明，露出星空背景 */
#board:has(.page-categories) {
  background-color: transparent !important;
  box-shadow: none !important;
}

/* === 分类页：横条列表 === */
.category-cards {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 0 1rem;
  max-width: 900px;
  margin: 0 auto;
}

/* 横条卡片 */
.category-card-row {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.category-card-row:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 左侧标签 "专栏1" */
.category-card-row .category-card-label {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: 1rem;
}

.category-card-row .category-card-label-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: #5a6a7a;
  padding: 0.25rem 0.6rem;
  border-left: 3px solid #4285f4;
  background: rgba(66, 133, 244, 0.08);
  border-radius: 0 4px 4px 0;
}

/* 分类名称 */
.category-card-row .category-card-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: #2c3e50;
  text-decoration: none;
  flex: 1;
  transition: color 0.3s ease;
}

/* 占位卡片（不可点击） */
.category-card-row.category-card-placeholder {
  cursor: default !important;
  opacity: 0.55;
}

.category-card-row.category-card-placeholder:hover {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  transform: none;
}

.category-card-row.category-card-placeholder .category-card-name {
  color: #9aa0a6 !important;
}

.category-card-row.category-card-placeholder .category-card-label-text {
  border-left-color: #bdc3c7;
  background: rgba(189, 195, 199, 0.12);
  color: #95a5a6;
}

.category-card-row:hover .category-card-name {
  color: #4285f4;
}

/* 文章数量 */
.category-card-row .category-card-count {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #7f8c8d;
  font-size: 0.9rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* === 分类子页：带序号的文章列表 === */
.category-post-list {
  padding: 0 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.category-post-item {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-radius: 6px;
  margin-bottom: 0.6rem;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-post-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* 序号 */
.category-post-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #4285f4;
  background: rgba(66, 133, 244, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 1rem;
}

/* 文章标题 */
.category-post-title {
  color: #2c3e50;
  font-size: 1rem;
  flex: 1;
  transition: color 0.2s ease;
}

.category-post-item:hover .category-post-title {
  color: #4285f4;
}

/* 文章日期 */
.category-post-date {
  color: #95a5a6;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .category-card-row {
    padding: 0.85rem 1rem;
  }
  
  .category-card-row .category-card-label {
    margin-right: 0.5rem;
  }
  
  .category-card-row .category-card-name {
    font-size: 1rem;
  }
  
  .category-post-item {
    padding: 0.75rem 1rem;
  }
  
  .category-post-date {
    display: none;
  }
}

/* === 覆盖原有分类列表样式 === */
.category-list,
.category-list .category,
.category-list .category-sub,
.category-list .category-item,
.category-list .category-subitem,
.category-list .category-collapse,
.category-list .category-post-list,
.category-list .category-count {
  all: unset !important;
}


.post-toc-col {
  flex: 0 0 220px;
  max-width: 220px;
  padding: 1.5rem 1rem 1.5rem 2rem;
  position: sticky;
  top: 5rem;
  align-self: flex-start;
}

.post-toc-col .toc-header {
  font-size: 1.1rem;
  color: var(--text-color);
}

.post-toc-col .toc-body {
  font-size: 0.9rem;
}

.post-toc-col .toc-body ol {
  list-style: none;
  padding-left: 0.8rem;
}

.post-toc-col .toc-body a {
  color: var(--text-color);
  text-decoration: none;
}

.post-toc-col .toc-body a:hover {
  color: var(--link-hover-color);
}

/* 蓝色竖线分隔条 */
.toc-divider {
  flex: 0 0 1px;
  width: 1px;
  align-self: stretch;
  margin-top: var(--first-heading-offset);
  background: #4285f4;
  min-height: 200px;
}

/* 文章页布局：目录 + 竖线 + 正文 水平排列 */
#board.post-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background-color: #fff !important;
}

/* 正文区域 */
#board.post-layout .post-content {
  flex: 1 1 0;
  min-width: 0;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 991.98px) {
  #board.post-layout {
    display: block;
  }
  .toc-divider {
    display: none !important;
  }
  #board.post-layout .post-content {
    padding-left: 10%;
    padding-right: 10%;
  }
}

/* === 首页项目展示 === */

/* 首页 #board 透明，露出星空 */
#board.home-custom {
  background-color: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* 个人定位 */
.home-intro {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.home-intro-text {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.1rem;
  color: rgba(245, 235, 220, 0.85);
  letter-spacing: 0.15em;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* 项目网格 */
.home-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
  padding: 1rem 3rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* 项目卡片 */
.proj-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: default;
}

.proj-card.proj-card-link {
  cursor: pointer;
}

.proj-card.proj-card-link:hover {
  box-shadow: 0 4px 24px rgba(66, 133, 244, 0.18);
  transform: translateY(-3px);
}

/* 卡片头部 */
.proj-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e8eaed;
}

.proj-index {
  font-family: "Noto Serif SC", serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #4285f4;
  flex-shrink: 0;
}

.proj-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2c3e50;
  flex: 1;
}

/* 状态标签 */
.proj-status {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.proj-status-done {
  background: rgba(52, 168, 83, 0.12);
  color: #34a853;
}

.proj-status-wip {
  background: rgba(251, 188, 4, 0.15);
  color: #fbbc04;
}

.proj-status-research {
  background: rgba(66, 133, 244, 0.12);
  color: #4285f4;
}

.proj-status-learn {
  background: rgba(154, 82, 196, 0.12);
  color: #9a52c4;
}

/* 卡片内容 */
.proj-card-body {
  flex: 1;
}

.proj-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.proj-platform {
  font-size: 0.85rem;
  color: #5f6368;
  font-weight: 500;
}

.proj-arch {
  font-size: 0.8rem;
  color: #9aa0a6;
  padding-left: 0.75rem;
  border-left: 2px solid #dadce0;
}

.proj-desc {
  font-size: 0.9rem;
  color: #5f6368;
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* 技术标签 */
.proj-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.proj-tag {
  font-size: 0.75rem;
  color: #5f6368;
  background: #f1f3f4;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* 底部标语 */
.home-footer-slogan {
  text-align: center;
  padding: 2rem 1rem 4rem;
}

.home-footer-slogan p {
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1rem;
  color: rgba(245, 235, 220, 0.7);
  letter-spacing: 0.2em;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* 移动端适配 */
@media (max-width: 768px) {
  .home-projects {
    grid-template-columns: 1fr;
    padding: 1rem 1.5rem 2rem;
    gap: 1rem;
  }

  .proj-card {
    padding: 1.25rem 1.25rem;
  }

  .home-intro {
    padding: 2rem 1rem 1rem;
  }

  .home-intro-text {
    font-size: 0.95rem;
  }
}

/* === 页脚：品牌蓝底 + 白字，在星空背景上稳定可读 === */
footer {
  margin-top: 3rem;
  padding: 0 1rem;
  background-color: #1b5aa7 !important;
  border-top: none;
}
footer .footer-inner {
  padding: 1.8rem 0 1.5rem;
  font-size: 0.85rem;
  line-height: 1.9;
}
footer .footer-inner,
footer .footer-inner .footer-content,
footer .footer-inner .statistics,
footer .footer-inner span,
footer .footer-inner i,
footer .footer-inner a {
  color: #ffffff !important;
}
footer .footer-inner a {
  opacity: 0.92;
  text-decoration: none;
}
footer .footer-inner a:hover {
  opacity: 1;
  text-decoration: underline;
}
footer .footer-inner .footer-content br + a {
  font-size: 0.78rem;
  opacity: 0.85;
}
