:root {
  --ink: #101010;
  --paper: #f6f6f3;
  --muted: #777;
  --line: rgba(16, 16, 16, 0.2);
  --panel: #d8d8d4;
  --white: #fff;
  --pad: 28px;
  --sans: "DM Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

img,
video {
  max-width: 100%;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

[data-media-guard] {
  -webkit-touch-callout: none;
  user-select: none;
}

[data-media-guard] img {
  pointer-events: none;
}

[data-media-guard]::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  background: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  content: "";
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: var(--pad);
  padding: 9px 12px;
  color: var(--paper);
  background: var(--ink);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease var(--reveal-delay, 0ms),
    transform 0.45s ease var(--reveal-delay, 0ms);
}

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  display: grid;
  width: 100%;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  gap: 20px;
  padding: 14px var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 246, 243, 0.94);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand {
  display: flex;
  gap: 18px;
}

.header-role,
.header-clock {
  margin: 0;
}

.header-role span,
.header-clock span:last-child {
  color: var(--muted);
}

.menu-trigger,
.menu-close,
.project-close {
  align-self: start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-trigger::after {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border: 1px solid var(--ink);
  background: var(--white);
  content: "";
}

.menu-panel {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  color: var(--ink);
  background: var(--white);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-100%);
  transition: transform 0.35s ease, opacity 0.25s ease, visibility 0s linear 0.35s;
}

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

.menu-panel a {
  width: fit-content;
  font-size: 88px;
  font-weight: 700;
  line-height: 0.95;
}

.menu-panel a:hover {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
}

.menu-panel p {
  margin: 42px 0 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.menu-close {
  position: absolute;
  top: 17px;
  right: var(--pad);
}

.hero {
  min-height: 100svh;
  padding: 112px var(--pad) 28px;
}

.hero-layout {
  display: grid;
  min-height: calc(100svh - 140px);
  grid-template-columns: 1fr 390px;
  gap: 32px;
  align-items: end;
}

.eyebrow,
.section-heading,
.contact > p {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 1080px;
  margin: 14px 0 0;
  font-size: 140px;
  font-weight: 700;
  line-height: 0.86;
}

em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero-panel {
  position: relative;
  padding: 20px;
  border: 2px solid var(--ink);
  background: var(--white);
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  background: var(--white);
  content: "";
}

.hero-panel::before {
  top: -11px;
  left: -11px;
}

.hero-panel::after {
  right: -11px;
  bottom: -11px;
}

.panel-label {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 700;
}

.hero-panel p:last-of-type {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.55;
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-top: 28px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.arrow {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.work {
  padding: 0 var(--pad);
}

.work-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border-top: 1px solid var(--ink);
}

.work-index {
  position: sticky;
  top: 46px;
  min-height: calc(100svh - 46px);
  padding-bottom: 28px;
  background: var(--paper);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--line);
}

.section-heading p {
  margin: 0;
}

.work-index ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-index a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.work-index span,
.work-index small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.work-index strong {
  display: block;
  font-size: 13px;
}

.project-title-cn,
.project-title-en {
  display: block;
  overflow-wrap: anywhere;
}

.project-title-en {
  color: var(--muted);
  font-size: 0.82em;
  line-height: 1.15;
}

.work-index small {
  grid-column: 2;
}

.work-index a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 54px 14px;
  padding: 14px 0 120px;
}

.project-card {
  min-width: 0;
}

.project-card.card-wide {
  grid-column: span 2;
}

.art {
  position: relative;
  overflow: hidden;
  background: var(--panel);
}

.project-card .art {
  aspect-ratio: 4 / 5;
}

.project-card.card-wide .art {
  aspect-ratio: 16 / 9;
}

.art-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.project-card:hover .art-photo img {
  transform: scale(1.03);
}

.project-meta {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  padding-top: 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.project-meta h2,
.project-meta p {
  margin: 0;
  font-size: inherit;
}

.project-meta h2 {
  line-height: 1.16;
}

.project-meta .project-title-en {
  margin-top: 2px;
}

.project-meta p {
  grid-column: 2;
  color: var(--muted);
}

.project-meta span {
  grid-row: 1 / 3;
  color: var(--muted);
}

.project-meta strong {
  grid-row: 1;
  grid-column: 3;
  font-size: inherit;
}

.about {
  padding: 0 var(--pad) 130px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  min-height: 68svh;
  padding-top: 26px;
}

.about h2,
.contact h2 {
  margin: 0;
  font-size: 86px;
  font-weight: 700;
  line-height: 0.95;
}

.about-copy {
  max-width: 620px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
}

.about-copy p {
  margin: 0 0 24px;
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.resume-block {
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.resume-block h3 {
  margin: 0 0 18px;
  font-size: 26px;
}

.resume-block ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.resume-block p {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.contact {
  min-height: 92svh;
  padding: 20px var(--pad) 16px;
  color: var(--paper);
  background: var(--ink);
}

.contact h2 {
  max-width: 1100px;
  margin-top: 110px;
}

.contact-link {
  display: inline-block;
  margin-top: 42px;
  border-bottom: 1px solid currentColor;
  font-size: 38px;
  font-weight: 700;
}

.contact-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 190px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links[hidden] {
  display: none;
}

.not-found-home {
  align-self: start;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.not-found {
  position: relative;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 150px var(--pad) 26px;
}

.not-found-code {
  position: absolute;
  right: 0;
  bottom: 0;
  margin: 0;
  color: rgba(18, 18, 18, 0.07);
  font-size: 260px;
  font-weight: 700;
  line-height: 0.8;
  pointer-events: none;
}

.not-found-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 1050px);
}

.not-found h1 {
  margin: 0;
  font-size: 128px;
  font-weight: 700;
  line-height: 0.9;
}

.not-found-copy > p {
  max-width: 420px;
  margin: 36px 0 0 auto;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.not-found-link {
  display: flex;
  max-width: 420px;
  justify-content: space-between;
  margin: 44px 0 0 auto;
  padding: 12px 0 10px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  :root {
    --pad: 20px;
  }

  .hero h1 {
    font-size: 96px;
  }

  .work-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .about h2,
  .contact h2 {
    font-size: 64px;
  }

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

@media (max-width: 760px) {
  :root {
    --pad: 16px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-role,
  .header-clock {
    display: none;
  }

  .menu-panel a {
    font-size: 58px;
  }

  .hero {
    min-height: 92svh;
    padding-top: 96px;
  }

  .hero-layout {
    display: block;
    min-height: auto;
  }

  .hero h1 {
    font-size: 64px;
  }

  .hero-panel {
    margin-top: 48px;
  }

  .work-shell {
    display: block;
  }

  .work-index {
    position: static;
    min-height: 0;
  }

  .project-grid {
    display: block;
    padding-bottom: 80px;
  }

  .project-card {
    display: block;
    margin-bottom: 36px;
  }

  .project-card .art,
  .project-card.card-wide .art {
    aspect-ratio: 4 / 5;
  }

  .about {
    padding-bottom: 90px;
  }

  .about-grid {
    display: block;
    min-height: auto;
    padding-bottom: 60px;
  }

  .about h2,
  .contact h2 {
    font-size: 50px;
  }

  .about-copy {
    margin-top: 36px;
    font-size: 18px;
  }

  .contact {
    min-height: 84svh;
  }

  .contact-link {
    font-size: 28px;
  }

  .contact-footer {
    display: block;
    margin-top: 120px;
  }

  .not-found {
    padding-top: 110px;
  }

  .not-found h1 {
    font-size: 72px;
  }

  .not-found-copy > p,
  .not-found-link {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
