:root {
  --space: #0b0714;
  --space-2: #16051c;
  --space-3: #10131f;
  --nebula-cyan: #22d3c5;
  --nebula-violet: #7c3aed;
  --star-gold: #f59e0b;
  --stardust: #f7f3ea;
  --silver: #b8c4cc;
  --muted: #7f8c98;
  --line: rgba(247, 243, 234, 0.12);
  --panel: rgba(12, 11, 26, 0.72);
  --panel-strong: rgba(17, 20, 34, 0.88);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--stardust);
  background:
    radial-gradient(circle at 82% 12%, rgba(34, 211, 197, 0.16), transparent 28rem),
    radial-gradient(circle at 28% 18%, rgba(124, 58, 237, 0.18), transparent 24rem),
    linear-gradient(145deg, var(--space), var(--space-2) 58%, #05070e);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

button,
a {
  font: inherit;
}

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

button {
  border: 0;
}

.starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.62;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  background: rgba(7, 6, 16, 0.72);
  backdrop-filter: blur(22px);
}

.brand-lockup,
.rail-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup strong,
.rail-status strong {
  display: block;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand-lockup small,
.rail-status small {
  display: block;
  margin-top: 2px;
  color: var(--silver);
  font-size: 12px;
}

.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(34, 211, 197, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  object-fit: cover;
  object-position: center;
  box-shadow: 0 0 28px rgba(34, 211, 197, 0.12);
}

.rail-nav {
  display: grid;
  gap: 8px;
}

.rail-nav a {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--silver);
  font-size: 14px;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  border-color: rgba(34, 211, 197, 0.26);
  background: rgba(34, 211, 197, 0.07);
  color: var(--stardust);
  outline: none;
}

.rail-status {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--nebula-cyan);
  box-shadow: 0 0 18px rgba(34, 211, 197, 0.8);
}

.main {
  min-width: 0;
}

.hero,
.matrix-section,
.command-section,
.brand-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  align-items: center;
  gap: 52px;
  min-height: 94vh;
  padding-top: 56px;
  padding-bottom: 44px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--nebula-cyan);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(54px, 8vw, 112px);
  font-weight: 850;
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.lead {
  max-width: 620px;
  margin-bottom: 30px;
  color: rgba(247, 243, 234, 0.78);
  font-size: 18px;
}

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

.primary-action,
.ghost-action,
.copy-button,
.open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.primary-action {
  color: #061114;
  background: linear-gradient(135deg, var(--nebula-cyan), #8ff7e8);
  font-weight: 760;
  box-shadow: 0 18px 42px rgba(34, 211, 197, 0.2);
}

.ghost-action,
.copy-button,
.open-button {
  border: 1px solid var(--line);
  color: var(--stardust);
  background: rgba(255, 255, 255, 0.04);
}

.primary-action:hover,
.ghost-action:hover,
.copy-button:hover,
.open-button:hover {
  transform: translateY(-1px);
}

.ghost-action:hover,
.copy-button:hover,
.open-button:hover {
  border-color: rgba(34, 211, 197, 0.32);
  background: rgba(34, 211, 197, 0.07);
}

.hero-visual {
  position: relative;
  min-height: 420px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(247, 243, 234, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: var(--shadow);
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.hero-visual::before {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11, 7, 20, 0.72), transparent 42%),
    linear-gradient(0deg, rgba(11, 7, 20, 0.62), transparent 52%);
}

.hero-visual::after {
  inset: 18px;
  z-index: 2;
  border: 1px solid rgba(34, 211, 197, 0.18);
  border-radius: 6px;
}

.hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: 50% 50%;
  filter: saturate(0.9) contrast(1.05);
}

.hero-visual figcaption {
  position: absolute;
  right: 26px;
  bottom: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--silver);
  font-size: 12px;
}

.hero-visual figcaption strong {
  padding: 6px 9px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: var(--star-gold);
  background: rgba(245, 158, 11, 0.09);
  font-size: 12px;
}

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

.section-head > p {
  max-width: 460px;
  margin-bottom: 4px;
  color: var(--silver);
}

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

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.project-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle at 78% 12%, var(--accent-soft), transparent 16rem);
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.project-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(247, 243, 234, 0.13);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.055);
  font-weight: 850;
}

.project-status {
  padding: 6px 9px;
  border: 1px solid rgba(247, 243, 234, 0.12);
  border-radius: 999px;
  color: var(--silver);
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.project-card h3 {
  margin-bottom: 4px;
  font-size: 24px;
}

.cn-name {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 720;
}

.project-desc {
  min-height: 78px;
  color: rgba(247, 243, 234, 0.76);
}

.meta-list {
  display: grid;
  gap: 8px;
  margin: 0 0 24px;
}

.meta-list div {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
}

.meta-list dt {
  color: var(--muted);
  font-size: 12px;
}

.meta-list dd {
  min-width: 0;
  margin: 0;
  color: var(--silver);
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.open-button {
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.copy-button,
.open-button {
  min-height: 40px;
  font-size: 13px;
  white-space: nowrap;
}

.command-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.command-panel,
.signal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.command-panel {
  padding: 22px;
}

.panel-title {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-title p,
.signal-panel p {
  margin-bottom: 0;
  color: var(--silver);
}

.panel-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(34, 211, 197, 0.28);
  border-radius: 8px;
  color: var(--nebula-cyan);
  background: rgba(34, 211, 197, 0.06);
  font-weight: 820;
}

.launch-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
  counter-reset: launch;
}

.launch-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(247, 243, 234, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.launch-list li::before {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #061114;
  background: var(--nebula-cyan);
  content: counter(launch);
  counter-increment: launch;
  font-size: 12px;
  font-weight: 800;
}

.launch-list strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.launch-list code {
  color: var(--silver);
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.signal-panel {
  padding: 22px;
}

.signal-panel h3 {
  margin-bottom: 18px;
}

.signal-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.signal-panel dl div {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(247, 243, 234, 0.08);
}

.signal-panel dl div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.signal-panel dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.signal-panel dd {
  margin: 0;
  color: var(--stardust);
}

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

.principle-grid article {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.principle-grid span {
  display: block;
  margin-bottom: 38px;
  color: var(--star-gold);
  font-family: "JetBrains Mono", "SF Mono", Consolas, monospace;
  font-size: 13px;
}

.principle-grid p {
  margin-bottom: 0;
  color: var(--silver);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 197, 0.28);
  border-radius: 8px;
  color: var(--stardust);
  background: rgba(8, 10, 18, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: relative;
    z-index: 5;
    flex-direction: row;
    align-items: center;
    height: auto;
    padding: 16px 22px;
  }

  .rail-nav {
    display: flex;
    margin-left: auto;
  }

  .rail-status {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 52px;
  }

  .hero-visual {
    min-height: 360px;
  }

  .hero-visual img {
    min-height: 420px;
  }

  .project-grid,
  .principle-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .project-desc {
    min-height: auto;
  }

  .command-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .side-rail {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .rail-nav {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
  }

  .rail-nav a {
    flex: 1 0 auto;
    text-align: center;
  }

  .hero,
  .matrix-section,
  .command-section,
  .brand-section {
    padding: 46px 18px;
  }

  .hero {
    gap: 28px;
  }

  h1 {
    font-size: 58px;
  }

  .lead {
    font-size: 16px;
  }

  .hero-actions,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 280px;
  }

  .hero-visual img {
    min-height: 320px;
  }

  .hero-visual figcaption {
    left: 20px;
    right: 20px;
    justify-content: space-between;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .launch-list li {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .launch-list .copy-button {
    grid-column: 1 / -1;
  }
}
