:root {
  color-scheme: dark;
  --bg: #1f2224;
  --paper: #f3f0e8;
  --ink: #202427;
  --muted: #657176;
  --line: rgba(229, 224, 215, .22);
  --paper-line: #d7d0c4;
  --on-bg: #f0eee8;
  --on-bg-muted: #b6c0bf;
  --accent: #8aa89d;
  --accent-strong: #375f57;
  --steel: #d9dedc;
  --gold: #b79a6d;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #1f2224;
  color: var(--on-bg);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(243, 240, 232, .14), transparent 28%, rgba(138, 168, 157, .15) 58%, transparent 82%),
    linear-gradient(35deg, transparent 0 42%, rgba(255, 255, 255, .018) 42% 43%, transparent 43% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 68px),
    #1f2224;
  background-size: 170% 170%, 360px 360px, 68px 68px, 68px 68px, auto;
  animation: backgroundDrift 18s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(138, 168, 157, .16), transparent 28%),
    radial-gradient(circle at 82% 68%, rgba(183, 154, 109, .10), transparent 30%),
    radial-gradient(ellipse at center, transparent 0%, rgba(15, 17, 18, .22) 70%, rgba(15, 17, 18, .46) 100%);
  animation: backgroundGlow 24s ease-in-out infinite alternate;
}
@keyframes backgroundDrift {
  from { background-position: 0% 0%, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 100% 60%, 24px 18px, 34px 0, 0 34px, 0 0; }
}
@keyframes backgroundGlow {
  from { opacity: .75; transform: scale(1); }
  to { opacity: 1; transform: scale(1.04); }
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin-top: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px clamp(28px, 6vw, 88px);
  background: rgba(31, 34, 36, .78);
  border-bottom: 1px solid rgba(229, 224, 215, .12);
  backdrop-filter: blur(18px);
}
.brand { font-size: 20px; font-weight: 800; }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  padding: 9px;
  background: rgba(243, 240, 232, .12);
  border: 1px solid rgba(243, 240, 232, .24);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .28);
  color: #dce3e0;
  font-size: 17px;
  font-weight: 700;
}
.nav a {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 12px;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.nav a:hover,
.nav a:focus-visible {
  background: rgba(138, 168, 157, .24);
  color: var(--on-bg);
  box-shadow: inset 0 0 0 1px rgba(138, 168, 157, .24);
  outline: none;
}

.hero {
  width: min(100%, 1680px);
  min-height: calc(100vh - 94px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1080px);
  justify-content: center;
  align-items: center;
  gap: clamp(36px, 6vw, 108px);
  padding: clamp(52px, 7vw, 92px) clamp(28px, 5vw, 84px);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  max-width: 1080px;
  padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(135deg, rgba(243, 240, 232, .08), rgba(243, 240, 232, .035));
  border: 1px solid rgba(243, 240, 232, .14);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .16);
  backdrop-filter: blur(8px);
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1 {
  margin-bottom: 12px;
  font-size: clamp(56px, 9vw, 118px);
  line-height: .95;
}
.hero-identity {
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 42px);
  margin-bottom: 12px;
}
.hero-identity h1 {
  margin-bottom: 0;
}
.profile-photo {
  width: clamp(96px, 13vw, 156px);
  height: auto;
  display: block;
  border: 1px solid rgba(243, 240, 232, .34);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(29, 37, 40, .16);
}
h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
}
h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.35;
}
.role {
  max-width: 760px;
  color: var(--steel);
  font-size: clamp(20px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.35;
}
.intro {
  max-width: 780px;
  color: var(--on-bg-muted);
  font-size: 17px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-focus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(243, 240, 232, .14);
}
.hero-focus div {
  padding: 0 14px;
  border-left: 1px solid rgba(243, 240, 232, .16);
}
.hero-focus div:first-child {
  padding-left: 0;
  border-left: 0;
}
.hero-focus span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.hero-focus strong {
  color: var(--on-bg);
  font-size: clamp(16px, 1.8vw, 20px);
}
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}
.hero-proof div {
  min-height: 78px;
  padding: 14px 16px;
  background: rgba(243, 240, 232, .075);
  border: 1px solid rgba(243, 240, 232, .14);
  border-radius: 12px;
}
.hero-proof span,
.hero-proof strong {
  display: block;
}
.hero-proof span {
  color: var(--accent);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 900;
  line-height: 1;
}
.hero-proof strong {
  margin-top: 8px;
  color: var(--on-bg);
  font-size: 14px;
}
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}
.button.primary { background: var(--accent); color: #fff; }
.button.primary { color: #15201d; }
.button.secondary { color: var(--on-bg); }
.button:hover,
.button:focus-visible {
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
  outline: none;
}

.timeline-item,
.project-list article,
.capability-grid article,
.award-list,
.work-dialog {
  color: var(--ink);
}

.section {
  padding: clamp(58px, 8vw, 108px) clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.section-heading {
  max-width: 760px;
  margin-bottom: 34px;
}
.section-heading p:not(.eyebrow) {
  color: var(--on-bg-muted);
  font-size: 16px;
}

.work-groups {
  display: grid;
  gap: clamp(32px, 5vw, 56px);
}

.work-group {
  display: grid;
  gap: 16px;
}

.work-group-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.work-group-heading h3 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 32px);
}

.work-group-heading p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--on-bg-muted);
  font-size: 14px;
  text-align: right;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.work-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  overflow: hidden;
  position: relative;
  background-color: #182326;
  background-image: linear-gradient(180deg, rgba(10, 18, 20, .06) 0%, rgba(10, 18, 20, .16) 42%, rgba(10, 18, 20, .82) 100%), var(--poster);
  background-position: center;
  background-size: cover;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform .2s ease, box-shadow .2s ease;
}
.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 18, 20, .28), rgba(10, 18, 20, .04) 58%);
}

.work-card::after {
  content: none;
}
.work-card > * { position: relative; }
.work-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.work-card .index {
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
}
.work-card h3 {
  margin: 0;
  font-size: 25px;
}
.work-card p { color: rgba(255, 255, 255, .82); }
.tags, .tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.tags span, .tool-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.tags span { background: rgba(255, 255, 255, .16); color: #fff; }

.split {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: start;
}
.sticky-heading {
  position: sticky;
  top: 104px;
}
.timeline, .project-list, .stack { display: grid; gap: 16px; }
.timeline-item, .project-list article, .capability-grid article, .award-list, .tool-tags {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 24px;
}
.time {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}
.timeline-item p, .project-list p, .capability-grid p, .award-list p {
  margin-bottom: 0;
  color: var(--muted);
}
.capability-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-tags { margin-top: 0; }
.tool-tags span { background: #e9f2ef; color: var(--accent-strong); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--muted);
  font-size: 14px;
}
.footer p { margin: 0; }

.work-dialog {
  width: min(1080px, calc(100vw - 28px));
  padding: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.work-dialog::backdrop {
  background: rgba(20, 28, 31, .52);
  backdrop-filter: blur(5px);
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
}
.dialog-media {
  position: relative;
  min-height: 280px;
  background: #101719;
}
.dialog-media video {
  display: block;
  width: 100%;
  max-height: 68vh;
  background: #101719;
}
.missing-video {
  display: none;
  padding: 80px 24px;
  color: #fff;
  text-align: center;
}
.dialog-copy { padding: 26px; }
.dialog-copy h2 { font-size: 32px; }
.dialog-copy p:last-child { margin-bottom: 0; color: var(--muted); }

@media (max-width: 980px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-copy { max-width: none; }
  .sticky-heading { position: static; }
  .work-grid, .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-header { align-items: center; flex-direction: column; }
  .site-header { padding-inline: 12px; }
  .nav {
    width: fit-content;
    max-width: 100%;
    justify-content: center;
    overflow-x: auto;
    padding: 6px;
    border-radius: 14px;
    font-size: 15px;
  }
  .nav a { min-width: 64px; padding: 0 14px; }
  .work-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .work-group-heading p {
    text-align: left;
  }
  .work-grid, .capability-grid, .project-list { grid-template-columns: 1fr; }
  .work-card { min-height: 300px; }
  .hero-identity { align-items: flex-end; }
  .profile-photo { width: 92px; }
  .hero-focus { grid-template-columns: 1fr; }
  .hero-focus div {
    padding: 0 0 12px;
    border-left: 0;
    border-bottom: 1px solid rgba(243, 240, 232, .14);
  }
  .hero-proof { grid-template-columns: 1fr; }
  .footer { flex-direction: column; }
  .button { width: 100%; }
}
