@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=LXGW+WenKai&display=swap');
:root {
  --background: #ffffff;
  --text: #3d3d3d;
  --muted: #777777;
  --line: #e8e8e8;
  --brown: #7a5a3a;
  --overlay: rgba(255,255,255,.72);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  animation: page-fade 0.5s ease-out;
}

a {
  color: inherit;
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  width: 100%;
  padding: 20px 42px 24px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.logo {
  justify-self: start;
}

.logo a {
  color: var(--muted);
  font-size: 18px;
  font-weight: 400;
  text-decoration: none;
  transition: color 220ms ease;
}

.logo a:hover {
  color: var(--brown);
}

.logo .cn,
.cn {
    color: inherit;
    font-family: "LXGW WenKai", serif;
    font-size: 1.02em;
    font-weight: 400;
}

nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
  
}

nav a {
  position: relative;
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 2.4px;
  text-decoration: none;
  transition: color 220ms ease;
}

nav a:hover {
  color: var(--brown);
}

nav a::after {
    content: "";

    position: absolute;
    left: 50%;
    bottom: -8px;

    width: 76%;
    height: 1px;

    background: currentColor;

    transform: translateX(-50%);

    opacity: 0;

    transition: opacity 0.45s ease-out;
}

nav a:hover::after,
nav a.active::after {
    opacity: 1;
}

nav span,
.separator {
  color: #aaaaaa;
  font-size: 15px;
}

main {
  width: min(1080px, calc(100% - 48px));
  margin: 72px auto 100px;
}

.artwork {
  text-align: center;
}
.image-wrap {
  position: relative;
  width: min(54%, 610px);
  margin: 0 auto;
  overflow: hidden;
}

.image-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: flex-end;
  justify-content: flex-start;

  padding: 24px 26px;

  background: rgba(255, 255, 255, 0);
  opacity: 0;

  pointer-events: none;

  transition:
    background-color 0.55s ease,
    opacity 0.55s ease;
}

.image-wrap:hover .overlay {
  background: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

.overlay-title {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-style: italic;
  color: var(--text);
}

.overlay-info {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-style: normal;
  color: var(--text);
}

.image-wrap:hover .overlay {
  background: var(--overlay);
  opacity: 1;
  transform: translateY(0);
}

.artwork > h2 {
  margin-top: 34px;

  font-family: "Segoe UI", Arial, sans-serif;

  font-size: 28px;
  font-weight: 400;
}

.meta {
  margin-top: 14px;
  color: var(--muted);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.description {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  text-align: justify;
  text-justify: inter-word;
}

.about,
.abouttext {
  max-width: 640px;
  margin: 0 auto;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  text-align: justify;
  text-justify: inter-word;
}

.about h1,
main > h1 {
  margin-bottom: 38px;
  font-family: Inter, Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  text-align: center;
}

.contact-button {
  position: fixed;

top: 24px;
right: 42px;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  padding: 0;
  color: #ffffff;
  background: #111111;
  border: 0;
  border-radius: 50%;
  font-size: 31px;
  line-height: 1;
  cursor: pointer;
  transition: transform 240ms ease, background-color 240ms ease;
}

.contact-button:hover {
  background: var(--brown);
  transform: scale(1.07);
}

.popup {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.38);
  opacity: 0;
  transition: opacity 250ms ease;
}

.popup.is-open {
  display: flex;
  opacity: 1;
}

.popup-content {
  position: relative;
  width: min(460px, 100%);
  padding: 42px;
  background: #ffffff;
  border-radius: 16px;
  transform: translateY(10px);
  animation: popup-enter 260ms ease forwards;
}

.popup-content h2 {
  margin-bottom: 30px;

  color: var(--brown);

  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 2.4px;
}
.contact-intro {
  margin-bottom: 24px;

  color: var(--brown);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.contact-email {
  margin: 24px 0 42px;
}

.contact-email a {
  color: var(--brown);
  font-family: "Segoe UI", Arial, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.popup-content label {
  color: var(--brown);

  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.popup-content form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.popup-content input,
.popup-content textarea {
  width: 100%;
  padding: 14px 15px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  font: inherit;
  outline: none;
  transition: border-color 200ms ease;
}

.popup-content textarea {
  min-height: 150px;
  resize: vertical;
}

.popup-content input:focus,
.popup-content textarea:focus {
  border-color: var(--brown);
}

.popup-content button[type="submit"] {
  align-self: flex-start;
  padding: 12px 24px;
  color: #ffffff;
  background: #111111;
  border: 0;
  font: inherit;
  cursor: pointer;
  transition: background-color 220ms ease, transform 220ms ease;
}

.popup-content button[type="submit"]:hover {
  background: var(--brown);
  transform: translateY(-1px);
}

#close-popup {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 6px;
  color: var(--text);
  background: none;
  border: 0;
  font-size: 20px;
  cursor: pointer;
}

@keyframes popup-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 820px) {
  header {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 24px;
  }

  .logo,
  nav {
    justify-self: center;
  }

  header > :last-child {
    display: none;
  }

  nav a {
    font-size: 14px;
    letter-spacing: 1.8px;
  }

  main {
    margin-top: 50px;
  }

  .image-wrap {
    width: min(78%, 570px);
  }

  .contact-button {
    width: 64px;
    height: 64px;
    font-size: 27px;
  }
}

@media (max-width: 520px) {
  nav {
    gap: 11px;
  }

  nav a {
    font-size: 12px;
    letter-spacing: 1.3px;
  }

  main {
    width: min(100% - 28px, 1080px);
  }

  .image-wrap {
    width: 92%;
  }

  .description,
  .about,
  .abouttext {
    font-size: 15px;
    line-height: 1.8;
  }

  .popup-content {
    padding: 36px 24px 28px;
  }
}

@keyframes page-fade {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}

body {
  transition: opacity 0.23s ease;
}

body.page-leaving {
  opacity: 0;
}