:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: rgba(15, 16, 18, 0.74);
  --panel-strong: rgba(24, 25, 28, 0.92);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5f5f2;
  --muted: #aaa9a3;
  --soft: #74726c;
  --lime: #c9ff7a;
  --cyan: #89e7ff;
  --rose: #ff8aa0;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(201, 255, 122, 0.08), transparent 28rem),
    radial-gradient(circle at 80% 30%, rgba(137, 231, 255, 0.07), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

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

#signalCanvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  opacity: 0.75;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand,
.nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.09), transparent 42%),
    rgba(255, 255, 255, 0.06);
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(201, 255, 122, 0.06);
}

.brand-mark::before {
  position: absolute;
  top: 6px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--lime);
  content: "";
  opacity: 0.85;
}

.terminal-caret {
  transform: translateY(-1px);
}

.terminal-cursor {
  animation: cursorBlink 1s steps(2, start) infinite;
}

.nav {
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 9, 10, 0.68);
}

.nav a {
  min-width: 84px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: 32px;
  min-height: calc(100vh - 82px);
  align-items: center;
  padding: 46px 0 72px;
}

.hero-copy {
  max-width: 760px;
  min-width: 0;
}

.eyebrow,
.mini-label {
  margin: 0 0 12px;
  color: var(--lime);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0;
}

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

h1 {
  max-width: 850px;
  margin-bottom: 22px;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 16px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

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

.hero-text {
  max-width: 680px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover,
.button:focus-visible,
.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  border-color: rgba(201, 255, 122, 0.42);
  background: var(--text);
  color: #090909;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.console-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(22, 23, 26, 0.92), rgba(7, 8, 10, 0.88));
  box-shadow: var(--shadow);
}

.console-panel::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(transparent, rgba(201, 255, 122, 0.08), transparent),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 7px
    );
  opacity: 0.45;
}

.console-top {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.console-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--soft);
}

.console-top span:nth-child(1) {
  background: var(--rose);
}

.console-top span:nth-child(2) {
  background: var(--lime);
}

.console-top span:nth-child(3) {
  background: var(--cyan);
}

.dev-console {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 24px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.code-stream {
  display: grid;
  gap: 8px;
}

.code-stream p {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 8px 0;
  color: #dfded8;
  font-size: 13px;
  animation: codeFlicker 4.6s ease-in-out infinite;
}

.code-stream p:nth-child(2) {
  animation-delay: 0.45s;
}

.code-stream p:nth-child(3) {
  animation-delay: 0.9s;
}

.code-stream p:nth-child(4) {
  animation-delay: 1.35s;
}

.line-no {
  color: var(--soft);
}

.code-stream code {
  color: #e6e6df;
  white-space: normal;
}

.code-stream code::after {
  color: var(--lime);
  content: " ▌";
  animation: cursorBlink 1s steps(2, start) infinite;
}

.pulse-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 82px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(to top, rgba(201, 255, 122, 0.06), transparent),
    rgba(255, 255, 255, 0.025);
}

.pulse-row span {
  min-height: 12px;
  border-radius: 999px 999px 3px 3px;
  background: linear-gradient(to top, rgba(201, 255, 122, 0.22), var(--lime));
  box-shadow: 0 0 18px rgba(201, 255, 122, 0.1);
  animation: barPulse 2.8s ease-in-out infinite;
}

.pulse-row span:nth-child(1) {
  height: 32%;
}

.pulse-row span:nth-child(2) {
  height: 58%;
  animation-delay: 0.2s;
}

.pulse-row span:nth-child(3) {
  height: 42%;
  animation-delay: 0.4s;
}

.pulse-row span:nth-child(4) {
  height: 78%;
  animation-delay: 0.6s;
}

.pulse-row span:nth-child(5) {
  height: 52%;
  animation-delay: 0.8s;
}

.pulse-row span:nth-child(6) {
  height: 68%;
  animation-delay: 1s;
}

.pulse-row span:nth-child(7) {
  height: 36%;
  animation-delay: 1.2s;
}

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

.mini-dashboard div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.mini-dashboard strong,
.mini-dashboard span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-dashboard strong {
  color: var(--lime);
}

.mini-dashboard span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.section {
  padding: 76px 0;
  border-top: 1px solid var(--line);
}

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

.intro-grid article,
.log-entry,
.contact-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.intro-grid article {
  padding: 22px;
}

.record-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.record-list code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border: 1px solid rgba(201, 255, 122, 0.24);
  border-radius: 999px;
  color: var(--lime);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.record-list span {
  color: var(--muted);
}

.intro-grid p,
.about-copy p,
.contact-band p,
.log-entry p {
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 44px;
}

.section-heading {
  position: sticky;
  top: 90px;
  align-self: start;
}

.log-list {
  display: grid;
  gap: 14px;
}

.log-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 74px;
  gap: 20px;
  align-items: start;
  padding: 20px;
  background: var(--panel-strong);
}

.log-entry time {
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

.log-entry p {
  margin-bottom: 0;
}

.status {
  justify-self: end;
  min-width: 58px;
  padding: 4px 9px;
  border: 1px solid rgba(201, 255, 122, 0.34);
  border-radius: 999px;
  color: var(--lime);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.status.quiet {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--muted);
}

.about-copy {
  max-width: 760px;
  font-size: 18px;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px;
}

.contact-band p {
  margin-bottom: 0;
}

.contact-link {
  flex: 0 0 auto;
  padding: 12px 16px;
  border: 1px solid rgba(137, 231, 255, 0.28);
  border-radius: 8px;
  background: rgba(137, 231, 255, 0.08);
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  transition: transform 160ms ease, border-color 160ms ease;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 13px;
  text-align: center;
}

.icp-block {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: 2px;
}

.icp-label {
  color: var(--soft);
}

.icp-link {
  color: var(--muted);
  transition: color 160ms ease;
}

.icp-link:hover,
.icp-link:focus-visible {
  color: var(--text);
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    justify-content: space-between;
    overflow: hidden;
  }

  .nav a {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
  }

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

  .console-panel {
    width: 100%;
    max-width: 620px;
  }

  .intro-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .section-heading {
    position: static;
  }

  .log-entry {
    grid-template-columns: 1fr;
  }

  .status {
    justify-self: start;
  }

  .contact-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  main,
  .site-header,
  .footer {
    width: calc(100% - 42px);
  }

  h1 {
    font-size: 42px;
    line-height: 1.05;
  }

  h2 {
    font-size: 28px;
  }

  .hero-text,
  .about-copy {
    font-size: 16px;
  }

  .console-lines {
    padding: 18px;
  }

  .console-lines p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .section {
    padding: 56px 0;
  }

  .contact-link {
    width: 100%;
    text-align: center;
  }

  .nav {
    gap: 4px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 340px;
    padding: 5px;
  }

  .nav a {
    padding-inline: 4px;
    font-size: 13px;
  }

  .nav a[href="#contact"] {
    display: none;
  }

  .hero-text {
    max-width: 330px;
  }

  .console-panel {
    max-width: 348px;
  }

  .dev-console {
    padding: 18px;
  }

  .mini-dashboard {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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

@keyframes cursorBlink {
  50% {
    opacity: 0;
  }
}

@keyframes codeFlicker {
  0%,
  100% {
    opacity: 0.58;
    transform: translateY(0);
  }

  45% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

@keyframes barPulse {
  0%,
  100% {
    transform: scaleY(0.68);
    opacity: 0.72;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}
