:root {
  --bg: #050505;
  --bg-soft: #0b0d0f;
  --surface: #111417;
  --surface-strong: #171b1f;
  --line: rgba(240, 245, 238, 0.14);
  --line-strong: rgba(204, 255, 0, 0.45);
  --text: #f4f7ef;
  --muted: #a4aca2;
  --quiet: #687068;
  --acid: #ccff00;
  --cyan: #48e7ff;
  --amber: #ffbe55;
  --pink: #ff5fa2;
  --violet: #9b7cff;
  --radius: 8px;
  --page: min(1180px, calc(100vw - 40px));
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(72, 231, 255, 0.13), transparent 28vw),
    radial-gradient(circle at 78% 2%, rgba(204, 255, 0, 0.09), transparent 24vw),
    linear-gradient(180deg, #050505 0%, #080a0b 48%, #050505 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.032) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.82), transparent 82%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5,5,5,0.68));
}

a {
  color: inherit;
}

code {
  color: var(--acid);
  font-family: var(--mono);
  font-size: 0.94em;
}

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(18px);
}

.nav {
  width: var(--page);
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  text-decoration: none;
  display: grid;
  gap: 3px;
}

.brand strong {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0;
  color: var(--text);
}

.brand span {
  font-size: 12px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.055);
}

.nav-links a.primary-link {
  color: #101308;
  background: var(--acid);
  border-color: var(--acid);
  font-weight: 700;
}

.hero {
  width: var(--page);
  margin: 0 auto;
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.72fr);
  gap: 58px;
  align-items: center;
  padding: 72px 0 56px;
}

.hero-copy {
  display: grid;
  gap: 30px;
}

.hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(54px, 9vw, 126px);
  line-height: 0.88;
  font-weight: 760;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
  color: var(--acid);
}

.hero-summary {
  max-width: 680px;
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.72;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,0.04);
}

.button:hover {
  border-color: var(--line-strong);
}

.button.primary {
  color: #111606;
  background: var(--acid);
  border-color: var(--acid);
}

.hero-stage {
  min-height: 540px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #090b0d;
  box-shadow: 0 40px 120px rgba(0,0,0,0.42);
}

.hero-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.stage-panel {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(5,5,5,0.7);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
}

.stage-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.stage-label {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-family: var(--mono);
  color: var(--acid);
  font-size: 12px;
}

.section {
  width: var(--page);
  margin: 0 auto;
  padding: 78px 0;
  border-top: 1px solid var(--line);
}

.section.compact {
  padding-top: 50px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-kicker {
  font-family: var(--mono);
  color: var(--acid);
  font-size: 12px;
  margin: 0 0 12px;
}

.section h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.section-lede,
.page-title p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 16px;
  margin: 16px 0 0;
}

.page-title {
  width: var(--page);
  margin: 0 auto;
  padding: 78px 0 42px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stat {
  min-height: 118px;
  padding: 22px;
  background: rgba(12,14,16,0.84);
}

.stat strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  position: relative;
  min-height: 390px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 14, 16, 0.84);
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: rgba(17, 21, 24, 0.96);
}

.work-card.large {
  min-height: 480px;
}

.work-preview {
  min-height: 176px;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(255,255,255,0.09);
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 70% 28%, var(--preview, var(--acid)), transparent 6%),
    linear-gradient(135deg, rgba(255,255,255,0.12), transparent 33%),
      #090b0d;
}

.work-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.work-preview::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,0.055) 29px 30px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,0.045) 29px 30px);
  transform: rotate(-12deg);
}

.work-card.has-cover .work-preview::before {
  inset: 0;
  z-index: 1;
  transform: none;
  background:
    linear-gradient(180deg, transparent 42%, rgba(5,5,5,0.58) 100%),
    linear-gradient(90deg, rgba(5,5,5,0.34), transparent 46%);
}

.work-preview::after {
  content: "";
  position: absolute;
  width: 48%;
  aspect-ratio: 1;
  left: 26%;
  top: 20%;
  border: 1px solid color-mix(in srgb, var(--preview, var(--acid)) 70%, white 8%);
  border-radius: 50%;
  box-shadow: 0 0 80px color-mix(in srgb, var(--preview, var(--acid)) 38%, transparent);
}

.work-card.has-cover .work-preview::after {
  display: none;
}

.work-card[data-palette="cyan"] { --preview: var(--cyan); }
.work-card[data-palette="amber"] { --preview: var(--amber); }
.work-card[data-palette="pink"] { --preview: var(--pink); }
.work-card[data-palette="violet"] { --preview: var(--violet); }
.work-card[data-palette="green"],
.work-card[data-palette="lime"] { --preview: var(--acid); }

.work-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 18px;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 12px;
}

.work-card h3 {
  margin: 18px 0 12px;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.04;
  letter-spacing: 0;
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.64;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 8px;
}

.archive-tools {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 22px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.035);
  min-height: 38px;
  padding: 0 13px;
  font: 700 13px/1 var(--sans);
}

.filter-button:hover,
.filter-button.active {
  color: #101308;
  background: var(--acid);
  border-color: var(--acid);
}

.search-box {
  width: min(100%, 300px);
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  color: var(--text);
  padding: 0 14px;
  font: 14px/1 var(--sans);
}

.search-box::placeholder {
  color: var(--quiet);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.archive-grid .work-card {
  min-height: 360px;
}

.empty-state {
  display: none;
  min-height: 180px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state.visible {
  display: flex;
}

.maintenance {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: start;
}

.note-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12,14,16,0.74);
  padding: 24px;
}

.note-panel h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.note-panel p,
.note-panel li {
  color: var(--muted);
  line-height: 1.65;
}

.site-footer {
  width: var(--page);
  margin: 0 auto;
  padding: 42px 0 58px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 13px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--acid);
}

@media (max-width: 980px) {
  .hero,
  .maintenance {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
    min-height: 0;
  }

  .hero-stage {
    min-height: 420px;
  }

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

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

@media (max-width: 720px) {
  :root {
    --page: min(100vw - 28px, 1180px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: clamp(46px, 18vw, 74px);
  }

  .hero-stage {
    min-height: 340px;
  }

  .section {
    padding: 54px 0;
  }

  .section-head,
  .archive-tools,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-grid,
  .archive-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .work-card,
  .work-card.large,
  .archive-grid .work-card {
    min-height: 340px;
  }
}

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

.zh {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 0.9em;
  letter-spacing: 0.02em;
  font-weight: normal;
}

h1 .zh, h2 .zh, h3 .zh {
  font-weight: 400;
  opacity: 0.9;
}

.bilingual-block {
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}

.zh.bilingual-inline {
  margin-left: 0.4em;
  color: var(--muted);
}
