:root {
  --page: #ffffff;
  --surface: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --white: #ffffff;
  --blue: #2768c9;
  --radius-large: clamp(1.75rem, 3vw, 3rem);
  --page-width: 1320px;
  --edge: clamp(1.25rem, 4vw, 3.75rem);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.6rem;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

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

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  width: min(100%, var(--page-width));
  min-height: 4.5rem;
  margin: 0 auto;
  padding: 0 var(--edge);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.wordmark {
  justify-self: start;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

nav a {
  color: rgba(29, 29, 31, 0.78);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
}

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

.language-switch {
  justify-self: end;
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.045);
}

.language-button {
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.language-button.is-active {
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.wordmark:focus-visible,
nav a:focus-visible,
.language-button:focus-visible,
.primary-contact:focus-visible,
.contact-email:focus-visible {
  outline: 3px solid rgba(39, 104, 201, 0.5);
  outline-offset: 4px;
}

main,
footer {
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding-right: var(--edge);
  padding-left: var(--edge);
}

.hero {
  min-height: min(780px, calc(100vh - 6.5rem));
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 0.98fr 1.02fr;
  overflow: hidden;
  border-radius: var(--radius-large);
  background: var(--surface);
}

.hero-copy {
  z-index: 1;
  padding: clamp(3rem, 7vw, 7rem) clamp(2rem, 5vw, 5.8rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.role-line {
  margin: 0 0 1.25rem;
  color: var(--ink);
  font-size: clamp(1.08rem, 1.45vw, 1.35rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 2rem;
  font-size: clamp(3.5rem, 6.7vw, 7rem);
  font-weight: 650;
  line-height: 0.91;
  letter-spacing: -0.07em;
}

h1 > span {
  display: block;
}

.chinese-name {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.47em;
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: 0.05em;
}

.firm {
  max-width: 35rem;
}

.firm p {
  margin: 0;
}

.firm-primary {
  font-size: clamp(1.12rem, 1.55vw, 1.42rem);
  font-weight: 520;
  line-height: 1.38;
  letter-spacing: -0.02em;
}

.firm-secondary {
  margin-top: 0.45rem !important;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.primary-contact {
  margin-top: clamp(2rem, 5vh, 3.75rem);
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1.15rem;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 180ms ease, transform 180ms ease;
}

.primary-contact:hover {
  background: #1f57aa;
  transform: translateY(-1px);
}

.primary-contact svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portrait-frame {
  position: relative;
  min-height: 35rem;
  overflow: hidden;
  background: #171a24;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 50%;
  transform: scale(1.01);
  transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero:hover .portrait-frame img {
  transform: scale(1.035);
}

.expertise {
  padding-top: clamp(7rem, 12vw, 11rem);
  padding-bottom: clamp(7rem, 12vw, 11rem);
}

.section-header {
  width: 100%;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.section-header h2,
.contact h2 {
  margin: 0.8rem 0 0;
  font-size: clamp(3rem, 6.4vw, 6.6rem);
  font-weight: 650;
  line-height: 0.97;
  letter-spacing: -0.065em;
}

.section-header h2 {
  font-size: clamp(2.75rem, 5.7vw, 5.8rem);
}

.expertise-grid {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  list-style: none;
}

.expertise-grid li {
  position: relative;
  min-height: 17rem;
  padding: clamp(1.6rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: clamp(1.35rem, 1.8vw, 1.75rem);
  background: #f8f8fa;
  transition: transform 220ms ease, background 220ms ease;
}

.expertise-grid li:hover {
  background: #f0f0f2;
  transform: translateY(-4px);
}

.item-number {
  position: absolute;
  top: clamp(1.6rem, 3vw, 2.75rem);
  left: clamp(1.6rem, 3vw, 2.75rem);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}

.expertise-grid h3 {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.contact {
  min-height: clamp(19rem, 29vw, 25rem);
  padding: clamp(4.5rem, 8vw, 7rem) 0;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  border-top: 1px solid #d2d2d7;
}

.contact h2 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5.2rem);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  max-width: 100%;
  padding: 0.45rem 0;
  border-bottom: 1px solid currentColor;
  color: var(--blue);
  text-decoration: none;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  font-weight: 550;
  letter-spacing: -0.015em;
}

.contact-email span {
  overflow-wrap: anywhere;
}

.contact-email svg {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 180ms ease;
}

.contact-email:hover svg {
  transform: translateX(4px);
}

footer {
  min-height: 5.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #d2d2d7;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 960px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: 0;
    padding-top: clamp(3rem, 7vw, 5.5rem);
    padding-bottom: clamp(3rem, 7vw, 5.5rem);
  }

  .portrait-frame {
    order: -1;
    min-height: 0;
    height: clamp(22rem, 55vw, 36rem);
  }

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

  .expertise-grid li {
    min-height: 13rem;
  }

  .contact {
    min-height: 18rem;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 1.4rem;
    text-align: center;
  }
}

@media (max-width: 560px) {
  :root {
    --edge: 1rem;
  }

  .site-header {
    min-height: 4rem;
  }

  .hero {
    margin-top: 0.75rem;
    border-radius: 1.6rem;
  }

  .hero-copy {
    padding: 2.2rem 1.5rem 2.65rem;
  }

  h1 {
    margin-bottom: 1.55rem;
    font-size: clamp(2.6rem, 12.5vw, 4.5rem);
    line-height: 0.96;
  }

  .chinese-name {
    margin-top: 0.45rem;
  }

  .role-line {
    margin-bottom: 0.8rem;
    font-size: 1.08rem;
  }

  .portrait-frame {
    height: clamp(15rem, 72vw, 21rem);
  }

  .primary-contact {
    margin-top: 2rem;
  }

  .expertise {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .contact h2 {
    font-size: clamp(3rem, 14vw, 4.5rem);
  }

  .section-header h2 {
    font-size: clamp(2.75rem, 12vw, 4rem);
  }

  html[lang="zh-CN"] #expertise-title {
    font-size: clamp(1.75rem, 8.5vw, 2.75rem);
    letter-spacing: -0.045em;
    white-space: nowrap;
  }

  .expertise-grid {
    width: calc(100% - 1.5rem);
    margin-inline: auto;
  }

  .expertise-grid li {
    min-height: 11.5rem;
  }

  .contact {
    min-height: 17rem;
    padding: 3.75rem 0;
    gap: 1.3rem;
  }

  .contact-heading {
    width: 100%;
    text-align: center;
  }

  footer {
    min-height: 5.75rem;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
  }
}

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

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