:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101114;
  color: #f6f4ef;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #101114;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 3rem, 76rem);
  min-height: 100vh;
  margin: auto;
  padding: 1.5rem 0 5rem;
}

.signal-field,
.signal-field::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.signal-field {
  z-index: 0;
  overflow: hidden;
  background-image:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.signal-field::before {
  content: "";
  background: linear-gradient(115deg, #101114 16%, transparent 46%, #101114 82%);
}

.signal-orb {
  position: absolute;
  width: 34rem;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(1rem);
  opacity: 0.32;
  animation: drift 18s ease-in-out infinite alternate;
}

.signal-orb-one {
  top: -17rem;
  right: -10rem;
  background: radial-gradient(circle, #7367ff, transparent 66%);
}

.signal-orb-two {
  bottom: -21rem;
  left: -15rem;
  background: radial-gradient(circle, #2bd8a3, transparent 66%);
  animation-delay: -7s;
}

.signal-orb-three {
  top: 37%;
  left: 38%;
  width: 23rem;
  background: radial-gradient(circle, #d36eff, transparent 67%);
  opacity: 0.13;
  animation-delay: -12s;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.wordmark {
  color: #f6f4ef;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.contact-link {
  width: fit-content;
  padding: 0.8rem 1.05rem;
  border: 1px solid #b8c0ff;
  border-radius: 999px;
  color: #f6f4ef;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  background: #dce0ff;
  color: #171826;
  transform: translateY(-2px);
}

.experiments {
  padding-top: 1.5rem;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.experiments h2 {
  margin: 0;
  color: #aeb8ff;
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-status {
  margin: 0;
  color: #b9b8c4;
  font-size: 0.875rem;
}

.experiment-list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.experiment-card {
  --accent: #8d82ff;
  position: relative;
  display: flex;
  grid-column: span 5;
  min-height: 15rem;
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid rgb(246 244 239 / 13%);
  border-radius: 1.15rem;
  background:
    radial-gradient(circle at 110% -10%, color-mix(in srgb, var(--accent) 39%, transparent), transparent 47%),
    rgb(18 19 24 / 75%);
  box-shadow: inset 0 1px rgb(255 255 255 / 6%), 0 1.5rem 3rem rgb(0 0 0 / 16%);
  color: inherit;
  text-decoration: none;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.experiment-card[href]:hover,
.experiment-card[href]:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 72%, white);
  box-shadow: inset 0 1px rgb(255 255 255 / 12%), 0 1.75rem 4rem color-mix(in srgb, var(--accent) 18%, transparent);
  transform: translateY(-0.35rem);
}

.experiment-card h3,
.experiment-card p {
  margin: 0;
}

.experiment-card h3 {
  position: relative;
  max-width: 15ch;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.045em;
}

.experiment-card p {
  position: relative;
  max-width: 34rem;
  margin-top: 0.55rem;
  color: #c9c9d1;
  line-height: 1.45;
}

.experiment-card-featured {
  grid-column: span 7;
  min-height: 24rem;
}

.experiment-card-featured h3 {
  font-size: clamp(2rem, 4.2vw, 3.8rem);
}

.card-chrome {
  position: absolute;
  inset: 1.2rem 1.35rem auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b9b8c4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.signal-status::before {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0.7rem var(--accent);
  content: "";
}

.card-link {
  position: relative;
  margin-top: 1.4rem;
  color: #f6f4ef;
  font-size: 0.8rem;
  font-weight: 700;
}

@keyframes drift {
  from { transform: translate3d(-1rem, -0.5rem, 0) scale(1); }
  to { transform: translate3d(2.5rem, 2rem, 0) scale(1.12); }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 2rem, 76rem);
  }

  .masthead {
    margin-bottom: 5rem;
  }

  .experiment-card,
  .experiment-card-featured {
    grid-column: 1 / -1;
    min-height: 16rem;
  }

  .experiment-card-featured {
    min-height: 22rem;
  }
}

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