:root {
  --paper: #faf7f2;
  --ink: #050505;
  --muted: #6e6a63;
  --line: #050505;
  --soft-line: rgba(5, 5, 5, 0.14);
  --accent: #b8ff2c;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
}

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

button {
  color: inherit;
  font: inherit;
}

.site-nav {
  align-items: center;
  background: rgba(250, 247, 242, 0.88);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 64px;
  justify-content: space-between;
  left: 0;
  padding: 0 32px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand {
  border: 0;
  display: inline-flex;
  font-size: 22px;
  font-weight: 860;
  height: auto;
  letter-spacing: 0.08em;
  line-height: 1;
  min-width: 0;
  padding: 0;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 4px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 650;
  padding: 12px 12px;
  position: relative;
}

.nav-links a::after {
  background: var(--ink);
  bottom: 5px;
  content: "";
  height: 3px;
  left: 10px;
  position: absolute;
  right: 10px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.language-menu {
  position: relative;
}

.language-menu::before {
  content: "";
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
  top: 100%;
}

.lang-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 760;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 14px;
  position: relative;
  transition: color 0.2s ease;
}

.lang-toggle::after {
  background: var(--ink);
  bottom: 5px;
  content: "";
  height: 3px;
  left: 8px;
  position: absolute;
  right: 8px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.32s cubic-bezier(0.65, 0, 0.35, 1);
}

.language-menu:hover .lang-toggle::after,
.language-menu:focus-within .lang-toggle::after,
.language-menu.is-open .lang-toggle::after {
  transform: scaleX(1);
}

.lang-symbol {
  display: inline-block;
  font-weight: 760;
  height: 14px;
  line-height: 1;
  position: relative;
  width: 14px;
}

.lang-symbol span {
  position: absolute;
}

.lang-symbol span:first-child {
  font-size: 10px;
  left: 0;
  top: 0;
}

.lang-symbol span:last-child {
  font-size: 11px;
  left: 5px;
  top: 6px;
}

.lang-caret {
  display: inline-block;
  border-bottom: 1.4px solid var(--ink);
  border-right: 1.4px solid var(--ink);
  font-size: 0;
  height: 7px;
  transform: rotate(45deg) translateY(-2px);
  width: 7px;
}

.language-panel {
  background: var(--paper);
  border: 1px solid rgba(5, 5, 5, 0.06);
  border-radius: 28px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 4px;
  min-width: 150px;
  opacity: 0;
  padding: 22px 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  visibility: hidden;
  z-index: 50;
}

.language-menu:hover .language-panel,
.language-menu:focus-within .language-panel,
.language-menu.is-open .language-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  visibility: visible;
}

.language-panel button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.3;
  padding: 10px 34px;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.language-panel button:hover,
.language-panel button.is-active {
  color: var(--muted);
}

.grid-layout {
  margin: 0 auto;
  max-width: none;
  padding: 0;
  width: 100%;
}

.hero-section {
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  border-top: 0;
  transition: transform 0.65s cubic-bezier(0.2, 0.75, 0.2, 1);
}

@supports selector(:has(*)) {
  .hero-section:has(.crack-zone:hover) {
    transform: perspective(1200px) rotateX(-2.5deg);
  }
}

.flip-container {
  perspective: 1600px;
  width: 100%;
}

.flip-inner {
  min-height: 600px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.flip-face {
  backface-visibility: hidden;
  min-height: 600px;
  width: 100%;
}

.flip-front {
  position: relative;
  z-index: 1;
}

.flip-back {
  background: var(--ink);
  color: var(--paper);
  left: 0;
  position: absolute;
  top: 0;
  transform: rotateX(180deg);
  z-index: 0;
}

.hero-title {
  background: var(--paper);
  cursor: crosshair;
  height: 600px;
  overflow: hidden;
  position: relative;
}

.hero-background,
.alt-title-layer {
  inset: 0;
  position: absolute;
}

.hero-background {
  display: grid;
  gap: 0;
  grid-template-rows: repeat(14, 1fr);
  pointer-events: none;
}

.pattern-row {
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.035);
  display: flex;
  min-width: max-content;
  white-space: nowrap;
}

.pattern-text {
  color: rgba(5, 5, 5, 0.1);
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(20px, 2.05vw, 34px);
  font-weight: 700;
  padding-right: 28px;
}

.hero-background-invert .pattern-text {
  color: rgba(250, 247, 242, 0.16);
}

.hero-heading {
  --hero-name-offset: clamp(20px, 3.7vw, 54px);
  --hero-name-left: calc(50% + var(--hero-name-offset));
  font-size: clamp(54px, 7.15vw, 104px);
  font-weight: 860;
  left: 0;
  letter-spacing: 0;
  line-height: 0.96;
  margin: 0;
  max-width: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  z-index: 2;
  white-space: nowrap;
}

.hero-heading-cn {
  font-size: clamp(54px, 7.15vw, 104px);
}

.hero-prefix,
.hero-name {
  position: absolute;
  top: 50%;
  white-space: nowrap;
}

.hero-prefix {
  right: calc(100% - var(--hero-name-left) + 0.13em);
  transform: translateY(-50%);
}

.hero-name {
  left: var(--hero-name-left);
  transform: translateY(calc(-50% - 0.035em));
}

.alt-title-layer {
  background: var(--ink);
  clip-path: circle(0 at -300px -300px);
  color: var(--paper);
  overflow: hidden;
  pointer-events: none;
  will-change: clip-path;
  z-index: 3;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.crack-zone {
  align-items: flex-end;
  background: transparent;
  border: 0;
  bottom: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  left: 0;
  min-height: 42%;
  padding: 0 0 34px;
  position: absolute;
  right: 0;
  z-index: 4;
}

.crack-zone span {
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  padding: 11px 0;
  position: relative;
  transition: color 0.2s ease, transform 0.2s ease;
}

.crack-zone span::after {
  background: var(--ink);
  bottom: 6px;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.crack-zone:hover span {
  transform: translateY(-2px);
}

.crack-zone:hover span::after {
  transform: scaleX(1);
}

.about-panel {
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  min-height: 600px;
  padding: 72px 80px;
  position: relative;
}

.kicker {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 28px;
  text-transform: uppercase;
}

.about-copy h2 {
  font-size: clamp(56px, 7vw, 112px);
  letter-spacing: 0;
  line-height: 0.92;
  margin: 0 0 24px;
}

.about-copy p:last-child {
  color: rgba(250, 247, 242, 0.72);
  font-size: 18px;
  line-height: 1.9;
  margin: 0;
  max-width: 660px;
}

.quick-links {
  align-self: center;
  border: 1px solid rgba(250, 247, 242, 0.42);
}

.quick-links a {
  display: grid;
  gap: 20px;
  grid-template-columns: 56px 1fr;
  padding: 30px;
  transition: background 0.2s ease, color 0.2s ease;
}

.quick-links a + a {
  border-top: 1px solid rgba(250, 247, 242, 0.42);
}

.quick-links a:hover {
  background: var(--paper);
  color: var(--ink);
}

.quick-links span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
  grid-row: 1 / span 2;
}

.quick-links a:hover span {
  color: var(--ink);
}

.quick-links strong,
.quick-links em {
  display: block;
  grid-column: 2;
  font-style: normal;
}

.quick-links strong {
  font-size: 24px;
  line-height: 1.2;
}

.quick-links em {
  color: rgba(250, 247, 242, 0.58);
  font-size: 14px;
  margin-top: 8px;
}

.quick-links a:hover em {
  color: rgba(5, 5, 5, 0.58);
}

.back-button {
  background: transparent;
  border: 1px solid rgba(250, 247, 242, 0.55);
  bottom: 28px;
  color: var(--paper);
  cursor: pointer;
  font-size: 13px;
  font-weight: 760;
  padding: 10px 18px;
  position: absolute;
  right: 28px;
  transition: background 0.2s ease, color 0.2s ease;
}

.back-button:hover {
  background: var(--paper);
  color: var(--ink);
}

.index-section,
.contact-section,
.site-footer {
  border: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  margin-top: -1px;
}

.section-head,
.contact-section {
  align-items: center;
  background: var(--paper);
  display: flex;
  gap: 80px;
  padding: 60px 80px;
}

.section-head h2,
.contact-section h2 {
  flex-shrink: 0;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  margin: 0;
}

.section-head p,
.contact-section p {
  color: #333;
  font-size: 20px;
  line-height: 1.8;
  margin: 0;
}

.link-row {
  align-items: stretch;
  background: var(--paper);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  min-height: 136px;
  transition: background 0.2s ease, color 0.2s ease;
}

.link-row:hover {
  background: var(--ink);
  color: var(--paper);
}

.link-row > span,
.link-row > b {
  align-items: center;
  display: flex;
  justify-content: center;
}

.link-row > span {
  border-right: 1px solid var(--line);
  color: #999;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
}

.link-row:hover > span {
  border-color: rgba(250, 247, 242, 0.32);
  color: var(--paper);
}

.link-row div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 48px;
}

.link-row strong {
  font-size: 28px;
  line-height: 1.2;
}

.link-row p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 8px 0 0;
}

.link-row:hover p {
  color: rgba(250, 247, 242, 0.65);
}

.link-row > b {
  border-left: 1px solid var(--line);
  font-size: 32px;
  font-weight: 300;
  transition: transform 0.2s ease;
}

.link-row:hover > b {
  border-color: rgba(250, 247, 242, 0.32);
  transform: translateX(8px);
}

.contact-section {
  min-height: 220px;
}

.site-footer {
  background: var(--paper);
  color: var(--ink);
  display: block;
  padding: 0;
}

.footer-contact {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  min-height: 128px;
  padding: 36px 80px;
}

.footer-contact p,
.footer-copy p {
  margin: 0;
}

.footer-contact p {
  color: #777;
  font-size: 20px;
  line-height: 1.8;
}

.footer-contact a {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  margin-left: 12px;
  transition: color 0.2s ease;
}

.footer-contact a:hover {
  color: #777;
}

.footer-copy {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 104px;
  padding: 32px 24px;
}

.footer-copy p {
  color: #777;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 900px) {
  .site-nav {
    padding: 0 18px;
  }

  .nav-links a {
    padding: 10px 9px;
  }

  .grid-layout {
    padding: 0;
  }

  .hero-title,
  .flip-inner,
  .flip-face {
    min-height: 560px;
  }

  .hero-title {
    height: 560px;
  }

  .hero-title h1 {
    max-width: calc(100% - 32px);
  }

  .hero-heading {
    font-size: clamp(42px, 9vw, 72px);
    white-space: normal;
  }

  .hero-heading-cn {
    font-size: clamp(42px, 9vw, 72px);
  }

  .about-panel {
    display: flex;
    flex-direction: column;
    gap: 36px;
    min-height: 560px;
    padding: 44px 26px 84px;
  }

  .quick-links a {
    grid-template-columns: 44px 1fr;
    padding: 22px 20px;
  }

  .section-head,
  .contact-section,
  .footer-contact {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    padding: 42px 24px;
  }

  .link-row {
    grid-template-columns: 64px 1fr 60px;
    min-height: 110px;
  }

  .link-row div {
    padding: 24px 20px;
  }

  .link-row strong {
    font-size: 21px;
  }
}

@media (max-width: 620px) {
  .site-nav {
    height: 58px;
    padding: 0 12px;
  }

  .brand {
    font-size: 18px;
  }

  .nav-links {
    gap: 1px;
  }

  .nav-links a {
    font-size: 12px;
    padding: 10px 6px;
  }

  .nav-links a:nth-child(3) {
    display: none;
  }

  .lang-toggle {
    gap: 6px;
    padding: 0 6px;
  }

  .lang-symbol {
    height: 13px;
    width: 13px;
  }

  .lang-symbol span:first-child {
    font-size: 9px;
  }

  .lang-symbol span:last-child {
    font-size: 10px;
    left: 5px;
    top: 6px;
  }

  .lang-caret {
    height: 6px;
    width: 6px;
  }

  .language-panel {
    border-radius: 24px;
    min-width: 132px;
    padding: 18px 0;
    right: -4px;
    top: calc(100% + 8px);
  }

  .language-panel button {
    font-size: 14px;
    padding: 9px 28px;
  }

  .hero-title,
  .flip-inner,
  .flip-face {
    min-height: 500px;
  }

  .hero-title {
    height: 500px;
  }

  .pattern-text {
    font-size: 22px;
    padding-right: 22px;
  }

  .hero-heading {
    font-size: clamp(31px, 8.7vw, 40px);
    line-height: 0.98;
  }

  .hero-heading-cn {
    font-size: clamp(31px, 8.7vw, 40px);
  }

  .hero-prefix {
    right: calc(100% - var(--hero-name-left) + 0.08em);
  }

  .flip-inner.is-flipped,
  .flip-inner.is-flipped .flip-face {
    min-height: var(--flipped-height, 500px);
  }

  .flip-inner.is-flipped .flip-front {
    height: var(--flipped-height, 500px);
    inset: 0;
    overflow: hidden;
    position: absolute;
  }

  .flip-inner.is-flipped .about-panel {
    min-height: 0;
  }

  .flip-inner.is-flipped .about-panel {
    gap: 16px;
    padding: 26px 20px 24px;
  }

  .flip-inner.is-flipped .kicker {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .flip-inner.is-flipped .about-copy h2 {
    font-size: clamp(38px, 11.5vw, 50px);
    margin-bottom: 12px;
  }

  .flip-inner.is-flipped .about-copy p:last-child {
    font-size: 13px;
    line-height: 1.55;
  }

  .flip-inner.is-flipped .quick-links {
    align-self: stretch;
  }

  .flip-inner.is-flipped .quick-links a {
    gap: 12px;
    grid-template-columns: 36px 1fr;
    min-height: 76px;
    padding: 13px 16px;
  }

  .flip-inner.is-flipped .quick-links strong {
    font-size: 18px;
  }

  .flip-inner.is-flipped .quick-links em {
    font-size: 12px;
    margin-top: 4px;
  }

  .flip-inner.is-flipped .back-button {
    align-self: flex-end;
    font-size: 12px;
    padding: 7px 13px;
    position: static;
  }

  .crack-zone {
    min-height: 26%;
    padding-bottom: 24px;
  }

  .about-copy p:last-child,
  .section-head p,
  .contact-section p,
  .footer-contact p {
    font-size: 15px;
  }

  .quick-links strong {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
