/* Life story — vivid, modern timeline */

.life-story-page {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-bottom: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.life-story-page__progress {
  position: fixed;
  top: calc(var(--header-h) + var(--safe-top));
  left: 0;
  right: 0;
  z-index: 5;
  height: 3px;
  background: color-mix(in srgb, var(--color-border) 50%, transparent);
  pointer-events: none;
}

.life-story-page__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(
    90deg,
    var(--ls-emerald),
    var(--ls-sky),
    var(--ls-gold),
    var(--ls-violet)
  );
  box-shadow: 0 0 12px color-mix(in srgb, var(--ls-gold) 40%, transparent);
  transition: width 0.12s ease-out;
}

.life-hero__meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.life-hero__chip {
  display: inline-flex;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: color-mix(in srgb, var(--color-bg-elevated) 88%, transparent);
  border: 1px solid var(--color-border-subtle);
}

.life-hero__chip--accent {
  color: color-mix(in srgb, var(--ls-teal) 75%, var(--color-text));
  border-color: color-mix(in srgb, var(--ls-emerald) 35%, transparent);
  background: color-mix(in srgb, var(--ls-emerald) 10%, var(--color-surface));
}

[data-life-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translateY(18px);
}

[data-life-reveal].is-revealed {
  animation: life-hero-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes life-hero-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-life-reveal-stagger] > .life-story__stat {
  opacity: 0;
  transform: translateY(14px) scale(0.98);
}

[data-life-reveal-stagger].is-revealed > .life-story__stat {
  animation: life-stat-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-life-reveal-stagger].is-revealed > .life-story__stat:nth-child(1) {
  animation-delay: 0.05s;
}
[data-life-reveal-stagger].is-revealed > .life-story__stat:nth-child(2) {
  animation-delay: 0.12s;
}
[data-life-reveal-stagger].is-revealed > .life-story__stat:nth-child(3) {
  animation-delay: 0.19s;
}
[data-life-reveal-stagger].is-revealed > .life-story__stat:nth-child(4) {
  animation-delay: 0.26s;
}

@keyframes life-stat-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.life-story__paragraph:not(.is-revealed) {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(2px);
}

.life-story__paragraph.is-revealed {
  animation: life-para-in 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes life-para-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.life-story__actions {
  position: relative;
  z-index: 1;
  margin-top: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  justify-content: flex-start;
}

.life-story {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  --ls-emerald: #3ecf8e;
  --ls-teal: #2bb8a8;
  --ls-sky: #5eb3ff;
  --ls-indigo: #8b7cf6;
  --ls-rose: #ff7da2;
  --ls-coral: #ff9f6b;
  --ls-gold: #ffc857;
  --ls-amber: #f5a623;
  --ls-violet: #b388ff;
  --ls-magenta: #e056fd;
  position: relative;
  isolation: isolate;
  padding-bottom: clamp(2rem, 1rem + 4vw, 4rem);
}

/* Hero */
.life-hero {
  position: relative;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.5rem);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    linear-gradient(
      120deg,
      rgba(62, 207, 142, 0.65),
      rgba(94, 179, 255, 0.55),
      rgba(255, 200, 87, 0.6),
      rgba(255, 125, 162, 0.5)
    )
    border-box;
  box-shadow: var(--shadow-md);
}

.life-hero__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background:
    radial-gradient(circle at 20% 30%, rgba(62, 207, 142, 0.22), transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(139, 124, 246, 0.2), transparent 42%),
    radial-gradient(circle at 60% 80%, rgba(255, 200, 87, 0.18), transparent 50%);
  pointer-events: none;
  animation: life-hero-shimmer 14s ease-in-out infinite alternate;
}

@keyframes life-hero-shimmer {
  from {
    transform: translate3d(-2%, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 1%, 0) scale(1.04);
  }
}

.life-hero__eyebrow {
  position: relative;
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ls-teal);
  font-weight: 600;
}

.life-hero__title {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.4rem + 2.5vw, 3rem);
  line-height: 1.08;
  background: linear-gradient(105deg, var(--color-text) 0%, var(--color-gold-soft) 55%, var(--ls-sky) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.life-hero__lead {
  position: relative;
  margin: 0.85rem 0 0;
  max-width: 40rem;
  color: var(--color-text-muted);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.12rem);
  line-height: 1.55;
}

.life-hero__lead strong {
  color: var(--color-gold);
  font-weight: 600;
}

/* Ambient orbs */
.life-story__ambient {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.life-story__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  will-change: transform;
}

.life-story__orb--1 {
  width: min(420px, 70vw);
  height: min(420px, 70vw);
  top: 4%;
  left: -8%;
  background: radial-gradient(circle, rgba(62, 207, 142, 0.55), transparent 68%);
}

.life-story__orb--2 {
  width: min(360px, 60vw);
  height: min(360px, 60vw);
  top: 35%;
  right: -10%;
  background: radial-gradient(circle, rgba(139, 124, 246, 0.5), transparent 70%);
}

.life-story__orb--3 {
  width: min(300px, 55vw);
  height: min(300px, 55vw);
  bottom: 8%;
  left: 25%;
  background: radial-gradient(circle, rgba(255, 200, 87, 0.45), transparent 72%);
}

/* Stats */
.life-story__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

@media (min-width: 640px) {
  .life-story__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.life-story__stat {
  position: relative;
  padding: 1rem 0.85rem;
  border-radius: var(--radius-lg);
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.life-story__stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.life-story__stat::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.92;
  z-index: 0;
}

.life-story__stat > * {
  position: relative;
  z-index: 1;
}

.life-story__stat--born::before {
  background: linear-gradient(145deg, rgba(62, 207, 142, 0.35), rgba(43, 184, 168, 0.12));
}

.life-story__stat--years::before {
  background: linear-gradient(145deg, rgba(255, 200, 87, 0.38), rgba(245, 166, 35, 0.14));
}

.life-story__stat--meru::before {
  background: linear-gradient(145deg, rgba(94, 179, 255, 0.35), rgba(139, 124, 246, 0.12));
}

.life-story__stat--church::before {
  background: linear-gradient(145deg, rgba(255, 125, 162, 0.32), rgba(224, 86, 253, 0.12));
}

.life-story__stat-icon {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
  color: var(--color-gold-soft);
  opacity: 0.95;
}

.life-story__stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--color-text);
}

.life-story__stat-label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Progress */
.life-story__progress {
  position: sticky;
  top: calc(var(--header-h) + 0.35rem);
  z-index: 3;
  height: 5px;
  margin-bottom: 1.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.life-story__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--ls-emerald),
    var(--ls-sky),
    var(--ls-gold),
    var(--ls-rose),
    var(--ls-violet)
  );
  background-size: 200% 100%;
  animation: life-progress-hue 8s linear infinite;
  transition: width 0.15s ease-out;
}

@keyframes life-progress-hue {
  to {
    background-position: 200% 0;
  }
}

/* Layout & nav */
.life-story__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@media (min-width: 960px) {
  .life-story__layout {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
    align-items: start;
  }
}

.life-story__nav {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-subtle);
  background: color-mix(in srgb, var(--color-surface) 88%, transparent);
  backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-md);
}

.life-story__nav-heading {
  margin: 0 0 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 600;
}

.life-story__nav-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.life-story__nav-link {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.5rem 0.55rem;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition),
    transform var(--transition);
}

.life-story__nav-link:hover {
  background: var(--color-nav-hover-bg);
  color: var(--color-text);
  transform: translateX(2px);
}

.life-story__nav-dot {
  flex-shrink: 0;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--nav-accent, var(--color-gold));
  box-shadow: 0 0 12px var(--nav-accent-glow, rgba(212, 175, 106, 0.45));
}

.life-story__nav-link--roots {
  --nav-accent: var(--ls-emerald);
  --nav-accent-glow: rgba(62, 207, 142, 0.55);
}
.life-story__nav-link--book {
  --nav-accent: var(--ls-sky);
  --nav-accent-glow: rgba(94, 179, 255, 0.55);
}
.life-story__nav-link--heart {
  --nav-accent: var(--ls-rose);
  --nav-accent-glow: rgba(255, 125, 162, 0.55);
}
.life-story__nav-link--faith {
  --nav-accent: var(--ls-gold);
  --nav-accent-glow: rgba(255, 200, 87, 0.55);
}
.life-story__nav-link--community {
  --nav-accent: var(--ls-coral);
  --nav-accent-glow: rgba(255, 159, 107, 0.55);
}
.life-story__nav-link--legacy {
  --nav-accent: var(--ls-violet);
  --nav-accent-glow: rgba(179, 136, 255, 0.55);
}

.life-story__nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.life-story__nav-link.is-active {
  background: var(--color-nav-active-bg);
  color: var(--color-text);
  box-shadow: inset 3px 0 0 var(--nav-accent, var(--color-gold));
}

.life-story__nav-year {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--nav-accent, var(--color-gold));
}

.life-story__nav-title {
  font-size: 0.86rem;
  line-height: 1.25;
}

/* Timeline spine */
.timeline--story {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-left: clamp(1.35rem, 0.85rem + 2vw, 2rem);
  border-left: 2px solid transparent;
  border-image: linear-gradient(
      180deg,
      var(--ls-emerald),
      var(--ls-sky),
      var(--ls-rose),
      var(--ls-gold),
      var(--ls-violet)
    )
    1;
}

.timeline--story .timeline__item {
  scroll-margin-top: calc(var(--header-h) + 2.25rem);
  min-width: 0;
  max-width: 100%;
}

.timeline--story .timeline__item::before {
  left: calc(-1.35rem - 2px);
  width: 0.85rem;
  height: 0.85rem;
  top: 1.35rem;
  background: var(--chapter-accent, var(--color-gold));
  box-shadow:
    0 0 0 4px var(--color-timeline-ring),
    0 0 18px var(--chapter-glow, rgba(212, 175, 106, 0.45));
}

.timeline__item--roots {
  --chapter-accent: var(--ls-emerald);
  --chapter-glow: rgba(62, 207, 142, 0.5);
  --chapter-grad-a: rgba(62, 207, 142, 0.28);
  --chapter-grad-b: rgba(43, 184, 168, 0.08);
}
.timeline__item--book {
  --chapter-accent: var(--ls-sky);
  --chapter-glow: rgba(94, 179, 255, 0.5);
  --chapter-grad-a: rgba(94, 179, 255, 0.28);
  --chapter-grad-b: rgba(139, 124, 246, 0.08);
}
.timeline__item--heart {
  --chapter-accent: var(--ls-rose);
  --chapter-glow: rgba(255, 125, 162, 0.5);
  --chapter-grad-a: rgba(255, 125, 162, 0.3);
  --chapter-grad-b: rgba(255, 159, 107, 0.1);
}
.timeline__item--faith {
  --chapter-accent: var(--ls-gold);
  --chapter-glow: rgba(255, 200, 87, 0.55);
  --chapter-grad-a: rgba(255, 200, 87, 0.32);
  --chapter-grad-b: rgba(245, 166, 35, 0.1);
}
.timeline__item--community {
  --chapter-accent: var(--ls-coral);
  --chapter-glow: rgba(255, 159, 107, 0.5);
  --chapter-grad-a: rgba(255, 159, 107, 0.28);
  --chapter-grad-b: rgba(62, 207, 142, 0.08);
}
.timeline__item--legacy {
  --chapter-accent: var(--ls-violet);
  --chapter-glow: rgba(179, 136, 255, 0.55);
  --chapter-grad-a: rgba(179, 136, 255, 0.3);
  --chapter-grad-b: rgba(224, 86, 253, 0.1);
}

.timeline__card {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.timeline--story .timeline__item.is-visible .timeline__card {
  border-color: color-mix(in srgb, var(--chapter-accent) 45%, transparent);
  box-shadow:
    var(--shadow-md),
    0 0 0 1px color-mix(in srgb, var(--chapter-accent) 18%, transparent),
    0 12px 40px -16px var(--chapter-glow);
}

.timeline__card-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--chapter-accent), transparent);
  opacity: 0.95;
}

.timeline__watermark {
  position: absolute;
  top: 0.2rem;
  right: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(3rem, 2rem + 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--chapter-accent);
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}

.timeline__card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--chapter-grad-a), var(--chapter-grad-b));
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.timeline__card > *:not(.timeline__watermark):not(.timeline__card-accent) {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .timeline--story .timeline__item {
    opacity: 0.45;
    transform: translateY(28px) scale(0.97);
    filter: blur(2px);
    transition:
      opacity 0.6s ease,
      transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
      filter 0.5s ease;
  }

  .timeline--story .timeline__item.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  .timeline--story .timeline__item.is-visible .timeline__card {
    animation: life-card-pop 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .timeline--story .timeline__item.is-visible .timeline__card-head {
    animation: life-card-head-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }
}

@keyframes life-card-pop {
  from {
    transform: translateY(10px) scale(0.98);
    box-shadow: var(--shadow-sm);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

@keyframes life-card-head-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.timeline--story .timeline__item.is-visible .timeline__card {
  position: relative;
}

.timeline--story .timeline__item.is-visible .timeline__card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(
    130deg,
    var(--chapter-accent),
    transparent 45%,
    color-mix(in srgb, var(--chapter-accent) 40%, transparent)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
  animation: life-frame-fade 0.8s ease both;
}

@keyframes life-frame-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.timeline__card-head {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.timeline__badge {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  font-size: 1.25rem;
  background: color-mix(in srgb, var(--chapter-accent) 22%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 40%, transparent);
  box-shadow: 0 8px 24px -12px var(--chapter-glow);
}

.timeline__head-text {
  min-width: 0;
  flex: 1 1 auto;
}

.life-story__paragraph {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.timeline--story .timeline__year {
  color: var(--chapter-accent);
  font-weight: 700;
}

.timeline--story .timeline__title {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.65rem);
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.timeline__body--stack p {
  margin: 0 0 0.9rem;
  color: var(--color-text);
  line-height: 1.65;
}

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

/* Tags */
.life-story__tags {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px dashed color-mix(in srgb, var(--chapter-accent) 35%, transparent);
}

.life-story__tags-label {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chapter-accent);
  font-weight: 600;
}

.life-story__tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.life-story__tag {
  display: inline-block;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text);
  background: color-mix(in srgb, var(--chapter-accent) 18%, var(--color-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 35%, transparent);
  transition: transform var(--transition), background var(--transition);
}

.life-story__tag:hover {
  transform: translateY(-1px) scale(1.02);
  background: color-mix(in srgb, var(--chapter-accent) 28%, var(--color-bg-elevated));
}

.timeline__item.is-visible .life-story__tag {
  animation: life-tag-in 0.45s ease both;
  animation-delay: calc(var(--tag-i, 0) * 45ms);
}

@keyframes life-tag-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Callout */
.life-story__callout {
  margin: 1.2rem 0 0;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--chapter-accent) 45%, transparent);
  background: linear-gradient(
    125deg,
    color-mix(in srgb, var(--chapter-accent) 22%, transparent),
    transparent 65%
  );
}

.life-story__callout-word {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 1.3rem + 1.8vw, 2.35rem);
  font-weight: 600;
  background: linear-gradient(90deg, var(--chapter-accent), var(--color-gold-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.life-story__callout-note,
.life-story__callout-meru {
  margin: 0.4rem 0 0;
  color: var(--color-text-muted);
  font-size: 0.96rem;
}

.life-story__callout-meru {
  font-style: italic;
  color: var(--color-text);
}

/* Finale */
.timeline__item--finale .timeline__card {
  border-color: color-mix(in srgb, var(--ls-violet) 50%, transparent);
}

.timeline__item--finale .timeline__card::after {
  background: linear-gradient(
    145deg,
    rgba(179, 136, 255, 0.35),
    rgba(255, 200, 87, 0.15),
    rgba(62, 207, 142, 0.12)
  );
}

.life-story__rest {
  margin: 1.35rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.15rem + 1.2vw, 1.85rem);
  font-style: italic;
  text-align: center;
  color: var(--color-text);
  background: linear-gradient(
    90deg,
    rgba(179, 136, 255, 0.15),
    rgba(255, 200, 87, 0.18),
    rgba(62, 207, 142, 0.12)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Light theme tuning */
html[data-theme="light"] .life-hero__title {
  background: linear-gradient(105deg, #1a2e28 0%, #6b5220 50%, #2a5a8a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="light"] .life-story__stat {
  border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .timeline__card {
  background: color-mix(in srgb, var(--color-surface) 96%, white);
}

html[data-theme="light"] .life-story__orb {
  opacity: 0.28;
}

html[data-theme="light"] .life-story__stat {
  box-shadow: var(--shadow-sm);
}

html[data-theme="light"] .timeline__card {
  border-color: var(--color-border);
}

html[data-theme="light"] .life-story__rest {
  border-color: var(--color-border);
  background: var(--color-surface-muted);
}

html[data-theme="light"] .life-story__paragraph:not(.is-revealed) {
  filter: blur(1px);
}

@media (max-width: 767px) {
  .life-story {
    padding-bottom: 2rem;
  }

  .life-hero {
    padding: 1rem;
    margin-bottom: 1.15rem;
  }

  .life-hero__title {
    font-size: 1.45rem;
  }

  .life-hero__lead {
    font-size: 0.8125rem;
  }

  .life-hero__eyebrow {
    font-size: 0.625rem;
  }

  .life-story__stats {
    gap: 0.55rem;
    margin-bottom: 1rem;
  }

  .life-story__stat {
    padding: 0.75rem 0.5rem;
  }

  .life-story__stat-value {
    font-size: 1.2rem;
  }

  .life-story__stat-label {
    font-size: 0.6rem;
  }

  .life-story__stat-icon {
    font-size: 0.8rem;
  }

  .life-story__layout {
    gap: 1rem;
  }

  .life-story__nav {
    padding: 0.85rem;
  }

  .life-story__nav-link {
    min-width: 5.5rem;
    padding: 0.55rem 0.45rem;
  }

  .life-story__nav-title {
    font-size: 0.78rem;
  }

  .life-story__nav-year {
    font-size: 0.65rem;
  }

  .timeline--story {
    padding-left: 0.85rem;
    gap: 1.15rem;
  }

  .timeline--story .timeline__item::before {
    left: calc(-0.85rem - 2px);
    width: 0.65rem;
    height: 0.65rem;
    top: 1.1rem;
  }

  .timeline__card {
    padding: 0.85rem 0.75rem;
  }

  .timeline__card-head {
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
  }

  .timeline__badge {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1rem;
    border-radius: 0.75rem;
  }

  .timeline__watermark {
    font-size: clamp(1.75rem, 1.25rem + 3vw, 2.5rem);
    right: 0.1rem;
    max-width: 45%;
    overflow: hidden;
    text-overflow: clip;
  }

  @media (prefers-reduced-motion: no-preference) {
    .timeline--story .timeline__item:not(.is-visible) {
      transform: translateY(16px);
    }
  }

  .timeline--story .timeline__title {
    font-size: 1.05rem;
  }

  .timeline--story .timeline__year {
    font-size: 0.68rem;
  }

  .timeline__body--stack p {
    font-size: 0.8125rem;
  }

  .life-story__tags {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
  }

  .life-story__tag {
    font-size: 0.72rem;
    padding: 0.28rem 0.55rem;
  }

  .life-story__callout {
    padding: 0.85rem 0.95rem;
  }

  .life-story__callout-word {
    font-size: 1.35rem;
  }

  .life-story__callout-note,
  .life-story__callout-meru {
    font-size: 0.8125rem;
  }

  .life-story__rest {
    font-size: 1.1rem;
    padding: 0.75rem 0.85rem;
  }
}

@media (max-width: 959px) {
  .life-story__nav {
    position: static;
    overflow: hidden;
  }

  .life-story__nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    margin-inline: -0.15rem;
    padding-inline: 0.15rem;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .life-story__nav-list li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .life-story__nav-link {
    flex-direction: column;
    align-items: center;
    min-width: 5.75rem;
    max-width: 8.5rem;
    text-align: center;
    padding: 0.65rem 0.55rem;
    border: 1px solid var(--color-border-subtle);
    background: var(--color-bg-elevated);
  }

  .life-story__nav-text {
    align-items: center;
    width: 100%;
  }

  .life-story__nav-title {
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .life-hero__glow,
  .life-story__progress-fill {
    animation: none;
  }

  .life-story-page__progress-fill {
    transition: none;
  }

  [data-life-reveal]:not(.is-revealed),
  [data-life-reveal-stagger] > .life-story__stat,
  .life-story__paragraph:not(.is-revealed) {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .timeline--story .timeline__item,
  .timeline__item.is-visible .life-story__tag,
  .timeline--story .timeline__item.is-visible .timeline__card,
  .timeline--story .timeline__item.is-visible .timeline__card-head {
    animation: none !important;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .timeline--story .timeline__item.is-visible .timeline__card::before {
    display: none;
  }
}

@media (max-width: 767px) {
  .life-story__actions {
    flex-direction: column;
  }

  .life-story__actions .btn {
    width: 100%;
  }
}
