:root {
  --life-bg: #f7f8f5;
  --life-card-bg: #ffffff;
  --life-text: #2d3540;
  --life-muted: #5f6a75;
  --life-line: #d6dece;
  --life-accent: #3f7a57;
  --life-glow: rgba(63, 122, 87, 0.14);
}

.life-intro {
  margin: 0.6rem 0 1.4rem;
  padding: 0.9rem 1.1rem;
  color: #32443b;
  font-weight: 600;
  border-radius: 14px;
  border: 1px solid #dce4d8;
  background: linear-gradient(120deg, #f3f7ef 0%, #f9f8f1 100%);
}

.life-entries {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.6rem;
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 18%, rgba(101, 153, 118, 0.1), transparent 42%),
    radial-gradient(circle at 84% 82%, rgba(203, 168, 117, 0.09), transparent 40%),
    var(--life-bg);
}

.life-card {
  position: relative;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--life-line);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 252, 246, 0.96) 100%),
    var(--life-card-bg);
  box-shadow:
    0 14px 30px -24px rgba(31, 38, 33, 0.58),
    0 6px 18px -20px var(--life-glow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  animation: life-fade-up 500ms ease both;
}

.life-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, #5a8e68 0%, #cab56f 100%);
}

.life-card:hover {
  transform: translateY(-3px);
  border-color: #b8c7b1;
  box-shadow:
    0 20px 34px -25px rgba(31, 38, 33, 0.65),
    0 8px 22px -18px var(--life-glow);
}

.life-card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: #233127;
}

.life-card p {
  margin: 0.8rem 0 0;
  white-space: pre-line;
  color: var(--life-text);
  line-height: 1.82;
}

.life-card:nth-child(2n)::before {
  background: linear-gradient(180deg, #648b98 0%, #aebc73 100%);
}

.life-card:nth-child(3n)::before {
  background: linear-gradient(180deg, #7e6fa6 0%, #d09f6e 100%);
}

.life-card:nth-child(1) {
  animation-delay: 40ms;
}

.life-card:nth-child(2) {
  animation-delay: 90ms;
}

.life-card:nth-child(3) {
  animation-delay: 140ms;
}

.life-card:nth-child(4) {
  animation-delay: 190ms;
}

.life-card:nth-child(5) {
  animation-delay: 240ms;
}

.life-card--featured {
  border-color: #b7caa8;
  background:
    linear-gradient(140deg, rgba(247, 252, 242, 0.99) 0%, rgba(255, 252, 243, 0.98) 100%),
    var(--life-card-bg);
}

@media (min-width: 900px) {
  .life-entries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
    padding: 0.85rem;
  }

  .life-card--featured {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .life-entries {
    padding: 0.45rem;
    gap: 0.85rem;
  }

  .life-card {
    padding: 1rem 1rem 1rem 1.1rem;
  }

  .life-card h3 {
    font-size: 1.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .life-card {
    animation: none;
    transition: none;
  }

  .life-card:hover {
    transform: none;
  }
}

@keyframes life-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.life-card a,
.book-card a,
.poem-card a {
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--life-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.life-card a:hover,
.life-card a:focus-visible {
  color: #27553a;
}
