:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-soft: #eef7f4;
  --ink: #1b2533;
  --muted: #627084;
  --line: #dfe6ee;
  --blue: #2563eb;
  --green: #16a37a;
  --coral: #e86d5a;
  --shadow: 0 18px 50px rgba(31, 45, 61, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 320px),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

.language-switcher {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
}

.language-switcher select {
  min-height: 38px;
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(31, 45, 61, 0.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  padding: 0 34px 0 12px;
  font-size: 0.86rem;
}

.page-shell {
  width: min(100% - 32px, 880px);
  margin: 0 auto;
  padding: 48px 0 32px;
}

.hero {
  min-height: min(620px, 86vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 0 42px;
}

.avatar {
  width: clamp(112px, 24vw, 156px);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--surface);
  box-shadow:
    0 0 0 2px rgba(37, 99, 235, 0.2),
    var(--shadow);
}

.eyebrow,
.section-kicker {
  margin: 22px 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(2.25rem, 7vw, 4.6rem);
  line-height: 1.05;
}

.english-name {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1.05rem;
}

.intro {
  max-width: 620px;
  margin-bottom: 0;
  color: #344256;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
}

.section-block {
  padding: 34px 0;
}

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

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  line-height: 1.18;
}

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

.info-card,
.link-card,
.chat-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(31, 45, 61, 0.07);
}

.info-card {
  min-height: 220px;
  padding: 20px;
}

.info-card h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.info-card ul {
  margin: 0;
  padding-left: 1.15rem;
  color: #3f4d60;
}

.info-card li + li {
  margin-top: 8px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  padding: 7px 11px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 0.94rem;
}

.trait-card {
  border-left: 5px solid var(--coral);
}

.trait-card p {
  margin-bottom: 10px;
  color: #3d4b5e;
  font-weight: 700;
}

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

.link-card {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 16px 38px rgba(31, 45, 61, 0.11);
}

.link-label {
  width: fit-content;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.link-card strong {
  font-size: 1.05rem;
}

.link-card span:last-child {
  color: var(--muted);
  font-size: 0.94rem;
}

.chat-panel {
  padding: 16px;
}

.chat-window {
  height: 390px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 4px 14px;
}

.message {
  max-width: min(78%, 560px);
  border-radius: 8px;
  padding: 12px 14px;
}

.message p {
  margin-bottom: 0;
}

.message-name {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.message.bot {
  align-self: flex-start;
  background: var(--surface-soft);
  border: 1px solid #cde8dd;
}

.message.user {
  align-self: flex-end;
  background: var(--blue);
  color: #ffffff;
}

.message.user .message-name {
  color: rgba(255, 255, 255, 0.76);
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.suggestions button,
.chat-form button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.suggestions button {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: #f4f8ff;
  color: #1e4fbf;
  padding: 10px 12px;
  text-align: left;
}

.suggestions button:hover,
.suggestions button.asked {
  background: #e5efff;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-form input {
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
}

.chat-form button {
  background: var(--ink);
  color: #ffffff;
  padding: 0 18px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  padding: 0 16px 26px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

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

.footer a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .language-switcher {
    top: 10px;
    right: 10px;
  }

  .language-switcher select {
    min-width: 124px;
  }

  .page-shell {
    width: min(100% - 24px, 520px);
    padding-top: 64px;
  }

  .hero {
    min-height: 78vh;
  }

  .info-grid,
  .link-grid,
  .suggestions {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: auto;
  }

  .chat-window {
    height: 340px;
  }

  .message {
    max-width: 92%;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }
}
