:root {
  color-scheme: light;
  font-family: Arial, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: #171717;
  background: #fff;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.masthead {
  padding: clamp(28px, 5.5svh, 56px) 24px 24px;
}

.wordmark {
  position: relative;
  width: 108px;
  aspect-ratio: 2160 / 625;
  margin: 0 auto;
  overflow: hidden;
}

.wordmark img {
  position: absolute;
  width: 126.4815%;
  height: 327.68%;
  left: -13.0556%;
  top: -102.4%;
  max-width: none;
  filter: brightness(0);
}

main {
  width: min(100% - 80px, 960px);
  margin-inline: auto;
  padding: 28px 0 clamp(56px, 13svh, 144px);
  display: grid;
  align-items: center;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 7vw, 112px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding-bottom: 12px;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: rgb(0 128 145 / 10%);
}

.project:focus-visible {
  outline: 1px solid #087d8b;
  outline-offset: 8px;
}

.cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: #fff;
}

.cover img {
  position: absolute;
  display: block;
  height: auto;
  object-fit: contain;
}

/* Keep the original cover's composition using the existing white-screen asset. */
.cover--single img {
  left: 12.60947%;
  top: 11.78739%;
  width: 75.23298%;
}

/* A white inset balances the full-bleed circular artwork with the single. */
.cover--archive img {
  inset: 8%;
  width: 84%;
  height: 84%;
}

.project-title {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", "Apple SD Gothic Neo", monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: .035em;
  text-align: center;
  text-underline-offset: 5px;
}

.project:focus-visible .project-title,
.project:active .project-title {
  text-decoration: underline;
}

@media (hover: hover) {
  .project:hover .project-title { text-decoration: underline; }
}

@media (max-width: 600px) and (orientation: portrait) {
  .masthead { padding: 28px 20px 16px; }
  .wordmark { width: 92px; }

  main {
    width: calc(100% - 40px);
    padding: 12px 0 36px;
  }

  .projects {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 28px;
  }

  .projects li {
    width: min(68vw, 250px, max(140px, (100svh - 220px) / 2));
  }

  .project { gap: 8px; padding-bottom: 4px; }
  .project-title { font-size: 11px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .masthead { padding: 16px 20px 8px; }
  .wordmark { width: 80px; }
  main { width: min(100% - 48px, 540px); padding: 12px 0 24px; }
  .projects { gap: 48px; }
  .project { gap: 4px; }
}
