:root {
  --bg: #ffffff;
  --primary: #4A77B1;
  --muted: #5C6975;
  --max-width: 980px;
}

/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont,
    system-ui, -system-ui, sans-serif;  background-color: var(--bg);
  color: #333333;
}

html[lang="zh-CN"] body {
  font-family: "Noto Serif SC", "Noto Serif", "Times New Roman", serif;
  font-weight: 300;
}

/* =========================
   Shared Top Navigation
   ========================= */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px;
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(34, 34, 34, 0.06);
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 0;
}

html[lang="en"] .site-header {
  font-family: "Palanquin", "Helvetica", "Arial", sans-serif;
}

.site-brand a {
  text-decoration: none;
  color: #333333;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-left: 12px;
  line-height: 1;
}

html[lang="en"] .site-brand a {
  font-weight: 500;
  letter-spacing: 0.10em;
  line-height: 1;
}

.site-nav {
  display: flex;
  gap: 32px;
  font-size: 14px;
  margin-right: 20px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

html[lang="zh-CN"] .site-nav {
  font-size: 15px;
}

html[lang="en"] .site-nav {
  font-size: 14px;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav a.active {
  color: #7ab4ff;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
  font-size: 16px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #222222;
  font-family: "Noto Serif", "Noto Serif SC", "Times New Roman", serif;
  font-weight: 400;
}

.lang-switch-handle {
  text-align: right;
  font-size: 0.95em;
}

.lang-switch-handle a {
  background: none;
  border: none;
  padding: 0 0 4px;
  font: inherit;
  color: inherit !important;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  text-decoration: none !important;
}

.lang-switch-handle a:visited,
.lang-switch-handle a:hover,
.lang-switch-handle a:active {
  color: inherit !important;
}

.lang-switch-handle a.active {
  color: #111111 !important;
  border-bottom-color: #f2d400 !important;
}

.lang-switch-handle a:focus-visible {
  outline: 2px solid #f2d400;
  outline-offset: 2px;
}

.lang-sep {
  color: currentColor;
  opacity: 0.6;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--primary);
  background: transparent;
  padding: 4px 8px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  color: var(--primary);
}

.imgbook-page {
  min-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 40px;
  text-align: center;
}

.imgbook-line {
  margin: 0;
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: 0.02em;
}

.imgbook-tags {
  width: min(1200px, 100%);
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.imgbook-tag {
  border: 1px solid rgba(27, 27, 24, 0.25);
  border-radius: 999px;
  background: #ffffff;
  color: #333333;
  font-size: 13px;
  line-height: 1;
  padding: 8px 14px;
  cursor: pointer;
}

.imgbook-tag.is-active {
  border-color: #333333;
  background: #333333;
  color: #ffffff;
}

.imgbook-tag:focus-visible {
  outline: 2px solid #7ab4ff;
  outline-offset: 2px;
}

.imgbook-cards {
  width: min(1200px, 100%);
  display: grid;
  gap: 20px;
  margin-top: 24px;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  justify-items: center;
}

.imgbook-card {
  width: min(420px, 100%);
  aspect-ratio: 4 / 3;
  background: #ffffff;
  border: 1px solid rgba(27, 27, 24, 0.12);
  box-shadow: 0 8px 18px rgba(27, 27, 24, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imgbook-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #ffffff;
  cursor: zoom-in;
}

.imgbook-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.8);
}

.imgbook-lightbox.is-open {
  display: flex;
}

.imgbook-lightbox-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.imgbook-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  padding: 8px 14px;
  line-height: 1;
  cursor: pointer;
}

.imgbook-lightbox-close:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .imgbook-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .imgbook-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .imgbook-cards {
    width: min(1380px, 100%);
  }
}

/* =========================
   Responsive
   ========================= */

   @media (max-width: 720px) {
    .site-header {
      padding: 10px 14px;
    }
  
    .lang-switch {
      display: none;
    }
  
    .site-nav .lang-switch {
      display: inline-flex;
      margin-top: 6px;
    }
  
    .nav-toggle {
      display: inline-block;
    }
  
    .site-nav {
      position: fixed;
      top: 52px;
      left: 0;
      right: 0;
      flex-direction: column;
      gap: 10px;
      padding: 10px 18px 14px;
      background-color: rgba(255, 255, 255, 0.98);
      border-bottom: 1px solid rgba(34, 34, 34, 0.06);
      display: none;
    }
  
    .site-nav.is-open {
      display: flex;
      align-items: center;
    }
  
    .archive-hero-inner,
    .archive-inner {
      padding: 0 18px;
    }
  
    .timeline {
      padding-left: 64px;
    }
  
    .timeline::before {
      left: 24px;
    }
  
    .timeline-event {
      grid-template-columns: 1fr;
      row-gap: 10px;
    }
  }
  
