:root {
  /* Astra / inf.ink (WordPress) global palette */
  --ast-global-color-0: #0170B9;
  --ast-global-color-1: #3a3a3a;
  --ast-global-color-2: #3a3a3a;
  --ast-global-color-3: #4B4F58;
  --ast-global-color-4: #F5F5F5;
  --ast-global-color-5: #FFFFFF;
  --ast-global-color-6: #F2F5F7;
  --ast-global-color-7: #424242;
  --ast-global-color-8: #000000;

  --bg: #000000;
  --text: var(--ast-global-color-3);
  --line: rgba(48, 48, 48, 0.93);
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Verdana, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0);
  background: rgba(0, 0, 0, 0);
  padding: 20px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 35px;
}

.footer-copyright {
  text-align: center;
  color: var(--ast-global-color-3);
  font-size: 16px;
}

.site-header {
  position: relative;
  z-index: 1000;
  background: rgba(0, 0, 0, 0);
  border-bottom: 1px solid var(--line);
  /* 与页面正文的 text-align 解耦：home / infinite_space 等页面对 body 设了 center，会继承到导航 */
  text-align: left;
}

/* 移动端全屏遮罩（在 .nav 之前插入，叠在页面内容之下、导航栏之下） */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.nav-backdrop[hidden] {
  display: none !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.25);
  margin-top: 10px;
  margin-bottom: 10px;
  color: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(242, 245, 247, 0.28);
}

.nav-toggle:focus-visible {
  outline: thin dotted;
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ast-global-color-1);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bar:nth-child(2) {
  margin: 5px 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  box-sizing: border-box;
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ast-global-color-7);
  transition: color 0.5s ease;
}

.brand:hover {
  color: var(--ast-global-color-6);
}

.brand:focus-visible {
  outline: thin dotted;
  outline-color: inherit;
  outline-offset: 2px;
}

.brand img {
  width: 60px;
  height: auto;
}

.brand .title {
  font-family: "Abhaya Libre", serif;
  font-size: 35px;
  letter-spacing: 0.2px;
  font-weight: 300;
  min-width: 0;
}

.menu {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.menu a {
  color: var(--ast-global-color-7);
  text-decoration: none;
  padding: 0 0.6em;
  line-height: 30px;
  transition: color 0.5s ease;
  font-weight: 300;
}

.menu a:hover {
  color: var(--ast-global-color-6);
}

.menu a.active {
  color: var(--ast-global-color-6);
}

.menu a:focus-visible {
  outline: thin dotted;
  outline-color: inherit;
  outline-offset: 2px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 35px 28px;
}

.simple-hero {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 18px 16px;
  background: rgba(255, 255, 255, 0.03);
}

.simple-hero h1 {
  margin: 0 0 8px;
  font-family: "Abhaya Libre", serif;
  font-weight: 400;
}

.simple-hero p {
  margin: 0;
  color: rgba(75, 79, 88, 0.85);
}

/* 桌面端：不显示汉堡与遮罩 */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }

  .nav-backdrop {
    display: none !important;
  }

  .menu {
    display: flex !important;
  }
}

/* 平板 / 手机：汉堡 + 下拉菜单 */
@media (max-width: 768px) {
  .nav {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 16px 0;
    min-height: 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .brand {
    min-width: 0;
    max-width: calc(100% - 52px);
    flex: 1 1 auto;
  }

  .brand img {
    width: 44px;
  }

  .brand .title {
    font-size: clamp(18px, 5.2vw, 26px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu {
    display: none;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 4px 0 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .site-header.nav-open .menu {
    display: flex;
  }

  .menu a {
    padding: 12px 4px;
    line-height: 1.45;
    font-size: 15px;
    white-space: normal;
    border-radius: 8px;
  }

  .menu a + a {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
}

/* 小屏手机：再收紧内边距与页脚 */
@media (max-width: 544px) {
  .nav {
    padding: 8px 14px 0;
  }

  .menu a {
    padding: 11px 2px;
    font-size: 14px;
  }

  .footer-inner {
    padding: 0 20px;
  }

  .container {
    padding: 14px 20px 22px;
  }
}

