:root {
  color-scheme: light;
  --ink: #151515;
  --muted: #666666;
  --line: #d8d8d8;
  --paper: #f6f6f4;
  --white: #ffffff;
  --accent: #111111;
  --accent-soft: #ececea;
  --accent-dark: #111111;
  --olive: #595959;
  --charcoal: #111111;
  --header-bg: rgba(246, 246, 244, 0.9);
  --page-bg: linear-gradient(135deg, #f7f7f5 0%, #ffffff 48%, #ededeb 100%);
  --section-bg: rgba(255, 255, 255, 0.42);
  --card-bg: rgba(255, 255, 255, 0.68);
}

body[data-theme="sage"] {
  --ink: #172120;
  --muted: #5d6d70;
  --line: #c8d8d4;
  --paper: #f3f8f7;
  --accent: #4f8f8a;
  --accent-soft: #d9eeea;
  --accent-dark: #255653;
  --olive: #4f8f8a;
  --charcoal: #1b302f;
  --header-bg: rgba(243, 248, 247, 0.88);
  --page-bg: linear-gradient(135deg, #f8fbfa 0%, #dff2ef 42%, #b6d8d5 100%);
  --section-bg: rgba(255, 255, 255, 0.32);
  --card-bg: rgba(255, 255, 255, 0.72);
}

body[data-theme="dust"] {
  --ink: #241f24;
  --muted: #766a78;
  --line: #ddd2df;
  --paper: #faf5f8;
  --accent: #9b748f;
  --accent-soft: #eadce7;
  --accent-dark: #5d4658;
  --olive: #8a7489;
  --charcoal: #2b242b;
  --header-bg: rgba(250, 245, 248, 0.88);
  --page-bg: linear-gradient(135deg, #fbf8fa 0%, #eadce7 44%, #c7b0c2 100%);
  --section-bg: rgba(255, 255, 255, 0.34);
  --card-bg: rgba(255, 255, 255, 0.72);
}

body[data-theme="blue"] {
  --ink: #181d28;
  --muted: #626b7e;
  --line: #ccd4e4;
  --paper: #f4f6fb;
  --accent: #667ca8;
  --accent-soft: #dfe5f3;
  --accent-dark: #394969;
  --olive: #667ca8;
  --charcoal: #20283a;
  --header-bg: rgba(244, 246, 251, 0.88);
  --page-bg: linear-gradient(135deg, #fbfbfe 0%, #e2e8f6 42%, #aab8d8 100%);
  --section-bg: rgba(255, 255, 255, 0.34);
  --card-bg: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--page-bg);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  background: var(--header-bg);
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
}

nav {
  display: flex;
  gap: clamp(12px, 2.5vw, 30px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

nav a:hover {
  color: var(--accent);
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-dot {
  width: 24px;
  height: 24px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  cursor: pointer;
}

.theme-dot[aria-pressed="true"] {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.theme-dot-mono {
  background: linear-gradient(135deg, #111 0 50%, #fff 50% 100%);
}

.theme-dot-sage {
  background: linear-gradient(135deg, #255653 0%, #4f8f8a 48%, #dff2ef 100%);
}

.theme-dot-dust {
  background: linear-gradient(135deg, #5d4658 0%, #9b748f 48%, #eadce7 100%);
}

.theme-dot-blue {
  background: linear-gradient(135deg, #394969 0%, #667ca8 48%, #e2e8f6 100%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: clamp(30px, 6vw, 84px);
  min-height: calc(100vh - 71px);
  padding: clamp(46px, 7vw, 96px) clamp(20px, 5vw, 72px) 44px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  align-self: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 22px;
  font-family: "Noto Serif SC", serif;
  max-width: none;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: 0;
  white-space: nowrap;
  overflow-wrap: normal;
}

h2 {
  margin-bottom: 0;
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1.35;
}

.lead {
  max-width: 760px;
  color: #373b3f;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.72;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

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

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

.button.ghost {
  background: transparent;
}

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

.profile-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 760px;
  margin: 52px 0 0;
}

.profile-facts div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 5px 0 0;
  font-weight: 800;
}

.portrait-panel {
  align-self: center;
  justify-self: end;
  width: min(100%, 240px);
}

.portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(180deg, var(--white), var(--accent-soft));
  border: 1px solid var(--line);
}

.portrait img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 34px;
  text-align: center;
}

.portrait-fallback span {
  font-family: "Noto Serif SC", serif;
  font-size: clamp(30px, 5vw, 48px);
}

.portrait-fallback small {
  max-width: 260px;
  color: var(--muted);
}

.quote {
  margin-top: 18px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.quote span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quote p {
  margin: 8px 0 0;
  font-size: 19px;
  font-weight: 700;
}

.section {
  padding: clamp(52px, 7vw, 94px) clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: var(--section-bg);
}

.intro {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
  gap: clamp(26px, 6vw, 72px);
  align-items: start;
}

.intro > p {
  margin: 36px 0 0;
  color: #3e4246;
  font-size: 20px;
}

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

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

.strength-grid article,
.work-card {
  min-height: 210px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  padding: 26px;
}

.strength-grid article {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.strength-grid p,
.work-card p,
.timeline-item p,
.credential-list p {
  color: var(--muted);
}

.timeline-section {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 36%),
    var(--charcoal);
  color: var(--white);
}

.timeline-section .section-kicker,
.timeline-section time {
  color: #e6a08f;
}

.timeline {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.timeline-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: clamp(20px, 5vw, 64px);
  padding: 26px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.timeline-item time {
  font-weight: 800;
}

.timeline-item p {
  max-width: 820px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.credentials {
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  background: rgba(255, 255, 255, 0.76);
}

.credential-list {
  display: grid;
  gap: 14px;
}

.credential-list p {
  margin: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.work-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--ink);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--white);
}

.work-card span {
  color: var(--olive);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.work-card h3 {
  overflow-wrap: anywhere;
}

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

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

.poster-card {
  gap: 16px;
}

.poster-preview {
  position: relative;
  display: block;
  width: 100%;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  cursor: zoom-in;
  padding: 0;
}

.poster-preview img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.82);
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-width: min(94vw, 980px);
  max-height: 92vh;
  object-fit: contain;
  background: var(--white);
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.contact-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(52px, 7vw, 94px) clamp(20px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    var(--accent-dark);
  color: var(--white);
}

.contact-section p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.78);
}

footer {
  display: grid;
  place-items: center;
  padding: 24px clamp(20px, 5vw, 72px);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 900px) {
  .site-header,
  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .intro,
  .credentials {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .portrait-panel {
    justify-self: center;
    width: min(100%, 220px);
    text-align: center;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .site-header {
    position: static;
    gap: 14px;
    padding: 14px 18px;
  }

  .brand {
    width: 100%;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
    white-space: nowrap;
  }

  .theme-switcher {
    margin-left: auto;
  }

  .theme-dot {
    width: 22px;
    height: 22px;
  }

  .hero {
    gap: 30px;
    padding: 38px 18px 36px;
  }

  .eyebrow,
  .section-kicker {
    font-size: 11px;
  }

  h1 {
    font-size: clamp(28px, 8.5vw, 38px);
    white-space: nowrap;
  }

  h2 {
    font-size: clamp(28px, 8vw, 38px);
  }

  .lead {
    font-size: 18px;
  }

  .hero-actions {
    margin-top: 26px;
  }

  .profile-facts,
  .strength-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .profile-facts {
    gap: 12px;
    margin-top: 34px;
  }

  .profile-facts div {
    padding-top: 12px;
  }

  .portrait-panel {
    width: 168px;
    margin-inline: auto;
    text-align: center;
  }

  .quote {
    margin-top: 14px;
    padding-top: 14px;
  }

  .quote p {
    font-size: 16px;
  }

  .section {
    padding: 46px 18px;
  }

  .intro > p {
    margin-top: 20px;
    font-size: 17px;
  }

  .section-heading {
    display: block;
    margin-bottom: 24px;
  }

  .strength-grid article,
  .work-card {
    min-height: auto;
    padding: 22px;
  }

  .timeline-item {
    padding: 22px 0;
  }

  .poster-preview {
    min-height: 300px;
  }

  .contact-section {
    padding: 46px 18px;
  }

  .button {
    width: 100%;
  }

  footer {
    align-items: center;
    padding: 20px 18px;
  }
}

@media (max-width: 380px) {
  nav {
    gap: 14px;
    font-size: 13px;
  }

  h1 {
    font-size: 28px;
  }

  .portrait-panel {
    width: 150px;
  }
}
