:root {
  color-scheme: dark;
  --paper: #10141d;
  --ink: #eee9dc;
  --body: #b6bcc7;
  --muted: #969fad;
  --line: #303a49;
  --preview: #1a202a;
  /* DB8 palette colors shared with Playload. */
  --red: #d77355;
  --blue: #508cd7;
  --green: #64b964;
  --yellow: #e6c86e;
  --accent: var(--yellow);
  --project-title: var(--blue);
  --column-gap: 64px;
  --intro-space: 48px;
  --resident-size: 44px;
  --sprite-size: 30px;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 385;
  font-synthesis: none;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: color-mix(in srgb, var(--project-title) 16%, transparent);
  touch-action: manipulation;
}
a {
  color: inherit;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
button {
  font: inherit;
}
a:focus-visible,
button:focus-visible,
:focus-visible > .focus-content {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}
:focus-visible:has(> .focus-content),
.resident:focus-visible {
  outline: none;
}
[hidden] {
  display: none !important;
}
::selection {
  color: var(--paper);
  background: var(--accent);
}

.page {
  width: min(100% - 112px, 984px);
  margin-inline: auto;
}
.site-header {
  padding-block: 64px var(--intro-space);
}
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
h1 {
  margin: 0;
  font-size: 70px;
  line-height: 1;
  font-weight: 460;
  letter-spacing: -3px;
}
.domain-dot {
  color: var(--dot-color, var(--project-title));
}
.languages {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.languages > span {
  color: var(--muted);
}
.languages button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 7px;
  border: 0;
  background: none;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  text-underline-offset: 5px;
}
.languages button[aria-pressed='true'] {
  color: var(--ink);
  text-decoration: none;
  cursor: default;
}
.support-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin-top: 20px;
}
.support-badges a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}
.support-badges img {
  display: block;
}
.intro-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: var(--column-gap);
  margin-top: var(--intro-space);
}
.section-heading {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 425;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 1.6px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.profile-icon {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}
.profile-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
}
.profile-name span {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.profile-description {
  max-width: 490px;
  margin: 9px 0 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.9;
  text-wrap: pretty;
}
.profile-description cite {
  font-synthesis: style;
}
.accounts {
  margin: 10px 0 0;
  font-size: 13px;
}
.accounts > div {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: baseline;
  gap: 13px;
}
.accounts dt {
  color: var(--muted);
  font-size: 11px;
}
.accounts dd {
  min-width: 0;
  margin: 0;
}
.accounts a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--ink);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.project-section > .section-heading {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.projects {
  margin: 0;
  padding: 0;
  list-style: none;
}
.projects > li {
  border-bottom: 1px solid var(--line);
}
.project {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--column-gap);
  padding-block: 48px;
}
.project-info {
  grid-column: 2;
  grid-row: 1;
  padding-block: 3px;
}
.project h3 {
  margin: 0;
  color: var(--project-title);
  font-size: 30px;
  font-weight: 460;
  line-height: 1.35;
  letter-spacing: -0.45px;
  text-wrap: balance;
}
.project-title {
  display: inline-block;
  vertical-align: top;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
html:lang(ja) .project .book-title {
  font-size: 22px;
  font-weight: 425;
  line-height: 1.65;
  letter-spacing: 0;
}
.project-description {
  max-width: 370px;
  margin: 16px 0 0;
  color: var(--body);
  font-size: 14px;
  line-height: 1.95;
  text-wrap: pretty;
}
.project .preview {
  grid-column: 1;
  grid-row: 1;
}
.preview {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
}
.preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: var(--preview);
  object-fit: contain;
  object-position: center;
}
.preview-pyxel img,
.preview-keynote img {
  image-rendering: pixelated;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 40px 32px;
  color: var(--muted);
  font-size: 11px;
}
.site-footer p {
  margin: 0;
}
.footer-gems {
  display: grid;
  flex: 0 0 calc(4 * var(--sprite-size));
  grid-template-columns: repeat(4, var(--sprite-size));
  grid-template-rows: var(--sprite-size);
}
.footer-gems img {
  display: block;
  grid-row: 1;
  width: var(--sprite-size);
  height: var(--sprite-size);
  image-rendering: pixelated;
}
.resident {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: block;
  width: var(--resident-size);
  height: var(--resident-size);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  will-change: transform;
}
.resident-art {
  position: absolute;
  bottom: 0;
  left: calc((var(--resident-size) - var(--sprite-size)) / 2);
  width: var(--sprite-size);
  height: var(--sprite-size);
  background: var(--sprite-one) center / contain no-repeat;
  image-rendering: pixelated;
  transform: scaleX(var(--facing, 1));
}
.resident[data-frame='1'] .resident-art {
  background-image: var(--sprite-two);
}

@media (hover: hover) {
  a:hover,
  .languages button[aria-pressed='false']:hover {
    text-decoration-line: underline;
  }
  .languages button:hover {
    color: var(--ink);
  }
}

@media (760px < width <= 1000px) {
  :root {
    --column-gap: 40px;
  }
  .page {
    width: calc(100% - 80px);
  }
  .project h3 {
    font-size: 27px;
  }
}

@media (width <= 760px) {
  :root {
    --intro-space: 32px;
  }
  .page {
    width: min(100% - 48px, 540px);
  }
  .site-header {
    padding-block: 32px var(--intro-space);
  }
  h1 {
    font-size: 46px;
    letter-spacing: -2px;
  }
  .masthead {
    gap: 8px;
  }
  .languages {
    gap: 0;
    font-size: 11px;
  }
  .languages button {
    min-width: 34px;
    padding-inline: 4px;
  }
  .intro-sections {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .profile-identity {
    margin-top: 13px;
  }
  .profile-name {
    font-size: 18px;
  }
  .profile-description {
    max-width: none;
    font-size: 13px;
  }
  .accounts {
    margin-top: 8px;
  }
  .project-section > .section-heading {
    padding-bottom: 12px;
  }
  .project {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 32px 40px;
  }
  .project-info {
    grid-column: 1;
  }
  .project .preview {
    grid-row: 2;
  }
  .project h3 {
    font-size: 28px;
  }
  .project-description {
    max-width: none;
    margin-top: 12px;
    line-height: 1.9;
  }
  .site-footer {
    padding-top: 35px;
  }
}

@media (width < 360px) {
  .page {
    width: calc(100% - 36px);
  }
  h1 {
    font-size: 41px;
    letter-spacing: -1.8px;
  }
  .languages button {
    min-width: 31px;
    padding-inline: 3px;
  }
  .project h3 {
    font-size: 27px;
  }
}
