.hope-logo {
  display: inline-flex;
  width: auto;
  height: 3.6rem;
  flex: 0 0 auto;
  object-fit: contain;
  object-position: center;
}

@media only screen and (min-width: 768px) {
  .hope-logo {
    height: 4rem;
  }
}

[color-scheme="light"] .mxd-header .hope-logo,
[color-scheme="light"] .mxd-menu .hope-logo {
  filter: invert(1);
}

.hope-intro {
  max-width: 68rem;
}

.hope-intro p {
  max-width: 46rem;
}

.hope-journal-link {
  margin-top: 3.2rem;
}

@media only screen and (max-width: 767px) {
  .hope-intro {
    max-width: none;
  }
}

/* 博客分类筛选条 */
.hope-cat-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3.2rem;
}

.hope-cat-bar .tag {
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.hope-cat-bar .tag:hover,
.hope-cat-bar .tag.is-active {
  opacity: 1;
}

.hope-cat-bar .tag sup {
  margin-left: 0.3rem;
  font-size: 0.7em;
}

/* ===== 导航站：左侧分类 + 右侧卡片网格 ===== */
.hope-nav-layout {
  display: grid;
  grid-template-columns: 22rem 1fr;
  gap: 4.8rem;
  align-items: start;
}

/* 左侧分类导航（跟随滚动） */
.hope-nav-side__inner {
  position: sticky;
  top: 12rem;
  display: flex;
  flex-direction: column;
}

.hope-nav-side__link {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.2rem 0;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(128, 128, 128, 0.22);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.hope-nav-side__link:hover {
  opacity: 1;
}

.hope-nav-side__index {
  font-size: 1.2rem;
  opacity: 0.5;
}

.hope-nav-side__name {
  flex: 1;
  font-size: 1.6rem;
}

.hope-nav-side__count {
  font-size: 1.2rem;
  opacity: 0.5;
}

/* 右侧内容 */
.hope-nav-group {
  margin-bottom: 6.4rem;
  scroll-margin-top: 12rem;
}

.hope-nav-group__title {
  margin-bottom: 2.4rem;
  font-size: 3.2rem;
}

.hope-nav-sub {
  margin-bottom: 3.2rem;
}

.hope-nav-sub__title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
}

.hope-nav-sub__count {
  font-size: 1.1rem;
  opacity: 0.6;
}

/* 卡片网格：每行多个，不再占满整宽 */
.hope-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(24rem, 1fr));
  gap: 1.6rem;
}

.hope-nav-card {
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 1.8rem 2rem;
  border: 1px solid rgba(128, 128, 128, 0.25);
  border-radius: 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hope-nav-card:hover {
  border-color: currentColor;
  transform: translateY(-2px);
}

.hope-nav-card__title {
  font-size: 1.7rem;
  font-weight: 600;
}

.hope-nav-card__desc {
  font-size: 1.3rem;
  opacity: 0.65;
  line-height: 1.5;
}

@media only screen and (max-width: 1199px) {
  .hope-nav-layout {
    grid-template-columns: 1fr;
    gap: 3.2rem;
  }
  .hope-nav-side__inner {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.8rem 2rem;
  }
  .hope-nav-side__link {
    border-bottom: none;
    padding: 0.4rem 0;
  }
  .hope-nav-side__count {
    display: none;
  }
}

@media only screen and (max-width: 767px) {
  .hope-nav-grid {
    grid-template-columns: 1fr;
  }
  .hope-nav-group__title {
    font-size: 2.4rem;
  }
}
/* 站点图标 */
.hope-nav-card__icon {
  flex: 0 0 auto;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 0.6rem;
  object-fit: contain;
  background: rgba(128, 128, 128, 0.12);
}

/* 抓不到 favicon 时的首字母兜底 */
.hope-nav-card__icon--letter {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.75;
}

.hope-nav-card__text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.hope-nav-card__title,
.hope-nav-card__desc {
  overflow-wrap: anywhere;
}
/* ===== 宽屏顶部平铺菜单 ===== */
/* 默认隐藏：窄屏继续用模板自带的汉堡折叠菜单 */
.hope-topnav {
  display: none;
}

@media only screen and (min-width: 1200px) {
  .hope-topnav {
    display: flex;
    align-items: center;
    gap: 2.8rem;
    margin-left: auto;
    margin-right: 2.4rem;
  }

  .hope-topnav__link {
    position: relative;
    padding: 0.4rem 0;
    font-size: 1.5rem;
    line-height: 1;
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease;
  }

  .hope-topnav__link:hover,
  .hope-topnav__link.is-current {
    opacity: 1;
  }

  /* 当前页下划线 */
  .hope-topnav__link.is-current::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.4rem;
    height: 1px;
    background: currentColor;
  }

  /* 宽屏不需要汉堡入口 */
  .mxd-menu__contain {
    display: none;
  }
}