:root {
  color-scheme: dark;
  --bg: #05070d;
  --ink: #f6f8ff;
  --muted: #a8b1c7;
  --line: rgba(255, 255, 255, 0.14);
  --panel: rgba(14, 19, 34, 0.68);
  --cyan: #43e8ff;
  --lime: #b7ff54;
  --rose: #ff4f87;
  --amber: #ffc857;
  --violet: #8b5cf6;
  --shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 12%, rgba(67, 232, 255, 0.18), transparent 26rem),
    radial-gradient(circle at 82% 2%, rgba(255, 79, 135, 0.16), transparent 28rem),
    linear-gradient(135deg, #05070d 0%, #0b1020 45%, #08090d 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  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: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 10;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  transform: translateX(-50%);
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

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

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #05070d;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
}

.site-nav {
  gap: 6px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  transition: 180ms ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

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

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 740px;
  margin-bottom: 24px;
  font-size: clamp(44px, 5.8vw, 76px);
  line-height: 1.08;
  font-weight: 900;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.08;
  font-weight: 900;
}

h3 {
  font-size: 24px;
}

.hero-text,
.contact-section p,
.work-card p,
.stack-item p {
  color: var(--muted);
  line-height: 1.85;
}

.hero-text {
  max-width: 620px;
  font-size: 18px;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
}

.button.primary {
  color: #061018;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 18px 60px rgba(67, 232, 255, 0.22);
}

.button.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.hero-panel {
  perspective: 1200px;
}

.orbital-card {
  position: relative;
  min-height: 520px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.03)),
    rgba(10, 14, 26, 0.78);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(4deg);
  transform-style: preserve-3d;
}

.orbital-card::before {
  content: "";
  position: absolute;
  inset: 80px 40px;
  border: 1px solid rgba(67, 232, 255, 0.22);
  border-radius: 50%;
  animation: spin 16s linear infinite;
}

.orbital-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: 42px;
  bottom: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, white, var(--cyan) 18%, #1769ff 48%, transparent 70%);
  filter: drop-shadow(0 0 45px rgba(67, 232, 255, 0.45));
}

.status-line {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 18px var(--lime);
}

.metric-grid {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric-grid div {
  min-height: 106px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 7, 13, 0.48);
}

.metric-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 32px;
}

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

.signal-map {
  position: absolute;
  inset: 116px 34px auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.signal-map span {
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  animation: breathe 3.4s ease-in-out infinite;
}

.signal-map span:nth-child(2n) {
  animation-delay: 0.6s;
}

.signal-map span:nth-child(3n) {
  animation-delay: 1.1s;
}

.marquee-section {
  overflow: hidden;
  border-block: 1px solid var(--line);
}

.marquee {
  display: flex;
  width: max-content;
  gap: 42px;
  padding: 22px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 900;
  animation: marquee 20s linear infinite;
}

.split-section,
.stack-section,
.journal-section,
.contact-section {
  padding: 118px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 44px;
  margin-bottom: 42px;
}

.section-heading.compact {
  display: block;
  max-width: 720px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 16px;
}

.work-card,
.stack-item,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.work-card {
  min-height: 340px;
  padding: 24px;
}

.work-card.featured {
  background:
    linear-gradient(135deg, rgba(67, 232, 255, 0.2), rgba(255, 79, 135, 0.12)),
    var(--panel);
}

.card-topline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 120px;
  color: var(--muted);
  font-size: 13px;
}

.work-card a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--lime);
  font-weight: 800;
}

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

.stack-item {
  padding: 24px;
}

.stack-item span {
  color: var(--amber);
  font-weight: 900;
}

.journal-list {
  border-top: 1px solid var(--line);
}

.journal-list a {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: 180ms ease;
}

.journal-list a:hover {
  padding-left: 16px;
  color: var(--cyan);
}

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

.journal-list strong {
  font-size: clamp(20px, 2.6vw, 34px);
}

.contact-section {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 36px;
  align-items: center;
}

.contact-card {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.contact-card a,
.contact-card span {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  color: var(--muted);
}

.footer-main,
.footer-icp {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-main {
  align-items: center;
  padding-bottom: 18px;
}

.footer-main a,
.footer-icp a {
  transition: color 180ms ease;
}

.footer-main a:hover,
.footer-icp a:hover {
  color: var(--cyan);
}

.footer-icp {
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
}

.footer-icp span,
.footer-icp a {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: rgba(168, 177, 199, 0.86);
}

.footer-icp span:not(:last-child)::after,
.footer-icp a:not(:last-child)::after {
  content: "";
  width: 1px;
  height: 12px;
  margin-left: 16px;
  background: var(--line);
}

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

@keyframes breathe {
  50% {
    border-color: rgba(67, 232, 255, 0.36);
    background: rgba(67, 232, 255, 0.11);
    transform: translateY(-4px);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    border-radius: 8px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero,
  .section-heading,
  .work-grid,
  .stack-grid,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 130px;
    gap: 24px;
  }

  .orbital-card {
    min-height: 420px;
    transform: none;
  }

  .work-card,
  .metric-grid div {
    min-height: auto;
  }

  .card-topline {
    margin-bottom: 72px;
  }

  .journal-list a {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .site-header {
    position: absolute;
  }

  .brand span:last-child {
    display: none;
  }

  .site-nav a {
    padding: 8px 9px;
    font-size: 13px;
  }

  h1 {
    font-size: 40px;
  }

  .hero-actions,
  .footer-main,
  .footer-icp {
    flex-direction: column;
  }

  .footer-main,
  .footer-icp {
    align-items: flex-start;
  }

  .footer-icp {
    gap: 8px;
  }

  .footer-icp span::after,
  .footer-icp a::after {
    display: none;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }

  .signal-map {
    display: none;
  }
}
