:root {
  --bg: #fbf6ee;
  --bg-soft: #fff9f2;
  --blush: #f6d9d4;
  --blush-deep: #d98a84;
  --vanilla: #f3dfae;
  --leaf: #6f8a73;
  --leaf-deep: #314f3b;
  --wood: #8b6349;
  --text: #332c28;
  --muted: #7c716b;
  --line: #eadbd1;
  --surface: #fffdf8;
  --shadow: 0 22px 70px rgba(92, 68, 50, 0.13);
  --frame-shadow: 0 20px 42px rgba(217, 138, 132, 0.28), 0 7px 16px rgba(246, 217, 212, 0.72);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

a {
  color: var(--leaf-deep);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--blush-deep);
}

.wrap {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 249, 242, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-title {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.page-heading,
.page {
  padding: clamp(64px, 9vw, 116px) 0;
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, 84svh);
  overflow: hidden;
  background: var(--bg-soft);
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 249, 242, 0.9) 0%, rgba(255, 249, 242, 0.68) 34%, rgba(255, 249, 242, 0.08) 70%),
    linear-gradient(0deg, rgba(251, 246, 238, 0.82) 0%, rgba(251, 246, 238, 0) 30%);
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image: url("/images/site/taolia-spring-reading-room.png");
  background-position: center;
  background-size: cover;
}

.hero-inner {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 72px 0;
}

.eyebrow,
.meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  max-width: 700px;
  font-family: Georgia, "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(2.55rem, 6vw, 5.6rem);
  font-weight: 400;
}

h2 {
  font-family: Georgia, "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

.phrase {
  display: inline-block;
  white-space: nowrap;
}

.lede,
.content {
  max-width: 760px;
}

.lede {
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  color: var(--leaf-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link::after {
  content: "";
  width: 56px;
  height: 1px;
  background: currentColor;
}

.intro-band,
.featured-posts {
  padding: clamp(64px, 9vw, 116px) 0;
}

.intro-band {
  background: var(--surface);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: end;
}

.intro-grid p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.32rem);
}

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

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.category-nav a,
.term-list a,
.category-card {
  text-decoration: none;
}

.category-nav a,
.term-list a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.74);
  color: var(--leaf-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.category-nav a {
  gap: 8px;
  padding: 9px 14px;
  text-transform: uppercase;
}

.category-nav a:hover,
.category-nav a[aria-current="page"],
.term-list a:hover {
  border-color: #d8b7a8;
  background: var(--blush);
  color: var(--text);
}

.category-nav span {
  color: var(--muted);
  font-size: 0.72rem;
}

.term-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.single-terms {
  margin-top: 22px;
  margin-bottom: 0;
}

.term-list a {
  padding: 5px 9px;
}

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

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

.category-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 112px;
  padding: 24px;
  overflow: hidden;
  background: var(--surface);
  border: 0;
  box-shadow: var(--frame-shadow);
  color: var(--text);
}

.category-card-image {
  min-height: 240px;
  align-items: flex-end;
  box-shadow:
    inset 0 0 0 1px rgba(255, 253, 248, 0.72),
    var(--frame-shadow);
}

.category-card-image::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(51, 44, 40, 0.04) 0%, rgba(51, 44, 40, 0.64) 100%);
}

.category-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 420ms ease;
}

.category-card span {
  position: relative;
  z-index: 1;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  font-size: 1.35rem;
}

.category-card strong {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--blush);
  color: var(--leaf-deep);
  font-size: 0.9rem;
}

.category-card-image span {
  color: var(--surface);
  font-size: 1.65rem;
  text-shadow: 0 2px 20px rgba(51, 44, 40, 0.42);
}

.category-card-image:hover img {
  transform: scale(1.045);
}

.content {
  margin-top: 30px;
}

.content h1,
.content h2,
.content h3 {
  margin-top: 1.6em;
  margin-bottom: 0.55em;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
}

.content h1:first-child,
.content h2:first-child,
.content h3:first-child {
  margin-top: 0;
}

.content hr {
  width: min(180px, 42%);
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

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

.content-list {
  padding: 0 0 clamp(72px, 10vw, 128px);
}

.empty-state {
  margin: 0;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.content-card,
.post-tile {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.content-card-media,
.post-tile-media {
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
}

.content-card-media img,
.post-tile-media img,
.featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.content-card-media img,
.post-tile-media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scale(1);
  transition: transform 420ms ease;
}

.content-card-body,
.post-tile-body {
  padding: 24px;
}

.content-card h2 a,
.post-tile h3 a {
  color: var(--text);
  text-decoration: none;
  transition: color 180ms ease;
}

.content-card:hover,
.post-tile:hover {
  border-color: #d8b7a8;
  box-shadow: 0 28px 80px rgba(92, 68, 50, 0.18);
  transform: translateY(-6px);
}

.content-card:hover .content-card-media img,
.post-tile:hover .post-tile-media img {
  transform: scale(1.045);
}

.content-card:hover h2 a,
.post-tile:hover h3 a {
  color: var(--blush-deep);
}

.content-card-body p,
.post-tile-body p {
  color: var(--muted);
}

.content-card p:last-child,
.post-tile p:last-child {
  margin-bottom: 0;
}

.featured-image {
  max-width: 920px;
  margin: 36px 0 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .post-grid,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .hero {
    min-height: 78svh;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 249, 242, 0.88) 0%, rgba(255, 249, 242, 0.62) 48%, rgba(255, 249, 242, 0.16) 100%),
      linear-gradient(0deg, rgba(251, 246, 238, 0.88) 0%, rgba(251, 246, 238, 0) 36%);
  }

  .hero-image {
    background-position: 58% center;
  }

  .post-grid,
  .content-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-card,
  .post-tile,
  .content-card-media img,
  .post-tile-media img,
  .content-card h2 a,
  .post-tile h3 a {
    transition: none;
  }

  .content-card:hover,
  .post-tile:hover,
  .content-card:hover .content-card-media img,
  .post-tile:hover .post-tile-media img {
    transform: none;
  }
}
