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

:root {
  --bg-deep: #0a0e1a;
  --bg-panel: #111827;
  --cyan-primary: #00e5ff;
  --magenta-accent: #ff2a6d;
  --green-accent: #39ff88;
  --text-high: #f5f7fa;
  --text-mid: #a0aec0;
  --text-low: #64748b;
  --warning: #ffb86c;
  --purple-glow: #7a5af8;
  --font-head: system-ui, 'Noto Sans SC', 'Microsoft Yahei', sans-serif;
  --font-body: system-ui, 'Inter', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;
  --sidebar-w: 220px;
  --header-h-mobile: 60px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --transition-base: all 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-high);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 900px 500px at 85% 10%, rgba(0, 229, 255, 0.055), transparent 60%),
    radial-gradient(ellipse 700px 400px at 15% 65%, rgba(255, 42, 109, 0.045), transparent 60%),
    radial-gradient(ellipse 800px 500px at 60% 90%, rgba(122, 90, 248, 0.05), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

a {
  color: var(--cyan-primary);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.25;
  font-weight: 800;
}

:focus-visible {
  outline: 2px solid var(--cyan-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 3000;
  padding: 0.6rem 1.25rem;
  background: var(--cyan-primary);
  color: #0a0e1a;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  transition: top 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.4);
}

.skip-link:focus {
  top: 1rem;
}

#main-content {
  margin-left: var(--sidebar-w);
  min-height: calc(100vh - 300px);
  position: relative;
  display: block;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  width: var(--sidebar-w);
  background-color: var(--bg-panel);
  border-right: 1px solid rgba(0, 229, 255, 0.14);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
  flex-direction: column;
  padding: 1.75rem 1.25rem 1.25rem;
  overflow: visible;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.site-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  height: 100%;
  width: 1px;
  background: linear-gradient(180deg, var(--cyan-primary) 0%, transparent 35%, rgba(255, 42, 109, 0.5) 75%, transparent 100%);
  opacity: 0.35;
}

.header-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-high);
  padding: 0.25rem 0;
  margin-bottom: 2.5rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--purple-glow) 60%, var(--magenta-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: #0a0e1a;
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-style: italic;
  line-height: 1.3;
}

.site-nav {
  position: relative;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  color: var(--text-mid);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-base);
  position: relative;
  border-left: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text-high);
  background: rgba(0, 229, 255, 0.06);
  transform: translateX(3px);
  border-left-color: rgba(0, 229, 255, 0.3);
}

.nav-link[aria-current="page"] {
  color: var(--cyan-primary);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.12), rgba(0, 229, 255, 0.02));
  border-left-color: var(--cyan-primary);
  font-weight: 700;
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--cyan-primary), var(--magenta-accent));
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-low);
  margin-right: 0.7rem;
  font-style: normal;
  letter-spacing: 0.05em;
  transition: color 0.25s;
}

.nav-link:hover .nav-index {
  color: var(--magenta-accent);
}

.nav-link[aria-current="page"] .nav-index {
  color: var(--cyan-primary);
}

.header-status {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(57, 255, 136, 0.06);
  border: 1px solid rgba(57, 255, 136, 0.15);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--green-accent);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  align-self: flex-start;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-accent);
  flex-shrink: 0;
  animation: status-pulse 2s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(57, 255, 136, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(57, 255, 136, 0);
  }
}

.brand-vertical {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.5em;
  color: var(--text-low);
  text-transform: uppercase;
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
}

.header-toggle {
  display: none;
}

.toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-high);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan-primary), var(--purple-glow), var(--magenta-accent));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 2500;
  pointer-events: none;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.5);
}

.site-footer {
  margin-left: var(--sidebar-w);
  background: var(--bg-panel);
  border-top: 1px solid rgba(0, 229, 255, 0.12);
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(ellipse 600px 300px at 90% 0%, rgba(0, 229, 255, 0.04), transparent);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.5), rgba(255, 42, 109, 0.5), transparent);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem clamp(1.5rem, 4vw, 3rem) 1.75rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1.6fr;
  gap: 2.5rem 3rem;
}

.footer-brand-block {
  display: flex;
  flex-direction: column;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan-primary), var(--purple-glow) 60%, var(--magenta-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
  color: #0a0e1a;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.25);
  flex-shrink: 0;
}

.footer-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  font-style: italic;
}

.footer-tagline {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-low);
  margin-top: 0.9rem;
  max-width: 38ch;
}

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

.footer-col-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-low);
  margin-bottom: 0.8rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-links a {
  color: var(--text-mid);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 0.2s, padding-left 0.2s;
  border-radius: 6px;
  position: relative;
}

.footer-links a:hover {
  color: var(--cyan-primary);
  padding-left: 0.6rem;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-mid);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  line-height: 1.6;
}

.footer-contact-item::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan-primary);
  margin-right: 0.5rem;
  flex-shrink: 0;
  vertical-align: middle;
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.5);
}

.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  color: var(--text-low);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2rem);
}

.section {
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-primary) 0%, var(--purple-glow) 55%, var(--magenta-accent) 100%);
  color: #0a0e1a;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px rgba(255, 42, 109, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-ghost:hover {
  background: rgba(0, 229, 255, 0.08);
  border-color: var(--cyan-primary);
  transform: translateY(-2px);
}

.btn-ghost:active {
  transform: translateY(0);
}

.card {
  background: linear-gradient(145deg, var(--bg-panel), rgba(17, 24, 39, 0.8));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(0, 229, 255, 0.06);
}

.card--accent {
  position: relative;
  overflow: hidden;
}

.card--accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan-primary), var(--magenta-accent));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.7;
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--cyan-primary);
}

.badge--purple {
  background: rgba(122, 90, 248, 0.12);
  border-color: rgba(122, 90, 248, 0.25);
  color: var(--purple-glow);
}

.badge--green {
  background: rgba(57, 255, 136, 0.1);
  border-color: rgba(57, 255, 136, 0.25);
  color: var(--green-accent);
}

.badge--magenta {
  background: rgba(255, 42, 109, 0.1);
  border-color: rgba(255, 42, 109, 0.25);
  color: var(--magenta-accent);
}

.badge--warning {
  background: rgba(255, 184, 108, 0.1);
  border-color: rgba(255, 184, 108, 0.25);
  color: var(--warning);
}

.section-head {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: var(--text-high);
}

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan-primary);
  margin-bottom: 0.5rem;
  font-style: normal;
}

.section-sub {
  font-size: 0.95rem;
  color: var(--text-mid);
  max-width: 60ch;
  line-height: 1.7;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1.05rem;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn:hover {
  border-color: rgba(0, 229, 255, 0.35);
  color: var(--text-high);
}

.filter-btn[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(255, 42, 109, 0.15));
  border-color: var(--cyan-primary);
  color: var(--cyan-primary);
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-low);
  padding: 1rem 0;
}

.crumb {
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.2s;
}

.crumb:hover {
  color: var(--cyan-primary);
}

.crumb-sep {
  color: var(--text-low);
  opacity: 0.4;
  padding: 0 0.15rem;
}

.crumb--current {
  color: var(--text-low);
  cursor: default;
}

.img-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(255, 42, 109, 0.06), rgba(122, 90, 248, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.img-frame::before {
  content: '';
  display: block;
  padding-top: 56.25%;
}

.img-frame img,
.img-frame .img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-low);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  background-image:
    linear-gradient(135deg, rgba(0, 229, 255, 0.06), transparent),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(255, 255, 255, 0.015) 12px 24px);
}

.divider {
  border: none;
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.25) 30%, rgba(255, 42, 109, 0.25) 70%, transparent);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 981px) and (max-width: 1200px) {
  :root {
    --sidebar-w: 190px;
  }

  .site-header {
    padding: 1.25rem 0.75rem;
  }

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

  .nav-link {
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
  }

  .header-status {
    padding: 0.35rem 0.7rem;
    font-size: 0.68rem;
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-w: 0px;
  }

  #main-content {
    margin-left: 0;
  }

  .site-header {
    position: sticky;
    top: 0;
    bottom: auto;
    width: 100%;
    height: var(--header-h-mobile);
    min-height: 0;
    padding: 0 1rem;
    border-right: none;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    flex-direction: row;
    align-items: center;
  }

  .site-header::after {
    top: auto;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--cyan-primary), transparent 30%, rgba(255, 42, 109, 0.5) 70%, transparent);
  }

  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h-mobile);
  }

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

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 12px;
  }

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

  .header-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
  }

  .header-toggle:hover {
    border-color: rgba(0, 229, 255, 0.4);
  }

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

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

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

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(17, 24, 39, 0.98);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0, 229, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }

  .site-nav[data-open] {
    max-height: calc(100vh - var(--header-h-mobile));
    overflow-y: auto;
  }

  .nav-list {
    padding: 0.75rem 1rem 1.25rem;
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  .header-status,
  .brand-vertical {
    display: none;
  }

  .site-footer {
    margin-left: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    padding: 2.5rem 1.5rem 1.5rem;
  }

  .footer-tagline {
    max-width: 100%;
  }

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

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

@media (max-width: 480px) {
  .brand-name {
    font-size: 0.95rem;
  }

  .footer-inner {
    padding: 2rem 1.25rem 1.25rem;
  }
}

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

  .status-dot {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
