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

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

body {
  min-height: 100vh;
  background: var(--c-navy);
  color: var(--c-gray);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--f-display);
  font-weight: 900;
  font-style: italic;
  line-height: 1.2;
  color: var(--c-white);
  letter-spacing: 0.01em;
}

::selection {
  background: var(--c-neon);
  color: var(--c-navy);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: var(--c-navy);
}

::-webkit-scrollbar-thumb {
  background: var(--c-purple);
  border-radius: 0;
}

/* ===== Variables ===== */
:root {
  --c-navy: #0B1B3D;
  --c-purple: #6A0DAD;
  --c-neon: #39FF14;
  --c-darkp: #1E0A3C;
  --c-blue: #00BFFF;
  --c-gray: #E0E0E0;
  --c-dark: #2C2C2C;
  --c-white: #FFFFFF;
  --c-gold: #FFD700;
  --c-glass: rgba(11, 27, 61, 0.82);

  --f-display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-body: "JetBrains Mono", "Courier New", "Noto Sans SC", "PingFang SC", monospace;

  --container-w: 1280px;
  --gap: 24px;
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-inner-w: 1200px;
}

/* ===== Base Typography ===== */
body {
  letter-spacing: 0.01em;
}

p {
  margin-bottom: 1em;
}

strong {
  color: var(--c-white);
  font-weight: 700;
}

em {
  color: var(--c-blue);
}

code,
kbd,
samp {
  font-family: var(--f-body);
  background: rgba(57, 255, 20, 0.08);
  padding: 0.1em 0.3em;
  color: var(--c-neon);
  font-size: 0.9em;
}

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

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  margin-bottom: 0.6rem;
}

/* ===== Layout Utilities ===== */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding-left: var(--gap);
  padding-right: var(--gap);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

/* ===== Common Components ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--f-body);
  font-size: 0.85rem;
  color: var(--c-gray);
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 24px;
}

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

.breadcrumb a:hover {
  color: var(--c-neon);
  text-decoration: underline;
}

.breadcrumb .sep {
  opacity: 0.4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--c-purple);
  color: var(--c-white);
  border: 1px solid transparent;
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover {
  background: var(--c-navy);
  border-color: var(--c-neon);
  color: var(--c-neon);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  border-color: var(--c-blue);
  color: var(--c-blue);
}

.btn-secondary:hover {
  background: rgba(0, 191, 255, 0.08);
  border-color: var(--c-blue);
  color: var(--c-neon);
}

.media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--c-navy), var(--c-darkp));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: var(--radius);
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57, 255, 20, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.1) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 60%, rgba(106, 13, 173, 0.18) 100%);
  pointer-events: none;
}

.media img,
.media > * {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 2000;
  background: var(--c-neon);
  color: var(--c-navy);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius);
  transition: top 0.2s var(--ease);
}

.skip-link:focus-visible {
  top: 12px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-glass);
  background: linear-gradient(180deg, rgba(11, 27, 61, 0.96) 0%, rgba(30, 10, 60, 0.94) 100%);
  border-bottom: 1px solid rgba(0, 191, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  width: 100%;
  max-width: var(--header-inner-w);
  margin: 0 auto;
  padding: 0 24px;
}

.progress-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  pointer-events: none;
}

.progress-bar {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--c-purple), var(--c-neon));
  transition: width 0.08s linear;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--c-purple), var(--c-navy));
  border: 1px solid var(--c-neon);
  transform: skewX(-8deg);
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.2);
}

.brand-mark-inner {
  display: inline-block;
  transform: skewX(8deg);
  font-family: var(--f-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--c-white);
  letter-spacing: -0.03em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--f-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--c-white);
  letter-spacing: 0.04em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--c-blue);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-shell {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 0 12px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.search-shell:focus-within {
  border-color: var(--c-neon);
  background: rgba(57, 255, 20, 0.04);
}

.search-glyph {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--c-blue);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  margin-right: 8px;
}

.search-glyph::after {
  content: "";
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 6px;
  height: 2px;
  background: var(--c-blue);
  transform: rotate(45deg);
}

.search-input {
  width: 210px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-white);
  font-size: 0.85rem;
  padding: 8px 0;
}

.search-input::placeholder {
  color: rgba(224, 224, 224, 0.5);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--c-white);
  font-family: var(--f-body);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  transition: border-color 0.3s var(--ease);
}

.nav-toggle:hover {
  border-color: var(--c-neon);
}

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-white);
  border-radius: 1px;
  transition: background 0.3s var(--ease);
}

.nav-toggle:hover .nav-bar {
  background: var(--c-neon);
}

.nav-toggle-label {
  font-size: 0.75rem;
}

.nav-panel {
  display: block;
}

.site-nav {
  width: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  padding: 8px 0 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding: 8px 16px;
  font-family: var(--f-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-gray);
  border-radius: var(--radius);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--c-white);
  background: rgba(106, 13, 173, 0.2);
}

.nav-link[aria-current="page"] {
  color: var(--c-neon);
  background: rgba(57, 255, 20, 0.06);
  box-shadow: inset 0 -2px 0 var(--c-neon);
}

/* ===== Footer ===== */
.site-footer {
  position: relative;
  margin-top: auto;
  background: linear-gradient(180deg, var(--c-darkp) 0%, var(--c-navy) 100%);
  border-top: 1px solid var(--c-neon);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, var(--c-neon) 50%, transparent 90%);
  opacity: 0.35;
}

.footer-inner {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 48px 24px 20px;
}

.footer-main {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.6fr;
  gap: 40px;
  padding-bottom: 36px;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.footer-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--c-purple), var(--c-navy));
  border: 1px solid var(--c-neon);
  transform: skewX(-8deg);
  font-family: var(--f-display);
  font-weight: 900;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--c-white);
}

.footer-brand-name {
  font-family: var(--f-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--c-white);
}

.footer-slogan {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--c-blue);
  margin-bottom: 14px;
}

.footer-trust {
  font-size: 0.82rem;
  line-height: 1.8;
  color: rgba(224, 224, 224, 0.72);
  max-width: 340px;
}

.footer-col {
  min-width: 0;
}

.footer-heading {
  font-family: var(--f-display);
  font-weight: 900;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--c-white);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(57, 255, 20, 0.2);
}

.footer-list li {
  margin-bottom: 8px;
}

.footer-list a {
  font-size: 0.85rem;
  color: rgba(224, 224, 224, 0.78);
  transition: color 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.footer-list a:hover {
  color: var(--c-neon);
  padding-left: 4px;
}

.footer-list li:not(a) {
  font-size: 0.82rem;
  color: rgba(224, 224, 224, 0.65);
  line-height: 1.6;
}

.footer-note {
  font-size: 0.75rem;
  color: rgba(224, 224, 224, 0.45);
  margin-top: 14px;
  border-left: 2px solid var(--c-purple);
  padding-left: 10px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 18px;
  margin-top: 8px;
}

.footer-copy,
.footer-icp {
  font-size: 0.76rem;
  color: rgba(224, 224, 224, 0.5);
  letter-spacing: 0.04em;
}

.footer-icp {
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 10px;
  border-radius: 2px;
}

/* ===== Focus states ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--c-neon);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Media Queries ===== */
@media (max-width: 1024px) {
  .search-input {
    width: 150px;
  }

  .footer-main {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 28px;
  }

  .footer-col-contact {
    grid-column: 1 / -1;
  }

  .grid .span-4 {
    grid-column: span 6;
  }

  .grid .span-3 {
    grid-column: span 6;
  }
}

@media (max-width: 768px) {
  .header-top {
    padding: 12px 0;
  }

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

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

  .brand-tagline {
    font-size: 0.68rem;
  }

  .search-shell {
    display: none;
  }

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

  .nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(78vw, 320px);
    background: linear-gradient(160deg, rgba(11, 27, 61, 0.98) 0%, rgba(30, 10, 60, 0.98) 100%);
    border-left: 1px solid var(--c-neon);
    padding: 28px 24px;
    transform: translateX(102%);
    transition: transform 0.32s var(--ease);
    z-index: 150;
    overflow-y: auto;
    box-shadow: -16px 0 40px rgba(0, 0, 0, 0.35);
  }

  .nav-panel[data-open="true"] {
    transform: translateX(0);
  }

  .site-nav {
    margin-top: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border-top: none;
    padding-top: 10px;
  }

  .nav-link {
    display: block;
    padding: 14px 12px;
    font-size: 1rem;
    border-radius: var(--radius);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }

  .nav-link[aria-current="page"] {
    background: rgba(57, 255, 20, 0.08);
    box-shadow: inset 3px 0 0 var(--c-neon);
  }

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

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0 16px;
  }

  .brand-tagline {
    display: none;
  }

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

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .grid .span-4,
  .grid .span-3,
  .grid .span-6,
  .grid .span-8 {
    grid-column: span 12;
  }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .progress-bar {
    transition: none;
  }

  .nav-panel {
    transition: none;
  }
}
