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

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

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #0A1228;
  background-image:
    radial-gradient(rgba(212,175,55,0.10) 1px, transparent 1px),
    radial-gradient(rgba(0,229,255,0.05) 1px, transparent 1px);
  background-size: 34px 34px, 17px 17px;
  color: #E8EDF2;
  font-family: "Source Serif Pro", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

:root {
  --bg-deep: #0A1228;
  --bg-night: #1A1B3A;
  --accent-gold: #D4AF37;
  --accent-cyan: #00E5FF;
  --text-white: #E8EDF2;
  --text-gray: #9BA4B3;
  --line: #2A3455;
  --glass: rgba(10,18,40,0.6);
  --warn-red: #FF5C7C;
  --font-display: "Orbitron", "DIN Alternate", "Bahnschrift", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Source Serif Pro", "Noto Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --font-mono: "SF Mono", "Cascadia Mono", "Consolas", "Roboto Mono", monospace;
  --sidebar-w: 280px;
  --header-h: 64px;
}

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

button {
  font: inherit;
  cursor: pointer;
}

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

main {
  position: relative;
  z-index: 1;
  flex: 1;
}

[hidden] {
  display: none !important;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 8px 18px;
  background: var(--accent-gold);
  color: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  transform: translateY(-200%);
  transition: transform 0.3s ease;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.page-header {
  padding: 48px 0 40px;
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.page-title .accent-cut {
  color: var(--accent-gold);
}

.page-lead {
  margin-top: 14px;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.9;
  color: var(--text-gray);
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  position: relative;
  padding: 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.card:focus-within {
  border-color: rgba(212,175,55,0.45);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.card-title {
  margin: 8px 0 4px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.card-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-cyan);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-gold {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-deep);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(212,175,55,0.28);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(0,229,255,0.4);
  color: var(--accent-cyan);
}

.btn-ghost:hover {
  background: rgba(0,229,255,0.08);
  border-color: var(--accent-cyan);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 32px;
  font-size: 13px;
  color: var(--text-gray);
}

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

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

.breadcrumb span + span::before {
  content: "·";
  margin-inline: 8px;
  color: var(--text-gray);
}

.entry {
  max-width: 36em;
  font-size: 16px;
  line-height: 2;
  color: var(--text-gray);
}

.entry p {
  margin: 0 0 1em;
}

.data {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.note {
  border-left: 3px solid var(--accent-gold);
  padding: 10px 16px;
  background: rgba(212,175,55,0.06);
  font-size: 14px;
  color: var(--text-gray);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.img-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 25%, rgba(212,175,55,0.18), transparent 45%),
    linear-gradient(135deg, var(--bg-night), var(--bg-deep));
  border: 1px solid var(--line);
}

.img-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0,229,255,0.14) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.4;
  pointer-events: none;
}

.img-frame::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), rgba(212,175,55,0));
}

.img-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  height: 100vh;
  height: 100dvh;
  z-index: 90;
  padding: 28px 20px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(0,229,255,0.08), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-night) 100%);
  box-shadow: 1px 0 0 rgba(212,175,55,0.12);
}

.site-header::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: -1px;
  width: 1px;
  background: linear-gradient(180deg, rgba(212,175,55,0.8), rgba(212,175,55,0.08));
  pointer-events: none;
}

.frame-progress {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 2px;
  z-index: 3;
  background: linear-gradient(180deg, var(--accent-gold), var(--accent-cyan));
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}

.side-brand {
  position: relative;
  margin-bottom: 32px;
}

.brand-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.brand-glyph {
  width: fit-content;
  border: 1px solid var(--accent-gold);
  padding: 10px 10px 8px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 4px;
  color: var(--accent-gold);
}

.brand-name {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 5px;
  color: var(--text-white);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--text-gray);
}

.side-announce {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 10px 12px;
  background: var(--glass);
  border: 1px solid var(--line);
}

.announce-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.announce-text {
  flex: 1;
  font-size: 13px;
  color: var(--text-gray);
}

.announce-close {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--text-gray);
  font-size: 20px;
  line-height: 1;
}

.announce-close:hover {
  color: var(--text-white);
}

.site-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-left: 2px solid transparent;
  color: var(--text-gray);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-item:hover {
  border-left-color: var(--accent-gold);
  background: rgba(212,175,55,0.08);
  color: var(--text-white);
}

.nav-item[aria-current="page"] {
  border-left-color: var(--accent-gold);
  background: linear-gradient(270deg, transparent 10%, rgba(212,175,55,0.14));
  color: var(--accent-gold);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent-cyan);
}

.nav-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
}

.side-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold);
}

.status-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-gray);
}

.side-vert {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 7px;
  color: var(--text-gray);
  pointer-events: none;
}

.nav-toggle {
  display: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at 85% 8%, rgba(0,229,255,0.05), transparent 42%),
    #080E1E;
}

.footer-shell {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.footer-shell::before {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, rgba(212,175,55,0) 60%);
  margin-bottom: 36px;
}

.footer-core {
  display: grid;
  grid-template-columns: 1.2fr 1.6fr 1.2fr;
  gap: 40px;
  padding-bottom: 28px;
}

.footer-brand-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.footer-glyph {
  flex: 0 0 auto;
  border: 1px solid var(--accent-gold);
  padding: 8px 8px 6px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 3px;
  color: var(--accent-gold);
}

.footer-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-white);
}

.footer-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-gray);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-col-title,
.footer-contact-title {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

.footer-link {
  width: fit-content;
  padding: 3px 0;
  font-size: 14px;
  color: var(--text-gray);
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-white);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 14px;
  color: var(--text-gray);
}

.footer-motto {
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 16px;
  font-style: italic;
  color: var(--accent-gold);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 36px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-gray);
}

@media (max-width: 1023px) {
  body {
    padding-left: 0;
  }

  .site-header {
    width: 100%;
    height: var(--header-h);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    overflow: visible;
    background:
      radial-gradient(circle at 20% 0%, rgba(0,229,255,0.06), transparent 50%),
      linear-gradient(180deg, var(--bg-deep), var(--bg-night));
  }

  .site-header::after {
    right: auto;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(212,175,55,0.8), rgba(212,175,55,0.08));
  }

  .frame-progress {
    top: auto;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-cyan));
    transform: scaleX(0);
    transform-origin: left;
  }

  .side-brand {
    margin-bottom: 0;
  }

  .brand-link {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .brand-glyph {
    padding: 4px 6px;
    font-size: 14px;
    letter-spacing: 2px;
  }

  .brand-name {
    margin-top: 0;
    font-size: 18px;
    letter-spacing: 2px;
  }

  .brand-sub {
    display: none;
  }

  .side-announce,
  .side-status,
  .side-vert {
    display: none;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    justify-content: center;
    gap: 6px;
    padding: calc(var(--header-h) + 12px) 24px 24px;
    overflow-y: auto;
    background: rgba(10,18,40,0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  .site-nav[data-open] {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px 12px;
    font-size: 18px;
  }

  .nav-item:hover,
  .nav-item[aria-current="page"] {
    border-left: 0;
    border-bottom-color: var(--accent-gold);
  }

  .nav-label {
    font-size: 18px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text-white);
  }

  .toggle-text {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 2px;
  }

  .toggle-icon {
    position: relative;
    display: block;
    width: 20px;
    height: 14px;
  }

  .toggle-icon::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-toggle[aria-expanded="true"] .toggle-icon::before {
    top: 6px;
    box-shadow: none;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .toggle-icon::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 0;
    width: 20px;
    height: 2px;
    background: currentColor;
    transform: rotate(-45deg);
  }

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

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

@media (max-width: 640px) {
  .container,
  .footer-shell {
    padding-inline: 16px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .page-header {
    padding: 32px 0 28px;
  }

  .page-lead {
    font-size: 16px;
  }

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

  .brand-glyph {
    font-size: 12px;
  }

  .brand-name {
    font-size: 16px;
  }
}

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