:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent-a: #f59e0b;
  --accent-b: #14b8a6;
  --font-display: "Space Grotesk", "Gill Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", "Fira Code", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  width: 100%;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-display);
  color: var(--text);
  background: var(--bg);
}

body::selection {
  color: #05070b;
  background: var(--accent-a);
}

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

.scene {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  min-height: 100svh;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.scene::before,
.scene::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
}

.scene::before {
  z-index: -1;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, black, transparent 78%);
  animation: grid-drift 30s linear infinite;
}

.scene::after {
  z-index: -1;
  opacity: 0.12;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.07) 48%, transparent 64%);
  animation: scan 13s ease-in-out infinite;
}

.scene-image,
.scene-shade,
.scene-particles,
.scene-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-image {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  opacity: 0.9;
  filter: saturate(1.04) contrast(1.03);
}

.scene-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, 0.96) 0%, rgba(5, 7, 11, 0.76) 34%, rgba(5, 7, 11, 0.18) 72%, rgba(5, 7, 11, 0.48) 100%),
    linear-gradient(180deg, rgba(5, 7, 11, 0.28), rgba(5, 7, 11, 0.82));
}

.scene-particles {
  z-index: -1;
  opacity: 0.34;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.42) 0.7px, transparent 0.8px),
    radial-gradient(rgba(20, 184, 166, 0.38) 0.8px, transparent 0.9px),
    radial-gradient(rgba(245, 158, 11, 0.32) 0.7px, transparent 0.8px);
  background-position: 0 0, 80px 45px, 140px 90px;
  background-size: 150px 150px, 230px 230px, 310px 310px;
  animation: particle-drift 42s linear infinite;
  mix-blend-mode: screen;
}

.scene-glow {
  z-index: -1;
  background:
    radial-gradient(280px circle at 14% 76%, rgba(245, 158, 11, 0.2), transparent 68%),
    radial-gradient(360px circle at 24% 72%, rgba(20, 184, 166, 0.12), transparent 70%),
    radial-gradient(640px circle at 74% 42%, rgba(20, 184, 166, 0.09), transparent 72%);
  opacity: 0.9;
  animation: glow-pulse 9s ease-in-out infinite;
}

.signature {
  align-self: end;
  width: min(100%, 48rem);
  margin: 0;
  padding-bottom: 3.5rem;
  animation: text-enter 620ms ease-out both;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow:
    0 0 24px rgba(248, 250, 252, 0.1),
    0 0 52px rgba(20, 184, 166, 0.14);
  animation: title-signal 6s ease-in-out infinite;
}

.site-footer {
  align-self: end;
  color: rgba(148, 163, 184, 0.72);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  animation: text-enter 720ms 90ms ease-out both;
}

.site-footer p {
  margin: 0;
}

@keyframes grid-drift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 160px 120px, 120px 160px;
  }
}

@keyframes scan {
  0%,
  100% {
    transform: translateY(-18%);
    opacity: 0.08;
  }
  50% {
    transform: translateY(18%);
    opacity: 0.18;
  }
}

@keyframes particle-drift {
  from {
    background-position: 0 0, 80px 45px, 140px 90px;
  }
  to {
    background-position: 180px 120px, 10px 260px, 340px 300px;
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translate3d(0, 0, 0);
  }
  50% {
    opacity: 1;
    transform: translate3d(1.2%, -0.8%, 0);
  }
}

@keyframes title-signal {
  0%,
  100% {
    text-shadow:
      0 0 24px rgba(248, 250, 252, 0.1),
      0 0 52px rgba(20, 184, 166, 0.14);
  }
  50% {
    text-shadow:
      0 0 28px rgba(248, 250, 252, 0.18),
      0 0 68px rgba(20, 184, 166, 0.22),
      0 0 80px rgba(245, 158, 11, 0.1);
  }
}

@keyframes text-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .scene-image {
    object-position: 68% center;
    opacity: 0.78;
  }

  .scene-shade {
    background:
      linear-gradient(90deg, rgba(5, 7, 11, 0.94) 0%, rgba(5, 7, 11, 0.72) 56%, rgba(5, 7, 11, 0.38) 100%),
      linear-gradient(180deg, rgba(5, 7, 11, 0.24), rgba(5, 7, 11, 0.86));
  }

  h1 {
    font-size: clamp(2.1rem, 10vw, 2.55rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene::before,
  .scene::after,
  .scene-particles,
  .scene-glow,
  .signature,
  .site-footer,
  h1 {
    animation: none;
  }
}
