:root {
  color-scheme: dark;
  --background: #151719;
  --text: #e6e7e9;
  --muted: #abb0b5;
  --border: #32373b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

main {
  max-width: 72rem;
  margin: 3.5rem auto;
  padding: 0 2rem;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
}

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

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
}

.intro {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.profile-link {
  flex-shrink: 0;
  font-size: 0.9375rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #101214;
  border: 1px solid var(--border);
}

.project-preview:hover {
  border-color: #757d83;
}

.project-preview img {
  position: absolute;
  inset: 1rem;
  display: block;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  object-fit: contain;
}

.pixel-art img {
  image-rendering: pixelated;
}

.github-preview img {
  inset: 0;
  width: 6rem;
  height: 6rem;
  margin: auto;
}

.project-content {
  padding-top: 1rem;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.source-link {
  display: inline-flex;
  flex: 0 0 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
}

.source-link img {
  display: block;
  opacity: 0.7;
}

.source-link:hover img,
.source-link:focus-visible img {
  opacity: 1;
}

h2 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.4;
}

h2 a {
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
}

.language {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.description {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 45rem) {
  main {
    margin: 2rem auto;
    padding: 0 1.25rem;
  }

  .site-header {
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .projects {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
