:root {
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #1d253d;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #1d253d url("./assets/background.webp") center / cover no-repeat;
  pointer-events: none;
}

.page {
  width: min(100%, 1600px);
  margin: 0 auto;
  line-height: 0;
}

.page img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2450 / 1656;
}

.site-footer {
  padding-bottom: 26px;
  text-align: center;
}

.record-link {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-decoration: none;
  transition: color 180ms ease;
}

.record-link:hover,
.record-link:focus-visible {
  color: #bf9f6a;
}

.section-nav {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 0 10px 10px;
  opacity: 0.45;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
}

.section-nav:hover,
.section-nav:focus-within {
  opacity: 1;
}

.section-nav.is-hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.section-nav__count {
  color: rgba(255, 255, 255, 0.78);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  line-height: 1;
}

#current-section {
  color: #bf9f6a;
}

.section-nav__slash {
  padding: 0 7px;
  color: rgba(255, 255, 255, 0.32);
}

.section-nav__items {
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-nav__items a {
  display: grid;
  place-items: center;
  min-width: 14px;
  min-height: 20px;
  outline-offset: 3px;
}

.section-nav__items a span {
  display: block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 200ms ease, background-color 200ms ease;
}

.section-nav__items a[aria-current="true"] span {
  width: 26px;
  background: #bf9f6a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .site-background {
    background-size: auto 100%;
  }

  .site-footer {
    padding-bottom: 20px;
  }

  .record-link {
    margin-top: 14px;
    font-size: 11px;
  }

  .section-nav {
    right: 14px;
    bottom: 14px;
    gap: 7px;
  }

  .section-nav__items {
    gap: 4px;
  }

  .section-nav__items a span {
    width: 8px;
  }

  .section-nav__items a[aria-current="true"] span {
    width: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  .section-nav,
  .section-nav__items a span,
  .record-link {
    transition: none;
  }
}
