:root {
  color-scheme: dark;
  --bg: #101411;
  --panel: #f4f0df;
  --panel-2: #e7dfc1;
  --ink: #101411;
  --muted: #5e665d;
  --line: #242d26;
  --grid: rgba(244, 240, 223, 0.08);
  --green: #7cff9b;
  --cyan: #68e8ff;
  --amber: #ffd166;
  --red: #ff6b6b;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 72% 18%, rgba(104, 232, 255, 0.14), transparent 28%),
    radial-gradient(circle at 18% 70%, rgba(124, 255, 155, 0.1), transparent 28%),
    var(--bg);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
  color: var(--panel);
  font-family:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  color: inherit;
  font: inherit;
}

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

.brand,
.nav,
.hero-actions,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  color: var(--panel);
  font-weight: 850;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--panel);
  background: var(--green);
  box-shadow: 5px 5px 0 #000;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.nav {
  gap: 4px;
  border: 2px solid rgba(244, 240, 223, 0.2);
  border-radius: var(--radius);
  background: rgba(16, 20, 17, 0.78);
  padding: 5px;
}

.nav a {
  border-radius: 6px;
  color: var(--panel-2);
  padding: 8px 11px;
}

.nav a:hover {
  background: rgba(244, 240, 223, 0.12);
  color: #fff;
}

main,
.site-footer {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  gap: 38px;
  align-items: center;
  min-height: calc(100vh - 84px);
  padding: 38px 0 70px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 16px;
  color: #fff;
  font-size: clamp(64px, 13vw, 162px);
  line-height: 0.84;
  text-shadow: 8px 8px 0 #000;
}

.hero-line {
  max-width: 680px;
  margin-bottom: 14px;
  color: var(--panel);
  font-size: clamp(25px, 3.5vw, 45px);
  font-weight: 850;
  line-height: 1.18;
}

.hero-note {
  max-width: 620px;
  margin-bottom: 26px;
  color: var(--panel-2);
  font-size: 18px;
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  background: transparent;
  padding: 0 17px;
  box-shadow: 5px 5px 0 #000;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #000;
}

.button.primary {
  background: var(--panel);
  color: var(--ink);
  font-weight: 850;
}

.button.secondary {
  background: rgba(244, 240, 223, 0.08);
  color: var(--panel);
}

.robot-stage {
  position: relative;
  display: grid;
  min-height: 560px;
  align-content: center;
  justify-items: center;
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(16, 20, 17, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(16, 20, 17, 0.04) 1px, transparent 1px),
    var(--panel);
  background-size: 18px 18px;
  box-shadow: 10px 10px 0 #000;
  overflow: hidden;
}

.stage-toolbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 2px solid var(--ink);
  background: var(--panel-2);
  color: var(--ink);
  padding: 10px 12px;
}

.stage-toolbar span {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  background: var(--red);
}

.stage-toolbar span:nth-child(2) {
  background: var(--amber);
}

.stage-toolbar span:nth-child(3) {
  background: var(--green);
}

.stage-toolbar strong {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.pixel-robot {
  position: relative;
  width: 230px;
  height: 300px;
  margin-top: 34px;
  border: 0;
  background: transparent;
  cursor: pointer;
  image-rendering: pixelated;
  transition: transform 0.18s ease;
}

.pixel-robot:hover,
.pixel-robot.is-awake {
  transform: translateY(-5px);
}

.pixel-robot span {
  position: absolute;
  display: block;
}

.antenna {
  left: 106px;
  top: 0;
  width: 18px;
  height: 42px;
  background: var(--ink);
}

.antenna::after {
  position: absolute;
  top: -18px;
  left: -8px;
  width: 34px;
  height: 22px;
  background: var(--green);
  box-shadow: 4px 4px 0 #000;
  content: "";
}

.robot-head {
  left: 34px;
  top: 42px;
  width: 162px;
  height: 126px;
  border: 8px solid var(--ink);
  background: #f8f4e6;
  box-shadow: 8px 8px 0 #000;
}

.robot-head::before,
.robot-head::after {
  position: absolute;
  top: 48px;
  width: 22px;
  height: 38px;
  background: var(--ink);
  content: "";
}

.robot-head::before {
  left: -28px;
}

.robot-head::after {
  right: -28px;
}

.eye {
  top: 34px;
  width: 28px;
  height: 28px;
  background: var(--ink);
  transform: translate(var(--eye-x, 0), var(--eye-y, 0));
}

.eye-left {
  left: 35px;
}

.eye-right {
  right: 35px;
}

.mouth {
  left: 52px;
  bottom: 28px;
  width: 58px;
  height: 12px;
  background: var(--cyan);
  box-shadow: inset 0 0 0 4px var(--ink);
}

.robot-body {
  left: 52px;
  top: 180px;
  width: 126px;
  height: 86px;
  border: 8px solid var(--ink);
  background: var(--green);
  box-shadow: 8px 8px 0 #000;
}

.core {
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  background: var(--ink);
}

.meter {
  right: 18px;
  top: 20px;
  display: flex !important;
  gap: 5px;
}

.meter i {
  display: block;
  width: 12px;
  height: 34px;
  background: var(--ink);
  animation: meter 1.1s steps(2, end) infinite;
}

.meter i:nth-child(2) {
  animation-delay: 0.16s;
}

.meter i:nth-child(3) {
  animation-delay: 0.32s;
}

.arm {
  top: 196px;
  width: 38px;
  height: 18px;
  background: var(--ink);
}

.arm-left {
  left: 8px;
  transform-origin: right center;
}

.arm-right {
  right: 8px;
  transform-origin: left center;
}

.pixel-robot.is-awake .arm-left {
  animation: wave-left 0.8s steps(2, end) infinite;
}

.pixel-robot.is-awake .arm-right {
  animation: wave-right 0.8s steps(2, end) infinite;
}

.leg {
  bottom: 0;
  width: 34px;
  height: 34px;
  background: var(--ink);
}

.leg-left {
  left: 70px;
}

.leg-right {
  right: 70px;
}

.terminal {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(16, 20, 17, 0.92);
  color: var(--panel);
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal p {
  margin: 0;
  line-height: 1.5;
}

.terminal p + p {
  color: var(--green);
}

.terminal span {
  color: var(--cyan);
}

.work-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 28px 0 76px;
}

.work-strip article {
  min-height: 230px;
  border: 2px solid rgba(244, 240, 223, 0.24);
  border-radius: var(--radius);
  background: rgba(244, 240, 223, 0.08);
  padding: 18px;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.work-strip article:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  background: rgba(124, 255, 155, 0.1);
}

.work-strip span {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-bottom: 46px;
  place-items: center;
  border: 2px solid var(--panel);
  background: var(--ink);
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.work-strip h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.work-strip p,
.lab-grid p,
.contact-band p {
  color: var(--panel-2);
  line-height: 1.75;
}

.lab-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1fr);
  gap: 28px;
  align-items: start;
  border-top: 2px solid rgba(244, 240, 223, 0.2);
  padding: 72px 0;
}

.lab-section h2,
.contact-band h2 {
  margin-bottom: 0;
  color: #fff;
  font-size: clamp(32px, 5vw, 68px);
  line-height: 1.04;
}

.lab-grid {
  display: grid;
  gap: 10px;
}

.lab-grid div {
  border: 2px solid rgba(244, 240, 223, 0.24);
  border-radius: var(--radius);
  background: rgba(16, 20, 17, 0.58);
  padding: 16px;
}

.lab-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lab-grid p {
  margin-bottom: 0;
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 72px;
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  background: rgba(244, 240, 223, 0.08);
  padding: 26px;
  box-shadow: 8px 8px 0 #000;
}

.contact-band > div {
  min-width: 0;
}

.contact-band p {
  margin: 12px 0 0;
}

.contact-band h2 {
  overflow-wrap: anywhere;
}

.site-footer {
  justify-content: space-between;
  border-top: 2px solid rgba(244, 240, 223, 0.18);
  color: var(--panel-2);
  padding: 24px 0 34px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 40;
  border: 2px solid var(--panel);
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: 5px 5px 0 #000;
  color: var(--panel);
  padding: 10px 14px;
  opacity: 0;
  transform: translate(-50%, 14px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes meter {
  0%,
  100% {
    height: 16px;
  }

  50% {
    height: 34px;
  }
}

@keyframes wave-left {
  50% {
    transform: rotate(18deg);
  }
}

@keyframes wave-right {
  50% {
    transform: rotate(-18deg);
  }
}

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

  .hero {
    min-height: auto;
  }

  .robot-stage {
    min-height: 520px;
  }

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

@media (max-width: 680px) {
  .site-header {
    position: static;
    display: grid;
    gap: 12px;
  }

  .nav {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .nav a {
    flex: 0 0 auto;
  }

  .hero {
    padding: 24px 0 48px;
  }

  h1 {
    font-size: 72px;
    text-shadow: 5px 5px 0 #000;
  }

  .hero-line {
    font-size: 26px;
  }

  .hero-note {
    font-size: 16px;
  }

  .robot-stage {
    min-height: 500px;
  }

  .pixel-robot {
    transform: scale(0.82);
  }

  .pixel-robot:hover,
  .pixel-robot.is-awake {
    transform: scale(0.82) translateY(-5px);
  }

  .work-strip {
    grid-template-columns: 1fr;
    padding-bottom: 58px;
  }

  .work-strip article {
    min-height: 180px;
  }

  .work-strip span {
    margin-bottom: 24px;
  }

  .lab-section {
    padding: 58px 0;
  }

  .contact-band,
  .site-footer {
    display: grid;
  }

  .contact-band .button {
    width: 100%;
  }
}
