:root {
  --cloud: #f6f8f4;
  --cloud-deep: #e8eee8;
  --paper: #fffefa;
  --bamboo: #315f4d;
  --bamboo-deep: #163d32;
  --bamboo-light: #a9c1b1;
  --ink: #17221f;
  --muted: #68736e;
  --line: rgba(24, 56, 46, 0.16);
  --line-strong: rgba(24, 56, 46, 0.28);
  --mist: rgba(255, 255, 255, 0.72);
  --shadow: 0 26px 70px rgba(22, 61, 50, 0.1);
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --serif: "Source Han Serif SC", "Songti SC", "STSong", "Noto Serif SC", SimSun, serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --content: 1180px;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(49, 95, 77, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 95, 77, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 78% 7%, rgba(255, 255, 255, 0.95) 0 8%, transparent 28%),
    radial-gradient(circle at 15% 18%, rgba(197, 220, 205, 0.45), transparent 22rem),
    linear-gradient(180deg, #f7f9f6 0%, var(--cloud) 60%, #eef3ee 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  font-family: var(--sans);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.82;
  background:
    radial-gradient(ellipse 32% 11% at 91% 30%, rgba(255, 255, 255, 0.92), transparent 70%),
    radial-gradient(ellipse 24% 8% at 84% 36%, rgba(255, 255, 255, 0.75), transparent 72%),
    radial-gradient(ellipse 35% 10% at 4% 58%, rgba(255, 255, 255, 0.66), transparent 72%);
  filter: blur(1px);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.11;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='420' viewBox='0 0 280 420'%3E%3Cg fill='none' stroke='%23315f4d' stroke-width='2'%3E%3Cpath d='M222 420c-12-62 3-123 21-183 17-56 1-102-23-137'/%3E%3Cpath d='M225 340c-26-12-51-5-72 10M234 302c29-16 47-38 56-67M243 261c-26-17-35-40-36-69'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right top;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: #fff;
  background: var(--bamboo);
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  color: #fff;
  background: var(--bamboo-deep);
  border-radius: 4px;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 0.75rem;
}

.page-shell {
  width: min(calc(100% - 3rem), var(--content));
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 0.8rem;
  align-items: center;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.brand-mark,
.profile-avatar {
  display: inline-grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.2), transparent 40%),
    var(--bamboo-deep);
  font-family: var(--serif);
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  font-size: 1rem;
}

.site-nav {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.site-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
}

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

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

.menu-button {
  display: none;
  padding: 0.55rem 0.9rem;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr);
  gap: clamp(3rem, 8vw, 8rem);
  align-items: center;
  min-height: 680px;
  padding: clamp(4.2rem, 8vw, 7.5rem) 0;
  overflow: hidden;
}

.hero::before {
  position: absolute;
  top: 10%;
  right: -4%;
  z-index: -1;
  width: 38rem;
  height: 18rem;
  content: "";
  border: 1px solid rgba(49, 95, 77, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.5rem rgba(255, 255, 255, 0.16),
    0 0 0 5rem rgba(49, 95, 77, 0.025);
  transform: rotate(-8deg);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.9rem;
  color: var(--bamboo);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero h1 {
  max-width: 9em;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.5rem, 7vw, 6.3rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero h1::after {
  display: block;
  width: min(100%, 26rem);
  height: 34px;
  margin-top: 1.1rem;
  content: "";
  background:
    linear-gradient(90deg, var(--bamboo) 0 7%, transparent 7% 11%, var(--bamboo-light) 11% 14%, transparent 14%) 0 19px / 100% 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 420 34'%3E%3Cpath d='M0 20h84l14-13 9 24 11-18 8 7h54l10-5 9 12 10-20 13 21 12-8h186' fill='none' stroke='%23315f4d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.headline {
  margin: 1.1rem 0 0;
  color: var(--bamboo-deep);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.25vw, 1.95rem);
  line-height: 1.4;
}

.hero-summary {
  max-width: 41rem;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  min-height: 2.95rem;
  padding: 0.68rem 1.2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

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

.button:focus-visible,
.site-nav a:focus-visible,
.profile-links a:focus-visible,
.project-card a:focus-visible {
  outline: 3px solid rgba(49, 95, 77, 0.24);
  outline-offset: 3px;
}

.button-primary {
  color: #fff;
  background: var(--bamboo-deep);
}

.button-primary:hover {
  background: #0f3027;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.45);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  border-color: var(--bamboo);
}

.profile-card {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  background: rgba(255, 255, 252, 0.82);
  border: 1px solid rgba(49, 95, 77, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.profile-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  content: "";
  background: linear-gradient(90deg, var(--bamboo-deep), var(--bamboo-light));
}

.profile-card::after {
  position: absolute;
  right: -2.5rem;
  bottom: -3.2rem;
  width: 12rem;
  height: 12rem;
  content: "";
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'%3E%3Cg fill='none' stroke='%23315f4d' stroke-width='3'%3E%3Cpath d='M147 220c-7-46 2-90 18-134 13-36 3-65-17-86'/%3E%3Cpath d='M151 171c-24-10-45-6-63 8M159 130c22-13 36-31 41-54M162 95c-16-12-21-28-22-44'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
}

.profile-orbit {
  position: absolute;
  top: -4.3rem;
  right: -4.3rem;
  width: 10rem;
  height: 10rem;
  border: 1px solid rgba(49, 95, 77, 0.15);
  border-radius: 50%;
}

.profile-orbit::after {
  position: absolute;
  inset: 1.6rem;
  content: "";
  border: 1px solid rgba(49, 95, 77, 0.1);
  border-radius: 50%;
}

.profile-avatar {
  position: relative;
  width: 5.7rem;
  height: 5.7rem;
  font-size: 2.5rem;
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(22, 61, 50, 0.18);
}

.availability {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin: 1.2rem 0 1.6rem;
  color: var(--bamboo-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.availability::before {
  width: 0.45rem;
  height: 0.45rem;
  content: "";
  background: #6b9f83;
  border-radius: 50%;
  box-shadow: 0 0 0 0.28rem rgba(107, 159, 131, 0.12);
}

.profile-facts {
  display: grid;
  gap: 0.8rem;
  padding: 1.15rem 0;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.profile-facts div {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.8rem;
}

.profile-facts dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
}

.profile-facts dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 650;
}

.profile-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.profile-links a {
  padding: 0.38rem 0.62rem;
  color: var(--bamboo-deep);
  background: rgba(49, 95, 77, 0.07);
  border: 1px solid rgba(49, 95, 77, 0.1);
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 700;
}

.focus-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: rgba(255, 255, 252, 0.5);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.focus-item {
  position: relative;
  min-height: 106px;
  padding: 1.4rem 1.5rem;
}

.focus-item::before {
  display: block;
  width: 1.8rem;
  height: 2px;
  margin-bottom: 0.65rem;
  content: "";
  background: var(--bamboo-light);
}

.focus-item + .focus-item {
  border-left: 1px solid var(--line);
}

.focus-item span {
  display: block;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.67rem;
  letter-spacing: 0.09em;
}

.focus-item strong {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 500;
}

.section {
  padding: clamp(4.4rem, 8vw, 7rem) 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 3.6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-index {
  margin: 0;
  color: var(--bamboo);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.section-kicker {
  margin-bottom: 0.32rem;
}

.section h2,
.contact-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 5rem);
  padding: 0 0 0 4.6rem;
}

.about-lead {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.8vw, 2.25rem);
  line-height: 1.52;
}

.about-body {
  margin: 0;
  color: var(--muted);
  white-space: pre-line;
}

.timeline {
  display: grid;
  margin-left: 4.6rem;
  border-top: 1px solid var(--line-strong);
}

.timeline-item {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  padding: 1.7rem 0;
  border-bottom: 1px solid var(--line);
}

.timeline-period {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.73rem;
  letter-spacing: 0.02em;
}

.timeline-role {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 500;
}

.timeline-org {
  margin: 0.18rem 0 0;
  color: var(--bamboo-deep);
  font-size: 0.86rem;
  font-weight: 700;
}

.timeline-summary {
  max-width: 45rem;
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-left: 4.6rem;
}

.project-card {
  position: relative;
  display: flex;
  min-height: 16rem;
  padding: 1.8rem;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 252, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.project-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  content: "";
  background: linear-gradient(var(--bamboo), var(--bamboo-light));
}

.project-card:hover {
  box-shadow: 0 16px 42px rgba(22, 61, 50, 0.08);
  transform: translateY(-2px);
}

.project-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.project-card p {
  margin: 0.9rem 0 1.3rem;
  color: var(--muted);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: auto 0 0;
  list-style: none;
}

.tag-list li {
  padding: 0.35rem 0.56rem;
  color: var(--bamboo-deep);
  background: rgba(49, 95, 77, 0.07);
  border: 1px solid rgba(49, 95, 77, 0.08);
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
}

.project-link {
  margin-top: 1rem;
  color: var(--bamboo-deep);
  font-size: 0.82rem;
  font-weight: 700;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-left: 4.6rem;
}

.skill-card {
  padding: 1.5rem;
  background: rgba(255, 255, 252, 0.58);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.skill-card h3 {
  margin: 0 0 0.8rem;
  color: var(--bamboo);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

.skill-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.skill-card li {
  padding: 0.4rem 0.66rem;
  background: var(--cloud-deep);
  border-radius: 3px;
  font-size: 0.82rem;
}

.contact-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  padding: clamp(2.7rem, 5vw, 4.4rem);
  margin: clamp(3.5rem, 8vw, 6rem) 0;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 93% 10%, rgba(255, 255, 255, 0.15), transparent 17rem),
    linear-gradient(135deg, var(--bamboo-deep), #285743);
  border-radius: var(--radius);
}

.contact-panel::after {
  position: absolute;
  right: -2rem;
  bottom: -5rem;
  width: 18rem;
  height: 24rem;
  content: "";
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 380'%3E%3Cg fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M180 380c-13-63-2-124 18-182 15-43 4-88-19-122'/%3E%3Cpath d='M184 310c-25-12-48-6-68 9M193 265c23-15 39-35 46-61M201 220c-22-15-29-35-30-59'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
}

.contact-panel > * {
  position: relative;
  z-index: 1;
}

.contact-panel .section-kicker {
  color: #b8d4c3;
}

.contact-panel p:not(.section-kicker) {
  max-width: 38rem;
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.button-inverse {
  color: var(--bamboo-deep);
  background: #fff;
}

.site-footer {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.site-footer a {
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

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

.noscript-message {
  max-width: 36rem;
  padding: 1rem;
  margin: 2rem auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .page-shell {
    width: min(calc(100% - 2rem), var(--content));
  }

  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 1rem;
    left: 1rem;
    z-index: 20;
    display: none;
    padding: 0.8rem;
    flex-direction: column;
    align-items: stretch;
    background: rgba(247, 249, 246, 0.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.58rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 4rem 0;
  }

  .profile-card {
    max-width: 460px;
  }

  .focus-strip {
    grid-template-columns: 1fr;
  }

  .focus-item + .focus-item {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .about-grid,
  .timeline,
  .project-grid,
  .skills-grid {
    margin-left: 0;
    padding-left: 0;
  }

  .about-grid,
  .project-grid,
  .skills-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .contact-panel {
    align-items: start;
  }
}

@media (max-width: 540px) {
  .site-header {
    min-height: 72px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 4.3rem);
  }

  .profile-card {
    padding: 1.45rem;
  }

  .section-heading {
    grid-template-columns: 2.4rem minmax(0, 1fr);
  }

  .profile-facts div {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }

  .contact-panel {
    padding: 2rem 1.3rem;
  }

  .site-footer {
    gap: 0.8rem;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

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

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

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

@media print {
  :root {
    --ink: #111;
    --muted: #444;
    --bamboo: #111;
    --bamboo-deep: #111;
    --bamboo-light: #bbb;
  }

  body {
    background: #fff;
  }

  body::before,
  body::after,
  .site-header,
  .hero-actions,
  .profile-links,
  .site-footer,
  .contact-panel .button {
    display: none !important;
  }

  .page-shell {
    width: 100%;
  }

  .hero {
    grid-template-columns: 1fr 0.55fr;
    min-height: auto;
    padding: 0 0 2rem;
    gap: 2rem;
  }

  .hero h1 {
    font-size: 42pt;
  }

  .profile-card {
    padding: 1rem;
    box-shadow: none;
  }

  .profile-avatar {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.7rem;
  }

  .section {
    padding: 1.8rem 0;
    break-inside: avoid;
  }

  .contact-panel {
    color: #111;
    background: #fff;
    border: 1px solid #bbb;
  }

  .contact-panel p:not(.section-kicker) {
    color: #444;
  }

  .project-grid,
  .skills-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card,
  .skill-card {
    box-shadow: none;
  }

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