:root {
  --bg-void: #090a17;
  --bg-deep: #161827;
  --bg-surface: #1f2140;
  --purple-core: #7244d3;
  --purple-soft: #a678ff;
  --pink-accent: #f25bd3;
  --line-soft: #34385d;
  --text-main: #f7f8ff;
  --text-muted: #bdc0dc;
  --glow: rgba(166, 120, 255, 0.34);
  --radius: 18px;
  --parallax-x: 0px;
  --parallax-y: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", "Avenir Next", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(1000px 600px at 25% 10%, rgba(114, 68, 211, 0.24), transparent 70%),
    radial-gradient(1000px 700px at 80% 80%, rgba(242, 91, 211, 0.15), transparent 70%),
    linear-gradient(170deg, var(--bg-void), var(--bg-deep));
  overflow-x: hidden;
}

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

.atmosphere {
  position: fixed;
  inset: -8%;
  z-index: -1;
  pointer-events: none;
  transform: translate(var(--parallax-x), var(--parallax-y));
  transition: transform 0.2s linear;
  background:
    radial-gradient(300px 300px at 15% 20%, rgba(114, 68, 211, 0.24), transparent 72%),
    radial-gradient(450px 450px at 75% 30%, rgba(242, 91, 211, 0.14), transparent 75%),
    radial-gradient(280px 280px at 85% 78%, rgba(166, 120, 255, 0.18), transparent 68%);
}

.layout {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 2rem;
  padding: 4rem 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.hero,
.socials {
  border: 1px solid rgba(247, 248, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(31, 33, 64, 0.84), rgba(19, 21, 37, 0.82));
  box-shadow:
    0 20px 50px rgba(7, 8, 20, 0.56),
    0 0 0 1px rgba(166, 120, 255, 0.12) inset;
  backdrop-filter: blur(8px);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2.5rem clamp(1.25rem, 4vw, 3rem);
}

.hero > * {
  position: relative;
  z-index: 2;
}

.panda-frame {
  position: absolute;
  inset: -14% -8% auto auto;
  width: 420px;
  height: 420px;
  z-index: 1;
  transform: translate(24%, -26%);
  pointer-events: none;
  opacity: 0.86;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid transparent;
}

.ring-1 {
  inset: 14%;
  border-color: rgba(242, 91, 211, 0.58);
  box-shadow: 0 0 32px rgba(242, 91, 211, 0.2);
}

.ring-2 {
  inset: 2%;
  border-color: rgba(166, 120, 255, 0.48);
  border-style: solid;
}

.ring-3 {
  inset: 26%;
  border-top-color: rgba(247, 248, 255, 0.66);
  border-right-color: rgba(247, 248, 255, 0.34);
  border-bottom-color: rgba(242, 91, 211, 0.56);
  border-left-color: rgba(166, 120, 255, 0.36);
}

.facet {
  position: absolute;
  border: 1px solid rgba(247, 248, 255, 0.17);
  background: linear-gradient(165deg, rgba(166, 120, 255, 0.05), rgba(242, 91, 211, 0.08));
  clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 20% 100%, 0% 35%);
}

.facet-1 {
  width: 130px;
  height: 150px;
  right: 56px;
  top: 84px;
  transform: rotate(14deg);
}

.facet-2 {
  width: 90px;
  height: 104px;
  right: 220px;
  top: 186px;
  transform: rotate(-18deg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 84% 18%, rgba(242, 91, 211, 0.2), transparent 38%),
    radial-gradient(circle at 78% 24%, rgba(166, 120, 255, 0.2), transparent 45%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 120px;
  right: -34px;
  bottom: -44px;
  z-index: 1;
  border-radius: 999px;
  border: 2px solid rgba(242, 91, 211, 0.5);
  border-left-color: transparent;
  border-right-color: transparent;
  transform: rotate(-8deg);
  box-shadow: 0 0 28px rgba(242, 91, 211, 0.2);
}

.eyebrow {
  margin: 0;
  color: var(--purple-soft);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 600;
}

h1 {
  margin: 0.6rem 0 0;
  font-size: clamp(2rem, 5.5vw, 3.35rem);
  line-height: 1.05;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

h2 {
  margin: 0.6rem 0 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

h3 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-soft);
}

.rocket {
  width: 1.1em;
  height: 1.1em;
  display: inline-flex;
}

.rocket svg {
  width: 100%;
  height: 100%;
  fill: var(--pink-accent);
  filter: drop-shadow(0 0 10px rgba(242, 91, 211, 0.45));
}

.tagline {
  margin: 1rem 0 0;
  max-width: 56ch;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1.03rem;
}

.actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid transparent;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.button-icon {
  display: inline-flex;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.button-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #ffffff;
  background: linear-gradient(120deg, var(--purple-core), #854de8 55%, var(--pink-accent));
  box-shadow: 0 10px 24px rgba(80, 44, 165, 0.46);
}

.button-primary:hover {
  box-shadow: 0 14px 32px rgba(97, 54, 195, 0.5);
}

.button-ghost {
  color: var(--text-main);
  border-color: var(--line-soft);
  background: rgba(114, 68, 211, 0.08);
}

.button-ghost:hover {
  border-color: rgba(166, 120, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(166, 120, 255, 0.12);
}

.socials {
  position: relative;
  overflow: hidden;
  padding: 1.25rem clamp(1rem, 3vw, 2rem);
}

.github-stats {
  border: 1px solid rgba(247, 248, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(31, 33, 64, 0.84), rgba(19, 21, 37, 0.82));
  box-shadow:
    0 20px 50px rgba(7, 8, 20, 0.56),
    0 0 0 1px rgba(166, 120, 255, 0.12) inset;
  backdrop-filter: blur(8px);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.github-stats-head h2 {
  margin: 0.45rem 0 0;
}

.github-stats-note {
  margin: 0.6rem 0 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats-grid {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1.3fr 1fr 1fr;
}

.stat-card {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(247, 248, 255, 0.14);
  background: linear-gradient(160deg, rgba(31, 33, 64, 0.85), rgba(18, 20, 34, 0.84));
  min-height: 132px;
}

.stat-card-featured {
  background:
    radial-gradient(280px 200px at 80% 10%, rgba(166, 120, 255, 0.24), transparent 80%),
    linear-gradient(160deg, rgba(41, 35, 87, 0.92), rgba(21, 23, 42, 0.9));
  border-color: rgba(166, 120, 255, 0.5);
}

.stat-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-label-prefix {
  width: 0.9rem;
  height: 0.9rem;
  display: inline-flex;
  flex: 0 0 auto;
  color: rgba(247, 248, 255, 0.86);
}

.stat-label-prefix svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.stat-value {
  margin: 0.5rem 0 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
}

.stat-card-featured .stat-value {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #ffffff;
  text-shadow: 0 0 18px rgba(166, 120, 255, 0.34);
}

.stat-value[data-loading="true"] {
  color: rgba(247, 248, 255, 0.46);
}

.github-stats-footnote {
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.github-stats-footnote a {
  color: var(--text-main);
  margin-left: 0.25rem;
  text-decoration: underline;
  text-decoration-color: rgba(166, 120, 255, 0.75);
  text-underline-offset: 2px;
}

.github-stats-footnote a:hover {
  text-shadow: 0 0 10px var(--glow);
}

.stats-grid[data-state="error"] .stat-card {
  border-color: rgba(242, 91, 211, 0.45);
}

.socials::before {
  content: "";
  position: absolute;
  inset: auto -14% -46% auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(166, 120, 255, 0.42);
  box-shadow: 0 0 26px rgba(166, 120, 255, 0.12);
  pointer-events: none;
}

.socials h2 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.socials ul {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.socials a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px dashed rgba(247, 248, 255, 0.35);
  width: fit-content;
}

.socials a:hover {
  color: #ffffff;
  text-shadow: 0 0 10px var(--glow);
  border-bottom-color: rgba(242, 91, 211, 0.9);
}

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

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

@media (max-width: 900px) {
  .layout {
    max-width: 760px;
  }

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

  .stat-card-featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .layout {
    padding: 1rem 0.9rem 2rem;
  }

  .hero,
  .socials,
  .github-stats {
    border-radius: 14px;
  }

  .tagline {
    font-size: 1rem;
  }

  .button {
    width: 100%;
    text-align: center;
  }

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

  .panda-frame {
    transform: translate(34%, -28%) scale(0.78);
    opacity: 0.54;
  }
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere,
  .reveal,
  .button:hover {
    transition: none !important;
    transform: none !important;
  }
}

