/* ==========================================================
 * 个人自定义样式
 * 基调：简洁有设计感 / 温和 / 略带活泼 / 木质红棕 / 无尖锐感
 * 加载方式：_config.butterfly.yml → inject.head
 * ========================================================== */

:root {
  --warm-brown: #9c6644;
  --warm-brown-deep: #7f5136;
  --warm-brown-soft: #b98a6b;
  --warm-sand: #f3e9e1;
}

/* ----------------------------------------------------------
 * 1. 导航栏：菜单整体居中，右上角腾出开关位置
 * ---------------------------------------------------------- */
#nav {
  justify-content: center;
}

#nav #blog-info {
  position: absolute;
  left: 36px;
  flex: none;
}

#nav #menus {
  margin-right: 6px;
}

@media screen and (max-width: 768px) {
  #nav {
    justify-content: space-between;
  }

  #nav #blog-info {
    position: static;
    flex: 1;
  }
}

/* ----------------------------------------------------------
 * 2. 右上角夜间模式开关
 * ---------------------------------------------------------- */
#nav-darkmode {
  position: absolute;
  right: 30px;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  color: var(--light-grey, #eee);
  font-size: 15px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

#nav-darkmode:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #fff;
  transform: translateY(-50%) rotate(18deg);
}

/* ----------------------------------------------------------
 * 3. 页脚：去掉固定底色，透明跟随明暗模式
 * ---------------------------------------------------------- */
#footer {
  background-color: transparent !important;
}

#footer::before,
#footer::after {
  display: none !important;
}

#footer > * {
  color: var(--font-color) !important;
}

#footer a {
  color: var(--warm-brown) !important;
}

#footer a:hover {
  color: var(--warm-brown-deep) !important;
}

[data-theme='dark'] #footer a {
  color: var(--warm-brown-soft) !important;
}

/* ----------------------------------------------------------
 * 4. 社交图标：深色图标在夜间自动反色
 * ---------------------------------------------------------- */
[data-theme='dark'] .social-icon .fa-github,
[data-theme='dark'] .social-icon .fa-twitter,
[data-theme='dark'] .social-icon .fa-x-twitter {
  color: #f2efe9 !important;
}

/* 暗色下图标底色块也淡一点，避免突兀 */
.social-icon:hover i {
  transform: translateY(-2px);
}

.social-icon i {
  transition: transform 0.25s ease;
}

/* ----------------------------------------------------------
 * 5. 圆润与柔和：卡片、按钮、标签去掉尖锐直角
 * ---------------------------------------------------------- */
.recent-post-item,
.card-widget {
  border-radius: 18px !important;
  box-shadow: 0 6px 22px rgba(156, 102, 68, 0.07) !important;
  border: none !important;
}

[data-theme='dark'] .recent-post-item,
[data-theme='dark'] .card-widget {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35) !important;
}

#pagination .page-number,
#pagination .extend,
.tag_cloud a,
.category-list-item {
  border-radius: 999px !important;
}

#pagination .page-number:hover,
#pagination .extend:hover {
  transform: translateY(-1px);
}

/* 文章标题不要压得太紧，读起来温和一些 */
#recent-posts .recent-post-info .article-title {
  letter-spacing: 0.2px;
  font-weight: 600;
}

/* ----------------------------------------------------------
 * 6. 首页顶栏：高度收一点，减少整屏压迫感
 * ---------------------------------------------------------- */
#page-header.full_page {
  height: 72vh;
}

@media screen and (max-width: 768px) {
  #page-header.full_page {
    height: 62vh;
  }
}
