@font-face {
  font-family: DunbenSerif;
  src: url("fonts/LibertinusSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: DunbenSans;
  src: url("fonts/DMSans-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --main-navigation-dark: #18191a;
  --main-navigation-light: #f6f1e8;
  --main-navigation-ease: cubic-bezier(.16, 1, .3, 1);
}

.main-navigation,
.main-navigation__overlay {
  box-sizing: border-box;
  font-family: DunbenSans, "Dunben Sans SC", Helvetica, Arial, sans-serif;
}

.main-navigation *,
.main-navigation__overlay * {
  box-sizing: border-box;
}

.main-navigation__logo {
  z-index: 10030;
  position: fixed;
  top: clamp(18px, 2.2vw, 30px);
  left: clamp(20px, 3.4vw, 46px);
  width: clamp(68px, 6vw, 92px);
  display: block;
  color: #fff;
  line-height: 0;
  text-decoration: none;
  mix-blend-mode: difference;
}

.main-navigation__logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) brightness(0) invert(1);
}

.main-navigation__logo:focus-visible,
.main-navigation__button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 6px;
}

.main-navigation__button {
  z-index: 10030;
  position: fixed;
  top: clamp(22px, 3vw, 42px);
  right: clamp(22px, 4vw, 58px);
  width: 2.3rem;
  height: 2rem;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--main-navigation-light);
  background: transparent;
  border: 0;
  cursor: pointer;
  mix-blend-mode: difference;
}

.main-navigation__button-lines {
  pointer-events: none;
  width: 100%;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  gap: .3rem;
}

.main-navigation__line {
  width: 100%;
  height: .16rem;
  background: currentColor;
  transform-origin: center;
  transition: transform .65s var(--main-navigation-ease);
}

.main-navigation.is-open .main-navigation__line--top {
  transform: translateY(.23rem) rotate(45deg);
}

.main-navigation.is-open .main-navigation__line--bottom {
  transform: translateY(-.23rem) rotate(-45deg);
}

.main-navigation__overlay {
  z-index: 10020;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
  background: var(--main-navigation-dark);
  color: var(--main-navigation-light);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .95s cubic-bezier(.77, 0, .175, 1);
}

.main-navigation__overlay.is-open {
  pointer-events: auto;
  clip-path: inset(0);
}

.main-navigation__container {
  width: 100%;
  height: 100%;
  padding: clamp(80px, 9vw, 132px) clamp(24px, 7vw, 96px) clamp(28px, 4vw, 58px);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

.main-navigation__layout {
  min-height: 0;
  flex: 0 0 auto;
  max-width: 100%;
  margin-block: auto;
  align-items: center;
  display: flex;
  flex-flow: column;
  justify-content: center;
  gap: clamp(32px, 6svh, 64px);
}

.main-navigation__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: clamp(16px, 2.3vw, 34px);
}

.main-navigation__item {
  overflow: clip;
}

.main-navigation__link {
  display: inline-block;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-family: DunbenSerif, "Libertinus Sans", "Dunben Serif SC", Georgia, serif;
  font-size: clamp(56px, 9.3vw, 142px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: 0;
  text-decoration: none;
  transform: translateY(115%) rotate(2deg);
  transform-origin: left bottom;
  opacity: 0;
  transition: transform .9s var(--main-navigation-ease), opacity .65s ease, color .25s ease;
}

.main-navigation__overlay.is-open .main-navigation__link {
  transform: translateY(0) rotate(0);
  opacity: 1;
}

/* zh (2026-10-14): 8px smaller, and a taller line box. The Latin .88 line
   height leaves no room above CJK glyphs (思源宋体 fills the full em), so the
   item's overflow:clip — which hides the links before the reveal — was
   shaving the tops of 作品 / 关于, worse on the -.06em hover lift. 1.2 keeps
   the ink plus the lift inside the clip box. :where() holds this at the base
   rule's specificity so the ≤ --bp-md size below still applies on phones. */
:where(html[lang="zh-CN"]) .main-navigation__link {
  font-size: calc(clamp(56px, 9.3vw, 142px) - 14px); /* −8, then −6 more on desktop (2026-10-14) */
  line-height: 1.14;
}

/* zh desktop: tighter rows — the list gap drops to about a third. Phones keep
   their own stack (≤760px). 1.14 above still clears the ink + hover lift. */
@media (min-width: 761px) {
  html[lang="zh-CN"] .main-navigation__list { gap: clamp(4px, .8vw, 12px); }
}

.main-navigation__overlay.is-open .main-navigation__item:nth-child(1) .main-navigation__link {
  transition-delay: .18s;
}

.main-navigation__overlay.is-open .main-navigation__item:nth-child(2) .main-navigation__link {
  transition-delay: .27s;
}

.main-navigation__overlay.is-open .main-navigation__item:nth-child(3) .main-navigation__link {
  transition-delay: .36s;
}

.main-navigation__overlay.is-open .main-navigation__item:nth-child(4) .main-navigation__link {
  transition-delay: .45s;
}

@media (max-height: 780px) and (min-width: 761px) {
  html[lang="zh-CN"] .main-navigation__link { font-size: min(9vw, 11svh); }
  .main-navigation__container { padding-top: 100px; padding-bottom: 28px; }
  .main-navigation__layout { gap: 24px; }
}

.main-navigation__link:hover,
.main-navigation__link:focus-visible,
.main-navigation__link.is-active {
  color: #fff;
  transform: translateY(-.06em);
}

.main-navigation__links {
  display: flex;
  align-items: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s ease, transform .75s var(--main-navigation-ease);
}

.main-navigation__overlay.is-open .main-navigation__links {
  opacity: 1;
  transform: translateY(0);
  transition-delay: .5s;
}

.main-navigation__contact.shiny-cta {
  margin: 0;
}


html.main-navigation-open,
html.main-navigation-open body {
  overflow: hidden;
}


@media (max-width: 760px) {
  .main-navigation__logo {
    top: 18px;
    left: 20px;
    width: 76px;
  }

  .main-navigation__button {
    top: 17px;
    right: 18px;
  }

  .main-navigation__container {
    padding: 96px 24px 34px;
  }


  .main-navigation__link {
    font-size: clamp(54px, 17vw, 86px);
  }

  :where(html[lang="zh-CN"]) .main-navigation__link {
    font-size: calc(clamp(54px, 17vw, 86px) - 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-navigation__overlay,
  .main-navigation__link,
  .main-navigation__links,
  .main-navigation__line,
  .main-navigation__contact {
    transition: none !important;
  }
}

/* ---------------------------------------------------------------------------
   Language switcher (EN / CN) — i18n, 2026-10-12.
   Desktop: sits in the same row as the email button, to its right.
   Below --bp-md (48rem) the row stacks and the switcher moves ABOVE the email
   button (structural change → allowed media query per RESPONSIVE.md).
   Tap targets ≥ 44px. Current language full opacity, the other one muted.
--------------------------------------------------------------------------- */
.main-navigation__lang {
  display: inline-flex;
  align-items: center;
  gap: .25em;
  font-family: DunbenSans, "Dunben Sans SC", Helvetica, Arial, sans-serif;
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--main-navigation-light);
}

.main-navigation__lang-option {
  min-width: 44px;
  min-height: 44px;
  padding: 0 .35em;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  opacity: .45;
  cursor: pointer;
  transition: opacity .25s ease;
}

.main-navigation__lang-option:hover,
.main-navigation__lang-option:focus-visible {
  opacity: .8;
}

.main-navigation__lang-option.is-current {
  opacity: 1;
  cursor: default;
  text-decoration: underline;
  text-underline-offset: .35em;
  text-decoration-thickness: 1px;
}

.main-navigation__lang-divider {
  opacity: .35;
}

@media (max-width: 47.99rem) {
  .main-navigation__links {
    flex-direction: column-reverse;
    gap: 12px;
  }
}
