:root {
  --black: #101014;
  --black-soft: #17171c;
  --white: #f7f7f8;
  --muted: #a4a4ac;
  --line: rgba(255, 255, 255, 0.12);
  --ink: #121216;
  --page: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
  background: #eee;
}

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

button {
  color: inherit;
  font: inherit;
}

.page-width {
  width: min(var(--page), calc(100% - 80px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 64px;
  padding: 0 max(40px, calc((100vw - var(--page)) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(16, 16, 20, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wordmark {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.nav-links {
  display: flex;
  gap: 54px;
  font-size: 15px;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: #fff;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 0;
  background: transparent;
}

.menu-button span {
  display: block;
  height: 1px;
  margin: 6px 0;
  background: #fff;
}

.profile {
  position: relative;
  min-height: 536px;
  overflow: hidden;
  background: #edf2f5;
}

.profile-image,
.profile-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.profile-image {
  object-fit: cover;
  object-position: center;
}

.profile-shade {
  background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.24) 35%, rgba(255,255,255,.12) 58%, rgba(255,255,255,.92) 100%);
}

.profile-content {
  position: relative;
  z-index: 1;
  min-height: 536px;
  padding: 56px 0;
  display: grid;
  grid-template-columns: 1fr 340px;
  justify-content: space-between;
}

.identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.identity h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.2;
}

.name-en {
  margin: 3px 0 0;
  color: rgba(18, 18, 22, 0.42);
  font-size: 18px;
}

.role {
  margin-top: 50px;
}

.role p,
.contact a {
  display: block;
  margin: 0;
  font-size: 14px;
}

.contact {
  margin-top: 48px;
}

.wechat {
  width: 80px;
  height: 80px;
  margin-top: auto;
}

.strengths {
  display: grid;
  align-content: center;
  gap: 23px;
}

.strengths article {
  max-width: 340px;
}

.strengths h2 {
  margin: 0 0 5px;
  font-size: 14px;
}

.strengths p {
  margin: 0;
  color: rgba(18, 18, 22, 0.7);
  font-size: 14px;
}

.dark-section {
  color: rgba(255, 255, 255, 0.9);
  background: var(--black);
}

.resume {
  padding: 76px 0 80px;
}

.section-heading {
  margin-bottom: 50px;
}

.section-heading p {
  margin: 0 0 8px;
  color: #777780;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.section-heading h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.2;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 40px;
  left: 142px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 120px 44px 1fr;
  min-height: 125px;
}

.timeline-date {
  text-align: right;
}

.timeline-date strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.timeline-date span {
  display: inline-block;
  margin-top: 7px;
  padding: 1px 7px;
  color: var(--muted);
  font-size: 11px;
  background: #202026;
  border-radius: 3px;
}

.timeline-marker {
  position: relative;
}

.timeline-marker::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 19px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.timeline-main {
  position: relative;
  padding: 0 122px 36px 12px;
}

.timeline-main::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 0;
  left: 288px;
  height: 1px;
  background: var(--line);
}

.company-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  padding-right: 18px;
  background: var(--black);
}

.company-row img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
}

.company-row h3 {
  margin: 0 3px 0 6px;
  font-size: 17px;
}

.company-row span {
  padding: 2px 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  background: #222228;
  border-radius: 3px;
}

.achievement {
  margin: 12px 0 0 48px;
  color: var(--muted);
  font-size: 13px;
}

.detail-toggle {
  position: absolute;
  top: -2px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0 6px 12px;
  border: 0;
  background: var(--black);
  cursor: pointer;
}

.chevron {
  width: 8px;
  height: 8px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 200ms ease;
}

.detail-toggle[aria-expanded="true"] .chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.detail-panel {
  display: none;
  margin: 0 0 0 48px;
}

.detail-panel > div {
  overflow: hidden;
}

.detail-panel.open {
  display: block;
  margin-top: 24px;
}

.detail-panel h4 {
  margin: 18px 0 5px;
  font-size: 13px;
}

.detail-panel h4:first-child {
  margin-top: 0;
}

.detail-panel p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 13px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.skill-grid article {
  min-height: 120px;
  padding: 17px 18px;
  background: var(--black-soft);
  border: 1px solid rgba(255, 255, 255, 0.025);
  border-radius: 7px;
}

.skill-grid h3 {
  margin: 0 0 7px;
  font-size: 13px;
}

.skill-grid p {
  margin: 0;
  color: #85858e;
  font-size: 12px;
}

.works {
  padding: 84px 0 100px;
  background: #efefef;
}

.light-heading h2 {
  color: var(--ink);
}

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

.work-card {
  display: block;
  overflow: hidden;
  background: #fff;
  border-radius: 6px;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.work-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(20, 20, 25, 0.12);
}

.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.work-card > div {
  position: relative;
  min-height: 118px;
  padding: 18px 20px;
}

.work-card h3 {
  margin: 0;
  font-size: 16px;
}

.work-card p {
  margin: 5px 0 0;
  color: #77777f;
  font-size: 12px;
}

.work-card span {
  position: absolute;
  right: 20px;
  bottom: 18px;
  color: #8a8a92;
  font-size: 11px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.work-card:hover span {
  opacity: 1;
  transform: translateX(0);
}

footer {
  color: #fff;
  background: var(--black);
}

.footer-inner {
  min-height: 440px;
  padding: 86px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-kicker {
  margin: 0 0 24px;
  color: #777780;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.footer-inner h2 {
  margin: 0;
  font-size: 48px;
  line-height: 1.25;
}

.footer-contact {
  min-width: 290px;
  padding-top: 36px;
}

.footer-contact p {
  margin: 22px 0 3px;
  color: #777780;
  font-size: 12px;
}

.footer-contact a {
  font-size: 18px;
}

@media (max-width: 900px) {
  .page-width {
    width: min(100% - 48px, 720px);
  }

  .site-header {
    padding-inline: 24px;
  }

  .profile {
    min-height: 760px;
  }

  .profile-image {
    object-position: 48% center;
  }

  .profile-shade {
    background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.34) 45%, rgba(255,255,255,.94) 78%);
  }

  .profile-content {
    min-height: 760px;
    grid-template-columns: 1fr;
    padding: 46px 0 38px;
  }

  .strengths {
    align-self: end;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
  }

  .wechat {
    display: none;
  }

  .role {
    margin-top: 28px;
  }

  .contact {
    margin-top: 24px;
  }

  .timeline::before {
    left: 126px;
  }

  .timeline-item {
    grid-template-columns: 105px 40px 1fr;
  }

  .timeline-main {
    padding-right: 0;
  }

  .timeline-main::after {
    display: none;
  }

  .detail-toggle {
    position: static;
    margin: 10px 0 0 48px;
    padding-left: 0;
  }

  .company-row {
    flex-wrap: wrap;
    width: auto;
  }

  .skill-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 600px) {
  .page-width {
    width: calc(100% - 36px);
  }

  .wordmark {
    max-width: 220px;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 8px 18px 16px;
    background: rgba(16, 16, 20, 0.98);
    border-bottom: 1px solid rgba(255,255,255,.08);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-links a {
    padding: 12px 4px;
  }

  .profile {
    min-height: 800px;
  }

  .profile-image {
    height: 480px;
    object-position: 50% center;
  }

  .profile-shade {
    background: linear-gradient(180deg, rgba(255,255,255,.68) 0%, rgba(255,255,255,.15) 44%, #eef2f4 60%);
  }

  .profile-content {
    min-height: 800px;
    padding-top: 34px;
  }

  .identity h1 {
    font-size: 29px;
  }

  .strengths {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .strengths article {
    max-width: none;
  }

  .resume,
  .works {
    padding: 60px 0;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading h2 {
    font-size: 30px;
  }

  .timeline::before {
    left: 7px;
  }

  .timeline-item {
    grid-template-columns: 20px 1fr;
    margin-bottom: 42px;
  }

  .timeline-date {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 13px;
    text-align: left;
  }

  .timeline-date strong,
  .timeline-date span {
    display: inline-block;
  }

  .timeline-date span {
    margin: 0 0 0 8px;
  }

  .timeline-marker {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .timeline-marker::after {
    top: 8px;
    left: 5px;
  }

  .timeline-main {
    grid-column: 2;
    padding: 0;
  }

  .company-row {
    gap: 6px;
    padding: 0;
  }

  .company-row h3 {
    font-size: 16px;
  }

  .achievement,
  .detail-toggle,
  .detail-panel {
    margin-left: 0;
  }

  .skill-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .skill-grid article {
    min-height: 110px;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .work-card > div {
    min-height: 105px;
  }

  .work-card span {
    opacity: 1;
    transform: none;
  }

  .footer-inner {
    min-height: 480px;
    padding: 64px 0;
    flex-direction: column;
  }

  .footer-inner h2 {
    font-size: 36px;
  }

  .footer-contact {
    min-width: 0;
    padding-top: 50px;
  }
}

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

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