:root {
  --ink: #050505;
  --paper: #fff;
  --muted: #aaa;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

body,
button,
a {
  font-family: "Courier New", "Pretendard", monospace;
  font-weight: 700;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.mobile-chrome,
.mobile-menu {
  display: none;
}

.portfolio-viewport,
.plane {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.portfolio-viewport {
  background: var(--paper);
  touch-action: none;
  cursor: grab;
}

.portfolio-viewport.is-dragging {
  cursor: grabbing;
}

.plane {
  z-index: 1;
  will-change: transform;
}

.plane-copy {
  position: absolute;
  inset: 0;
  transform: translate(var(--clone-x, 0), var(--clone-y, 0));
}

.wordmark {
  position: absolute;
  z-index: 0;
  left: 26.9vw;
  top: calc(49.7vh - 2.58vw);
  width: 47vw;
  color: #000;
  font-family: Arial, "Pretendard", sans-serif;
  font-size: 5.75vw;
  line-height: 1;
  font-weight: 400;
  letter-spacing: -0.09em;
  white-space: nowrap;
  pointer-events: none;
}

.project {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  outline: 0;
}

.project img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition:
    filter 0.25s steps(4, end),
    transform 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.project::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  background: var(--pixel-image) center / cover no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}

.project::after {
  content: attr(data-title);
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  transform: translate(-50%, -50%);
  color: #fff;
  background: #000;
  font-size: clamp(9px, 0.75vw, 12px);
  line-height: 1.25;
  text-align: center;
  text-shadow: none;
  opacity: 0;
  pointer-events: none;
}

.project:hover img,
.project:focus-visible img {
  filter: blur(0.7px) saturate(0.62) contrast(1.35);
  transform: scale(1.035);
  image-rendering: pixelated;
}

.project:hover::before,
.project:hover::after,
.project:focus-visible::before,
.project:focus-visible::after {
  opacity: 1;
}

.p02 img {
  transform: scale(1.55);
  transform-origin: center bottom;
}

.p02::before {
  background-position: center bottom;
  background-size: 155%;
}

.p02:hover img,
.p02:focus-visible img {
  transform: scale(1.6);
}

.project:focus-visible {
  box-shadow: inset 0 0 0 2px #000;
}

.p01 {
  --pixel-image: url("assets/pixel-01.webp");
  left: 4.1667vw;
  top: 2.0833vw;
  width: 18.75vw;
  height: 12.5vw;
}
.p02 {
  --pixel-image: url("assets/pixel-02.webp");
  left: 83.3333vw;
  top: 4.1667vw;
  width: 12.5vw;
  height: 18.75vw;
}
.p03 {
  --pixel-image: url("assets/pixel-03.webp");
  left: 4.1667vw;
  top: 22.9167vw;
  width: 10.4167vw;
  height: 10.4167vw;
}
.p04 {
  --pixel-image: url("assets/pixel-04.webp");
  left: 29.1667vw;
  top: 16.6667vw;
  width: 41.6667vw;
  height: 22.9167vw;
}
.p05 {
  --pixel-image: url("assets/pixel-05.webp");
  left: 79.1667vw;
  top: 33.3333vw;
  width: 16.6667vw;
  height: 16.6667vw;
}
.p06 {
  --pixel-image: url("assets/pixel-06.webp");
  left: 20.8333vw;
  top: 47.9167vw;
  width: 10.4167vw;
  height: 15.625vw;
}
.p07 {
  --pixel-image: url("assets/pixel-07.webp");
  left: 64.5833vw;
  top: 54.1667vw;
  width: 16.6667vw;
  height: 12.5vw;
}
.p08 {
  --pixel-image: url("assets/pixel-08.webp");
  left: 4.1667vw;
  top: 70.8333vw;
  width: 25vw;
  height: 14.5833vw;
}
.p09 {
  --pixel-image: url("assets/pixel-09.webp");
  left: 35.4167vw;
  top: 75vw;
  width: 33.3333vw;
  height: 33.3333vw;
}
.p10 {
  --pixel-image: url("assets/pixel-10.webp");
  left: 83.3333vw;
  top: 81.25vw;
  width: 12.5vw;
  height: 18.75vw;
}
.p11 {
  --pixel-image: url("assets/pixel-11.webp");
  left: 10.4167vw;
  top: 102.0833vw;
  width: 12.5vw;
  height: 18.75vw;
}
.p12 {
  --pixel-image: url("assets/pixel-12.webp");
  left: 83.3333vw;
  top: 112.5vw;
  width: 12.5vw;
  height: 12.5vw;
}
.p13 {
  --pixel-image: url("assets/pixel-13.webp");
  left: 36.4583vw;
  top: 120.8333vw;
  width: 27.0833vw;
  height: 14.5833vw;
}

.site-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 8vw;
  pointer-events: none;
}

.site-header a,
.site-header button {
  pointer-events: auto;
}

.identity {
  position: absolute;
  left: 2.0833vw;
  top: 1.6vw;
  width: 1.5vw;
  height: 1.75vw;
  min-width: 12px;
  min-height: 14px;
}

.identity-mark {
  position: absolute;
  inset: 0;
  display: block;
  background: #000;
  clip-path: polygon(
    0 0,
    68% 0,
    68% 21%,
    100% 21%,
    100% 59%,
    68% 59%,
    68% 100%,
    29% 100%,
    29% 70%,
    0 70%
  );
}

.identity-mark::after {
  content: "";
  position: absolute;
  left: 29%;
  top: 17%;
  width: 24%;
  height: 30%;
  background: #fff;
}

.site-header nav a {
  position: absolute;
  top: 2.0833vw;
  font-size: 1.1111vw;
  line-height: 1.3444vw;
}

.site-header nav a:nth-child(1) {
  left: 27.0833vw;
}
.site-header nav a:nth-child(2) {
  left: 47.0833vw;
}
.site-header nav a:nth-child(3) {
  left: 67.6389vw;
}

.languages {
  position: absolute;
  right: 2.0833vw;
  top: 2.0833vw;
  display: flex;
}

.languages button {
  font-size: 0.9722vw;
  line-height: 1;
  color: #c2c2c2;
}

.languages button[aria-pressed="true"] {
  color: #000;
}

.site-footer {
  position: fixed;
  z-index: 20;
  inset: auto 0 0;
  pointer-events: none;
  font-size: 1.1111vw;
  line-height: 1.3444vw;
}

.site-footer button,
.site-footer span {
  pointer-events: auto;
  position: absolute;
  bottom: 2.74vw;
  white-space: nowrap;
}

.legal button {
  position: static;
  font-size: inherit;
  line-height: inherit;
}

.legal {
  position: absolute;
  left: 1.875vw;
  bottom: 2.74vw;
  display: flex;
  gap: 0.76vw;
  pointer-events: auto;
}

.credit {
  left: 27.0833vw;
  bottom: 1.8vw !important;
  color: #b5b5b5 !important;
  font-size: 0.9722vw;
}

.social {
  position: absolute;
  left: 42.75vw;
  bottom: 2.74vw;
  display: flex;
  gap: 1.6vw;
  pointer-events: auto;
}

.social button {
  position: static;
  font-size: inherit;
}

.contact-placeholder {
  left: 69.03vw;
  bottom: 1.8vw !important;
  color: #b5b5b5;
  font-size: 0.9722vw;
}

.press {
  right: 2.0833vw;
  font-size: inherit;
}

.hover-arrow {
  position: fixed;
  z-index: 24;
  right: 2.1vw;
  top: 1.5vw;
  margin: 0;
  font-size: 1.2vw;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

body.has-project-hover .hover-arrow {
  opacity: 1;
}

.drag-hint,
.project-status {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (max-width: 600px) {
  .desktop-chrome {
    display: none;
  }

  .mobile-chrome {
    display: block;
  }

  .mobile-header {
    position: fixed;
    z-index: 25;
    inset: 0 0 auto;
    height: 100px;
    pointer-events: none;
  }

  .mobile-header > * {
    pointer-events: auto;
  }

  .mobile-header .identity {
    left: 17px;
    top: 17px;
    width: 44px;
    height: 44px;
  }

  .mobile-header .identity-mark {
    inset: 0 auto auto 0;
    width: 27px;
    height: 30px;
  }

  .menu-open,
  .menu-close {
    min-width: 96px;
    min-height: 44px;
    font-size: 20px;
    line-height: 24px;
  }

  .menu-open {
    position: absolute;
    right: 16px;
    top: 13px;
  }

  .plane-copy.clone {
    display: none;
  }

  .wordmark {
    left: 7px;
    top: 400px;
    width: auto;
    font-size: 58px;
    line-height: 64px;
    letter-spacing: -0.1em;
  }

  .project {
    left: auto;
    top: auto;
    width: auto;
    height: auto;
  }

  .p01 {
    left: 51px;
    top: 50px;
    width: 288px;
    height: 192px;
  }
  .p02 {
    left: 101.5px;
    top: 266px;
    width: 187px;
    height: 280px;
  }
  .p03 {
    left: 118.5px;
    top: 570px;
    width: 153px;
    height: 153px;
  }
  .p04 {
    left: 34px;
    top: 747px;
    width: 322px;
    height: 179px;
  }
  .p05 {
    left: 118.5px;
    top: 950px;
    width: 153px;
    height: 153px;
  }
  .p06 {
    left: 101.5px;
    top: 1127px;
    width: 187px;
    height: 280px;
  }
  .p07 {
    left: 34px;
    top: 1431px;
    width: 322px;
    height: 258px;
  }
  .p08 {
    left: 34px;
    top: 1713px;
    width: 322px;
    height: 179px;
  }
  .p09 {
    left: 34px;
    top: 1916px;
    width: 322px;
    height: 321px;
  }
  .p10 {
    left: 101.5px;
    top: 2261px;
    width: 187px;
    height: 280px;
  }
  .p11 {
    left: 84.5px;
    top: 2566px;
    width: 221px;
    height: 392px;
  }
  .p12 {
    left: 101.5px;
    top: 2982px;
    width: 187px;
    height: 188px;
  }
  .p13 {
    left: 34px;
    top: 3194px;
    width: 322px;
    height: 179px;
  }

  .hover-arrow {
    right: 18px;
    top: 68px;
    font-size: 18px;
  }

  .mobile-menu {
    position: fixed;
    z-index: 50;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    visibility: hidden;
    opacity: 0;
    background: #fff;
    transform: translateY(-100%);
    transition:
      transform 0.45s ease,
      opacity 0.2s linear,
      visibility 0s 0.45s;
  }

  .mobile-menu::before {
    content: "";
    position: absolute;
    z-index: 2;
    left: 17px;
    top: 666px;
    width: 5px;
    height: 5px;
    background: #000;
    box-shadow: 351px 0 #000, 0 100px #000, 351px 100px #000;
    pointer-events: none;
  }

  .mobile-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .mobile-menu > .identity-mark {
    left: 17px;
    top: 17px;
    width: 27px;
    height: 30px;
  }

  .menu-close {
    position: absolute;
    top: 13px;
    right: 16px;
    transform: scaleX(0.68);
    transform-origin: right center;
  }

  .menu-main {
    position: absolute;
    inset: 0;
    left: 0;
    right: 0;
    height: 625px;
    font-size: 14px;
    line-height: 14px;
  }

  .menu-main a,
  .menu-main button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-height: 44px;
    min-width: 160px;
    display: grid;
    place-items: center;
    font-size: 14px;
  }

  .menu-languages {
    position: absolute;
    top: 152px;
    left: 50%;
    width: 160px;
    height: 44px;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
  }

  .menu-languages button {
    position: static;
    transform: none;
    min-width: auto;
    color: #aaa;
  }

  .menu-languages button:first-child {
    color: #000;
  }

  .dots {
    position: absolute;
    left: 17px;
    width: 356px;
    height: 84px;
    line-height: 14px;
    text-align: center;
  }

  .menu-main > .dots:nth-of-type(1) {
    top: 195px;
  }

  .menu-main > a:nth-of-type(1) {
    top: 285px;
  }
  .menu-main > a:nth-of-type(2) {
    top: 330.5px;
  }
  .menu-main > a:nth-of-type(3) {
    top: 376px;
  }

  .menu-main > .dots:nth-of-type(2) {
    top: 426px;
    height: 70px;
  }

  .menu-main > button:last-child {
    top: 488.5px;
  }

  .regions {
    position: absolute;
    top: 689px;
    left: 50%;
    width: 340px;
    height: 60px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 13px;
    white-space: nowrap;
  }

  .region-arrows {
    position: absolute;
    left: 76px;
    top: 0;
    font-size: 9px;
    letter-spacing: 3px;
  }

  .region-globe {
    display: inline-grid;
    width: 34px;
    height: 18px;
    place-items: center;
    border: 1px solid #000;
    border-radius: 50%;
    font-size: 17px;
    line-height: 1;
  }

  .menu-bottom {
    position: absolute;
    bottom: 13px;
    display: grid;
    gap: 0;
    font-size: 12px;
    line-height: 20px;
  }

  .menu-bottom button {
    min-height: 24px;
    text-align: inherit;
    font-size: inherit;
  }

  .menu-bottom span {
    color: #aaa;
    margin-top: 3px;
  }

  .menu-bottom.left {
    left: 17px;
    text-align: left;
  }
  .menu-bottom.right {
    right: 17px;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    animation-duration: 0s !important;
  }
}
