:root {
  --bg: #f7f4ef;
  --bg-alt: #efe9df;
  --text: #1f1f1f;
  --muted: #666;
  --line: #ddd3c3;
  --primary: #5c4632;
  --primary-dark: #3e2f22;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  --container: 1120px;
  --narrow: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", "STSong", "Source Han Serif SC", serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  width: min(var(--narrow), 100%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 239, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-nav a {
  color: var(--text);
  font-size: 0.98rem;
  padding: 8px 0;
  position: relative;
}

.site-nav a.active,
.site-nav a:hover {
  color: var(--primary);
}

.site-nav a.active::after,
.site-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.nav-toggle {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  cursor: pointer;
}

.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.88rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.15;
  margin: 0 0 10px;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.lead {
  font-size: 1.08rem;
  max-width: 620px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  transition: 0.2s ease;
}

.btn:hover {
  background: var(--primary);
  color: var(--white);
}

.btn.primary {
  background: var(--primary);
  color: var(--white);
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 20px;
}

.cards.three {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-top: 0;
}

.text-link {
  font-weight: 600;
}

.memorial-quote {
  margin: 0;
  padding: 28px;
  background: var(--white);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 1.1rem;
}

.gallery-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.gallery-preview img,
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.center {
  text-align: center;
}

.page {
  padding: 56px 0 72px;
}

.page h1 {
  margin-top: 0;
  font-size: 2.4rem;
}

.intro {
  color: var(--muted);
  margin-bottom: 32px;
}

.center-text {
  text-align: center;
}

.content-section {
  margin-bottom: 38px;
}

.content-section h2 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.timeline {
  padding-left: 20px;
}

.timeline li {
  margin-bottom: 10px;
}

.pub-list li,
.book-list li {
  margin-bottom: 10px;
}

.tribute-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.tribute-item h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.tribute-meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: -8px;
  margin-bottom: 12px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gallery-item {
  margin: 0;
}

.gallery-item figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.narrow-block {
  max-width: 760px;
  margin: 42px auto 0;
}

.contact-email {
  font-size: 1.2rem;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .cards.three,
  .gallery-preview,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-image {
    order: -1;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}