:root {
  --ink: #f8f2f6;
  --muted: #c4b8c0;
  --pink: #ff3d9a;
  --pink-soft: #ff70b5;
  --line: rgba(255, 61, 154, .36);
  --panel: rgba(12, 6, 10, .72);
  --black: #060406;
}

* { box-sizing: border-box; }

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--black);
}

body {
  color: var(--ink);
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 82% 6%, rgba(111, 12, 59, .28), transparent 34rem),
    radial-gradient(circle at 18% 70%, rgba(68, 10, 42, .14), transparent 36rem),
    var(--black);
}

button,
a { font: inherit; }

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

.page-shell {
  width: min(1540px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
}

.site-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 112, 181, .13);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .23em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #160610;
  background: linear-gradient(145deg, #ff2f94, #ff70b5);
  box-shadow: 0 0 28px rgba(255, 61, 154, .28);
  letter-spacing: 0;
}

.home-link {
  color: var(--pink);
  font-size: 18px;
  border-bottom: 1px solid currentColor;
  padding: 5px 0;
}

.library-hero {
  min-height: 370px;
  padding: 74px 34px 46px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  margin: 0 0 24px;
  color: var(--pink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2em;
}

h1 {
  margin: 0;
  font-size: clamp(66px, 7vw, 108px);
  line-height: 1;
  letter-spacing: -.06em;
}

.intro {
  margin: 28px 0 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 29px);
}

.lantern {
  position: absolute;
  inset: 0 0 0 45%;
  background-image:
    linear-gradient(90deg, var(--black), transparent 34%),
    linear-gradient(0deg, var(--black), transparent 22%),
    url("./assets/mascots.png");
  background-repeat: no-repeat;
  background-size: cover, cover, 980px auto;
  background-position: center, center, right 8%;
  opacity: .78;
  filter: contrast(1.1) saturate(.9);
}

.category-view { padding: 6px 34px 80px; }

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

.category-card {
  min-height: 210px;
  padding: 34px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(22, 8, 17, .6), rgba(5, 3, 5, .88));
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.category-card:hover,
.category-card:focus-visible {
  outline: none;
  transform: translateY(-4px);
  border-color: var(--pink);
  background: linear-gradient(145deg, rgba(45, 11, 31, .74), rgba(7, 3, 6, .94));
}

.category-card svg,
.article-icon svg {
  width: 74px;
  height: 74px;
  fill: none;
  stroke: var(--pink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(255, 61, 154, .34));
}

.category-name {
  font-size: 27px;
  font-weight: 600;
}

.article-view { padding: 10px 34px 100px; }

.back-button {
  border: 0;
  padding: 12px 0;
  color: var(--pink);
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}

.article-heading {
  margin: 38px 0 34px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.article-icon svg { width: 56px; height: 56px; }

h2 {
  margin: 0;
  font-size: clamp(42px, 5vw, 70px);
  letter-spacing: -.04em;
}

.empty-state {
  min-height: 230px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 18px;
}

.article-item {
  min-height: 112px;
  padding: 28px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-top: 1px solid var(--line);
}

.article-item:last-child { border-bottom: 1px solid var(--line); }
.article-title { font-size: clamp(20px, 2vw, 30px); }
.article-source { color: var(--pink); white-space: nowrap; font-size: 17px; }

@media (max-width: 900px) {
  .page-shell { width: calc(100% - 32px); }
  .site-header { height: 92px; }
  .brand { gap: 12px; font-size: 13px; }
  .brand-mark { width: 40px; height: 40px; }
  .home-link { font-size: 16px; }

  .library-hero {
    min-height: 520px;
    padding: 70px 20px 50px;
    align-items: flex-end;
  }

  .eyebrow { margin-bottom: 18px; font-size: 14px; }
  h1 { font-size: clamp(48px, 15vw, 68px); }
  .intro { margin-top: 20px; font-size: 18px; }

  .lantern {
    inset: 0 -16px 16% 30%;
    background-size: cover, cover, 680px auto;
    background-position: center, center, 58% 5%;
    opacity: .7;
  }

  .category-view { padding: 18px 20px 70px; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .category-card { min-height: 178px; padding: 24px 12px; gap: 18px; }
  .category-card svg { width: 58px; height: 58px; }
  .category-name { font-size: 21px; }

  .article-view { padding: 12px 20px 70px; }
  .article-heading { margin-top: 28px; }
  .article-item { align-items: flex-start; flex-direction: column; gap: 14px; }
  .article-title { font-size: 20px; line-height: 1.55; }
}

@media (max-width: 420px) {
  .library-hero { min-height: 460px; }
  .category-card { min-height: 154px; }
  .category-card svg { width: 50px; height: 50px; }
  .category-name { font-size: 19px; }
}
