/* 基础设置 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg-main: #faf7f2;
  --bg-section: #fdfbf8;
  --text-main: #333333;
  --text-muted: #777777;
  --accent: #d79c7a;
  --border-soft: #e6dfd4;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
}

/* 顶部 header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 20px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: "Playfair Display", "Noto Sans SC", serif;
  font-size: 1.65rem;
  letter-spacing: 0.1em;
}

.brand-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.lang-switch label {
  white-space: nowrap;
}

.lang-switch select {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 4px 12px;
  background: white;
  font-size: 0.82rem;
}

/* 导航 */
.main-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 20px 10px;
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
  overflow-x: auto;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-main);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.main-nav a:hover {
  border-color: var(--accent);
}

/* Hero 滚动横幅 */
.hero {
  width: 100%;
  overflow: hidden;
  background: black;
}

.hero-track {
  display: flex;
  transition: transform 0.8s ease;
}

.hero-slide {
  min-width: 100%;
  justify-content: center;
  align-items: center;
  display: flex;
}

.hero-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Section 通用 */
.section {
  padding: 56px 16px;
}

.section:nth-of-type(odd) {
  background: var(--bg-section);
}

.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.section h2 {
  font-family: "Playfair Display", "Noto Sans SC", serif;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.section-lead {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* 书籍布局 */
.section-book .section-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 32px;
  align-items: center;
}

.book-cover img {
  width: 100%;
  max-width: 320px;
  display: block;
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-soft);
  background: white;
}

.book-cover a {
  display: inline-block;
}

.book-text p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.book-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
}

/* 按钮 / tag */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  padding: 8px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: #c2825c;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #f4eee6;
  font-size: 0.82rem;
  color: var(--text-main);
  text-decoration: none;
  margin-right: 8px;
  margin-top: 8px;
}

/* 衍生品 */
.section-derives .derives-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.derive-item {
  text-decoration: none;
  color: var(--text-main);
  text-align: center;
  padding: 12px 10px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.derive-item img {
  width: 100%;
  max-width: 140px;
  height: auto;
  margin-bottom: 10px;
}

.derive-item h3 {
  font-size: 0.95rem;
  margin: 4px 0 2px;
}

.derive-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.derive-item:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 32px rgba(0,0,0,0.06);
}

/* 媒体列表 */
.media-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.media-list li + li {
  margin-top: 10px;
}

.media-list a {
  text-decoration: none;
  color: var(--text-main);
}

.media-list a span {
  border-bottom: 1px dotted rgba(0,0,0,0.15);
}

.media-list a:hover span {
  border-bottom-style: solid;
}

/* 科普 & 简历 */
.section-science p {
  font-size: 0.95rem;
  line-height: 1.7;
}

.bio-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bio-form input {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  padding: 8px 14px;
}

.form-error {
  color: #c6584a;
  font-size: 0.85rem;
}

.bio-content ul {
  padding-left: 18px;
}

.bio-content li {
  margin-bottom: 4px;
  font-size: 0.95rem;
}

.hidden {
  display: none;
}

/* 联系方式 */
.section-contact .contact-mail a {
  font-size: 1rem;
  color: var(--accent);
  text-decoration: none;
}

/* Footer */
.site-footer {
  padding: 20px 16px 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 900px) {
  .section-book .section-inner {
    grid-template-columns: 1fr;
  }

  .book-cover {
    text-align: center;
  }

  .book-cover img {
    max-width: 260px;
  }

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

@media (max-width: 600px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-name {
    font-size: 1.3rem;
  }

  .main-nav {
    gap: 14px;
  }

  .section {
    padding: 40px 14px;
  }
}