:root {
  --ink: #f7f1df;
  --muted: #b9b5aa;
  --night: #090b16;
  --panel: #121527;
  --panel-light: #1b1f37;
  --blue: #5b7cff;
  --electric-blue: #7da1ff;
  --orange: #ff7a45;
  --green: #b7f36b;
  --pink: #ff73b9;
  --border: #343957;
  --shadow: 7px 7px 0 #000;
  --radius: 18px;
  --body-font: "Trebuchet MS", "Avenir Next", Arial, sans-serif;
  --mono-font: "Courier New", Courier, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgb(91 124 255 / 16%), transparent 27rem),
    radial-gradient(circle at 90% 35%, rgb(255 115 185 / 10%), transparent 24rem),
    var(--night);
  font-family: var(--body-font);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--night);
  background: var(--green);
  font-family: var(--mono-font);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgb(255 255 255 / 3%) 3px,
    rgb(255 255 255 / 3%) 4px
  );
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  background: rgb(9 11 22 / 88%);
  border: 2px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--mono-font);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.logo-dot {
  width: 0.8rem;
  height: 0.8rem;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--green);
  animation: pulse 2s steps(2, end) infinite;
}

.site-navigation {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-navigation a {
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.86rem;
  text-decoration: none;
}

.site-navigation a:hover,
.site-navigation a:focus-visible {
  color: var(--green);
}

.menu-button {
  display: none;
  padding: 0.5rem 0.8rem;
  color: var(--ink);
  background: var(--panel-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--mono-font);
  cursor: pointer;
}

main,
.site-footer {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.hero {
  min-height: 88vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: 7rem 0;
}

.eyebrow,
.section-number,
.note-label,
.tag,
.project-meta,
.system-message {
  font-family: var(--mono-font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.section-number {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

.eyebrow span {
  display: inline-block;
  margin-right: 0.45rem;
  animation: blink 1.2s steps(2, end) infinite;
}

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

h1,
h2,
h3 {
  line-height: 1.05;
}

h1 {
  max-width: 780px;
  margin-bottom: 1.5rem;
  font-size: clamp(3.6rem, 9vw, 7.5rem);
  letter-spacing: -0.07em;
}

h1 span {
  color: var(--blue);
  text-shadow: 4px 4px 0 var(--pink);
}

.hero-description {
  max-width: 680px;
  color: #d7d2c6;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: var(--mono-font);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--ink);
}

.button-primary {
  color: var(--night);
  background: var(--green);
}

.button-secondary {
  background: var(--panel-light);
}

.system-message {
  color: var(--muted);
  font-size: 0.78rem;
}

.system-message > span:first-child {
  color: var(--orange);
}

.hero-art {
  transform: rotate(2deg);
  border: 3px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: var(--night);
  background: var(--electric-blue);
  border-bottom: 3px solid var(--ink);
  font-family: var(--mono-font);
  font-weight: 700;
}

.window-controls {
  display: flex;
  gap: 0.35rem;
}

.window-controls span {
  width: 0.8rem;
  height: 0.8rem;
  background: var(--night);
  border-radius: 50%;
}

.window-content {
  padding: clamp(2rem, 6vw, 4rem);
  text-align: center;
  background: var(--panel);
}

.pixel-face {
  position: relative;
  width: 9rem;
  height: 9rem;
  margin: 0 auto 2rem;
  background: var(--orange);
  border: 4px solid var(--ink);
  border-radius: 42% 58% 48% 52%;
  box-shadow: 9px 9px 0 var(--blue);
  animation: float 3.8s ease-in-out infinite;
}

.eye,
.mouth {
  position: absolute;
  display: block;
  background: var(--night);
}

.eye {
  top: 2.7rem;
  width: 1rem;
  height: 1.25rem;
}

.eye-left {
  left: 2.2rem;
}

.eye-right {
  right: 2.2rem;
}

.mouth {
  left: 3.1rem;
  bottom: 2.4rem;
  width: 2.8rem;
  height: 0.65rem;
}

.window-content > p {
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.window-content > strong {
  color: var(--green);
  font-family: var(--mono-font);
}

.loading-bar {
  height: 1rem;
  margin: 1.5rem 0 0.8rem;
  padding: 2px;
  border: 2px solid var(--ink);
}

.loading-bar span {
  display: block;
  width: 72%;
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--pink) 0 10px, transparent 10px 14px);
}

.window-content small {
  color: var(--muted);
  font-family: var(--mono-font);
}

.section {
  padding: 7rem 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

h2 {
  max-width: 850px;
  margin-bottom: 0;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.055em;
}

h3 {
  font-size: 1.6rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 2rem;
  align-items: start;
}

.large-copy {
  max-width: 700px;
  font-size: clamp(1.4rem, 3vw, 2.25rem);
  line-height: 1.35;
}

.note-card {
  padding: 1.5rem;
  color: var(--night);
  background: var(--orange);
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: var(--shadow);
  transform: rotate(-1deg);
}

.note-label {
  font-weight: 700;
}

.note-card ul {
  margin: 0;
  padding-left: 1.3rem;
}

.note-card li + li {
  margin-top: 0.55rem;
}

.quest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.quest-card {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  color: var(--night);
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 180ms ease;
}

.quest-card:hover {
  transform: translateY(-8px) rotate(-1deg);
}

.blue-card {
  background: var(--electric-blue);
}

.orange-card {
  background: var(--orange);
}

.green-card {
  background: var(--green);
}

.card-symbol {
  margin-bottom: auto;
  font-family: var(--mono-font);
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1;
}

.quest-card p:not(.card-symbol) {
  flex-grow: 1;
}

.tag {
  align-self: flex-start;
  padding: 0.25rem 0.55rem;
  color: var(--ink);
  background: var(--night);
  border-radius: 999px;
  font-size: 0.68rem;
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.5fr 0.8fr;
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.project-card:hover {
  border-color: var(--electric-blue);
  transform: translateX(6px);
}

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

.project-meta {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.69rem;
}

.project-card > a,
.fake-link,
.text-button {
  color: var(--green);
  font-family: var(--mono-font);
  font-size: 0.82rem;
  font-weight: 700;
}

.text-button {
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

.secret-card.void-poked {
  animation: glitch 300ms steps(2, end) 2;
}

.contact {
  margin-bottom: 5rem;
  padding: clamp(2rem, 7vw, 5rem);
  text-align: center;
  background: var(--blue);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.contact .section-number {
  color: var(--green);
}

.contact h2 {
  margin-inline: auto;
}

.contact > p:not(.section-number) {
  max-width: 620px;
  margin: 1.5rem auto 2rem;
  font-size: 1.15rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 0.6fr 1.5fr auto;
  gap: 1rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-family: var(--mono-font);
  font-size: 0.75rem;
}

.site-footer p {
  margin-bottom: 0;
}

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 4px;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes float {
  50% { transform: translateY(-10px) rotate(-2deg); }
}

@keyframes glitch {
  0% { transform: translate(0); }
  25% { transform: translate(-8px, 3px); }
  50% { transform: translate(7px, -3px); filter: hue-rotate(90deg); }
  75% { transform: translate(-3px, -2px); }
  100% { transform: translate(0); }
}

@media (max-width: 850px) {
  .menu-button {
    display: block;
  }

  .site-navigation {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--panel);
    border: 2px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

  .site-navigation.open {
    display: flex;
  }

  .site-navigation a {
    padding: 0.65rem;
  }

  .hero,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 6rem 0;
  }

  .hero-art {
    width: min(100%, 520px);
    justify-self: center;
  }

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

  .quest-card {
    min-height: 280px;
  }

  .project-card {
    grid-template-columns: 0.5fr 1fr;
  }

  .project-card > p,
  .project-card > a,
  .project-card > .fake-link,
  .project-card > .text-button {
    grid-column: 1 / -1;
  }

  .site-footer {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    width: calc(100% - 1rem);
    margin-top: 0.5rem;
  }

  main,
  .site-footer {
    width: min(100% - 1.25rem, 1180px);
  }

  .hero {
    padding-top: 5rem;
  }

  h1 {
    font-size: clamp(3.2rem, 19vw, 5.2rem);
  }

  .section {
    padding: 5rem 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

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

  .project-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .project-card > p,
  .project-card > a,
  .project-card > .fake-link,
  .project-card > .text-button {
    grid-column: auto;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
