:root {
  --yellow: #fdf3a6;
  --black: #000;
  --white: #fff;
  --text: #333;
  --nav-height: 90px;
  --page-gutter: clamp(72px, 5.208vw, 100px);
  --content-width: min(calc(100% - (var(--page-gutter) * 2)), 1720px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

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

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: var(--nav-height);
  padding: 30px 0 30px max(var(--page-gutter), calc((100vw - 1920px) / 2 + 100px));
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  transition: transform 260ms ease, background 260ms ease;
}

.site-nav.is-hidden {
  transform: translateY(-100%);
}

.site-nav nav {
  display: flex;
  gap: clamp(64px, 6.25vw, 120px);
  align-items: center;
  color: var(--yellow);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
}

.site-nav a {
  cursor: pointer;
}

.page {
  width: min(100%, 1920px);
  margin: 0 auto;
  overflow: hidden;
}

.home {
  position: relative;
  width: 100%;
  background: var(--black);
}

.home-hero {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  cursor: none;
  --mx: 50%;
  --my: 42%;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --title-x: 0px;
  --title-y: 0px;
  --hero-title-top: min(26.4vw, 430px);
  --hero-title-width: min(56vw, 1074px);
}

.home-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  pointer-events: none;
  user-select: none;
}

.home-bg-base {
  transform: translate3d(var(--parallax-x), var(--parallax-y), 0) scale(1.035);
  filter: brightness(1.06) saturate(1.08) contrast(1);
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-bg-glow {
  opacity: 0.56;
  transform: translate3d(calc(var(--parallax-x) * -0.55), calc(var(--parallax-y) * -0.55), 0) scale(1.055);
  filter: brightness(1.34) saturate(1.12) contrast(1.02);
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(circle 260px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.74) 22%, rgba(0, 0, 0, 0.24) 48%, transparent 72%);
  mask-image: radial-gradient(circle 260px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.74) 22%, rgba(0, 0, 0, 0.24) 48%, transparent 72%);
  transition:
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease;
}

.home-light {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(circle 190px at var(--mx) var(--my), rgba(255, 255, 255, 0.24), rgba(202, 156, 255, 0.14) 28%, rgba(93, 51, 255, 0.07) 48%, transparent 72%),
    radial-gradient(circle 420px at var(--mx) var(--my), rgba(255, 246, 196, 0.08), transparent 68%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.home-vignette {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.22), transparent 28%, rgba(0, 0, 0, 0.18) 88%, rgba(0, 0, 0, 0.44) 100%),
    linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.1));
  pointer-events: none;
}

.home-title {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: var(--hero-title-top);
  width: var(--hero-title-width);
  transform: translate3d(calc(-50% + var(--title-x)), var(--title-y), 0);
  text-align: right;
  pointer-events: none;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-title {
  width: 100%;
  height: auto;
}

.hero-subtitle {
  margin: -10px 0 0;
  padding-right: 1.2%;
  color: var(--yellow);
  font-size: clamp(16px, 1.32vw, 24px);
  line-height: 1.25;
}

.intro {
  position: relative;
  z-index: 3;
  width: var(--content-width);
  margin: calc(min(10.57vw, 203px) - 60px) auto 0;
  font-size: 32px;
  font-weight: 400;
  line-height: 48px;
}

.wave {
  display: inline-block;
  width: 43px;
  height: 43px;
  margin-right: 10px;
  vertical-align: -6px;
}

.section-title {
  margin: 0;
  font-size: 32px;
  font-weight: 400;
  line-height: 48px;
}

.work-section {
  width: var(--content-width);
  margin: 0 auto;
  padding: min(5.99vw, 115px) 0 0;
}

.project-list {
  display: grid;
  gap: 50px;
  margin-top: 50px;
}

.featured-project {
  display: grid;
  grid-template-columns: min(56.771vw, 1090px) minmax(0, min(30.729vw, 590px));
  gap: min(2.083vw, 40px);
  align-items: start;
}

.project-cover {
  display: block;
  overflow: hidden;
  background: #111;
}

.featured-project .project-cover {
  aspect-ratio: 1090 / 613;
  height: auto;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease, opacity 250ms ease;
}

.project-cover:hover img {
  transform: scale(1.025);
  opacity: 0.9;
}

.project-copy h2 {
  margin: 0;
  color: var(--white);
  font-size: 32px;
  font-weight: 500;
  line-height: 48px;
}

.rule {
  width: 100%;
  height: 1px;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.5);
}

.project-type,
.project-desc {
  margin: 0;
  color: var(--white);
  font-size: 22px;
}

.project-type {
  line-height: 30px;
}

.project-desc {
  line-height: 34px;
}

.contact-section {
  position: relative;
  display: grid;
  place-items: center;
  padding: 120px 0 200px;
  text-align: center;
}

.thanks-wrap {
  position: relative;
  width: min(860.707px, 72vw);
  margin-top: 16px;
}

.thanks-mark {
  width: 100%;
  height: auto;
}

.thanks-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 100%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 24px;
  line-height: 36px;
  text-align: center;
}

.contact-card .contact-note {
  margin: -46px 0 0;
  color: var(--white);
  font-size: 24px;
  line-height: 36px;
  text-align: center;
}

.contact-card {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 20px;
  margin-top: 52px;
}

.avatar {
  width: 206px;
  height: 206px;
  border-radius: 50%;
}

.contact-card a p {
  margin: 0;
  font-size: 24px;
  line-height: 36px;
}

.email-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
}

.project-page {
  background: var(--white);
  color: var(--text);
}

.project-hero img,
.case-image img {
  width: 100%;
  height: auto;
}

.case-image {
  position: relative;
}

.build-deep-link {
  position: absolute;
  left: 30%;
  bottom: 5.8%;
  width: 40%;
  height: 13%;
  z-index: 2;
  cursor: pointer;
}

.project-intro {
  display: grid;
  grid-template-columns: minmax(560px, 620px) minmax(420px, min(36.458vw, 700px));
  justify-content: space-between;
  gap: 40px;
  align-items: start;
  width: var(--content-width);
  margin: 100px auto;
}

.project-intro h1 {
  margin: 0;
  max-width: 620px;
  font-size: 56px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: normal;
  word-break: keep-all;
}

.project-intro p {
  margin: 0;
  font-size: 20px;
  line-height: 30px;
}

.case-stack {
  display: grid;
  gap: 15px;
}

.other-projects {
  width: var(--content-width);
  margin: 120px auto 120px;
}

.other-projects h2 {
  margin: 0 0 50px;
  font-size: 32px;
  font-weight: 400;
  line-height: 48px;
}

.other-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}

.other-card {
  display: grid;
  gap: 16px;
}

.other-copy {
  display: grid;
  gap: 8px;
}

.other-card .project-cover {
  aspect-ratio: 1920 / 1080;
}

.other-card h3,
.other-card p {
  margin: 0;
}

.other-card h3 {
  font-size: 28px;
  font-weight: 500;
  line-height: 42px;
}

.other-card p {
  font-size: 20px;
  line-height: 30px;
}

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 700ms ease,
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

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

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

  .project-cover img,
  .site-nav,
  .home-bg-base,
  .home-bg-glow,
  .home-title,
  .reveal {
    transition: none;
  }

  .home-bg-base,
  .home-bg-glow {
    transform: none;
  }

  .home-title {
    transform: translateX(-50%);
  }

  .home-bg-glow,
  .home-light {
    display: none;
  }

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

@media (max-height: 820px) {
  .home-hero {
    --hero-title-top: min(22.8vw, 330px);
  }
}

@media (max-width: 1500px) {
  .page {
    width: 100%;
  }

  .project-intro {
    grid-template-columns: minmax(460px, 0.9fr) minmax(420px, 1fr);
    gap: 6vw;
  }
}

@media (max-width: 900px) {
  :root {
    --nav-height: 68px;
    --page-gutter: 24px;
  }

  .site-nav {
    height: var(--nav-height);
    padding: 22px var(--page-gutter);
  }

  .site-nav nav {
    justify-content: space-between;
    gap: 0;
    width: 100%;
    font-size: 16px;
  }

  .home-hero {
    min-height: 100svh;
    cursor: auto;
    --hero-title-top: 42svh;
    --hero-title-width: 86vw;
  }

  .home-bg {
    top: 220px;
    left: 50%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center top;
  }

  .home-bg-base {
    transform: translateX(-50%) scale(1.62);
  }

  .home-bg-glow,
  .home-light {
    display: none;
  }

  .home-title {
    transform: translateX(-50%);
  }

  .hero-subtitle {
    margin-top: -3px;
    padding-right: 0;
    font-size: clamp(13px, 3.3vw, 16px);
  }

  .intro {
    margin: 64px auto 0;
    font-size: 20px;
    line-height: 32px;
  }

  .wave {
    width: 28px;
    height: 28px;
    margin-right: 6px;
    vertical-align: -4px;
  }

  .section-title {
    font-size: 24px;
    line-height: 36px;
  }

  .work-section {
    padding-top: 72px;
  }

  .project-list {
    gap: 56px;
    margin-top: 32px;
  }

  .featured-project {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-copy h2 {
    font-size: 24px;
    line-height: 34px;
  }

  .rule {
    margin: 14px 0;
  }

  .project-type,
  .project-desc {
    font-size: 16px;
  }

  .project-type {
    line-height: 24px;
  }

  .project-desc {
    line-height: 26px;
  }

  .contact-section {
    padding: 88px var(--page-gutter) 160px;
  }

  .avatar {
    width: 148px;
    height: 148px;
  }

  .thanks-wrap {
    width: min(100%, 520px);
    margin-top: 8px;
  }

  .thanks-overlay,
  .contact-card .contact-note,
  .contact-card a p {
    font-size: 18px;
    line-height: 28px;
  }

  .contact-card .contact-note {
    margin-top: -28px;
  }

  .project-intro {
    grid-template-columns: 1fr;
    gap: 28px;
    margin: 64px auto;
  }

  .project-intro h1 {
    max-width: none;
    font-size: 36px;
    line-height: 1.35;
  }

  .project-intro p {
    font-size: 17px;
    line-height: 29px;
  }

  .case-stack {
    gap: 10px;
  }

  .other-projects {
    margin: 80px auto 88px;
  }

  .other-projects h2 {
    margin-bottom: 32px;
    font-size: 24px;
    line-height: 36px;
  }

  .other-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .other-card {
    gap: 12px;
  }

  .other-card h3 {
    font-size: 22px;
    line-height: 32px;
  }

  .other-card p {
    font-size: 16px;
    line-height: 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --page-gutter: 18px;
  }

  .site-nav {
    padding-right: 18px;
    padding-left: 18px;
  }

  .home-hero {
    --hero-title-top: 43svh;
    --hero-title-width: 90vw;
  }

  .home-bg {
    transform: translateX(-49%);
  }

  .home-bg-base {
    transform: translateX(-49%) scale(1.62);
  }

  .intro {
    font-size: 18px;
    line-height: 30px;
  }

  .project-copy h2 {
    font-size: 22px;
    line-height: 32px;
  }

  .project-intro h1 {
    font-size: 32px;
  }

  .project-intro p {
    font-size: 16px;
    line-height: 28px;
  }

  .thanks-overlay,
  .contact-card .contact-note,
  .contact-card a p {
    font-size: 16px;
    line-height: 26px;
  }
}
