:root {
  color-scheme: dark;
  --nav-height: 68px;
  --nav-bg: rgba(118, 118, 118, 0.46);
  --nav-text: rgba(255, 255, 255, 0.76);
  --nav-strong: #ffffff;
  --nav-active: rgba(255, 255, 255, 0.16);
  --page-bg: #050505;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--nav-strong);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  overflow-x: hidden;
}

@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }

  a,
  button {
    cursor: none;
  }
}

button {
  font: inherit;
}

.nav-hotspot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 45;
  width: 100%;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 160ms ease, width 160ms ease, height 160ms ease, border-color 160ms ease, background 160ms ease;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.28);
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  mix-blend-mode: difference;
}

body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring {
  opacity: 1;
}

body.cursor-hover .cursor-ring {
  width: 46px;
  height: 46px;
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 clamp(18px, 3vw, 38px);
  background: linear-gradient(180deg, rgba(64, 64, 64, 0.6), var(--nav-bg));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(20px) saturate(1.25);
  opacity: 1;
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1), opacity 420ms ease, background 420ms ease;
  will-change: transform, opacity;
}

.top-nav.hidden {
  opacity: 0;
  transform: translateY(calc(-100% - 12px));
}

.nav-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: max-content;
  color: var(--nav-strong);
  text-decoration: none;
}

.nav-name {
  font-size: 18px;
  font-weight: 800;
}

.nav-title {
  color: var(--nav-text);
  font-size: 14px;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.nav-btn {
  min-width: 62px;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nav-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}

.nav-btn:hover,
.nav-btn.active {
  background: var(--nav-active);
  color: var(--nav-strong);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--nav-strong);
}

.portfolio-pages {
  width: 100%;
}

.page {
  display: grid;
  min-height: auto;
  margin-bottom: 6px;
  place-items: center;
  scroll-margin-top: 0;
  background: var(--page-bg);
}

.page > img {
  display: block;
  width: 100vw;
  max-width: none;
  height: auto;
  min-height: auto;
  background: var(--page-bg);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 72px;
  padding: 18px 20px;
  background: #000;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 980px) {
  .top-nav {
    height: auto;
    min-height: 64px;
    align-items: center;
    padding: 11px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 18px 16px;
    background: rgba(38, 38, 38, 0.88);
    backdrop-filter: blur(18px);
  }

  .nav-menu.open {
    display: grid;
  }

  .nav-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .nav-name {
    font-size: 16px;
  }

  .nav-title,
  .nav-btn {
    font-size: 13px;
  }

  .page {
    min-height: auto;
  }

  .page > img {
    width: 100%;
    height: auto;
  }

  .site-footer {
    flex-direction: column;
    gap: 4px;
    min-height: 84px;
    font-size: 12px;
  }
}

@media (hover: none), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}
