:root {
  color-scheme: light;
  --ink: #000000;
  --paper: #fffaeb;
  --accent: #046e5c;
  --line: 1.5px;
  font-family: Arial, Helvetica, "Noto Sans SC", "PingFang SC", sans-serif;
  font-synthesis: none;
}

@font-face {
  font-family: "Lanting Calligraphy";
  src: url("assets/fonts/lanting-calligraphy-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--paper);
  transform: translateY(-110%);
}

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

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: stretch;
  padding: 0;
  border-bottom: 4px solid var(--ink);
}

.header-portrait {
  display: block;
  align-self: end;
  width: 100%;
  max-height: 24rem;
  object-fit: contain;
  object-position: left bottom;
}

.identity h1 {
  max-width: 13ch;
  margin: 0.1rem 0 0.25rem;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.identity h1 span {
  display: block;
}

html[lang="zh-CN"] .name-western {
  display: none;
}

html[lang="zh-CN"] .identity h1 {
  font-size: clamp(3.8rem, 11vw, 8rem);
  line-height: 0.9;
}

html[lang="zh-CN"] .name-native {
  font-family: "Lanting Calligraphy", "STKaiti", "Kaiti SC", "KaiTi", cursive;
  font-weight: 400;
  letter-spacing: -0.18em;
}

.identity {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 4.25rem;
  padding-bottom: 2rem;
}

.location {
  margin: 0.2rem 0 0;
  font-size: clamp(0.95rem, 1.8vw, 1.3rem);
}

.header-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.65rem;
  margin-top: 0.4rem;
  font-size: clamp(0.875rem, 1.5vw, 1.05rem);
}

html[lang="zh-CN"] .header-contact {
  margin-top: 1.2rem;
}

.header-contact span {
  color: var(--accent);
  font-weight: 700;
}

.header-contact a {
  overflow-wrap: anywhere;
}

.language-switch {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  border: var(--line) solid var(--ink);
}

.language-switch button {
  min-width: 3.3rem;
  min-height: 2.25rem;
  padding: 0.3rem 0.55rem;
  border: 0;
  background: var(--paper);
  font-size: 0.875rem;
  cursor: pointer;
}

.language-switch button + button {
  border-left: var(--line) solid var(--ink);
}

.language-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--paper);
}

main {
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
}

.bordered {
  border: var(--line) solid var(--ink);
}

.intro {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) 2fr;
  gap: 2rem;
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem);
}

h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.intro p {
  max-width: 48rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
}

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

.section-block {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.section-block h2 {
  padding-bottom: 1.15rem;
  border-bottom: var(--line) solid var(--ink);
}

article {
  padding: 1.3rem 0;
  border-bottom: var(--line) solid var(--ink);
}

article:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

h3 {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

p {
  margin: 0;
}

article p {
  margin-bottom: 0.55rem;
}

.compact-grid .section-block {
  min-height: 14rem;
}

ul {
  margin: 1.15rem 0 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.75rem;
}

.compact-grid p {
  margin-top: 1.15rem;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 1rem, 48rem);
    padding: 1rem 0;
  }

  .site-header {
    grid-template-columns: minmax(7rem, 0.65fr) minmax(0, 1.35fr);
    gap: 0.6rem;
  }

  .identity h1 {
    font-size: clamp(1.95rem, 8vw, 2.7rem);
  }

  .identity {
    padding-top: 4rem;
    padding-bottom: 1.25rem;
  }

  .header-portrait {
    max-height: 16rem;
  }

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

  .intro {
    gap: 1rem;
  }

  .compact-grid .section-block {
    min-height: 0;
  }
}

.pointer-effects {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
}

.pointer-ring,
.pointer-spark {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.pointer-spark {
  width: 13px;
  height: 13px;
}

.pointer-ring {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 2.2px solid var(--pointer-color, var(--accent));
  transition: width 160ms ease, height 160ms ease, opacity 160ms ease, background-color 160ms ease;
}

.pointer-ring.is-visible { opacity: 0.65; }

.pointer-ring.is-link {
  width: 55px;
  height: 55px;
  opacity: 1;
  background: color-mix(in srgb, var(--pointer-color) 12%, transparent);
  box-shadow: 0 0 23px color-mix(in srgb, var(--pointer-color) 25%, transparent);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html.custom-pointer-active,
  html.custom-pointer-active * { cursor: none !important; }
}

@media (hover: hover) and (pointer: fine) {
  a:hover {
    color: var(--pointer-color, var(--accent));
    text-decoration-color: currentColor;
    text-decoration-thickness: 3px;
    background: color-mix(in srgb, var(--pointer-color, var(--accent)) 10%, transparent);
  }
}

@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .pointer-effects { display: none; }
}

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