:root {
  color-scheme: dark;
  --bg: #050507;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --muted: rgba(245, 245, 247, 0.68);
  --soft: rgba(245, 245, 247, 0.42);
  --line: rgba(255, 255, 255, 0.16);
  --blue: #55a7ff;
  --green: #72dfb3;
  --pink: #ff6fae;
  --gold: #f7ca68;
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(85, 167, 255, 0.22), transparent 26rem),
    radial-gradient(circle at 78% 8%, rgba(255, 111, 174, 0.2), transparent 28rem),
    radial-gradient(circle at 50% 58%, rgba(114, 223, 179, 0.14), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

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

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

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

button {
  font: inherit;
}

#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cursor-light {
  position: fixed;
  left: 0;
  top: 0;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 62%);
  opacity: 0.75;
  transform: translate3d(-50%, -50%, 0);
}

.site-header {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100% - 32px), var(--max));
  height: 58px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 14, 18, 0.62);
  backdrop-filter: blur(26px) saturate(140%);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
  transform: translateX(-50%);
}

.brand {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
}

.nav-links a,
.header-action {
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

.header-action {
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
  font-size: 14px;
}

.header-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.section {
  width: min(calc(100% - 36px), var(--max));
  margin: 0 auto;
  padding: 112px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.82fr);
  gap: 48px;
  align-items: center;
  min-height: 100vh;
  padding-top: 128px;
  padding-bottom: 70px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(76px, 14vw, 164px);
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.18;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 620px;
  color: rgba(245, 245, 247, 0.86);
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.28;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  background: linear-gradient(135deg, #f8f8ff, #b8d8ff);
  color: #050507;
}

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

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-stage {
  position: relative;
  min-height: 620px;
  transform-style: preserve-3d;
  perspective: 1200px;
}

.hero-lab {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(85, 167, 255, 0.22), transparent 18rem),
    radial-gradient(circle at 38% 34%, rgba(255, 111, 174, 0.2), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035));
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

.hero-lab::before {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  animation: rotateSlow 18s linear infinite;
}

.hero-lab::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.09) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 255, 255, 0.07) 50%, transparent 51%);
  background-size: 82px 82px;
  mask-image: radial-gradient(circle, black 0%, transparent 68%);
  opacity: 0.85;
}

.lab-core {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(68vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.9), rgba(146, 199, 255, 0.26) 22%, transparent 48%),
    conic-gradient(from 160deg, rgba(85, 167, 255, 0.2), rgba(255, 111, 174, 0.46), rgba(114, 223, 179, 0.4), rgba(85, 167, 255, 0.2));
  filter: saturate(1.2);
  animation: pulseGlow 5s ease-in-out infinite;
}

.lab-core span {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  animation: rotateSlow 11s linear infinite;
}

.lab-core span:nth-child(2) {
  inset: 20%;
  border-color: rgba(114, 223, 179, 0.36);
  animation-duration: 8s;
  animation-direction: reverse;
}

.lab-core span:nth-child(3) {
  inset: 32%;
  border-color: rgba(255, 111, 174, 0.34);
  animation-duration: 6.5s;
}

.lab-core i {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, #d7edff 26%, #55a7ff 58%, #111827 100%);
  box-shadow: 0 0 70px rgba(85, 167, 255, 0.55), inset -18px -20px 44px rgba(0, 0, 0, 0.22);
}

.lab-rings {
  position: absolute;
  z-index: 1;
  width: min(76vw, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent, rgba(85, 167, 255, 0.9), transparent 22%, rgba(114, 223, 179, 0.85), transparent 48%, rgba(255, 111, 174, 0.84), transparent 70%);
  mask-image: radial-gradient(circle, transparent 59%, black 60%, black 62%, transparent 63%);
  animation: rotateSlow 9s linear infinite reverse;
}

.device-orbit {
  position: absolute;
  inset: 0 8% 0 6%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

.device-orbit::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.24) 38%, transparent 48%);
  animation: shine 5s ease-in-out infinite;
  transform: translateX(-120%);
}

.device-orbit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.92;
  transform: scale(1.04);
}

.floating-card {
  position: absolute;
  display: grid;
  gap: 7px;
  width: 210px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(12, 12, 16, 0.68);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  animation: float 5.5s ease-in-out infinite;
}

.floating-card strong {
  font-size: 22px;
}

.floating-card span {
  color: var(--muted);
  font-size: 13px;
}

.card-a {
  left: -6px;
  bottom: 84px;
}

.card-b {
  right: -8px;
  top: 92px;
  animation-delay: -2.6s;
}

.hero-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hero-metrics div,
.intro-panel,
.work-card,
.agent-console,
.timeline-list,
.contact-inner {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(24px) saturate(145%);
}

.hero-metrics div {
  padding: 18px;
}

.hero-metrics strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
}

.hero-metrics span,
.intro-panel p,
.work-info p,
.ai-copy p,
.timeline-item p,
.contact-inner p {
  color: var(--muted);
  line-height: 1.75;
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin-bottom: 36px;
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.intro-panel {
  min-height: 260px;
  padding: 24px;
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease;
}

.intro-panel:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: var(--panel-strong);
  transform: translateY(-6px);
}

.panel-index {
  display: inline-block;
  margin-bottom: 42px;
  color: var(--soft);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  cursor: pointer;
}

.filter.active,
.filter:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

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

.work-card {
  overflow: hidden;
  min-height: 100%;
  transition: transform 220ms ease, opacity 220ms ease, border-color 220ms ease;
}

.work-card.is-hidden {
  display: none;
}

.work-card:hover {
  border-color: rgba(255, 255, 255, 0.32);
}

.work-card.feature {
  grid-column: span 2;
}

.work-preview {
  display: block;
  width: 100%;
  height: 360px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #111;
  cursor: zoom-in;
}

.work-card.feature .work-preview {
  height: 520px;
}

.work-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 700ms ease, filter 350ms ease;
}

.work-card:hover .work-preview img {
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.055);
}

.work-info {
  padding: 22px;
}

.work-info span {
  display: block;
  margin-bottom: 12px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.local-visual {
  display: grid;
  align-content: end;
  gap: 10px;
  height: 360px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(85, 167, 255, 0.78), transparent 46%),
    linear-gradient(315deg, rgba(255, 111, 174, 0.68), transparent 44%),
    linear-gradient(180deg, rgba(114, 223, 179, 0.48), rgba(5, 5, 7, 0.82)),
    #101014;
}

.local-visual span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.local-visual strong {
  max-width: 260px;
  font-size: 36px;
  line-height: 1.03;
}

.ai-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 34px;
  align-items: center;
}

.agent-console {
  position: relative;
  overflow: hidden;
  padding: 18px;
  box-shadow: 0 35px 110px rgba(85, 167, 255, 0.13);
}

.agent-console::before {
  position: absolute;
  inset: -1px;
  content: "";
  background: linear-gradient(135deg, rgba(85, 167, 255, 0.24), transparent 42%, rgba(114, 223, 179, 0.22));
  opacity: 0.9;
  pointer-events: none;
}

.console-top,
.console-lines {
  position: relative;
}

.console-top {
  display: flex;
  gap: 8px;
  padding-bottom: 18px;
}

.console-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--pink);
}

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

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

.console-lines {
  display: grid;
  gap: 12px;
}

.console-lines p {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.console-lines span {
  color: var(--green);
  font-weight: 900;
}

.timeline-list {
  overflow: hidden;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-item time {
  color: var(--green);
  font-weight: 900;
}

.timeline-item p {
  margin: 0;
}

.contact {
  padding-bottom: 124px;
}

.contact-inner {
  padding: clamp(28px, 6vw, 70px);
  background:
    linear-gradient(135deg, rgba(85, 167, 255, 0.18), transparent 40%),
    linear-gradient(315deg, rgba(255, 111, 174, 0.18), transparent 42%),
    var(--panel);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 24px;
}

.modal.is-open {
  display: grid;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(18px);
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(1120px, 100%);
  max-height: min(88vh, 900px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0b0f;
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

#modal-image {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #050507;
}

.modal-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.modal-caption strong {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shine {
  0%,
  42% {
    transform: translateX(-125%);
  }
  70%,
  100% {
    transform: translateX(125%);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes rotateSlow {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-links {
    display: none;
  }

  .hero,
  .ai-section {
    grid-template-columns: 1fr;
  }

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

  .hero-metrics,
  .intro-grid,
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-card.feature {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .section {
    width: min(calc(100% - 24px), var(--max));
    padding: 76px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 116px;
  }

  h1 {
    font-size: clamp(66px, 24vw, 108px);
  }

  .hero-subtitle {
    font-size: 22px;
  }

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

  .device-orbit {
    inset: 0;
  }

  .floating-card {
    width: 176px;
  }

  .card-a {
    left: 10px;
    bottom: 24px;
  }

  .card-b {
    right: 10px;
    top: 24px;
  }

  .hero-metrics,
  .intro-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card.feature {
    grid-column: auto;
  }

  .work-preview,
  .work-card.feature .work-preview,
  .local-visual {
    height: 420px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .modal-caption {
    display: grid;
  }
}

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