:root {
  --paper: #f4f1e8;
  --paper-deep: #e8e1d2;
  --ink: #171512;
  --muted: #6f695f;
  --line: rgba(23, 21, 18, 0.18);
  --red: #8f1d14;
  --max-width: 1180px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 5px 5px;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: color 150ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--red);
}

.opening {
  width: min(calc(100% - 48px), var(--max-width));
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 72px 0 90px;
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(420px, 1.08fr);
  align-items: stretch;
  gap: clamp(54px, 8vw, 120px);
}

.memory-image {
  margin: 0;
  position: relative;
  align-self: start;
}

.memory-image img {
  width: 100%;
  max-height: 680px;
  object-fit: contain;
  position: relative;
  background: #d9d3c7;
  filter: contrast(1.04);
  box-shadow: 0 22px 60px rgba(31, 25, 18, 0.12);
}

.memory-image figcaption {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 10px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: center;
}

.memory-image figcaption span {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.poem-panel {
  max-width: 590px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transform: translateY(-14px);
}

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

h1,
h2 {
  font-family: var(--serif);
}

h1 {
  margin-bottom: 6px;
  padding-top: 0.08em;
  font-size: clamp(3.4rem, 6.8vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
}

.credit {
  margin-bottom: 34px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.88rem;
  letter-spacing: 0.1em;
}

.poem {
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 2px solid var(--red);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.55vw, 1.15rem);
  line-height: 1.9;
}

.poem p {
  margin-bottom: 18px;
}

.poem p:last-child {
  margin-bottom: 0;
}

.section {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 105px 0;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 70px;
  border-top: 1px solid var(--line);
}

.section-label {
  padding-top: 8px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.section-content {
  max-width: 820px;
}

h2 {
  margin-bottom: 26px;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.intro {
  max-width: 760px;
  margin-bottom: 50px;
  color: #3f3b35;
  font-family: var(--serif);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.95;
}

.facts {
  border-top: 1px solid var(--line);
}

.facts p {
  margin: 0;
  padding: 15px 0;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  color: #4f4a43;
  font-size: 0.9rem;
}

.facts span {
  color: var(--muted);
}

.facts a:hover,
.facts a:focus-visible {
  color: var(--red);
}

.work-list {
  border-top: 1px solid var(--line);
}

.work-item {
  min-height: 104px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  transition: padding 170ms ease, color 170ms ease;
}

.work-item:hover,
.work-item:focus-visible {
  padding-left: 12px;
  color: var(--red);
}

.work-number {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.work-main {
  display: grid;
  gap: 4px;
}

.work-main strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.work-main small {
  color: var(--muted);
  font-size: 0.82rem;
}

.arrow {
  color: var(--muted);
  font-size: 1rem;
}

footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 28px 0 40px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

footer p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}

@media (max-width: 900px) {
  .opening {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 64px;
  }

  .memory-image {
    width: min(100%, 610px);
  }

  .poem-panel {
    max-width: 680px;
  }

  .section {
    grid-template-columns: 120px 1fr;
    gap: 44px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .opening,
  .section,
  footer {
    width: min(calc(100% - 32px), var(--max-width));
  }

  .site-header {
    min-height: 66px;
  }

  nav {
    gap: 16px;
  }

  nav a:first-child {
    display: none;
  }

  .opening {
    padding: 44px 0 72px;
  }

  .memory-image img {
    max-height: 540px;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .credit {
    margin-bottom: 30px;
  }

  .poem {
    padding-left: 20px;
    font-size: 0.95rem;
    line-height: 1.9;
  }

  .section {
    padding: 76px 0;
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .section-label {
    padding-top: 0;
  }

  .facts p {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .work-item {
    grid-template-columns: 34px 1fr auto;
    gap: 14px;
  }

  footer {
    flex-direction: column;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
