:root {
  --ink: #171412;
  --muted: #74695d;
  --paper: #f4efe6;
  --line: rgba(38, 29, 21, 0.16);
  --accent: #b8894d;
  --accent-strong: #7d4c24;
  --oxblood: #6e241f;
  --smoke: #333a3b;
  --white: #fffaf0;
  --shadow: 0 24px 70px rgba(31, 24, 18, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--white);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(248, 245, 239, 0.92);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.nav-action {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: Georgia, serif;
}

.site-nav {
  justify-content: center;
  gap: clamp(16px, 3vw, 34px);
  font-size: 0.95rem;
}

.nav-action {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 94vh;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: -2%;
  z-index: -2;
  width: 104%;
  height: 104%;
  object-fit: cover;
  object-position: 71% 66%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 72% 35%, rgba(12, 10, 9, 0.02), rgba(12, 10, 9, 0.36) 40%, rgba(12, 10, 9, 0.82) 100%),
    linear-gradient(90deg, rgba(8, 7, 6, 0.95), rgba(8, 7, 6, 0.58) 43%, rgba(8, 7, 6, 0.2)),
    linear-gradient(0deg, rgba(8, 7, 6, 0.78), transparent 42%);
}

.hero-film {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-film::before,
.hero-film::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 24px;
  content: "";
  opacity: 0.34;
  background:
    repeating-linear-gradient(90deg, rgba(255, 250, 240, 0.55) 0 6px, transparent 6px 18px),
    linear-gradient(90deg, rgba(184, 137, 77, 0.22), rgba(255, 250, 240, 0.04), rgba(184, 137, 77, 0.18));
  mix-blend-mode: screen;
}

.hero-film::before {
  top: 0;
}

.hero-film::after {
  bottom: 0;
}

.hero-note {
  position: absolute;
  right: clamp(24px, 6vw, 92px);
  bottom: clamp(76px, 12vh, 140px);
  z-index: 1;
  max-width: 360px;
  color: rgba(255, 253, 248, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-style: italic;
  line-height: 1.35;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 36px));
  padding: min(34vh, 250px) 0 110px;
  margin-left: clamp(18px, 8vw, 112px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: #dcc28a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.6rem, 14vw, 11rem);
  font-weight: 500;
  line-height: 0.9;
}

.hero-spelling {
  margin: -6px 0 22px;
  color: #d7b878;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-style: italic;
  line-height: 1;
}

h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4.9rem);
  font-weight: 760;
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 610px;
  margin-bottom: 30px;
  color: rgba(255, 253, 248, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.ghost {
  color: var(--white);
  border-color: rgba(255, 253, 248, 0.72);
  background: rgba(255, 253, 248, 0.08);
}

.section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(72px, 10vw, 124px) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: clamp(32px, 7vw, 90px);
  align-items: start;
}

.profile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(32px, 7vw, 90px);
  align-items: start;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
}

.profile::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  background: url("assets/yangdi-profile-warm.jpg") 66% 42% / cover no-repeat;
  opacity: 0.70;
}

.profile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(244, 239, 230, 0.96), rgba(244, 239, 230, 0.78) 43%, rgba(244, 239, 230, 0.34) 72%),
    radial-gradient(circle at 72% 34%, rgba(255, 250, 240, 0.02), rgba(244, 239, 230, 0.42) 68%);
}

.profile-heading {
  display: grid;
  max-width: 680px;
  gap: 26px;
  align-content: start;
}

.intro-copy,
.profile-copy {
  color: var(--muted);
  font-size: clamp(1.26rem, 2vw, 1.78rem);
  line-height: 1.82;
}

.profile-copy {
  max-width: 620px;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid rgba(184, 137, 77, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.52);
  backdrop-filter: blur(3px);
}

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

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.metrics div {
  min-height: 148px;
  padding: 34px clamp(20px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  color: var(--oxblood);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-weight: 700;
}

.portraits {
  width: min(1180px, calc(100% - 36px));
}

.portrait-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(184, 137, 77, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 226, 235, 0.76), rgba(255, 250, 240, 0.94) 46%, rgba(38, 29, 21, 0.08)),
    var(--white);
  box-shadow: 0 18px 54px rgba(31, 24, 18, 0.12);
}

.portrait-card {
  position: relative;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f4c6d6;
}

.portrait-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(17, 13, 11, 0.26), transparent 36%);
  pointer-events: none;
}

.portrait-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.portrait-card-large img {
  aspect-ratio: 4 / 5;
  object-position: center 24%;
}

.portrait-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
}

.portrait-stack img {
  aspect-ratio: 4 / 3;
  object-position: center 26%;
}

.portrait-card figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  margin: 0;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 760;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.work-feature {
  position: relative;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(184, 137, 77, 0.24);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 54px rgba(31, 24, 18, 0.12);
}

.work-feature img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 8.2;
  padding: 0;
  object-fit: contain;
  object-position: center;
}

.work-feature::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(17, 13, 11, 0.54), transparent 42%);
  pointer-events: none;
}

.work-feature figcaption {
  position: absolute;
  left: clamp(18px, 4vw, 34px);
  right: clamp(18px, 4vw, 34px);
  bottom: clamp(18px, 3vw, 28px);
  z-index: 1;
  display: grid;
  gap: 6px;
  color: var(--white);
}

.work-feature strong {
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1.08;
}

.work-feature span {
  max-width: 560px;
  color: rgba(255, 250, 240, 0.82);
  font-weight: 700;
}

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

.work-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 40px rgba(31, 28, 24, 0.08);
  overflow: hidden;
}

.work-card::before {
  display: block;
  height: 168px;
  content: "";
  background:
    linear-gradient(135deg, rgba(184, 137, 77, 0.2), rgba(255, 250, 240, 0.92)),
    repeating-linear-gradient(45deg, rgba(38, 29, 21, 0.04) 0 8px, transparent 8px 16px);
}

.work-card-image::before {
  display: none;
}

.work-card > img {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  object-position: center;
}

.work-card-cover > img {
  height: 210px;
  padding: 18px 16px 10px;
  object-fit: contain;
  object-position: center;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.94), rgba(239, 229, 213, 0.62)),
    var(--white);
}

.work-card:nth-child(4).work-card-cover > img {
  padding-inline: 6px;
  transform: scaleX(1.1);
}

.work-card-body {
  display: flex;
  min-height: 170px;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
}

.work-card p {
  color: var(--accent-strong);
  font-weight: 900;
}

.work-card span,
.service-list p,
.contact p {
  color: var(--muted);
}

.services {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  gap: clamp(32px, 7vw, 90px);
}

.services .section-heading {
  display: block;
  margin-bottom: 0;
}

.service-list {
  display: grid;
  gap: 16px;
}

.service-list article {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.service-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.honors {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: clamp(32px, 7vw, 90px);
}

.honors .section-heading {
  display: block;
  margin-bottom: 0;
}

.honors-portrait {
  position: relative;
  margin: 28px 0 0;
  overflow: hidden;
  border: 1px solid rgba(184, 137, 77, 0.24);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 54px rgba(31, 24, 18, 0.12);
}

.honors-portrait::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(17, 13, 11, 0.18), transparent 42%);
  pointer-events: none;
}

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

.honor-list {
  display: grid;
  gap: 12px;
}

.honor-list article {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  min-height: 80px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.honor-list p {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
}

.contact {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: clamp(32px, 7vw, 90px);
  align-items: start;
}

.achievement-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.68fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: stretch;
}

.achievement-layout img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.timeline {
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 0;
  height: 100%;
  border-top: 1px solid var(--line);
}

.timeline article {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.timeline span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(184, 137, 77, 0.14);
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.contact-form,
.wechat-card {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.wechat-card {
  align-content: center;
  min-height: 300px;
  background:
    linear-gradient(135deg, rgba(255, 250, 240, 0.98), rgba(239, 229, 213, 0.86)),
    var(--white);
}

.wechat-label {
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.wechat-card strong {
  color: var(--ink);
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1;
  word-break: break-word;
}

.wechat-card p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

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

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

  .site-nav {
    display: none;
  }

  .nav-action {
    min-height: 34px;
    padding: 0 12px;
  }

  .hero {
    min-height: 91vh;
  }

  .hero-image {
    object-position: 62% 66%;
  }

  .hero-content {
    padding-top: 190px;
    margin-left: 18px;
  }

  .hero-note {
    display: none;
  }

  .hero-film::before,
  .hero-film::after {
    height: 18px;
    opacity: 0.24;
  }

  .intro,
  .profile,
  .services,
  .honors,
  .achievement-layout,
  .contact {
    grid-template-columns: 1fr;
  }

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

  .work-feature img {
    aspect-ratio: 4 / 3;
  }

  .work-card {
    min-height: 0;
  }

  .work-card::before,
  .work-card > img,
  .work-card-cover > img {
    height: 220px;
  }

  .work-card-body {
    min-height: 170px;
  }

  .profile {
    gap: 24px;
    min-height: 0;
  }

  .profile::before {
    background-position: 62% center;
    opacity: 0.60;
  }

  .profile::after {
    background:
      linear-gradient(180deg, rgba(244, 239, 230, 0.9), rgba(244, 239, 230, 0.7) 48%, rgba(244, 239, 230, 0.92)),
      radial-gradient(circle at 50% 35%, rgba(255, 250, 240, 0.02), rgba(244, 239, 230, 0.62) 64%);
  }

  .profile-copy {
    padding: 18px;
    font-size: 1.08rem;
    line-height: 1.75;
    background: rgba(255, 250, 240, 0.72);
  }

  .honors-portrait {
    margin-top: 20px;
  }

  .honors-portrait img {
    aspect-ratio: 16 / 10;
    object-position: 24% center;
  }

  .portrait-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .portrait-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 12px;
  }

  .portrait-card img {
    min-height: 220px;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .section-heading {
    display: block;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .portrait-stack {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
