@font-face {
  font-family: "sabon-web";
  src: url("./fonts/sabon-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "sabon-web";
  src: url("./fonts/sabon-bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif KR";
  src: url("./fonts/noto-serif-kr-site.woff") format("woff");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --header-height-top: 46px;
  --main-top: 240px;
  --gap: 16px;
  --line: 18px;
  --background: #fff;
  --foreground: #000;
  --hover: #0000ff;
}

html {
  box-sizing: border-box;
  background: var(--background);
  color: var(--foreground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "sabon-web", "Noto Serif KR", "Times New Roman", Times, Batang, "AppleMyungjo", serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--hover);
  text-decoration: none;
}

a:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.menu-link-active {
  color: var(--hover);
}

.work-title-ko {
  font-family: "Noto Serif KR", Batang, "AppleMyungjo", serif;
  font-weight: 500;
}

.header-top {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height-top);
  padding: 0 var(--gap);
  background: var(--background);
  line-height: var(--header-height-top);
}

.site-title {
  font: inherit;
  line-height: var(--header-height-top);
}

.menu-toggle {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: var(--header-height-top);
  cursor: pointer;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  color: var(--hover);
}

.menu-grid {
  position: fixed;
  z-index: 90;
  top: var(--header-height-top);
  left: 0;
  display: flex;
  width: 100%;
  padding: 8px var(--gap) 20px;
  background: var(--background);
}

.menu-column {
  width: 240px;
  flex: 0 0 240px;
}

.works-column {
  width: 280px;
  flex-basis: 280px;
}

.menu-column p {
  margin-bottom: var(--line);
}

.menu-line {
  display: block;
}

.menu-line a {
  white-space: nowrap;
}

.page-canvas {
  min-height: 100vh;
  padding: var(--main-top) var(--gap) 100px;
}

.project-shell {
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 20% 80%;
  grid-template-rows: 50% 50%;
  grid-template-areas:
    "toolbar slideshow"
    "caption slideshow";
  padding: 32px;
  background: var(--background);
}

.project-toolbar {
  grid-area: toolbar;
  align-self: start;
  z-index: 110;
  line-height: 1.4;
}

.project-caption {
  grid-area: caption;
  align-self: end;
  max-width: calc(100% - 32px);
  line-height: 1.4;
}

.project-caption h2 {
  margin: 0 0 4px;
  font: inherit;
  font-weight: 400;
}

.project-artwork-caption span {
  display: block;
}

.project-back {
  font-weight: 700;
}

.project-back-mobile,
.biography-back-mobile {
  display: none;
}

.project-slideshow {
  grid-area: slideshow;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  container-type: inline-size;
}

.project-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  animation: project-fade-in 0.5s ease both;
}

.project-slide img {
  display: block;
  flex: none;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(100%, 75cqw);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.project-nav {
  position: absolute;
  z-index: 30;
  top: 0;
  bottom: 0;
  width: 50%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.project-nav-previous {
  left: 0;
  cursor: w-resize;
}

.project-nav-next {
  right: 0;
  cursor: e-resize;
}

.project-nav:focus,
.project-nav:focus-visible {
  outline: none;
  box-shadow: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.installation-index-shell {
  min-height: 100vh;
  padding: var(--main-top) var(--gap) 100px;
  background: var(--background);
}

.installation-list {
  display: grid;
  gap: 96px;
  width: min(68vw, 1080px);
}

.installation-card h2,
.installation-detail-header h1 {
  margin: 0;
  font: inherit;
}

.installation-card img {
  display: block;
  width: 100%;
  height: auto;
}

.reveal-image {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.reveal-image.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

.installation-card-text {
  display: block;
  padding-top: 8px;
  animation: archive-content-enter 0.6s ease-in-out both;
}

.installation-site-header .menu-grid {
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.installation-site-header.installation-menu-hidden .menu-grid {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-130px);
}

.installation-detail-shell {
  min-height: 100vh;
  padding: 0 var(--gap) 100px;
  background: var(--background);
}

.installation-detail-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  width: 100%;
  margin-bottom: 0;
  padding: 16px 0;
  background: var(--background);
}

.installation-detail-back {
  justify-self: end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.installation-detail-images {
  display: grid;
  gap: 16px;
  width: min(72vw, 1080px);
}

.installation-detail-images figure {
  margin: 0;
}

.installation-detail-images .installation-detail-portrait {
  width: 56.6666667%;
}

.installation-detail-images img {
  display: block;
  width: 100%;
  height: auto;
}

.installation-detail-essays {
  display: grid;
  gap: 96px;
  width: min(72vw, 1080px);
  margin-top: 96px;
  font-size: 14.4px;
  line-height: 1.5;
}

.installation-detail-essay {
  max-width: 100%;
}

.installation-detail-essay h2 {
  margin: 0;
  font: inherit;
  font-weight: 400;
}

.installation-detail-essay-heading {
  margin-bottom: 1.5em;
}

.installation-detail-essay-heading p {
  text-align: right;
}

.installation-detail-essay-body {
  display: grid;
  gap: 1.5em;
}

.installation-detail-essay-notes {
  display: grid;
  gap: 0.35em;
  margin-top: 1.5em;
  font-size: 0.9em;
}

.texts-shell,
.biography-shell {
  min-height: 100vh;
  padding: var(--main-top) var(--gap) 100px;
  background: var(--background);
  animation: archive-content-enter 0.6s ease-in-out both;
}

.texts-alignment-frame {
  display: grid;
  grid-template-columns: 280px 240px max-content;
  width: max-content;
  max-width: 100%;
}

.texts-contact-width {
  visibility: hidden;
  grid-row: 1;
  grid-column: 3;
  pointer-events: none;
}

.texts-flat-list {
  grid-row: 1;
  grid-column: 1 / -1;
  width: 100%;
}

.texts-flat-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: baseline;
  padding: 0;
  font-size: 21px;
  line-height: 33.6px;
}

.texts-flat-entry + .texts-flat-entry {
  margin-top: 0;
}

.texts-flat-entry:hover {
  color: var(--hover);
}

.texts-flat-entry h2,
.biography-detail-header h1,
.biography-intro h2,
.biography-section h3 {
  margin: 0;
  font: inherit;
}

.biography-detail-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 16px;
  background: var(--background);
}

.biography-shell {
  padding-top: 72px;
}

.biography-intro {
  margin-bottom: 60px;
}

.biography-intro h2 {
  padding-bottom: 10px;
  border-bottom: 1px solid currentColor;
}

.biography-intro p {
  margin-top: 10px;
}

.biography-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.biography-column {
  min-width: 0;
  padding-right: 24px;
}

.biography-column + .biography-column {
  padding-right: 0;
  padding-left: 24px;
  border-left: 1px solid currentColor;
}

.biography-section + .biography-section {
  margin-top: 54px;
}

.biography-section h3 {
  margin-bottom: 18px;
  font-weight: 600;
}

.biography-column[lang="ko"] .biography-section h3 {
  font-weight: 400;
}

.biography-section p {
  line-height: 1.45;
}

@media (min-width: 921px) {
  .biography-intro h2 {
    border-bottom: 0;
  }
}

@keyframes project-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes archive-content-enter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  :root {
    --main-top: 102px;
  }

  .header-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

  .menu-grid {
    display: none;
  }

  .site-header.menu-open .header-top,
  .site-header.menu-open .menu-grid {
    background: blue;
  }

  .site-header.menu-open .site-title a,
  .site-header.menu-open .menu-toggle,
  .site-header.menu-open .menu-grid a {
    color: #fff;
  }

  .site-header.menu-open .menu-grid a:hover,
  .site-header.menu-open .menu-grid a:focus-visible,
  .site-header.menu-open .menu-toggle:hover,
  .site-header.menu-open .menu-toggle:focus-visible {
    color: #000;
  }

  .site-header.menu-open .menu-grid {
    display: block;
    height: calc(100vh - var(--header-height-top));
    padding-top: 60px;
  }

  .menu-column {
    width: 100%;
    margin-bottom: 60px;
    border-bottom: 1px solid #fff;
  }

  .menu-column p {
    margin-bottom: 10px;
  }

  .project-shell {
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    grid-template-columns: 100%;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "toolbar"
      "slideshow"
      "caption";
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px
      calc(12px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: none;
  }

  html:has(.project-shell),
  body:has(.project-shell) {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .project-toolbar {
    margin-bottom: 12px;
  }

  .project-back-desktop,
  .biography-back-desktop {
    display: none;
  }

  .project-back-mobile,
  .biography-back-mobile {
    display: inline;
  }

  .project-slide img {
    max-height: 100%;
  }

  .project-caption {
    max-width: 100%;
    padding-top: 12px;
    font-size: 0.8rem;
  }

  .project-nav {
    width: 20%;
  }

  .installation-detail-shell {
    padding: 0 16px 72px;
  }

  .installation-detail-header {
    top: 0;
    margin-right: -16px;
    margin-left: -16px;
    width: calc(100% + 32px);
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 16px;
    font-size: 0.8rem;
  }

  .installation-list,
  .installation-detail-images,
  .installation-detail-essays {
    width: 100%;
    margin-left: 0;
  }

  .installation-detail-essays {
    gap: 72px;
    margin-top: 72px;
    font-size: 13.1px;
  }

  .installation-list {
    gap: 72px;
  }

  .installation-index-shell {
    font-size: 0.8rem;
  }

  .installation-site-header.menu-open .menu-grid {
    pointer-events: auto;
    opacity: 1;
    transform: none;
  }

  .texts-shell,
  .biography-shell {
    padding-right: 16px;
    padding-bottom: 72px;
    padding-left: 16px;
  }

  .biography-detail-header,
  .biography-shell {
    font-size: 0.8rem;
  }

  .texts-alignment-frame,
  .texts-flat-list {
    display: block;
    width: 100%;
  }

  .texts-contact-width {
    display: none;
  }

  .texts-flat-entry {
    gap: 16px;
    padding: 2px 0;
    font-size: 15px;
    line-height: 24px;
  }

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

  .biography-column {
    padding-right: 0;
  }

  .biography-column + .biography-column {
    margin-top: 72px;
    padding-top: 72px;
    padding-left: 0;
    border-top: 1px solid currentColor;
    border-left: 0;
  }

  .biography-column[lang="ko"] {
    order: -1;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .biography-column[lang="en"] {
    order: 1;
    margin-top: 72px;
    padding-top: 72px;
    border-top: 0;
  }

  .biography-section {
    padding-bottom: 10px;
    border-bottom: 1px solid currentColor;
  }

  .biography-section + .biography-section {
    margin-top: 60px;
  }

  .biography-section h3 {
    margin-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-slide,
  .installation-card-text,
  .texts-shell,
  .biography-shell {
    animation: none;
  }

  .reveal-image {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
