:root {
  color-scheme: dark;
  --bg: #08080a;
  --panel: #111114;
  --panel-2: #17171b;
  --ink: #f4f1ed;
  --muted: #a7a3a0;
  --line: #2b2a2d;
  --red: #c5232b;
  --red-soft: rgba(197, 35, 43, 0.16);
  --max: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(197, 35, 43, 0.08), transparent 360px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.intro-active {
  overflow: hidden;
}

body:not(.intro-active) {
  overflow-x: hidden;
}

.intro-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.22)),
    url("jimeng-20.png") center / cover no-repeat,
    #050505;
  cursor: pointer;
  transition:
    opacity 720ms ease,
    visibility 720ms ease;
}

.intro-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.22));
  pointer-events: none;
}

.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.intro-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  align-self: end;
  margin-bottom: clamp(34px, 8vh, 84px);
}

.intro-hint {
  padding: 10px 14px;
  border: 1px solid rgba(255, 218, 143, 0.32);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 236, 190, 0.76);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  backdrop-filter: blur(10px);
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  mix-blend-mode: screen;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(20px, 4vw, 56px);
  background: rgba(8, 8, 10, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  width: fit-content;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--red);
  vertical-align: 2px;
}

.nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

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

.lang-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border: 1px solid #555257;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 400px);
  gap: clamp(34px, 7vw, 96px);
  align-items: end;
  max-width: var(--max);
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: clamp(70px, 11vh, 128px) clamp(20px, 4vw, 56px) 72px;
}

.hero .eyebrow,
.hero h1 span,
.hero .lead,
.hero-facts,
.hero-actions,
.portrait {
  opacity: 0;
  transform: translateY(22px);
}

body.site-entered .hero .eyebrow,
body.site-entered .hero h1 span,
body.site-entered .hero .lead,
body.site-entered .hero-facts,
body.site-entered .hero-actions,
body.site-entered .portrait {
  animation: hero-rise 820ms cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

body.site-entered .hero h1 span:first-child {
  animation-delay: 100ms;
}

body.site-entered .hero h1 span:last-child {
  animation-delay: 180ms;
}

body.site-entered .hero .lead {
  animation-delay: 260ms;
}

body.site-entered .hero-facts {
  animation-delay: 340ms;
}

body.site-entered .hero-actions {
  animation-delay: 420ms;
}

body.site-entered .portrait {
  animation-delay: 220ms;
}

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  margin-bottom: 18px;
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.25;
}


h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.06;
}

h1 {
  display: grid;
  gap: 10px;
  font-size: clamp(58px, 10vw, 132px);
  font-weight: 900;
}

h1 span:last-child {
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 237, 0.72);
}

h2 {
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 850;
}

.lead,
.positioning,
.contact p {
  max-width: 780px;
  color: #d8d3cd;
  font-size: clamp(18px, 2.1vw, 26px);
}

.lead {
  margin: 28px 0 0;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-facts span {
  border: 1px solid rgba(197, 35, 43, 0.46);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(197, 35, 43, 0.12);
  color: #f1e9e3;
  font-size: 13px;
  font-weight: 750;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 10px 18px;
  border: 1px solid #5b5658;
  font-size: 14px;
  font-weight: 800;
}

.button.primary {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.portrait::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(8, 8, 10, 0.86));
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 38%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) 48px;
  gap: 14px;
}

.stats div,
.info-panel,
.strength-card,
.project-card,
.work-card,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 17, 20, 0.86);
}

.stats div {
  display: grid;
  gap: 6px;
  padding: 20px;
}

.stats strong {
  color: var(--ink);
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

.stats span {
  color: var(--muted);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 82px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.positioning {
  margin: 0;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.strength-card {
  display: grid;
  gap: 14px;
  min-height: 230px;
  padding: 24px;
}

.strength-card .index {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.strength-card h3 {
  font-size: 24px;
}

.strength-card p,
.project-card p,
.project-card li,
.timeline-item p,
.timeline-item li,
.info-panel span,
.work-meta p {
  color: var(--muted);
}

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

.project-card {
  display: grid;
  gap: 20px;
  min-height: 280px;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(197, 35, 43, 0.1), transparent 34%),
    rgba(17, 17, 20, 0.86);
}

.project-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--red);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.project-card h3 {
  font-size: 26px;
}

.project-card p {
  margin: 14px 0 0;
}

.project-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding: 24px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -1px;
  width: 4px;
  height: 44px;
  background: var(--red);
}

.timeline-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.timeline-top h3 {
  font-size: 22px;
}

.timeline-top span {
  color: var(--red);
  font-weight: 800;
  white-space: nowrap;
}

.timeline-item p {
  margin: 12px 0 0;
}

.timeline-item ul {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding-left: 20px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
}

.info-panel {
  display: grid;
  gap: 10px;
  padding: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--red-soft);
  color: #efe8e5;
  font-size: 14px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.work-card {
  overflow: hidden;
  transform: translate3d(var(--tilt-x, 0), var(--tilt-y, 0), 0);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
  will-change: transform;
}

.work-card:hover {
  border-color: rgba(197, 35, 43, 0.72);
  background: rgba(22, 18, 20, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.work-card:hover .play-button {
  border-color: rgba(255, 255, 255, 0.48);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(197, 35, 43, 0.32);
}

.video-shell {
  position: relative;
  background: #000000;
}

.work-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #000000;
  object-fit: cover;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(197, 35, 43, 0.92);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.play-button::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #ffffff;
}

.play-button:hover {
  background: #df2a33;
}

.video-shell.is-playing .play-button {
  opacity: 0;
  pointer-events: none;
}

.work-meta {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.work-meta h3 {
  font-size: 18px;
}

.work-meta p {
  margin: 0;
  font-size: 14px;
}

.contact {
  padding-bottom: 110px;
}

.contact p {
  margin: 0;
}

.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.contact-list a,
.contact-list span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(17, 17, 20, 0.86);
  color: #efe8e5;
  font-size: 14px;
}

.contact-list a:hover {
  border-color: rgba(197, 35, 43, 0.72);
  color: #ffffff;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.reveal-item {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(22px);
  transition:
    opacity 760ms cubic-bezier(0.19, 1, 0.22, 1),
    filter 760ms cubic-bezier(0.19, 1, 0.22, 1),
    transform 760ms cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, filter, transform;
}

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

.timeline-item::before {
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 680ms cubic-bezier(0.19, 1, 0.22, 1);
  transition-delay: calc(var(--reveal-delay, 0ms) + 120ms);
}

.timeline-item.is-visible::before {
  transform: scaleY(1);
}

.work-card.reveal-item {
  transform: translate3d(var(--tilt-x, 0), calc(var(--tilt-y, 0) + 22px), 0) scale(0.985);
}

.work-card.reveal-item.is-visible {
  transform: translate3d(var(--tilt-x, 0), var(--tilt-y, 0), 0) scale(1);
}

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

  .nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: space-between;
  }

  .hero,
  .split,
  .strength-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .portrait {
    max-width: 420px;
  }

  .stats,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .timeline-top {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) and (max-width: 1120px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .button {
    width: 100%;
  }

  .section {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .reveal-item {
    transform: translateY(14px);
    transition-duration: 560ms;
  }

  .work-card.reveal-item {
    transform: translateY(14px) scale(0.99);
  }
}

@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-trail {
    display: none;
  }

  .work-card {
    transform: none !important;
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow,
  .hero h1 span,
  .hero .lead,
  .hero-facts,
  .hero-actions,
  .portrait,
  .reveal-item {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .timeline-item::before {
    transform: none;
    transition: none;
  }
}
