:root {
  --paper: #f7f0df;
  --paper-deep: #ead9b8;
  --ink: #201915;
  --muted: #6f5f4e;
  --cinnabar: #9b2d20;
  --jade: #2d6a5f;
  --gold: #b98a3b;
  --blue: #4f5f8f;
  --line: rgba(69, 46, 27, 0.22);
  --shadow: 0 22px 60px rgba(42, 28, 14, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(155, 45, 32, 0.11), transparent 26rem),
    radial-gradient(circle at 86% 14%, rgba(45, 106, 95, 0.12), transparent 24rem),
    linear-gradient(135deg, #f9f3e4 0%, #f4e6c9 43%, #e9d3a9 100%);
  font-family: "Songti SC", "Noto Serif CJK SC", "STSong", Georgia, serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  content: "";
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(94, 68, 43, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 68, 43, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 90%);
}

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

button {
  font: inherit;
}

.ink-vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, transparent 0 32%, rgba(60, 37, 18, 0.15) 100%),
    linear-gradient(to bottom, rgba(255, 250, 238, 0), rgba(67, 41, 20, 0.12));
}

.petal-field {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -24px;
  width: 11px;
  height: 18px;
  border-radius: 70% 20% 70% 30%;
  background: linear-gradient(145deg, #f4c9bd, #d56f60);
  opacity: 0.64;
  animation: fall var(--duration) linear infinite;
  animation-delay: var(--delay);
  transform: translateX(var(--start)) rotate(0deg);
}

@keyframes fall {
  0% {
    transform: translate3d(var(--start), -24px, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(calc(var(--start) + var(--drift)), 105vh, 0) rotate(520deg);
  }
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 14px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(255, 248, 229, 0.14);
  color: #fff8e8;
  background: rgba(31, 24, 18, 0.42);
  backdrop-filter: blur(10px);
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.site-header::before {
  display: none;
}

.site-header.scrolled {
  color: var(--ink);
  border-color: rgba(72, 48, 27, 0.14);
  background: rgba(249, 242, 224, 0.9);
  box-shadow: 0 8px 24px rgba(63, 43, 23, 0.1);
}

.site-header.scrolled::before {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.brand-seal {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 248, 232, 0.7);
  background: rgba(155, 45, 32, 0.94);
  color: #fff5df;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(58, 22, 16, 0.2);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: 18px;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  border: 0;
  white-space: nowrap;
  transition: color 0.28s ease, transform 0.28s ease;
}

.site-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 1px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s ease;
}

.site-nav a:hover {
  transform: translateY(-1px);
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-header.scrolled .brand {
  text-shadow: 0 1px 10px rgba(255, 248, 232, 0.6);
}

.site-header.scrolled .site-nav {
  background: transparent;
}

.site-header.scrolled .site-nav a::after {
  background: currentColor;
}

.site-header.scrolled .site-nav a:hover {
  color: var(--cinnabar);
}

.hero {
  position: relative;
  min-height: 94vh;
  display: grid;
  align-items: center;
  padding: 120px clamp(20px, 6vw, 86px) 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  animation: slowBreath 18s ease-in-out infinite alternate;
}

@keyframes slowBreath {
  from {
    transform: scale(1.04) translateY(0);
  }
  to {
    transform: scale(1.1) translateY(-10px);
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(270deg, rgba(28, 19, 13, 0.76) 0%, rgba(36, 25, 16, 0.5) 42%, rgba(236, 216, 176, 0.16) 100%),
    linear-gradient(to top, rgba(42, 27, 14, 0.58), transparent 46%);
}

.hero-content {
  justify-self: end;
  width: auto;
  max-width: min(760px, 100%);
  height: min(600px, calc(100vh - 190px));
  color: #fff8e8;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  padding: 18px 10px;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  margin: 0;
  max-height: 100%;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.18;
  font-weight: 800;
  white-space: nowrap;
}

.hero-copy {
  max-height: 100%;
  margin: 0;
  color: rgba(255, 248, 232, 0.9);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 2;
}

.intro-band,
.section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.intro-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 0.5fr) 1.5fr;
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  margin-top: 38px;
  margin-bottom: 22px;
  min-height: 360px;
  padding: clamp(42px, 6vw, 76px);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 248, 229, 0.22), rgba(255, 248, 229, 0.62) 46%, rgba(35, 24, 16, 0.18)),
    url("assets/intro-preface-bg.png") center / cover;
  box-shadow: 0 30px 88px rgba(55, 36, 17, 0.2);
  isolation: isolate;
}

.intro-band::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(255, 250, 235, 0.08), rgba(43, 29, 17, 0.1)),
    radial-gradient(circle at 82% 12%, rgba(255, 248, 229, 0.34), transparent 28%);
}

.intro-title {
  justify-self: end;
  color: #342316;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  text-shadow: 0 2px 20px rgba(255, 248, 232, 0.52);
}

.intro-title h2 {
  display: flex;
  flex-direction: row-reverse;
  gap: 20px;
}

.intro-title span {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

.intro-band h2,
.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.16;
}

.intro-band p {
  margin: 0;
  max-width: 660px;
  padding: 0;
  color: #3f2f22;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: 20px;
  line-height: 2.05;
  text-shadow: 0 1px 18px rgba(255, 248, 232, 0.72);
  backdrop-filter: none;
}

.section {
  padding: 78px 0;
}

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

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-tile,
.poet-card,
.work-card,
.timeline-item {
  position: relative;
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 250, 237, 0.9), rgba(236, 216, 178, 0.72)),
    var(--paper);
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 360px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 18px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-tile::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(to top, rgba(26, 18, 12, 0.88) 0%, rgba(26, 18, 12, 0.58) 34%, rgba(26, 18, 12, 0.04) 72%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent), transparent 72%), transparent 52%);
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 72px rgba(42, 28, 14, 0.24);
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 86px 22px 22px;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
}

.category-copy h3 {
  margin: 0 0 7px;
  color: #fff8e8;
  font-size: 22px;
  font-weight: 500;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.category-copy p {
  margin: 0;
  color: rgba(255, 248, 232, 0.86);
  font-size: 15px;
  line-height: 1.65;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.work-card p,
.timeline-item p {
  color: var(--muted);
}

.poet-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.poet-card {
  min-height: 430px;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  isolation: isolate;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poet-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(to top, rgba(25, 17, 12, 0.9) 0%, rgba(25, 17, 12, 0.58) 34%, rgba(25, 17, 12, 0.04) 76%),
    radial-gradient(circle at 74% 16%, rgba(255, 248, 232, 0.22), transparent 30%);
}

.poet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 72px rgba(42, 28, 14, 0.24);
}

.portrait {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
  transform: scale(1.02);
  transition: transform 0.55s ease, filter 0.55s ease;
}

.poet-card:hover .portrait {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.08);
}

.dynasty {
  margin: 0;
  color: rgba(255, 220, 169, 0.92);
  font-weight: 700;
}

.poet-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 112px 26px 26px;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  transform: translateY(8px);
  transition: transform 0.28s ease;
}

.poet-card:hover .poet-copy {
  transform: translateY(0);
}

.poet-card h3,
.work-card h3 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.poet-card h3 {
  color: #fff8e8;
  font-size: 25px;
  font-weight: 500;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.32);
}

.poet-card p {
  color: rgba(255, 248, 232, 0.86);
  font-size: 16px;
  line-height: 1.7;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

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

.work-card {
  min-height: 420px;
  padding: 0;
  border-radius: 18px;
  transform-origin: center;
  overflow: hidden;
  isolation: isolate;
  transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.work-card::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  border-radius: inherit;
  background:
    linear-gradient(to top, rgba(25, 17, 12, 0.92) 0%, rgba(25, 17, 12, 0.68) 46%, rgba(25, 17, 12, 0.08) 82%),
    radial-gradient(circle at 82% 10%, rgba(255, 248, 232, 0.2), transparent 30%);
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 72px rgba(42, 28, 14, 0.2);
}

.work-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  transform: scale(1.02);
  transition: transform 0.55s ease, filter 0.55s ease;
}

.work-card:hover .work-bg {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.08);
}

.work-copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 108px 24px 24px;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  transform: translateY(8px);
  transition: transform 0.28s ease;
}

.work-card:hover .work-copy {
  transform: translateY(0);
}

.work-kind,
.author {
  margin: 0;
}

.work-kind {
  color: rgba(255, 220, 169, 0.92);
  font-size: 17px;
  font-weight: 500;
}

.work-card h3 {
  color: #fff8e8;
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.34);
}

.work-card p {
  color: rgba(255, 248, 232, 0.86);
  font-size: 17px;
  line-height: 1.76;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.34);
}

.work-card .author {
  color: rgba(255, 232, 188, 0.9);
  font-size: 18px;
}

blockquote {
  margin: 18px 0;
  padding: 12px 0 12px 16px;
  color: #fff8e8;
  border-left: 3px solid rgba(255, 220, 169, 0.8);
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
  background: linear-gradient(90deg, rgba(255, 248, 232, 0.12), transparent);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.34);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.timeline::before {
  display: none;
}

.timeline-item {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(26px, 5vw, 64px);
  min-height: 240px;
  padding: 34px clamp(26px, 5vw, 58px);
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(22, 15, 10, 0.22), rgba(22, 15, 10, 0.7)),
    url("assets/intro-preface-bg.png") center / cover;
  box-shadow: 0 26px 68px rgba(42, 28, 14, 0.16);
  isolation: isolate;
}

.timeline-item::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 248, 232, 0.04), rgba(22, 15, 10, 0.2)),
    radial-gradient(circle at 84% 18%, rgba(255, 248, 232, 0.28), transparent 26%);
}

.timeline-item:nth-child(2) {
  background:
    linear-gradient(90deg, rgba(22, 15, 10, 0.22), rgba(22, 15, 10, 0.72)),
    url("assets/category-fu.png") center / cover;
}

.timeline-item:nth-child(3) {
  background:
    linear-gradient(90deg, rgba(22, 15, 10, 0.22), rgba(22, 15, 10, 0.72)),
    url("assets/category-tang.png") center / cover;
}

.timeline-item:nth-child(4) {
  background:
    linear-gradient(90deg, rgba(22, 15, 10, 0.22), rgba(22, 15, 10, 0.72)),
    url("assets/category-song.png") center / cover;
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 78px rgba(42, 28, 14, 0.22);
}

.timeline-item span {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  height: auto;
  color: #fff8e8;
  background: transparent;
  box-shadow: none;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.48);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  white-space: nowrap;
}

.timeline-item p {
  position: relative;
  z-index: 1;
  max-height: 168px;
  margin: 0;
  color: rgba(255, 248, 232, 0.88);
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: 18px;
  line-height: 1.9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.46);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.site-footer {
  position: relative;
  min-height: clamp(150px, 16vw, 210px);
  padding: clamp(50px, 6vw, 74px) 20px clamp(42px, 5vw, 62px);
  overflow: hidden;
  color: #5f3024;
  text-align: center;
  background: #e9d3a9;
  isolation: isolate;
}

.site-footer::before {
  display: none;
}

.site-footer::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background: transparent;
}

.site-footer p {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 0;
  font-family: "Xingkai SC", "STXingkai", "Kaiti SC", "KaiTi", "STKaiti", cursive;
  font-size: clamp(18px, 2.2vw, 25px);
  letter-spacing: 0;
  text-shadow: 0 2px 16px rgba(255, 255, 255, 0.88);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .site-header {
    align-items: center;
    flex-direction: column;
    gap: 10px;
    min-height: 124px;
    padding: 12px 14px 12px;
  }

  .site-header::before {
    display: none;
  }

  .brand {
    font-size: 20px;
  }

  .site-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px 10px;
    overflow: visible;
    padding: 0;
    font-size: 16px;
  }

  .site-nav a {
    display: grid;
    min-height: 34px;
    place-items: center;
    padding: 6px 4px;
    border: 0;
    background: transparent;
  }

  .site-header.scrolled .site-nav a {
    background: transparent;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: 86vh;
    padding-top: 164px;
  }

  .hero-content {
    height: min(560px, calc(100vh - 215px));
  }

  .intro-band,
  .category-grid,
  .poet-gallery,
  .works-grid {
    grid-template-columns: 1fr 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .brand-seal {
    width: 32px;
    height: 32px;
    font-size: 19px;
  }

  .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    font-size: 15px;
  }

  .hero {
    min-height: 94vh;
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-content {
    height: min(520px, calc(100vh - 232px));
    max-width: 100%;
    gap: 16px;
    padding-right: 8px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-copy {
    font-size: 16px;
    line-height: 1.85;
  }

  .intro-band,
  .category-grid,
  .poet-gallery,
  .works-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .intro-band {
    gap: 12px;
    min-height: 340px;
    padding: 32px 24px;
    background-position: center;
  }

  .intro-band::before {
    inset: 0;
  }

  .intro-band p {
    font-size: 17px;
    line-height: 1.9;
  }

  .intro-title {
    justify-self: start;
  }

  .intro-title h2 {
    margin-bottom: 2px;
    gap: 12px;
  }

  .intro-title span {
    writing-mode: horizontal-tb;
  }

  .poet-card {
    min-height: 390px;
  }

  .poet-copy {
    padding: 98px 22px 22px;
  }

  .work-copy {
    padding: 92px 22px 22px;
  }

  .work-card h3 {
    font-size: 25px;
  }

  .work-card p {
    font-size: 16px;
  }

  blockquote {
    font-size: 21px;
    line-height: 1.45;
  }

  .timeline-item {
    min-height: 270px;
    gap: 18px;
    padding: 28px 22px;
  }

  .timeline-item span {
    font-size: 34px;
  }

  .timeline-item p {
    max-height: 198px;
    font-size: 16px;
    line-height: 1.8;
  }

  .section {
    padding: 56px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
