:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #080808;
  --muted: #7a7a7a;
  --line: #e2e2e2;
  --soft: #f2f2ef;
  --accent: #5a6f79;
  --header: 64px;
  --ease: cubic-bezier(.76, 0, .24, 1);
  --big-ease: cubic-bezier(.45, 0, .55, 1);
  --zoom-open-ease: cubic-bezier(.25, .46, .45, .94);
  --column-rest-scale: 1;
  --expanded-counter-scale: 1;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

body[data-page="project"] {
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

img {
  max-width: 100%;
  -webkit-user-drag: none;
  user-select: 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;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
  color: #fff;
  animation: intro-slide 920ms var(--ease) 720ms forwards;
}

.intro-logo {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  animation: intro-logo 920ms var(--ease) 720ms forwards;
}

.intro-seen .intro {
  display: none;
}

@keyframes intro-slide {
  to {
    transform: translateY(-100%);
  }
}

@keyframes intro-logo {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50vw + 56px), calc(-50vh + 32px)) scale(.72);
    opacity: 0;
  }
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 130px;
  align-items: center;
  min-height: var(--header);
  padding: 0 34px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.brand {
  width: fit-content;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.category-nav {
  display: flex;
  justify-content: center;
  gap: clamp(26px, 6vw, 110px);
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.category-link {
  border: 0;
  padding: 8px 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
}

.category-link:hover,
.category-link:focus-visible,
.category-link[aria-pressed="true"] {
  color: var(--ink);
}

.language-switch {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.language-switch a {
  padding: 8px 0;
}

.language-switch a[aria-current="true"] {
  color: var(--ink);
}

.index-main {
  padding-top: calc(var(--header) + 28px);
}

.project-list {
  width: min(1620px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 0 0 70px;
  content-visibility: auto;
}

.projects-scaler {
  display: grid;
  gap: 34px;
  transform: scale(var(--column-rest-scale, 1));
  transform-origin: 50% 0;
}

.index-project {
  transition: opacity 180ms ease;
}

@media (min-width: 1024px) {
  body[data-page="index"] {
    --column-rest-scale: .752;
  }
}

.index-project[hidden] {
  display: none;
}

.index-project .project-summary {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(320px, 1fr);
  gap: 42px;
  align-items: start;
  width: min(960px, 100%);
  margin: 0 auto;
}

.index-project-meta {
  position: relative;
  top: auto;
  align-self: start;
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding-top: 0;
  text-align: right;
}

.index-project h2 {
  max-width: 260px;
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.12;
}

.index-project p {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.index-project figure {
  margin: 0;
  background: var(--soft);
  overflow: hidden;
}

.index-project img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.index-project .project-summary:hover img,
.index-project .project-summary:focus-visible img {
  filter: contrast(1.04);
}

.index-project.is-expanded {
  width: 100vw;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  scroll-margin-top: calc(var(--header) + 24px);
  transform-origin: 50% 0;
}

@media (min-width: 1024px) {
  body[data-page="index"].is-project-open .index-project.is-expanded {
    --expanded-counter-scale: 1.3298;
    position: relative;
    z-index: 2;
    margin-bottom: calc(min(62vh, 660px) * .33);
    transform: scale(var(--expanded-counter-scale));
  }
}

.expanded-project-meta {
  flex: 0 0 clamp(260px, 22vw, 380px);
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 10px;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 0;
  padding-right: 6px;
  text-align: right;
  scrollbar-width: thin;
}

.expanded-project-meta h2 {
  max-width: 260px;
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.expanded-project-meta > p {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-collapse {
  display: none;
}

.expanded-strip {
  display: flex;
  gap: clamp(28px, 4vw, 64px);
  align-items: flex-start;
  width: 100vw;
  max-width: none;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  padding-right: clamp(18px, 2.5vw, 56px);
  padding-left: clamp(18px, 2.5vw, 56px);
  height: min(62vh, 660px);
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  scroll-behavior: auto;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  transform: translate3d(0, 0, 0);
  transition: height 780ms var(--big-ease);
  will-change: height;
}

.index-project.is-expanded.is-project-zooming .expanded-strip {
  animation: selected-project-zoom-in 720ms var(--zoom-open-ease) both;
  transform-origin: 50% 50%;
}

@keyframes selected-project-zoom-in {
  from {
    transform: scale(.94);
    opacity: .98;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.expanded-strip:focus {
  outline: 0;
}

.expanded-strip.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.expanded-strip > * {
  flex-shrink: 0;
}

.expanded-strip::-webkit-scrollbar {
  display: none;
}

.inline-media-panel {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  max-width: 84vw;
  margin: 0;
  background: var(--soft);
  transform: translate3d(0, 0, 0);
  transition: width 780ms var(--big-ease), height 780ms var(--big-ease);
  will-change: width, height;
}

.inline-media-panel.hero-panel {
  flex-basis: min(64vw, 1120px);
  width: min(64vw, 1120px);
  max-width: min(64vw, 1120px);
}

.inline-media-panel img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 84vw;
  object-fit: contain;
}

.inline-media-panel.hero-panel img {
  width: 100%;
  max-width: 100%;
  object-fit: cover;
}

.inline-media-panel figcaption {
  position: absolute;
  right: 0;
  bottom: -22px;
  color: var(--muted);
  font-size: 11px;
}

.inline-copy-panel {
  flex: 0 0 clamp(340px, 30vw, 480px);
  display: grid;
  align-content: start;
  gap: 18px;
  height: 100%;
  padding-top: 4px;
  opacity: 0;
  transform: translateX(18px);
  animation: panel-reveal 400ms ease 420ms forwards;
}

@keyframes panel-reveal {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.inline-copy-panel p {
  margin: 0;
  font-size: 15px;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.inline-copy-panel h3 {
  margin: 0 0 -6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
}

.empty-state {
  margin: 40px 0;
  color: var(--muted);
  text-align: center;
}

.index-footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding: 58px 34px 72px;
  border-top: 1px solid var(--line);
}

.index-footer h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
}

.index-footer p,
.index-footer a {
  margin: 0;
  color: var(--muted);
}

.source-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0 0;
}

.source-stats div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.source-stats dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.source-stats dd {
  margin: 2px 0 0;
  font-size: 28px;
}

.detail-main {
  height: 100vh;
  padding-top: var(--header);
  overflow: hidden;
}

.project-strip {
  display: flex;
  gap: clamp(42px, 5vw, 86px);
  align-items: flex-start;
  height: calc(100vh - var(--header));
  overflow-x: auto;
  overflow-y: hidden;
  padding: 64px 8vw 74px 18vw;
  cursor: grab;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-width: none;
  touch-action: pan-x;
  -ms-overflow-style: none;
}

.project-strip:focus {
  outline: 0;
}

.project-strip.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.project-strip::-webkit-scrollbar {
  display: none;
}

.project-info-panel {
  flex: 0 0 260px;
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 16px;
  min-height: min(76vh, 800px);
  padding-top: 2px;
  text-align: right;
}

.project-info-panel h1 {
  max-width: 260px;
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.08;
}

.project-info-panel > p {
  margin: -6px 0 22px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.project-meta-list {
  display: grid;
  gap: 16px;
  width: 100%;
  margin: 0;
}

.project-meta-list div {
  display: grid;
  gap: 3px;
}

.project-meta-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.project-meta-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}

.media-panel {
  position: relative;
  flex: 0 0 auto;
  height: min(76vh, 800px);
  max-width: 90vw;
  margin: 0;
  background: var(--soft);
}

.media-panel img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 90vw;
  object-fit: contain;
}

.media-panel figcaption {
  position: absolute;
  right: 0;
  bottom: -22px;
  color: var(--muted);
  font-size: 11px;
}

.copy-panel {
  flex: 0 0 320px;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: min(76vh, 800px);
  padding-top: 4px;
}

.copy-panel p {
  margin: 0;
  font-size: 17px;
  line-height: 1.24;
}

.strip-controls {
  position: fixed;
  right: 34px;
  bottom: 22px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.strip-controls button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.strip-controls a:hover,
.strip-controls button:hover {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .intro {
    animation-duration: 1ms;
    animation-delay: 1ms;
  }

  .intro-logo {
    animation-duration: 1ms;
    animation-delay: 1ms;
  }

  .project-strip {
    scroll-behavior: auto;
  }

  .expanded-strip {
    scroll-behavior: auto;
  }

  .index-project.is-expanded.is-project-zooming .expanded-strip {
    animation: none;
  }

  .projects-scaler {
    transform: none !important;
  }
}

@media (max-width: 980px) {
  :root {
    --header: 86px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  .site-header {
    grid-template-columns: auto auto;
    gap: 10px;
    padding: 0 18px;
  }

  .category-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: flex-start;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .language-switch {
    justify-self: end;
  }

  .project-list {
    width: min(720px, calc(100vw - 36px));
    content-visibility: visible;
  }

  .projects-scaler {
    gap: 28px;
    transform: none;
  }

  .index-project .project-summary {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .index-project-meta {
    grid-template-columns: 1fr;
    justify-items: start;
    min-height: 0;
    text-align: left;
  }

  .expanded-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    width: 100vw;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
    height: auto;
    overflow: visible;
    cursor: auto;
    touch-action: auto;
    transform: none;
  }

  .index-project.is-expanded {
    width: 100vw;
    max-width: none;
  }

  .expanded-project-meta {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    overflow: visible;
    padding-right: 18px;
    padding-left: 18px;
    justify-items: start;
    text-align: left;
  }

  .expanded-project-meta h2 {
    max-width: min(720px, 100%);
    font-size: clamp(30px, 6vw, 46px);
    line-height: 1.04;
  }

  .expanded-project-meta > p {
    margin-bottom: 16px;
  }

  .project-meta-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    max-width: 720px;
  }

  .project-meta-list dd {
    overflow-wrap: anywhere;
  }

  .inline-media-panel,
  .inline-media-panel.hero-panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    flex-basis: auto;
    background: transparent;
    overflow: visible;
  }

  .index-project.is-expanded .inline-media-panel {
    background: transparent;
    overflow: visible;
  }

  .inline-media-panel img,
  .inline-media-panel.hero-panel img {
    width: calc(100vw - 36px);
    height: auto;
    max-width: calc(100vw - 36px);
    margin-right: 18px;
    margin-left: 18px;
    object-fit: contain;
    object-position: center center;
  }

  .inline-media-panel figcaption {
    display: none;
  }

  .inline-copy-panel {
    width: 100%;
    max-width: none;
    height: auto;
    flex-basis: auto;
    overflow: visible;
    padding-right: 18px;
    padding-left: 18px;
    opacity: 1;
    transform: none;
    animation: none;
  }

  .expanded-strip,
  .expanded-strip > *,
  .expanded-project-meta,
  .inline-media-panel,
  .inline-copy-panel,
  .inline-copy-panel p,
  .inline-copy-panel h3 {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .inline-copy-panel p,
  .inline-copy-panel h3 {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .project-collapse {
    position: fixed;
    top: calc(var(--header) + 10px);
    right: 18px;
    z-index: 40;
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: calc(100vw - 36px);
    margin-right: 0;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .94);
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
  }

  .project-collapse::before {
    content: "<";
    margin-right: 8px;
  }

  .index-footer {
    grid-template-columns: 1fr 1fr;
    padding-right: 18px;
    padding-left: 18px;
  }

  .detail-main {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body[data-page="project"] {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .project-strip {
    height: auto;
    min-height: calc(100vh - var(--header));
    padding: 30px 18px 86px;
  }

  .project-info-panel,
  .media-panel,
  .copy-panel {
    min-height: 0;
  }

  .project-info-panel {
    flex-basis: 230px;
  }

  .media-panel {
    height: min(62vh, 620px);
  }
}

@media (max-width: 640px) {
  .brand {
    font-size: 24px;
  }

  .category-nav {
    font-size: 12px;
  }

  .project-list {
    width: min(720px, calc(100vw - 36px));
  }

  .projects-scaler {
    gap: 28px;
  }

  .index-footer,
  .source-stats {
    grid-template-columns: 1fr;
  }

  .project-strip {
    gap: 24px;
    overflow-x: visible;
  }

  .expanded-strip {
    gap: 24px;
    height: auto;
  }

  .project-info-panel,
  .copy-panel,
  .expanded-project-meta,
  .inline-copy-panel {
    flex-basis: auto;
  }

  .project-meta-list {
    grid-template-columns: 1fr;
  }

  .expanded-project-meta {
    justify-items: start;
    text-align: left;
  }

  .media-panel,
  .inline-media-panel {
    height: auto;
    max-width: 100%;
  }

  .media-panel img,
  .inline-media-panel img {
    max-width: 100%;
  }

  .strip-controls {
    right: 18px;
    bottom: 16px;
  }
}
