:root {
  --bg: #0A1110;
  --ink: #DCE7D9;
  --muted: #99AC98;
  --accent: #B4E879;
  --on-accent: #0A1110;
  --highlight: #F05A28;
  --line: #324032;
  --paper: #101914;
  --wash: #152017;
  --max: 1024px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: repeating-linear-gradient(180deg, #dce7d903 0 1px, transparent 1px 4px), radial-gradient(ellipse at 75% 15%, #b4e87908, transparent 48%);
  color: var(--ink);
  font: 400 0.9375rem/1.8 ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

a {
  color: var(--accent);
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

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

h1,
h2,
h3 {
  font: inherit;
  font-weight: 600;
  line-height: 1.35;
}

h2 {
  font-size: 1.25rem;
}

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 10;
  top: 0.75rem;
  left: var(--gutter);
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  padding-block: 1.75rem;
  border-bottom: 1px dashed var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  text-decoration: none;
}

.brand__wordmark {
  width: 230px;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-header nav a {
  padding-block: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-header nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-bracket {
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 4rem);
  padding-block: 3.75rem 4.5rem;
}

.terminal-label {
  margin-bottom: 1.5rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.terminal-label span {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: var(--accent);
  text-shadow: 0 0 20px #b4e87918;
}

.terminal-cursor {
  display: inline-block;
  width: 0.35em;
  height: 0.75em;
  margin-left: 0.2em;
  background: var(--accent);
  vertical-align: -0.03em;
  animation: cursor-blink 1.2s steps(1, end) infinite;
}

@keyframes cursor-blink {
  0%, 49% {
    opacity: 1;
  }

  50%, 100% {
    opacity: 0;
  }
}

.hero__intro {
  max-width: 42ch;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero__art {
  padding: 1rem 0;
}

.hero__logo {
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  max-width: 100%;
  margin-top: 1.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.8rem;
  text-decoration: none;
}

.button:hover {
  border-bottom-color: var(--accent);
}

.button__prompt {
  color: var(--highlight);
}

.catalog-page {
  padding-block: 2rem 4rem;
}

.catalog-header {
  max-width: 65ch;
  padding-block: 2rem 2.5rem;
}

.catalog-header .terminal-label {
  margin-bottom: 0.75rem;
}

.catalog-header h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  letter-spacing: -0.06em;
}

.catalog-header > p:last-child {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.collection-empty {
  padding: 3rem 1.5rem;
  border-block: 1px dashed var(--line);
  text-align: center;
}

.collection-empty__icon {
  display: block;
  width: 72px;
  margin: 0 auto 1.25rem;
  color: var(--highlight);
}

.collection-empty h2 {
  font-size: 1rem;
}

.collection-empty p {
  max-width: 44ch;
  margin: 0.75rem auto 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  align-items: start;
  gap: 1.5rem;
}

.collection-item {
  min-width: 0;
  border-bottom: 1px dashed var(--line);
}

.collection__photo {
  display: block;
  margin: 0;
  background: var(--bg);
}

.collection__photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.collection-grid--reels .collection__photo img {
  aspect-ratio: 4 / 3;
}

.collection__body {
  padding: 1rem 0;
}

.collection__eyebrow {
  color: var(--muted);
  font-size: 0.75rem;
}

.collection__body h2 {
  margin-top: 0.4rem;
  font-size: 1rem;
}

.collection__meta {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.collection__details {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.collection__details summary {
  padding-block: 0.4rem;
  color: var(--accent);
  font-size: 0.75rem;
  cursor: pointer;
}

.collection__details dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 0.5rem 1rem;
  margin-block: 1rem;
  font-size: 0.75rem;
}

.collection__details dt {
  color: var(--muted);
}

.collection__details dd {
  margin: 0;
}

.collection__details p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.projects {
  padding-block: 2rem 3.5rem;
  border-top: 1px dashed var(--line);
}

.projects__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
}

.section-prefix {
  color: var(--accent);
  font-weight: 400;
}

.section-label {
  color: var(--muted);
  font-size: 0.7rem;
}

.projects__note {
  margin-top: 0.65rem;
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.games {
  display: grid;
  gap: 0;
}

.game {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem;
  min-width: 0;
  padding: 1.5rem 0;
  border-bottom: 1px dashed var(--line);
}

.game:hover,
.game:focus-within {
  border-bottom-color: var(--accent);
}

.game__picture {
  min-width: 0;
}

.game__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.game__body {
  min-width: 0;
}

.game__number {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--highlight);
  font-size: 0.7rem;
}

.game h3 {
  font-size: 1rem;
}

.game__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

/* Sits above the card's stretched title link, so it opens the game itself. */
.game__play {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 0.7rem;
  text-decoration: none;
}

.game__play:hover,
.game__play:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.game__play .icon {
  width: 0.85em;
  height: 0.85em;
}

/* A finger needs a bigger target than a cursor: taller on touch screens. */
@media (pointer: coarse) {
  .game__play {
    min-height: 44px;
    padding-inline: 0.9rem;
    font-size: 0.75rem;
  }
}

.game h3 a {
  color: var(--ink);
  text-decoration: none;
}

.game:hover h3 a,
.game:focus-within h3 a {
  color: var(--accent);
}

.game h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.game h3 a:focus-visible {
  outline: none;
}

.game h3 a:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.game__arrow {
  margin-left: 0.5rem;
  color: var(--accent);
}

.game__arrow::before {
  content: "→";
}

.game__summary {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.game__status {
  margin-top: 0.5rem;
  color: var(--highlight);
  font-size: 0.7rem;
}

.game-detail {
  padding-block: 2rem 4rem;
}

.game-detail__header,
.game-detail__section {
  max-width: 860px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding-block: 0.4rem;
  font-size: 0.75rem;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.game-detail__header {
  padding-block: 2rem 2.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1.4;
}

.game-detail__header .tags {
  margin: 0 0 0.75rem;
}

.game-detail__status {
  margin-bottom: 0.65rem;
  color: var(--highlight);
  font-size: 0.75rem;
}

.game-detail h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  letter-spacing: -0.06em;
}

.game-detail__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.game-detail__play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.game-detail__play:hover,
.game-detail__play:focus-visible {
  background: transparent;
  color: var(--accent);
}

.game-detail__play:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.game-detail__section {
  border-top: 1px dashed var(--line);
  padding-block: 2rem;
}

.game-detail__section h2 {
  font-size: 1.125rem;
}

.game-detail__section > p {
  max-width: 65ch;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.game-detail__section > p + p {
  margin-top: 1rem;
}

.screenshots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.screenshots figure {
  min-width: 0;
  margin: 0;
}

.screenshots a {
  display: block;
}

.screenshots figure:hover figcaption {
  color: var(--accent);
}

.screenshots img {
  width: 100%;
}

.screenshots figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.screenshots--interactive {
  display: block;
}

.screenshots--interactive > figure[hidden] {
  display: none;
}

.screenshots--interactive > figure > a {
  cursor: zoom-in;
}

.screenshots--interactive figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.screenshots__counter {
  flex-shrink: 0;
  color: var(--highlight);
  font-size: 0.7rem;
  white-space: nowrap;
}

.screenshots__thumbnails {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  margin-top: 1.5rem;
  overflow-x: auto;
  padding: 5px;
  margin-inline: -5px;
}

.screenshots__thumbnail {
  flex: 0 0 calc((100% - clamp(0.5rem, 2vw, 1rem) * 2) / 3);
  max-width: 180px;
  min-width: 0;
  padding: 0 0 0.5rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  text-align: left;
  cursor: pointer;
}

.screenshots__thumbnail img {
  aspect-ratio: 10 / 7;
  object-fit: contain;
  opacity: 0.65;
}

.screenshots__thumbnail span {
  display: block;
  margin-top: 0.5rem;
}

.screenshots__thumbnail[aria-pressed="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent);
}

.screenshots__thumbnail:hover img,
.screenshots__thumbnail:focus-visible img,
.screenshots__thumbnail[aria-pressed="true"] img {
  opacity: 1;
}

.screenshot-viewer-open {
  overflow: hidden;
}

.screenshot-viewer {
  width: min(1600px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.screenshot-viewer::backdrop {
  background: #060a09f2;
}

.screenshot-viewer__toolbar,
.screenshot-viewer__navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.screenshot-viewer__toolbar {
  margin-bottom: 0.75rem;
}

.screenshot-viewer button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.screenshot-viewer button:hover {
  color: var(--ink);
}

.screenshot-viewer figure {
  margin: 0;
}

.screenshot-viewer img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 10rem);
  object-fit: contain;
}

.screenshot-viewer figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.platform-list {
  margin: 1.25rem 0 0;
  padding: 0;
  border-block: 1px dashed var(--line);
  list-style: none;
}

.platform-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

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

.icon {
  flex: none;
  width: 1em;
  height: 1em;
}

.platform__name {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.875rem;
}

.platform__name .icon {
  width: 1.1em;
  height: 1.1em;
}

.platform__detail {
  padding-left: calc(1.1 * 0.875rem + 0.55rem);
}

.platform__detail {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.platform__note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding-left: calc(1.1 * 0.875rem + 0.55rem);
  color: var(--highlight);
  font-size: 0.72rem;
  line-height: 1.5;
}

.platform__note .icon {
  margin-top: 0.15em;
}

.platform-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding-block: 0.4rem;
  font-size: 0.8rem;
}

.platform__unavailable {
  color: var(--muted);
  font-size: 0.75rem;
}

.site-footer {
  position: relative;
  border-top: 1px dashed var(--line);
  padding-block: 2rem;
}

.site-footer h2 {
  font-size: 1rem;
}

.site-footer > p:not(.copyright) {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact__email {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

.contact__reveal {
  margin-top: 0.75rem;
  border-width: 0 0 1px;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.contact__reveal:disabled {
  opacity: 0.6;
  cursor: progress;
}

.contact__check:not(:empty) {
  margin-top: 0.75rem;
}

.contact__status {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.contact__status:empty {
  display: none;
}

.footer-collections {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.footer-collections a {
  color: var(--muted);
}

.footer-collections a:hover,
.footer-collections a[aria-current="page"] {
  color: var(--accent);
}

.copyright {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.65rem;
}

.not-found {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding-block: 3rem;
  text-align: center;
}

.not-found__code {
  color: var(--accent);
  font-size: 0.875rem;
}

.not-found h1 {
  max-width: 24ch;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  letter-spacing: -0.06em;
}

.not-found > p:not(.not-found__code) {
  max-width: 43ch;
  color: var(--muted);
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-block: 3rem;
  }

  .hero__art {
    width: min(400px, 100%);
    justify-self: center;
  }

}

@media (max-width: 540px) {
  .site-header {
    justify-content: center;
    gap: 0.75rem;
    padding-block: 1.25rem;
  }

  .site-header .brand {
    justify-content: center;
    flex-basis: 100%;
  }

  .site-header nav {
    justify-content: center;
    gap: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .game {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 1rem;
    padding-block: 1.25rem;
  }

  .game__number {
    margin-bottom: 0.35rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
