:root {
  --paper: #f2eee5;
  --paper-deep: #e7dfd1;
  --ink: #1c1d19;
  --muted: #6d6a61;
  --line: rgba(28, 29, 25, 0.16);
  --red: #a9472f;
  --teal: #123b3a;
  --teal-soft: #1d5b57;
  --cream: #f4efe4;
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(1100px 620px at 88% -8%, rgba(169, 71, 47, 0.09), transparent 62%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--red);
  color: var(--cream);
}

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

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--cream);
  font-size: 0.8rem;
}

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

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.site-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.brand {
  justify-self: start;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.brand span {
  color: var(--red);
}

.site-nav {
  display: flex;
  gap: 30px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.header-note {
  justify-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 0.63rem;
  letter-spacing: 0.18em;
}

.hero {
  position: relative;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 140px) clamp(20px, 4vw, 56px) 0;
}

.hero::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: clamp(20px, 4vw, 56px);
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--line) 22%, transparent);
  content: "";
  pointer-events: none;
}

.eyebrow,
.section-index {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  line-height: 1.6;
}

.eyebrow {
  padding-left: 22px;
}

.hero h1 {
  max-width: 1120px;
  margin: 26px 0 clamp(44px, 6vw, 72px);
  font-family: var(--serif);
  font-size: clamp(3.45rem, 9.4vw, 8.8rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-wrap: balance;
}

.hero h1 em {
  color: var(--red);
  font-weight: 400;
}

.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: end;
  padding: 28px 0 0 22px;
  border-top: 1px solid var(--line);
}

.lede {
  max-width: 35rem;
  margin: 0;
  color: #4e4d46;
  font-size: clamp(0.98rem, 1.25vw, 1.12rem);
  line-height: 1.95;
}

.hero-meta {
  display: flex;
  justify-content: flex-end;
  gap: clamp(24px, 3vw, 44px);
  margin: 0;
}

.hero-meta dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
}

.hero-meta dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.16rem;
  letter-spacing: -0.02em;
}

.scroll-cue {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(60px, 8vw, 112px);
  padding: 17px 0 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
}

.work,
.about {
  max-width: 1320px;
  margin: 0 auto;
  padding-right: clamp(20px, 4vw, 56px);
  padding-left: clamp(20px, 4vw, 56px);
}

.work {
  padding-top: clamp(90px, 12vw, 160px);
}

.section-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(220px, 300px);
  gap: 32px;
  align-items: start;
  padding-bottom: clamp(36px, 5vw, 54px);
  border-bottom: 1px solid var(--line);
}

.section-index {
  padding-top: 13px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.45rem, 5.1vw, 4.75rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
  text-wrap: balance;
}

.section-note {
  justify-self: end;
  max-width: 18rem;
  margin: 0;
  padding-top: 13px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.85;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(48px, 7vw, 92px) 0;
  border-bottom: 1px solid var(--line);
}

.project-media {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 2px;
  background: #101411;
  aspect-ratio: 8 / 5;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.project-media:hover img {
  transform: scale(1.035);
}

.media-label {
  position: absolute;
  bottom: 15px;
  left: 16px;
  padding: 7px 10px;
  background: rgba(8, 10, 8, 0.68);
  color: #f4efe4;
  font-size: 0.57rem;
  letter-spacing: 0.16em;
  backdrop-filter: blur(8px);
}

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

.project-kicker {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
}

.project h3 {
  margin: 26px 0 20px;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 4.2vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.project h3 span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
}

.project-body > p {
  max-width: 31rem;
  margin: 0;
  color: #555249;
  font-size: 0.94rem;
  line-height: 1.95;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 9px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
}

.text-link {
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.text-link--strong {
  color: var(--red);
}

.text-link.is-disabled {
  border-bottom-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.project--jingyu {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(26px, 4vw, 48px);
  border-bottom: 0;
  border-radius: 3px;
  background: var(--teal);
  color: var(--cream);
}

.project--jingyu .project-media {
  order: 2;
  background: #0d2b2b;
}

.project--jingyu .project-body {
  order: 1;
}

.project--jingyu .project-kicker {
  border-bottom-color: rgba(244, 239, 228, 0.2);
  color: rgba(244, 239, 228, 0.62);
}

.project--jingyu h3 span,
.project--jingyu .project-body > p {
  color: rgba(244, 239, 228, 0.7);
}

.project--jingyu .tags li {
  border-color: rgba(244, 239, 228, 0.24);
  color: rgba(244, 239, 228, 0.7);
}

.project--jingyu .text-link.is-disabled {
  border-bottom-color: rgba(244, 239, 228, 0.24);
  color: rgba(244, 239, 228, 0.56);
}

.about {
  padding-top: clamp(90px, 12vw, 160px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.section-head--about {
  grid-template-columns: 120px minmax(0, 1fr);
  border-bottom: 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 7vw, 110px);
  padding: 18px 0 clamp(44px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
}

.about-lead {
  max-width: 27rem;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.32;
}

.about-copy {
  max-width: 35rem;
}

.about-copy p {
  margin: 0 0 18px;
  color: #555249;
  font-size: 0.94rem;
  line-height: 1.95;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 36px);
  margin: 0;
  padding: 34px 0 0;
}

.stack div {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stack dt {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.59rem;
  letter-spacing: 0.17em;
}

.stack dd {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.75;
}

.credits {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) clamp(56px, 8vw, 92px);
}

.credits__inner {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.credits__copy {
  max-width: 47rem;
}

.credits__copy p {
  margin: 0 0 8px;
  color: #5a574e;
  font-size: 0.86rem;
  line-height: 1.9;
}

.credits__copy p:last-child {
  margin-bottom: 0;
}

.credits__copy strong {
  color: var(--red);
  font-weight: 500;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px clamp(20px, 4vw, 56px) 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--ink);
}

.hero .eyebrow,
.hero h1,
.hero-bottom,
.scroll-cue {
  animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero h1 {
  animation-delay: 70ms;
}

.hero-bottom {
  animation-delay: 150ms;
}

.scroll-cue {
  animation-delay: 220ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-note {
    display: none;
  }

  .hero::before {
    display: none;
  }

  .eyebrow,
  .hero-bottom {
    padding-left: 0;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .section-head,
  .section-head--about {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-index {
    padding-top: 0;
  }

  .section-note {
    justify-self: start;
    padding-top: 0;
  }

  .project,
  .project--jingyu {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .project--jingyu .project-media {
    order: 1;
  }

  .project--jingyu .project-body {
    order: 2;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 8px;
  }

  .stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .credits__inner {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 20px;
  }

  .brand {
    font-size: 1.22rem;
  }

  .site-nav {
    gap: 16px;
    font-size: 0.67rem;
  }

  .hero {
    padding: 56px 20px 0;
  }

  .hero h1 {
    margin-top: 20px;
    margin-bottom: 40px;
    font-size: clamp(3rem, 15vw, 4.2rem);
  }

  .hero-bottom {
    padding-top: 22px;
  }

  .hero-meta {
    gap: 22px;
    flex-wrap: wrap;
  }

  .hero-meta dd {
    font-size: 1rem;
  }

  .scroll-cue {
    margin-top: 56px;
  }

  .work,
  .about {
    padding-right: 20px;
    padding-left: 20px;
  }

  .project {
    padding: 38px 0;
  }

  .project h3 {
    margin-top: 20px;
  }

  .project--jingyu {
    padding: 22px;
  }

  .project-kicker {
    font-size: 0.55rem;
  }

  .stack {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .site-footer {
    flex-wrap: wrap;
    padding: 28px 20px 34px;
  }
}

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

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