/* ==========================================================================
   layout.css — 顶栏、导航、页脚
   对齐 kazumi.app：字标居左 · 胶囊导航居中 · 动作区居右
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-slow), background-color var(--t-slow);
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.site-header__in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding-block: 14px;
}

/* ---------------------------------------------------------------- 字标 */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  justify-self: start;
  color: var(--ink);
}

/* 吉祥物头像：抠好透明底，直接按尺寸摆，不做圆形裁切（会切掉长发外缘） */
.brand__logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
  transition: transform var(--t-slow);
}

.brand:hover .brand__logo { transform: translateY(-1px) scale(1.04); }

.brand__name {
  font-family: "Manrope", var(--font-sans);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  color: #14180F;
}

.brand__dot { color: var(--accent); }

.brand:hover .brand__name { color: var(--accent); }

/* ---------------------------------------------------------------- 胶囊导航 */

.nav { justify-self: center; }

.nav__list {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  background: var(--paper-3);
  border-radius: var(--radius-pill);
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-2);
  white-space: nowrap;
}

.nav__link svg {
  width: 17px;
  height: 17px;
  opacity: .72;
}

.nav__link:hover {
  background: rgba(255, 255, 255, .78);
  color: var(--ink-deep);
}

.nav__link:hover svg { opacity: 1; }

.nav__link.is-active,
.nav__link[aria-current="page"] {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.nav__link.is-active svg,
.nav__link[aria-current="page"] svg { opacity: 1; }

.nav__link.is-active:hover,
.nav__link[aria-current="page"]:hover { background: var(--accent); color: #fff; }



/* 桌面端隐藏「关于本站 / GitHub」这一组，只在移动菜单里出现 */
.nav__extra { display: none; }

/* ---------------------------------------------------------------- 右侧动作 */

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink-2);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.icon-btn svg { width: 19px; height: 19px; }

.icon-btn:hover { background: var(--mint); color: var(--accent); }

/* ---------------------------------------------------------------- 汉堡 */

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--paper-3);
  color: var(--ink);
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 17px;
}

.nav-toggle__bars span {
  height: 1.8px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}

body.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
body.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* ---------------------------------------------------------------- 页脚 */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(28px, 4vw, 56px);
  background: var(--paper);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(44px, 6vw, 72px) clamp(32px, 4vw, 52px);
}

.footer__brand-name {
  font-family: "Manrope", var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.045em;
  color: #14180F;
  line-height: 1;
  margin-bottom: 14px;
}

.footer__brand-name span { color: var(--accent); }

.footer__desc {
  font-size: 14px;
  line-height: 1.72;
  color: var(--ink-3);
  max-width: 30ch;
}

.footer__note {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-4);
  max-width: 34ch;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 16px;
}

.footer__list { display: grid; gap: 10px; }

.footer__list a {
  font-size: 14px;
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer__list a:hover { color: var(--accent); }

.footer__list svg { width: 14px; height: 14px; opacity: .5; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px 34px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-4);
}

.footer__bottom a { color: var(--ink-3); }
.footer__bottom a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1180px) {
  .nav__link { padding: 9px 12px; font-size: 13.5px; }
  .nav__link svg { display: none; }
}

@media (max-width: 960px) {
  .site-header__in {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .nav-toggle { display: inline-flex; }

  .site-header__in .header__cta { display: none; }

  .nav {
    position: fixed;
    left: 14px;
    top: 72px;
    width: calc(100vw - 28px);
    max-width: calc(100% - 28px);
    padding: 10px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  body.nav-open .nav { display: block; }

  .nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .nav__link {
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    font-size: 15px;
  }

  .nav__link svg { display: block; width: 18px; height: 18px; }

  .nav__extra {
    display: flex;
    gap: 8px;
    padding: 10px 4px 0;
    border-top: 1px solid var(--line);
    margin-top: 8px;
  }

  .nav__extra a {
    font-size: 13.5px;
    color: var(--ink-3);
    padding: 6px 8px;
  }

  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .brand__name { font-size: 22px; }
  .brand__logo { width: 29px; height: 29px; }
  .icon-btn { display: none; }
}

/* ---------- 区块标题 ---------- */
/* 区块标题行：左标题 + 右说明，底对齐，下面接内容 */
.split.sec-head {
  align-items: flex-end;
  margin-bottom: clamp(26px, 3.4vw, 46px);
}

/* 独占一行的区块标题（下面直接跟网格/表格） */
.sec-title { margin-bottom: clamp(24px, 3vw, 40px); }
