:root {
  color-scheme: light;
  --paper: #f4f0d6;
  --ink: #101010;
  --acid: #b5ff00;
  --warning: #ff3b18;
  --bruise: #6c5b7b;
  --link: #0000ee;
  --mud: #756932;
  --line: 3px solid var(--ink);
  --pixel: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(45deg, rgba(0, 0, 0, 0.16) 25%, transparent 25%) 0 0 / 16px 16px,
    linear-gradient(45deg, transparent 75%, rgba(181, 255, 0, 0.25) 75%) 0 0 / 16px 16px,
    repeating-linear-gradient(37deg, rgba(255, 59, 24, 0.22) 0 2px, transparent 2px 31px),
    repeating-linear-gradient(123deg, rgba(0, 0, 238, 0.12) 0 3px, transparent 3px 47px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 1px, transparent 1px 17px),
    linear-gradient(125deg, var(--paper) 0 44%, #c7d0bf 44% 61%, #ffed00 61% 100%);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.28) 1px, transparent 1px),
    radial-gradient(#000 0.9px, transparent 0.9px);
  background-size: 19px 100%, 7px 7px;
  mix-blend-mode: multiply;
  opacity: 0.19;
  z-index: 10;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 4px solid var(--warning);
  outline-offset: 3px;
}

button {
  border: 2px outset #b8b8b8;
  background: #e9e9e9;
  color: #111;
  font: inherit;
  cursor: pointer;
}

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

figure {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.4rem 0.7rem;
  background: var(--acid);
  color: #000;
  z-index: 20;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: var(--line);
  background:
    repeating-linear-gradient(90deg, #d8d8d8 0 14px, #ffed00 14px 18px, #d8d8d8 18px 29px);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.5rem;
  font-family: "Courier New", monospace;
}

nav a,
nav button {
  padding: 0.28rem 0.45rem;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  image-rendering: pixelated;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(19rem, 0.78fr) minmax(20rem, 1.22fr);
  gap: clamp(1rem, 4vw, 5rem);
  align-items: start;
  min-height: 88vh;
  padding: clamp(1rem, 3vw, 2.5rem);
  background:
    linear-gradient(90deg, transparent 0 62%, rgba(255, 59, 24, 0.22) 62% 64%, transparent 64%),
    repeating-linear-gradient(0deg, transparent 0 5.5rem, rgba(0, 0, 0, 0.08) 5.5rem 5.65rem);
  overflow: hidden;
}

.hero > * {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  right: 1.5rem;
  bottom: 1.5rem;
  width: min(28vw, 20rem);
  aspect-ratio: 1;
  background:
    linear-gradient(#000 0 0) 0 0 / 16px 16px,
    linear-gradient(var(--acid) 0 0) 32px 0 / 16px 16px,
    linear-gradient(#ff77bc 0 0) 64px 16px / 16px 16px,
    linear-gradient(var(--warning) 0 0) 16px 48px / 16px 16px,
    linear-gradient(#0000ee 0 0) 80px 64px / 16px 16px,
    linear-gradient(var(--acid) 0 0) 112px 96px / 16px 16px,
    linear-gradient(#000 0 0) 144px 112px / 16px 16px,
    linear-gradient(#ff77bc 0 0) 176px 144px / 16px 16px;
  background-repeat: no-repeat;
  opacity: 0.85;
  image-rendering: pixelated;
  transform: rotate(-6deg);
  z-index: 0;
}

.hero-copy {
  padding-top: 4vh;
}

.stamp,
.section-label {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0.25rem 0.45rem;
  border: 2px dashed #000;
  background: var(--acid);
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
  transform: rotate(-1.2deg);
  box-shadow: 6px 6px 0 #000;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 0.96;
  letter-spacing: 0;
}

h1 {
  max-width: 10ch;
  font-size: clamp(3rem, 5.8vw, 5.25rem);
  font-weight: 900;
  text-transform: uppercase;
  text-shadow:
    0.08em 0.08em 0 var(--acid),
    -0.05em 0.02em 0 #ff77bc,
    0.13em -0.05em 0 rgba(0, 0, 238, 0.65),
    0.19em 0.02em 0 rgba(0, 0, 0, 0.85);
}

h2 {
  font-size: clamp(2rem, 5vw, 4.8rem);
}

.authors {
  width: fit-content;
  max-width: 100%;
  margin: 1.2rem 0;
  padding: 0.35rem 0.55rem;
  background: #fff;
  border: var(--line);
  font-family: "Courier New", monospace;
  overflow-wrap: anywhere;
  box-shadow: 8px 8px 0 #000;
}

.claim-text {
  max-width: 42rem;
  margin: 2.5rem 0 1rem 9vw;
  padding: 0.8rem;
  color: #fff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 9px),
    #161616;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: 3vw;
}

.link-row a {
  padding: 0.35rem 0.55rem;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 5px 5px 0 #000;
}

.hero-figure {
  width: min(100%, 56rem);
  margin: 12vh 0 0;
  border: 4px solid #000;
  background: #fff;
  transform: rotate(1.4deg) skewX(-0.6deg);
  box-shadow: 13px 13px 0 #ff77bc, -9px -7px 0 var(--acid);
  image-rendering: pixelated;
}

figcaption {
  padding: 0.55rem;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  background: #f1f1f1;
  border-top: 2px solid #000;
}

.ticker {
  display: flex;
  overflow: hidden;
  gap: 1rem;
  padding: 0.45rem;
  border-block: var(--line);
  background: var(--warning);
  color: #fff;
  font-family: "Courier New", monospace;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #000;
}

.ticker span {
  animation: shove 9s steps(7, end) infinite alternate;
}

.split {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.5rem;
  padding: clamp(1rem, 4vw, 4rem);
}

.split article {
  padding: 1rem;
  border: var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.split article:nth-child(2) {
  margin-top: 7rem;
  background: #dbff6b;
}

.split p,
.section-note,
.closing p {
  max-width: 58rem;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.gallery-section,
.figures,
.findings,
.closing {
  padding: clamp(1rem, 4vw, 4rem);
  border-top: var(--line);
}

.findings {
  background:
    repeating-linear-gradient(0deg, rgba(255, 59, 24, 0.16) 0 2px, transparent 2px 23px),
    #ece7cc;
}

.finding-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 2rem;
}

.finding-grid article {
  min-height: 19rem;
  padding: 0.85rem;
  border: var(--line);
  background: #fff;
}

.finding-grid article:nth-child(2n) {
  margin-top: 3rem;
  background: #dbff6b;
}

.finding-grid article:nth-child(3) {
  background: #ffd1e8;
}

.finding-grid span {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border: 2px solid #000;
  background: var(--warning);
  color: #fff;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

h3 {
  margin: 0.75rem 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 2.1rem);
  line-height: 1;
}

.gallery-section {
  background: #eeeeee;
}

.real-world {
  background:
    linear-gradient(90deg, rgba(181, 255, 0, 0.45), transparent 34%),
    #c9c0ad;
}

.section-note {
  margin: 1rem 0 2rem;
  font-family: "Courier New", monospace;
}

.ai-grid,
.real-grid,
.figure-wall {
  display: grid;
  gap: 1rem;
}

.ai-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-pair {
  border: var(--line);
  background: #fff;
}

.pair-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.image-slot {
  position: relative;
  border-bottom: 2px solid #000;
}

.image-slot + .image-slot {
  border-left: 2px solid #000;
}

.image-slot img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  filter: contrast(1.25) saturate(0.82);
  image-rendering: pixelated;
}

.tag {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  padding: 0.12rem 0.28rem;
  background: #fff;
  border: 2px solid #000;
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
}

.success-tag {
  background: var(--acid);
}

.ai-pair dl,
.real-item dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.6rem;
  margin: 0;
  padding: 0.65rem;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0;
}

.real-grid {
  grid-template-columns: repeat(4, minmax(10rem, 1fr));
  align-items: start;
}

.real-item {
  border: 2px solid #000;
  background: #f7f7f7;
}

.real-item:nth-child(2n) {
  margin-top: 4rem;
}

.real-item:nth-child(3n) {
  transform: rotate(-1deg);
}

.real-item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: saturate(0.75) contrast(1.2);
  image-rendering: pixelated;
}

.figures {
  background: #f8f6f0;
}

.figure-wall {
  grid-template-columns: 1.4fr 0.9fr;
  align-items: start;
  margin-top: 2rem;
}

.figure-wall figure {
  margin: 0;
  border: var(--line);
  background: #fff;
}

.figure-wall figure:nth-child(2) {
  margin-top: 5rem;
}

.figure-wall figure:nth-child(3) {
  margin-left: 10vw;
}

.closing {
  min-height: 45vh;
  background: #111;
  color: #f6f1d7;
}

.closing h2 {
  color: var(--acid);
}

.closing pre {
  max-width: 58rem;
  overflow-x: auto;
  padding: 1rem;
  border: 2px solid var(--acid);
  background: #f6f1d7;
  color: #111;
  font-family: "Courier New", monospace;
  white-space: pre;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-top: var(--line);
  background: #d8d8d8;
  font-family: "Courier New", monospace;
}

.load-error {
  padding: 1rem;
  border: 4px solid var(--warning);
  background: #fff;
  color: #000;
  font-family: "Courier New", monospace;
}

body.plain {
  background: #fff;
}

body.plain::before,
body.plain .ticker span {
  animation: none;
  opacity: 0;
}

body.plain h1 {
  text-shadow: none;
}

body.plain .hero {
  background: transparent;
}

body.plain .hero::after {
  display: none;
}

body.plain nav a,
body.plain nav button,
body.plain .stamp,
body.plain .section-label,
body.plain .authors,
body.plain .link-row a {
  box-shadow: none;
}

body.plain .hero-figure,
body.plain .real-item {
  transform: none;
  box-shadow: none;
}

body.plain .image-slot img,
body.plain .real-item img,
body.plain .hero-figure {
  image-rendering: auto;
}

@keyframes shove {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-5rem);
  }
}

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

  .ticker span {
    animation: none;
  }
}

@media (max-width: 900px) {
  .hero,
  .split,
  .ai-grid,
  .finding-grid,
  .figure-wall {
    grid-template-columns: 1fr;
  }

  .hero {
    display: block;
  }

  .claim-text {
    margin-left: 0;
  }

  .hero-figure {
    margin-top: 1rem;
  }

  .split article:nth-child(2),
  .finding-grid article:nth-child(2n),
  .figure-wall figure:nth-child(2),
  .figure-wall figure:nth-child(3),
  .real-item:nth-child(2n) {
    margin: 0;
  }

  .real-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .hero {
    padding-inline: 1rem;
  }

  .hero-copy {
    max-width: min(22rem, 100%);
  }

  h1 {
    font-size: 2.3rem;
    max-width: 11ch;
    overflow-wrap: normal;
  }

  .authors {
    width: 100%;
    max-width: 100%;
  }

  .stamp,
  .section-label,
  .claim-text,
  .hero-figure {
    max-width: 100%;
  }

  .hero-figure {
    width: min(22rem, 100%);
  }

  .claim-text {
    width: 100%;
  }

  .pair-images {
    grid-template-columns: 1fr;
  }

  .image-slot + .image-slot {
    border-left: 0;
  }

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

  footer {
    flex-direction: column;
  }
}
