*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  color: #f0f0f8;
  background-color: #0a0e1a;
  background-image:
    linear-gradient(rgba(176, 38, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 38, 255, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

ul[class],
ol[class] {
  list-style: none;
}

a {
  color: #00e5ff;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #b026ff;
}

:root {
  --bg-deep: #0a0e1a;
  --bg-dark: #1a1025;
  --neon-purple: #b026ff;
  --neon-blue: #00e5ff;
  --neon-green: #39ff14;
  --text-light: #f0f0f8;
  --text-muted: #8a8f9e;
  --warn-orange: #ff6a00;

  --font-display: "Orbitron", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Source Code Pro", Consolas, "Courier New", monospace;

  --header-height: 72px;
  --content-max: 1280px;
  --gap: 24px;
  --radius: 4px;
  --transition: 0.2s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-light);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  text-wrap: pretty;
}

.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;
}

.skip-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1000;
  padding: 10px 18px;
  background: var(--neon-blue);
  color: var(--bg-deep);
  font-family: var(--font-body);
  font-weight: 700;
  border-radius: 2px;
  text-decoration: none;
  transform: translateY(-400%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
}

.shell {
  width: min(100% - 48px, var(--content-max));
  margin-inline: auto;
}

.section {
  padding-block: clamp(48px, 7vw, 112px);
}

.content {
  width: min(100% - 48px, var(--content-max));
  margin-inline: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--neon-purple);
  color: #fff;
  box-shadow: 0 0 20px rgba(176, 38, 255, 0.3);
}

.btn--primary:hover {
  background: #9a1fe0;
  color: #fff;
  box-shadow: 0 0 32px rgba(176, 38, 255, 0.5);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(176, 38, 255, 0.4);
  color: var(--text-light);
}

.btn--ghost:hover {
  border-color: var(--neon-purple);
  color: var(--text-light);
  box-shadow: 0 0 16px rgba(176, 38, 255, 0.25);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 16px 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--neon-blue);
}

.breadcrumb__current {
  color: var(--text-light);
}

.visual {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-dark);
}

.visual::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.visual > img,
.visual__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual--tall::before {
  padding-top: 120%;
}

.visual--wide::before {
  padding-top: 42%;
}

/* ------- Header ------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header[data-scrolled="true"] {
  background: rgba(10, 14, 26, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(176, 38, 255, 0.2);
}

.site-header__inner {
  width: min(100% - 48px, var(--content-max));
  margin-inline: auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand__mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.65rem;
  letter-spacing: 0.04em;
  color: var(--neon-purple);
  text-shadow: 0 0 18px rgba(176, 38, 255, 0.6);
}

.site-brand__text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--text-light);
}

.site-nav__list {
  display: flex;
  gap: 4px;
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--neon-purple);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav__link:hover {
  color: var(--neon-purple);
}

.site-nav__link:hover::after {
  transform: scaleX(1);
}

.site-nav__link[aria-current="page"] {
  color: var(--neon-blue);
}

.site-nav__link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--neon-blue);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
}

.site-header__login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-light);
  text-decoration: none;
  border: 1px solid rgba(176, 38, 255, 0.3);
  border-radius: 2px;
  background: rgba(10, 14, 26, 0.4);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.site-header__login:hover {
  border-color: var(--neon-purple);
  color: #fff;
  box-shadow: 0 0 12px rgba(176, 38, 255, 0.3);
}

.site-header__login-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

.site-nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(176, 38, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  z-index: 60;
}

.site-nav__toggle:hover {
  border-color: var(--neon-purple);
}

.site-nav__toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-light);
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.2s ease;
}

.site-nav__toggle.is-active .site-nav__toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--neon-purple);
}

.site-nav__toggle.is-active .site-nav__toggle-line:nth-child(2) {
  opacity: 0;
}

.site-nav__toggle.is-active .site-nav__toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--neon-purple);
}

.header-cats {
  max-height: 56px;
  opacity: 1;
  overflow: hidden;
  border-top: 1px solid rgba(176, 38, 255, 0.12);
  background: rgba(10, 14, 26, 0.25);
  transition: max-height 0.3s ease, opacity 0.3s ease, border-color 0.3s ease;
}

.site-header[data-scrolled="true"] .header-cats {
  max-height: 0;
  opacity: 0;
  border-top-color: transparent;
}

.header-cats__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.header-cats__link:hover {
  color: var(--neon-purple);
  background: rgba(176, 38, 255, 0.08);
}

.header-cats__index {
  font-size: 0.65rem;
  color: var(--neon-blue);
  opacity: 0.7;
}

.header-cats__label {
  font-family: var(--font-body);
  font-size: 0.82rem;
}

.site-header__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.15s ease-out;
}

/* ------- Footer ------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 120px);
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-dark) 45%, #0a0e1a 100%);
  border-top: 1px solid rgba(176, 38, 255, 0.2);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-purple), transparent);
  opacity: 0.5;
}

.site-footer__inner {
  width: min(100% - 48px, var(--content-max));
  margin-inline: auto;
  padding: 64px 0 28px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1.8fr 1fr;
  gap: 48px;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.site-footer__logo {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
}

.site-footer__logo-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--neon-purple);
  text-shadow: 0 0 16px rgba(176, 38, 255, 0.5);
}

.site-footer__logo-text {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--text-light);
}

.site-footer__statement {
  max-width: 34ch;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-muted);
  border-left: 2px solid rgba(0, 229, 255, 0.4);
  padding-left: 14px;
}

.site-footer__contact,
.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-footer__heading {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neon-purple);
  text-shadow: 0 0 12px rgba(176, 38, 255, 0.4);
  margin-bottom: 4px;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__list-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-light);
}

.site-footer__item-label {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  min-width: 3em;
}

.site-footer__item-value {
  color: var(--text-light);
  word-break: break-all;
}

.site-footer__note {
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
  border-top: 1px solid rgba(138, 143, 158, 0.12);
  padding-top: 12px;
}

.site-footer__link {
  font-size: 0.85rem;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__link::before {
  content: "▸";
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--neon-blue);
}

.site-footer__link:hover {
  color: var(--neon-purple);
  padding-left: 4px;
}

.site-footer__bottom {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid rgba(138, 143, 158, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__icp,
.site-footer__copyright {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ------- Responsive ------- */
@media (max-width: 991px) {
  .site-header__inner {
    height: 64px;
  }

  .site-nav__link {
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .site-brand__mark {
    font-size: 1.3rem;
  }

  .site-brand__text {
    font-size: 0.85rem;
  }

  .site-header__login-text {
    display: none;
  }

  .site-header__login {
    padding: 6px 10px;
  }

  .site-header__login-dot {
    width: 8px;
    height: 8px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    padding: 88px 28px 32px;
    background: rgba(10, 14, 26, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    z-index: 50;
    border-left: 1px solid rgba(176, 38, 255, 0.2);
    max-height: none;
  }

  .site-nav[data-open="true"] {
    transform: translateX(0);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  }

  .site-nav__list {
    flex-direction: column;
    gap: 4px;
  }

  .site-nav__link {
    display: block;
    padding: 13px 8px;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(138, 143, 158, 0.1);
  }

  .site-nav__link::after {
    display: none;
  }

  .site-nav__toggle {
    display: flex;
  }

  .header-cats__link {
    padding: 8px 10px;
    font-size: 0.68rem;
  }

  .header-cats__label {
    font-size: 0.78rem;
  }

  body.is-nav-open {
    overflow: hidden;
  }

  .site-footer__inner {
    padding: 48px 0 24px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .site-footer__brand {
    grid-column: auto;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 40px;
  }

  .header-cats {
    max-height: 44px;
  }
}

/* ------- Focus & Reduced Motion ------- */
:focus-visible {
  outline: 2px solid var(--neon-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .site-header__login-dot {
    animation: none;
  }
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.7);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 2px rgba(57, 255, 20, 0.3);
  }
}
