:root {
  color-scheme: dark;
  --bg: #080b18;
  --surface: #12172a;
  --surface-raised: #181e35;
  --text: #f6f4ff;
  --muted: #a5aac2;
  --violet: #8475ff;
  --violet-bright: #a89cff;
  --cyan: #4de0d0;
  --line: rgba(255, 255, 255, 0.12);
  --shell: min(1180px, calc(100vw - 64px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 9%, rgba(100, 76, 227, 0.2), transparent 32rem),
    radial-gradient(circle at 4% 60%, rgba(24, 122, 135, 0.1), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

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

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

a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
footer,
.section-shell,
.hero {
  width: var(--shell);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 24, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.brand i {
  margin-left: 5px;
  color: var(--muted);
  font-size: 0.84em;
  font-style: normal;
  font-weight: 520;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(132, 117, 255, 0.6);
  border-radius: 50%;
  background: rgba(132, 117, 255, 0.12);
  color: white;
  font-size: 14px;
}

nav {
  display: flex;
  gap: 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

nav a {
  transition: color 180ms ease;
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  min-height: min(760px, calc(100vh - 76px));
  padding-block: 80px 100px;
}

.eyebrow,
.section-index,
.card-type {
  margin: 0 0 18px;
  color: var(--violet-bright);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.25rem, 7vw, 6.7rem);
  font-weight: 730;
  letter-spacing: -0.07em;
  line-height: 0.98;
}

.hero h1 em {
  color: transparent;
  background: linear-gradient(115deg, #fff 12%, var(--violet-bright) 52%, var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}

.hero-intro {
  max-width: 580px;
  margin: 32px 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(132, 117, 255, 0.55);
  border-radius: 999px;
  background: rgba(132, 117, 255, 0.1);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.hero-link:hover {
  border-color: var(--violet);
  background: rgba(132, 117, 255, 0.2);
  transform: translateY(-2px);
}

.orbit {
  position: relative;
  width: min(38vw, 450px);
  aspect-ratio: 1;
  justify-self: end;
}

.orbit::before {
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 117, 255, 0.19), transparent 64%);
  filter: blur(3px);
  content: "";
}

.orbit-core {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 88px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(132, 117, 255, 0.95), rgba(59, 44, 126, 0.86));
  box-shadow: 0 0 75px rgba(132, 117, 255, 0.42);
  font-size: 2.1rem;
  font-weight: 760;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.orbit-ring {
  position: absolute;
  inset: 13%;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
}

.orbit-ring-one {
  transform: rotateX(64deg) rotateZ(18deg);
  animation: orbit-one 18s linear infinite;
}

.orbit-ring-two {
  inset: 24%;
  border-color: rgba(77, 224, 208, 0.2);
  transform: rotateY(58deg) rotateZ(-30deg);
  animation: orbit-two 14s linear infinite reverse;
}

.orbit-dot {
  position: absolute;
  width: 13px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 20px currentColor;
}

.orbit-dot-one {
  top: 16%;
  right: 22%;
  background: var(--cyan);
  color: var(--cyan);
}

.orbit-dot-two {
  bottom: 21%;
  left: 11%;
  width: 8px;
  background: var(--violet-bright);
  color: var(--violet-bright);
}

.orbit-label {
  position: absolute;
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.orbit-label-one { top: 22%; left: 4%; }
.orbit-label-two { right: 0; bottom: 25%; }

@keyframes orbit-one {
  to { transform: rotateX(64deg) rotateZ(378deg); }
}

@keyframes orbit-two {
  to { transform: rotateY(58deg) rotateZ(330deg); }
}

.section-shell {
  padding-block: 110px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px 48px;
  margin-bottom: 54px;
}

.section-heading .section-index {
  grid-row: span 2;
}

.section-heading h2,
.about h2 {
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 4.25rem);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.section-heading > p:last-child {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 390px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  transition: border-color 200ms ease, transform 200ms ease, background 200ms ease;
}

a.project-card:hover {
  border-color: rgba(132, 117, 255, 0.65);
  background: var(--surface-raised);
  transform: translateY(-4px);
}

.project-card-featured {
  grid-column: span 7;
  min-height: 490px;
  background:
    radial-gradient(circle at 78% 40%, rgba(132, 117, 255, 0.28), transparent 36%),
    linear-gradient(145deg, #272252, #12162b 65%);
}

.project-card-learn { grid-column: span 5; background: linear-gradient(150deg, #13313c, #111829 62%); }
.project-card-skills { grid-column: span 5; }
.project-card-dig { grid-column: span 7; background: linear-gradient(150deg, #20233b, #101524 65%); }

.card-topline {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
}

.status-active { border-color: rgba(132, 117, 255, 0.5); color: #c4bcff; }
.status-ready { border-color: rgba(77, 224, 208, 0.38); color: #81e7dd; }
.status-open { border-color: rgba(145, 200, 255, 0.4); color: #a8d1ff; }
.status-building { border-color: rgba(255, 198, 103, 0.38); color: #ffd08a; }

.card-number {
  color: rgba(255, 255, 255, 0.46);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

.card-symbol {
  position: absolute;
  inset: 72px 24px auto auto;
}

.symbol-comic {
  display: flex;
  gap: 10px;
  width: 230px;
  transform: rotate(-5deg);
}

.symbol-comic span {
  width: 33.333%;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.symbol-comic span:nth-child(2) { transform: translateY(-14px); background: rgba(132, 117, 255, 0.16); }

.symbol-learn {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--cyan);
  font-size: 2rem;
}

.symbol-learn span {
  display: grid;
  width: 66px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(77, 224, 208, 0.32);
  border-radius: 50%;
  background: rgba(77, 224, 208, 0.08);
}

.symbol-skills {
  display: grid;
  width: 132px;
  height: 110px;
  grid-template-columns: repeat(3, 1fr);
  place-items: center;
}

.symbol-skills i {
  width: 13px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 18px rgba(132, 117, 255, 0.7);
}

.symbol-skills i:nth-child(2) { background: var(--cyan); grid-column: 2; grid-row: 1 / 3; }
.symbol-skills i:nth-child(4) { grid-column: 3; }

.symbol-dig {
  width: 180px;
  height: 130px;
}

.symbol-dig span {
  position: absolute;
  right: 50px;
  width: 5px;
  height: 96px;
  border-radius: 5px;
  background: #d8c1a5;
  transform: rotate(35deg);
}

.symbol-dig i {
  position: absolute;
  right: 5px;
  bottom: 6px;
  width: 76px;
  height: 38px;
  border-radius: 0 0 76px 76px;
  background: linear-gradient(145deg, #b7b9d1, #676c8a);
  transform: rotate(35deg);
}

.card-copy {
  position: relative;
  z-index: 2;
  max-width: 470px;
}

.card-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.card-copy h3 small { color: var(--muted); font-size: 0.5em; font-weight: 500; }
.card-copy > p:not(.card-type) { margin: 0 0 18px; color: var(--muted); }
.card-meta { color: rgba(255, 255, 255, 0.46); font-size: 0.76rem; }

.section-heading.compact {
  grid-template-columns: 1fr 2fr;
}

.growing-list {
  margin-left: calc(33.333% + 16px);
}

.growing-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) 2fr auto;
  gap: 24px;
  align-items: center;
  padding-block: 24px;
  border-top: 1px solid var(--line);
}

.growing-list > div:last-child { border-bottom: 1px solid var(--line); }
.growing-list span { font-size: 1.3rem; font-weight: 650; }
.growing-list p { margin: 0; color: var(--muted); }
.growing-list i { color: rgba(255, 255, 255, 0.38); font-size: 0.64rem; font-style: normal; letter-spacing: 0.14em; }

.about {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: center;
  min-height: 540px;
}

.about-orbit {
  position: relative;
  width: 190px;
  aspect-ratio: 1;
  border: 1px solid rgba(132, 117, 255, 0.26);
  border-radius: 50%;
}

.about-orbit::before,
.about-orbit::after {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(77, 224, 208, 0.2);
  border-radius: 50%;
  content: "";
}

.about-orbit::after { inset: 38%; background: var(--violet); box-shadow: 0 0 45px rgba(132, 117, 255, 0.55); }
.about-orbit span { position: absolute; top: 12%; right: 12%; width: 8px; aspect-ratio: 1; border-radius: 50%; background: var(--cyan); }
.about-copy { max-width: 680px; }
.about-lead { margin: 26px 0 12px; color: var(--text) !important; font-size: 1.3rem; }
.about-copy > p:last-child { color: var(--muted); }

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 160px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

footer p { margin: 0; text-align: center; }
footer > a:last-child { justify-self: end; }
.footer-brand { color: var(--text); }

.error-page {
  display: grid;
  width: min(680px, calc(100% - 32px));
  min-height: 100svh;
  margin-inline: auto;
  place-content: center;
}

.error-page h1 {
  margin: 0;
  font-size: clamp(3rem, 9vw, 6rem);
  letter-spacing: -0.065em;
  line-height: 1;
}

.error-page > p:not(.eyebrow) {
  margin: 26px 0;
  color: var(--muted);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.65, 0.25, 1);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  :root { --shell: min(100% - 40px, 720px); }

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

  .orbit {
    position: absolute;
    top: 40px;
    right: -150px;
    z-index: -1;
    width: 390px;
    opacity: 0.56;
  }

  .project-card-featured,
  .project-card-learn,
  .project-card-skills,
  .project-card-dig { grid-column: span 6; min-height: 430px; }

  .section-heading,
  .section-heading.compact,
  .about { grid-template-columns: 1fr; }
  .section-heading .section-index { grid-row: auto; }
  .growing-list { margin-left: 0; }
  .about-orbit { position: absolute; right: 0; opacity: 0.42; }
}

@media (max-width: 640px) {
  :root { --shell: calc(100% - 32px); }

  .site-header { min-height: 66px; }
  nav { gap: 18px; font-size: 0.82rem; }
  .brand i { display: none; }
  .hero { min-height: calc(100svh - 66px); padding-block: 64px; }
  .hero h1 { font-size: clamp(3rem, 15vw, 4.4rem); }
  .hero-intro { margin-block: 26px; }
  .orbit { top: 25%; right: -210px; opacity: 0.42; }
  .section-shell { padding-block: 76px; }
  .section-heading { margin-bottom: 34px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-card-featured,
  .project-card-learn,
  .project-card-skills,
  .project-card-dig { grid-column: auto; min-height: 430px; }
  .project-card { padding: 22px; border-radius: 20px; }
  .symbol-comic { right: -30px; opacity: 0.72; }
  .symbol-learn { right: 6px; transform: scale(0.78); }
  .growing-list > div { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .growing-list p { grid-column: 1 / -1; }
  .about { min-height: 500px; }
  footer { grid-template-columns: 1fr auto; gap: 20px; padding-block: 32px; }
  footer p { grid-column: 1 / -1; grid-row: 2; text-align: left; }
}

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