:root {
  --ink: #171716;
  --ink-soft: #2b2a28;
  --muted: #68645d;
  --paper: #f6f4ef;
  --paper-deep: #ece8df;
  --white: #fffefb;
  --line: #d8d3c9;
  --line-dark: rgba(255, 255, 255, 0.16);
  --warm: #9a5b36;
  --warm-light: #d6b18f;
  --warm-pale: #eadbcc;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
textarea {
  font-family: var(--sans);
}

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

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

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

ul,
ol {
  margin-top: 0;
}

a:focus-visible {
  outline: 3px solid var(--warm-light);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-130%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 4vw;
  color: var(--white);
  background: rgba(23, 23, 22, 0.96);
  border-bottom: 1px solid var(--line-dark);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  font-family: var(--serif);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.25;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.13em;
}

.brand small {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.56rem;
  letter-spacing: 0.15em;
}

.site-header nav {
  display: flex;
  gap: clamp(0.85rem, 2vw, 1.65rem);
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.site-header nav a {
  color: rgba(255, 255, 255, 0.76);
  transition: color 160ms ease;
}

.site-header nav a:hover {
  color: var(--white);
}

.site-header .nav-contact {
  padding: 0.38rem 0.88rem;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.72fr);
  gap: clamp(2.5rem, 7vw, 8rem);
  align-items: center;
  min-height: calc(100svh - 72px);
  padding: clamp(4rem, 8vw, 8rem) 7vw;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 83% 18%, rgba(154, 91, 54, 0.22), transparent 24rem),
    linear-gradient(132deg, #111110 0%, #171716 56%, #22201d 100%);
}

.hero::before {
  position: absolute;
  top: 12%;
  left: 54%;
  width: 1px;
  height: 72%;
  content: "";
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.13), transparent);
}

.hero::after {
  position: absolute;
  right: -12rem;
  bottom: -16rem;
  width: 38rem;
  height: 38rem;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-copy,
.portrait {
  position: relative;
  z-index: 1;
}

.eyebrow,
.credential-type {
  color: var(--warm-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 1.2rem;
}

.eyebrow.dark {
  color: var(--warm);
}

.hero h1 {
  display: flex;
  flex-direction: column;
  gap: 0.12em;
  margin-bottom: 0.34em;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.03;
}

.name-cn {
  font-size: clamp(4.2rem, 10vw, 8.6rem);
  letter-spacing: 0.04em;
}

.name-en {
  max-width: 14em;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1.2rem, 2.6vw, 2.1rem);
  letter-spacing: 0.045em;
}

.name-en em {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

.hero-role {
  margin-bottom: 1rem;
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  letter-spacing: 0.05em;
}

.hero-lead {
  max-width: 38rem;
  margin-bottom: 1.8rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.4rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.66rem 1.35rem;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  color: var(--ink);
  background: var(--warm-light);
}

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

.button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.42);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 36rem;
  margin-bottom: 0;
}

.hero-facts div {
  padding-right: 1rem;
  border-right: 1px solid var(--line-dark);
}

.hero-facts div + div {
  padding-left: 1.2rem;
}

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

.hero-facts dt {
  color: var(--warm-light);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.hero-facts dd {
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
}

.portrait {
  justify-self: end;
  width: min(100%, 390px);
  margin-bottom: 0;
}

.portrait-frame {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.portrait-frame::before {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 72%;
  height: 38%;
  content: "";
  pointer-events: none;
  border-top: 1px solid var(--warm-light);
  border-right: 1px solid var(--warm-light);
}

.portrait img {
  width: 100%;
  aspect-ratio: 358 / 477;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.02);
}

.portrait figcaption {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 0.9rem;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
}

.section {
  display: grid;
  grid-template-columns: minmax(120px, 0.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(4.5rem, 9vw, 8.5rem) 7vw;
  border-top: 1px solid var(--line);
}

.section > * {
  min-width: 0;
}

.section-label {
  padding-top: 0.5rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
}

.section h2 {
  margin-bottom: 1.2rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.18;
}

.section h3 {
  line-height: 1.35;
}

.section-heading {
  margin-bottom: 2.4rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading.split {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
}

.section-heading.split > p {
  max-width: 22rem;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}

.intro {
  background: var(--white);
}

.intro-grid,
.english-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 7rem);
}

.intro-grid h2 {
  max-width: 7em;
}

.prose {
  max-width: 46rem;
}

.prose p {
  margin-bottom: 1.2rem;
  color: var(--muted);
}

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

.expertise {
  background: var(--paper);
}

.card-grid,
.project-grid,
.credential-grid,
.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.card,
.channel-card {
  padding: clamp(1.5rem, 3vw, 2.35rem);
  background: var(--white);
}

.card {
  min-height: 21rem;
}

.card-index {
  display: block;
  margin-bottom: 3.7rem;
  color: var(--warm);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.card h3,
.channel-card h3 {
  margin-bottom: 0.8rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.card p,
.channel-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.card ul {
  padding: 0;
  margin: 1.6rem 0 0;
  list-style: none;
}

.card li {
  padding: 0.52rem 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  border-top: 1px solid var(--line);
}

.experience {
  color: var(--white);
  background: var(--ink);
}

.experience .section-label,
.experience .section-heading.split > p,
.experience .eyebrow.dark {
  color: rgba(255, 255, 255, 0.47);
}

.experience .eyebrow.dark {
  color: var(--warm-light);
}

.timeline {
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
}

.timeline > li {
  display: grid;
  grid-template-columns: minmax(210px, 0.45fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--line-dark);
}

.timeline-meta {
  color: var(--warm-light);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.timeline-meta span {
  display: block;
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.47);
}

.timeline-body h3 {
  margin-bottom: 0.7rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.timeline-body p {
  max-width: 48rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.65);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  margin: 1rem 0 0;
  list-style: none;
}

.tags li {
  padding: 0.22rem 0.6rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.67rem;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
}

.projects {
  background: var(--white);
}

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

.project {
  min-height: 18rem;
  padding: clamp(1.6rem, 3.2vw, 2.5rem);
  background: var(--white);
}

.project-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.8rem;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
}

.project h3 {
  margin-bottom: 0.35rem;
  font-family: var(--serif);
  font-size: 1.42rem;
  font-weight: 500;
}

.project-role {
  margin-bottom: 1rem;
  color: var(--warm);
  font-size: 0.78rem;
}

.project > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.credentials {
  background: var(--paper);
}

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

.credential {
  min-height: 14rem;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  background: var(--white);
}

.credential h3 {
  margin: 0.8rem 0 0.75rem;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
}

.credential p:not(.credential-type) {
  color: var(--muted);
  font-size: 0.84rem;
}

.credential a {
  color: var(--warm);
  font-size: 0.77rem;
  text-decoration: underline;
  text-underline-offset: 0.24em;
}

.certificate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.certificate {
  margin-bottom: 0;
  background: var(--white);
  border: 1px solid var(--line);
}

.certificate a {
  display: block;
  overflow: hidden;
}

.certificate img {
  width: 100%;
  aspect-ratio: 1600 / 1131;
  object-fit: cover;
  transition: transform 220ms ease;
}

.certificate a:hover img {
  transform: scale(1.015);
}

.certificate figcaption {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  color: var(--muted);
  font-size: 0.69rem;
}

.certificate figcaption strong {
  color: var(--ink);
  font-weight: 600;
}

.education {
  padding: 2rem 0 0;
  border-top: 1px solid var(--line);
  margin-top: 2.2rem;
}

.education h3 {
  margin-bottom: 0.45rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
}

.education p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.writing {
  background: var(--paper-deep);
}

.channel-grid {
  margin-bottom: 1.25rem;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 1.25rem;
  background: var(--line);
  border: 1px solid var(--line);
}

.channel-card {
  display: flex;
  flex-direction: column;
  min-height: 17rem;
  transition: background-color 160ms ease;
}

.channel-card[href]:hover {
  background: var(--warm-pale);
}

.channel-card > span {
  margin-top: auto;
  color: var(--warm);
  font-size: 0.72rem;
}

.record-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.record-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--white);
  font-size: 0.82rem;
}

.record-links a:hover {
  background: var(--warm-pale);
}

.record-links small {
  color: var(--muted);
  font-size: 0.67rem;
}

.english {
  background: var(--white);
}

.english h2 {
  max-width: 6em;
}

.english h2 em {
  color: var(--muted);
  font-size: 0.68em;
  font-weight: 400;
}

.english-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-top: 1.6rem;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.english-details h3 {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 500;
}

.plain-list {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.plain-list li {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.plain-list strong {
  color: var(--ink);
  font-weight: 600;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  padding: clamp(4rem, 7vw, 6.5rem) 7vw;
  color: var(--ink);
  background: var(--warm-pale);
}

.contact .eyebrow {
  color: var(--warm);
}

.contact h2 {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
}

.contact p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
  color: #574e45;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.8rem);
  border-top: 1px solid rgba(23, 23, 22, 0.32);
  border-bottom: 1px solid rgba(23, 23, 22, 0.32);
}

.contact-link:hover {
  color: var(--warm);
}

footer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: 2rem;
  align-items: end;
  padding: 2.4rem 7vw;
  color: rgba(255, 255, 255, 0.52);
  background: var(--ink);
  font-size: 0.68rem;
}

footer p {
  margin-bottom: 0;
}

footer strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--white);
  font-family: var(--serif);
  font-size: 0.9rem;
}

footer p:nth-last-child(2) {
  text-align: center;
}

footer p:last-child {
  text-align: right;
}

.status-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 2rem;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 20%, rgba(154, 91, 54, 0.24), transparent 24rem),
    var(--ink);
}

.status-page main {
  width: min(100%, 46rem);
}

.status-page h1 {
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 9vw, 6rem);
  font-weight: 500;
  line-height: 1.1;
}

.status-page main > p:not(.eyebrow) {
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.62);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    min-height: auto;
    padding-top: 0.9rem;
    padding-bottom: 0.8rem;
  }

  .site-header nav {
    max-width: 72vw;
    padding-bottom: 0.15rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-header nav::-webkit-scrollbar {
    display: none;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
    gap: 2.5rem;
    padding-right: 5vw;
    padding-left: 5vw;
  }

  .hero::before {
    display: none;
  }

  .portrait {
    width: min(100%, 320px);
  }

  .section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-right: 5vw;
    padding-left: 5vw;
  }

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

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 0;
  }

  .card-index {
    margin-bottom: 1.5rem;
  }

  .intro-grid,
  .english-grid {
    grid-template-columns: minmax(200px, 0.65fr) minmax(0, 1.35fr);
    gap: 2.5rem;
  }

  .timeline > li {
    grid-template-columns: minmax(170px, 0.36fr) minmax(0, 1fr);
  }

  footer {
    grid-template-columns: 1fr 1fr;
    padding-right: 5vw;
    padding-left: 5vw;
  }

  footer p:last-child {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-header {
    display: block;
  }

  .brand {
    margin-bottom: 0.65rem;
  }

  .site-header nav {
    max-width: 100%;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .hero-copy {
    order: 2;
  }

  .portrait {
    order: 1;
    justify-self: start;
    width: min(70vw, 290px);
  }

  .portrait-frame::before {
    top: -16px;
    right: -16px;
  }

  .hero h1 {
    margin-top: 1.4rem;
  }

  .name-cn {
    font-size: clamp(3.5rem, 20vw, 5.2rem);
  }

  .hero-facts div {
    padding-right: 0.7rem;
  }

  .hero-facts div + div {
    padding-left: 0.8rem;
  }

  .section-heading.split {
    display: block;
  }

  .section-heading.split > p {
    margin-top: 0.8rem;
    text-align: left;
  }

  .intro-grid,
  .english-grid,
  .project-grid,
  .credential-grid,
  .certificate-grid,
  .channel-grid,
  .social-grid,
  .record-links,
  .english-details,
  .contact {
    grid-template-columns: 1fr;
  }

  .timeline > li {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .project {
    min-height: 0;
  }

  .project-topline {
    margin-bottom: 1.8rem;
  }

  .contact {
    align-items: start;
  }

  .contact-link {
    margin-top: 0.5rem;
    font-size: 1rem;
  }

  footer {
    display: block;
  }

  footer p {
    margin-top: 0.6rem;
  }

  footer p:nth-last-child(2) {
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
