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

:root {
  --space-deep: #0B1026;
  --space-navy: #1A2340;
  --glass-layer: rgba(42, 53, 82, 0.8);
  --text-high: #F5F7FA;
  --text-medium: #C6D0E3;
  --accent-gold: #F5B700;
  --accent-orange: #FF6B35;
  --border-starlight: #3D4F7A;
  --gradient-space: linear-gradient(135deg, #0B1026 0%, #1A2340 100%);
  --font-heading: "Noto Sans SC", "HarmonyOS Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --font-body: "Source Han Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --container-width: 1200px;
  --radius: 16px;
  --space: 24px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-high);
  background-color: var(--space-deep);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,0.35) 0, rgba(255,255,255,0.35) 1px, transparent 2px),
    radial-gradient(circle at 78% 32%, rgba(255,255,255,0.18) 0, rgba(255,255,255,0.18) 1px, transparent 2px),
    radial-gradient(circle at 45% 70%, rgba(245,183,0,0.18) 0, rgba(245,183,0,0.18) 1px, transparent 2px),
    radial-gradient(circle at 92% 8%, rgba(255,255,255,0.25) 0, rgba(255,255,255,0.25) 1px, transparent 2px),
    radial-gradient(circle at 30% 92%, rgba(255,255,255,0.25) 0, rgba(255,255,255,0.25) 1px, transparent 2px),
    radial-gradient(circle at 63% 46%, rgba(255,255,255,0.12) 0, rgba(255,255,255,0.12) 1px, transparent 2px),
    radial-gradient(circle at 18% 63%, rgba(255,255,255,0.30) 0, rgba(255,255,255,0.30) 1px, transparent 2px),
    radial-gradient(circle at 82% 76%, rgba(255,255,255,0.20) 0, rgba(255,255,255,0.20) 1px, transparent 2px),
    linear-gradient(135deg, #0B1026 0%, #111B36 55%, #0B1026 100%);
  background-attachment: fixed;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 160ms ease;
}

a:hover {
  color: #FFD45E;
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-high);
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: rgba(245, 183, 0, 0.25);
  color: #fff;
}

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

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  transform: translateY(-200%);
  padding: 12px 20px;
  border-radius: 0 0 10px 0;
  background: var(--accent-gold);
  color: var(--space-deep);
  font-family: var(--font-heading);
  font-weight: 700;
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: #0B1026;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 26px;
  border: 1px solid var(--accent-gold);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-gold);
  background: transparent;
  transition: background 160ms ease, box-shadow 160ms ease, transform 100ms ease;
}

.btn:hover {
  color: var(--accent-gold);
  background: rgba(245, 183, 0, 0.12);
  box-shadow: 0 0 24px rgba(245, 183, 0, 0.16);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  border: 0;
  background: linear-gradient(135deg, var(--accent-gold), #FFC857);
  color: var(--space-deep);
}

.btn--primary:hover {
  color: var(--space-deep);
  background: linear-gradient(135deg, #FFC857, var(--accent-gold));
  box-shadow: 0 10px 30px rgba(245, 183, 0, 0.30);
}

.btn--ghost {
  border-color: var(--border-starlight);
  color: var(--text-high);
}

.btn--ghost:hover {
  color: var(--text-high);
  border-color: var(--accent-gold);
  background: rgba(61, 79, 122, 0.20);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  font-size: 0.85rem;
  color: var(--text-medium);
}

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

.breadcrumb a:hover {
  color: var(--accent-gold);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 8px;
  color: var(--border-starlight);
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: 0.02em;
}

.section-title::before {
  content: attr(data-index);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent-orange);
}

.card {
  padding: var(--space);
  border: 1px solid rgba(61, 79, 122, 0.5);
  border-radius: var(--radius);
  background: rgba(26, 35, 64, 0.6);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.card:hover {
  border-color: rgba(245, 183, 0, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.30), 0 0 0 1px rgba(245, 183, 0, 0.04);
  transform: translateY(-2px);
}

.media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--border-starlight);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(42, 53, 82, 0.6), rgba(11, 16, 38, 0.8));
}

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

.media--scene {
  aspect-ratio: 16 / 9;
}

.media--portrait {
  aspect-ratio: 3 / 4;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 16, 38, 0.78);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(61, 79, 122, 0.6);
  box-shadow: 0 10px 30px rgba(3, 6, 18, 0.35);
}

.header-grid {
  display: grid;
  gap: 0;
}

.header-shell {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 16px 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: start;
}

.header-right {
  justify-self: end;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-starlight);
  border-radius: 12px;
  background: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px 0;
  border-radius: 2px;
  background: var(--text-high);
  transition: transform 200ms ease, opacity 200ms ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.lang-switch {
  padding: 6px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: rgba(42, 53, 82, 0.4);
  font-size: 0.85rem;
  color: var(--text-medium);
  cursor: default;
  transition: border-color 160ms ease, background 160ms ease;
}

.lang-switch:hover {
  border-color: var(--border-starlight);
  background: rgba(61, 79, 122, 0.3);
}

.brand {
  grid-column: 2;
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-heading);
  color: var(--text-high);
  line-height: 1;
}

.brand:hover {
  color: var(--text-high);
}

.brand-mark {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFF3B0, var(--accent-gold) 38%, rgba(245, 183, 0, 0.15) 65%, transparent 72%);
  box-shadow: 0 0 20px rgba(245, 183, 0, 0.40);
}

.brand-star {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.brand-name {
  background: linear-gradient(90deg, var(--accent-gold), #FFC857);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
}

.brand-tagline {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.35em;
  color: var(--text-medium);
  text-transform: uppercase;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 220px;
  padding: 6px 8px 6px 32px;
  border: 1px solid var(--border-starlight);
  border-radius: 999px;
  background: rgba(20, 27, 50, 0.65);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-box:hover {
  border-color: rgba(245, 183, 0, 0.60);
  box-shadow: 0 0 0 3px rgba(245, 183, 0, 0.08);
}

.search-box-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-gold);
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-65%);
}

.search-box-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: var(--accent-gold);
  transform: rotate(-45deg);
}

.search-box-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-high);
}

.search-box-input::placeholder {
  color: var(--text-medium);
  opacity: 0.7;
}

.main-nav {
  border-top: 1px solid rgba(61, 79, 122, 0.5);
}

.nav-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-medium);
  transition: color 150ms ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-high);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--accent-gold);
}

.header-progress {
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 2px;
  pointer-events: none;
}

.header-progress::after {
  content: "";
  display: block;
  width: calc(var(--progress, 0) * 100%);
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
  box-shadow: 0 0 12px rgba(245, 183, 0, 0.6);
}

.site-footer {
  padding: 64px 0 0;
  border-top: 1px solid var(--border-starlight);
  background: linear-gradient(180deg, #0E1530 0%, #080D1C 100%);
  color: var(--text-medium);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-high);
}

.footer-brand:hover {
  color: var(--text-high);
}

.footer-brand .brand-name {
  font-size: 1.5rem;
}

.footer-motto {
  max-width: 30em;
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--text-medium);
}

.footer-heading {
  margin-bottom: 16px;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text-high);
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 24px;
}

.footer-nav a {
  color: var(--text-medium);
}

.footer-nav a:hover {
  color: var(--accent-gold);
}

.footer-contact-block ul {
  padding: 0;
}

.footer-contact-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.footer-contact-list li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-gold);
  font-size: 0.8rem;
}

.contact-label {
  display: inline-block;
  min-width: 3.5em;
  margin-right: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid rgba(61, 79, 122, 0.5);
  font-size: 0.85rem;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--text-medium);
}

.footer-legal a:hover {
  color: var(--accent-gold);
}

.icp {
  color: var(--text-medium);
  font-family: var(--font-mono);
}

@media (max-width: 1024px) {
  .container {
    width: min(calc(100% - 32px), var(--container-width));
  }

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

  .footer-nav ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .header-shell {
    grid-template-columns: auto 1fr auto;
    padding: 10px 0;
  }

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

  .lang-switch {
    display: none;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-star {
    width: 12px;
    height: 12px;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .brand-tagline {
    display: none;
  }

  .search-box {
    min-width: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }

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

  .search-box-icon {
    position: static;
    transform: none;
  }

  .main-nav {
    display: none;
  }

  .main-nav[data-open] {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    padding: 0 0 8px;
  }

  .nav-link {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(61, 79, 122, 0.35);
    text-align: center;
  }

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

  .footer-brand-block,
  .footer-contact-block {
    text-align: left;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
  }
}

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