:root {
  color-scheme: dark;
  --bg: #020712;
  --bg-soft: #07111f;
  --text: #e8f1ff;
  --muted: #95a4b8;
  --muted-2: #6f7f95;
  --line: rgba(184, 207, 255, 0.14);
  --panel: rgba(11, 18, 32, 0.68);
  --panel-strong: rgba(16, 27, 45, 0.78);
  --cyan: #48d7f4;
  --amber: #ffbf58;
  --green: #7df2b0;
  --violet: #b8c7ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 18px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 18%, rgba(55, 203, 232, 0.22), transparent 34%),
    radial-gradient(circle at 84% 76%, rgba(255, 177, 62, 0.14), transparent 31%),
    radial-gradient(circle at 58% 48%, rgba(104, 122, 255, 0.10), transparent 30%),
    linear-gradient(135deg, #020712 0%, #061220 46%, #030712 100%);
  overflow-x: hidden;
}

a { color: inherit; }
button, input { font: inherit; }

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.20;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 86%);
}

.page-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.site-header {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(72, 215, 244, 0.76);
}

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

.nav-links a,
.inline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid rgba(215, 229, 255, 0.13);
  border-radius: 999px;
  color: #c7d5ea;
  background: rgba(9, 17, 31, 0.42);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.inline-pill:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(72, 215, 244, 0.44);
  background: rgba(72, 215, 244, 0.10);
}

.hero {
  width: min(var(--max), calc(100% - 40px));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: clamp(40px, 7vw, 88px);
  align-items: center;
  padding: 56px 0 88px;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #b9c7dd;
  background: rgba(9, 17, 31, 0.52);
  border: 1px solid rgba(184, 207, 255, 0.14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 760;
}

.kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(72, 215, 244, 0.88);
}

.hero-title {
  margin: 24px 0 18px;
  font-size: clamp(58px, 8.4vw, 116px);
  line-height: 0.88;
  letter-spacing: -0.075em;
  font-weight: 900;
}

.hero-title .outline {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(224, 237, 255, 0.82);
  text-stroke: 1.2px rgba(224, 237, 255, 0.82);
  opacity: 0.78;
  letter-spacing: -0.08em;
}

.hero-lead {
  margin: 0;
  max-width: 690px;
  color: #a8b7ce;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  --btn-border: rgba(222, 237, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--btn-border);
  text-decoration: none;
  color: #eaf4ff;
  background: rgba(11, 20, 36, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(72, 215, 244, 0.48);
  background: rgba(72, 215, 244, 0.11);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.07);
}

.btn.primary {
  background: linear-gradient(135deg, rgba(16, 144, 181, 0.72), rgba(19, 72, 114, 0.62));
  border-color: rgba(72, 215, 244, 0.44);
}

.micro-note {
  margin-top: 20px;
  max-width: 710px;
  color: var(--muted-2);
  font-size: 13px;
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  perspective: 1200px;
}

.surface-card {
  --accent: var(--cyan);
  --mx: 50%;
  --my: 50%;
  position: relative;
  min-height: 212px;
  padding: 26px 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 232, 255, 0.12);
  background:
    radial-gradient(circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 18%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(22, 33, 51, 0.74), rgba(11, 17, 30, 0.70));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 20px 60px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.055);
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
  opacity: 0;
  animation: cardIn 720ms cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: var(--delay, 0ms);
}

.surface-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.16), transparent 34%, transparent 68%, rgba(255,255,255,0.07));
  opacity: 0.18;
  pointer-events: none;
}

.surface-card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
  box-shadow: 0 -12px 32px color-mix(in srgb, var(--accent) 48%, transparent);
  transition: left 220ms ease, right 220ms ease, height 220ms ease;
}

.surface-card:hover {
  transform: translateY(-8px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: color-mix(in srgb, var(--accent) 44%, rgba(255,255,255,0.12));
  box-shadow: 0 30px 80px rgba(0,0,0,0.34), 0 0 42px color-mix(in srgb, var(--accent) 16%, transparent), inset 0 1px 0 rgba(255,255,255,0.08);
}

.surface-card:hover::after {
  left: 0;
  right: 0;
  height: 5px;
}

.surface-card.amber { --accent: var(--amber); }
.surface-card.green { --accent: var(--green); }
.surface-card.violet { --accent: var(--violet); }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.card-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.card-arrow {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #d9e7f8;
  background: rgba(255,255,255,0.08);
  transition: transform 180ms ease, background 180ms ease;
}

.surface-card:hover .card-arrow {
  transform: translateX(3px);
  background: color-mix(in srgb, var(--accent) 20%, rgba(255,255,255,0.08));
}

.card-title {
  margin: 28px 0 9px;
  font-size: clamp(27px, 3.2vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.052em;
  font-weight: 880;
}

.card-text {
  margin: 0;
  min-height: 82px;
  color: #a8b4c6;
  font-size: 15px;
  line-height: 1.72;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8f9cb0;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  font-size: 12px;
  font-weight: 760;
}

.card-foot::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(36px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.splash {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(72, 215, 244, 0.10), transparent 26%),
    #020712;
  transition: opacity 620ms ease, visibility 620ms ease;
}

.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.signature-wrap {
  width: min(640px, 86vw);
  filter: drop-shadow(0 0 22px rgba(72, 215, 244, 0.42));
}

.signature-mark {
  width: 100%;
  overflow: visible;
}

.sig-path {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawStroke 950ms cubic-bezier(.2,.65,.15,1) forwards;
  animation-delay: var(--delay, 0ms);
}

.sig-thin { stroke-width: 6; opacity: 0.82; }
.signature-hub {
  opacity: 0;
  animation: fadeHub 700ms ease forwards;
  animation-delay: 1900ms;
}

@keyframes drawStroke { to { stroke-dashoffset: 0; } }
@keyframes fadeHub {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.project-main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 90px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(32px, 7vw, 80px);
  align-items: start;
  min-height: 52vh;
  padding: 34px 0 56px;
}

.project-title {
  margin: 22px 0 18px;
  font-size: clamp(48px, 7.6vw, 94px);
  line-height: 0.95;
  letter-spacing: -0.07em;
  font-weight: 900;
}

.project-lead {
  margin: 0;
  max-width: 780px;
  color: #a9b8ce;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.85;
}

.project-panel {
  border: 1px solid rgba(217, 232, 255, 0.13);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(17, 28, 48, 0.78), rgba(9, 15, 28, 0.78));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.06);
  padding: 26px;
  overflow: hidden;
  position: relative;
}

.project-panel::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent, var(--cyan)) 28%, transparent), transparent 68%);
  opacity: 0.55;
}

.stat-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.stat-list li {
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(217, 232, 255, 0.10);
  background: rgba(5, 11, 21, 0.38);
}

.stat-label {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.stat-value {
  display: block;
  margin-top: 6px;
  color: #e9f4ff;
  line-height: 1.6;
}

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

.info-box {
  border: 1px solid rgba(217, 232, 255, 0.12);
  border-radius: 20px;
  background: rgba(11, 18, 32, 0.56);
  padding: 22px;
}

.info-box h2,
.info-box h3 {
  margin: 0 0 10px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.info-box p {
  margin: 0;
  color: #a5b3c8;
  font-size: 14px;
  line-height: 1.75;
}

.footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0 34px;
  color: #78869a;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(217,232,255,0.09);
  font-size: 13px;
}

@media (max-width: 980px) {
  .hero,
  .project-hero {
    grid-template-columns: 1fr;
  }
  .hero {
    align-items: start;
    padding-top: 42px;
  }
  .card-grid {
    max-width: 720px;
  }
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 28px, var(--max));
    align-items: flex-start;
    flex-direction: column;
  }
  .nav-links { justify-content: flex-start; }
  .hero,
  .project-main,
  .footer {
    width: min(100% - 28px, var(--max));
  }
  .hero { min-height: auto; padding: 40px 0 60px; }
  .hero-title { font-size: clamp(52px, 17vw, 84px); }
  .card-grid { grid-template-columns: 1fr; }
  .surface-card { min-height: 190px; }
  .card-text { min-height: auto; }
  .project-title { font-size: clamp(44px, 15vw, 76px); }
}

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