/* Timeline — artist's life path / archive installation */

.page-title {
  margin-bottom: clamp(72px, 11vw, 160px);
}

.page-title .eyebrow {
  margin-bottom: 14px;
}

.page-title h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(3.6rem, 9vw, 9.6rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .72;
}

.timeline-list {
  --timeline-axis: 32%;
  --timeline-gap: clamp(34px, 5vw, 92px);
  position: relative;
  width: min(100%, 1500px);
  display: grid;
  gap: 0;
  padding: clamp(28px, 5vw, 70px) 0 clamp(90px, 12vw, 180px);
  isolation: isolate;
}

.timeline-list::before,
.timeline-list::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--timeline-axis);
  width: 1px;
  pointer-events: none;
}

.timeline-list::before {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(0, 0, 0, .13) 3%,
    rgba(0, 0, 0, .13) 97%,
    transparent
  );
  z-index: -2;
}

.timeline-list::after {
  background: linear-gradient(
    to bottom,
    rgba(178, 58, 47, .18),
    rgba(178, 58, 47, .9) 20%,
    rgba(178, 58, 47, .72) 82%,
    transparent
  );
  box-shadow:
    0 0 8px rgba(178, 58, 47, .3),
    0 0 24px rgba(178, 58, 47, .16);
  transform: scaleY(var(--timeline-progress, 0));
  transform-origin: top;
  z-index: -1;
}

.timeline-year {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, var(--timeline-axis)) minmax(0, 1fr);
  gap: var(--timeline-gap);
  margin: 0;
  padding: clamp(54px, 8vw, 122px) 0;
  border: 0;
}

.timeline-year:first-child {
  padding-top: 0;
}

.timeline-year h2 {
  position: sticky;
  top: calc(var(--nav-height) + 38px);
  align-self: start;
  margin: 0;
  padding-right: clamp(22px, 4vw, 64px);
  color: rgba(0, 0, 0, .82);
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 5.6vw, 6.2rem);
  white-space: nowrap;
  font-weight: 400;
  letter-spacing: -.075em;
  line-height: .72;
  text-align: right;
  transition:
    color .7s ease,
    opacity .7s ease,
    transform .9s cubic-bezier(.2, .75, .2, 1);
}

.timeline-year.is-active h2 {
  color: var(--accent);
}

.timeline-items {
  display: grid;
  align-content: start;
  gap: 0;
}

.timeline-year article {
  position: relative;
  display: block;
  width: min(100%, 840px);
  margin: 0;
  padding: clamp(22px, 3.2vw, 42px) 0 clamp(34px, 4.8vw, 68px);
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, .15);
}

.timeline-year article:nth-child(even) {
  margin-left: 0;
  width: min(100%, 840px);
}

.timeline-year article:first-child {
  padding-top: 0;
  border-top: 0;
}

.timeline-year article::before {
  content: "";
  position: absolute;
  top: clamp(34px, 4.5vw, 52px);
  left: calc(-1 * var(--timeline-gap));
  width: var(--timeline-gap);
  height: 1px;
  background: rgba(0, 0, 0, .16);
  transform-origin: right;
}

.timeline-year article:first-child::before {
  top: 12px;
}

.timeline-year article::after {
  content: "";
  position: absolute;
  top: calc(clamp(34px, 4.5vw, 52px) - 4px);
  left: calc(-1 * var(--timeline-gap) - 4px);
  width: 9px;
  height: 9px;
  border: 1px solid rgba(178, 58, 47, .62);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 5px rgba(178, 58, 47, .06);
  transition:
    background-color .45s ease,
    box-shadow .45s ease,
    transform .45s ease;
}

.timeline-year article:first-child::after {
  top: 8px;
}

.timeline-year article.is-visible::after {
  background: var(--accent);
  box-shadow:
    0 0 0 6px rgba(178, 58, 47, .08),
    0 0 18px rgba(178, 58, 47, .32);
  transform: scale(1.08);
}

.timeline-year h3 {
  max-width: 760px;
  margin: 0 0 16px;
  font-family: var(--font-sans);
  font-size: clamp(1.5rem, 2.3vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: .94;
}

.timeline-year article a {
  display: inline-block;
  transition:
    transform .45s cubic-bezier(.2, .75, .2, 1),
    color .3s ease;
}

.timeline-year article a:hover {
  color: var(--accent);
  transform: translateX(8px);
}

.timeline-meta {
  max-width: 670px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(.64rem, .7vw, .74rem);
  letter-spacing: .15em;
  line-height: 1.55;
  text-transform: uppercase;
}

.timeline-year p {
  max-width: 670px;
  margin: 0;
  line-height: 1.55;
}

.timeline-year .muted {
  color: rgba(0, 0, 0, .6);
  font-family: var(--font-serif);
  font-size: clamp(.9rem, 1.05vw, 1.08rem);
}

/* Reveal only after JavaScript has activated the enhanced experience. */
.timeline-enhanced .timeline-year h2,
.timeline-enhanced .timeline-year article {
  opacity: 0;
  transform: translateY(44px);
}

.timeline-enhanced .timeline-year article::before {
  transform: scaleX(0);
}

.timeline-enhanced .timeline-year.is-visible h2,
.timeline-enhanced .timeline-year article.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-enhanced .timeline-year article.is-visible::before {
  transform: scaleX(1);
  transition: transform .8s cubic-bezier(.2, .75, .2, 1) .15s;
}

.timeline-enhanced .timeline-year article {
  transition:
    opacity .85s ease,
    transform 1s cubic-bezier(.2, .75, .2, 1);
}

@media (max-width: 760px) {
  .page-title {
    margin-bottom: 78px;
  }

  .page-title h1 {
    font-size: clamp(3.6rem, 9vw, 9.6rem);
    line-height: .78;
  }

  .timeline-list {
    --timeline-axis: 18px;
    --timeline-gap: 32px;
    padding-top: 10px;
  }

  .timeline-year {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 62px 0 86px 50px;
  }

  .timeline-year:first-child {
    padding-top: 0;
  }

  .timeline-year h2 {
    position: static;
    padding: 0;
    font-size: clamp(3.4rem, 18vw, 5.8rem);
    line-height: .72;
    text-align: left;
  }

  .timeline-year article,
  .timeline-year article:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding: 24px 0 42px;
  }

  .timeline-year article:first-child {
    padding-top: 0;
  }

  .timeline-year article::before {
    top: 37px;
    left: -32px;
    width: 32px;
  }

  .timeline-year article:first-child::before {
    top: 11px;
  }

  .timeline-year article::after {
    top: 33px;
    left: -36px;
  }

  .timeline-year article:first-child::after {
    top: 7px;
  }

  .timeline-year h3 {
    margin-bottom: 14px;
    font-size: clamp(1.7rem, 8.5vw, 2.8rem);
  }

  .timeline-year .muted {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-list::after {
    transform: scaleY(1);
  }

  .timeline-enhanced .timeline-year h2,
  .timeline-enhanced .timeline-year article {
    opacity: 1;
    transform: none;
  }

  .timeline-enhanced .timeline-year article::before {
    transform: none;
  }

  .timeline-year h2,
  .timeline-year article,
  .timeline-year article::before,
  .timeline-year article::after,
  .timeline-year article a {
    transition: none;
  }
}

/* Timeline project image — integrated project scene */
.timeline-year article.has-timeline-image {
  min-height: clamp(210px, 24vw, 330px);
  padding-right: clamp(260px, 30vw, 460px);
}

.timeline-project-image {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 1;
  width: clamp(240px, 28vw, 420px);
  height: auto;
  margin: 0;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(20px, -46%, 0) scale(.96);
  filter: blur(4px);
  box-shadow: none;
  transition:
    opacity .4s ease,
    transform .65s cubic-bezier(.2, .75, .2, 1),
    filter .55s ease;
}

.timeline-project-image.is-visible {
  opacity: .9;
  transform: translate3d(0, -50%, 0) scale(1);
  filter: blur(0);
}

.timeline-project-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 760px) {
  .timeline-year article.has-timeline-image {
    min-height: 0;
    padding-right: 0;
  }

  .timeline-project-image {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    margin-top: 24px;
    transform: translateY(18px) scale(.97);
  }

  .timeline-project-image.is-visible {
    transform: translateY(0) scale(1);
    opacity: .88;
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-project-image {
    display: none;
  }
}

/* Timeline project typography matches project pages */
.timeline-year article,
.timeline-year article a,
.timeline-year h3,
.timeline-meta,
.timeline-year .muted {
  font-family: var(--font-sans);
}


.timeline-project-image img[src*=".svg"] {
  width: 100%;
  height: clamp(290px, 32vw, 470px);
  object-fit: contain;
  object-position: center;
  filter: none;
}

@media (max-width: 760px) {
  .timeline-project-image img[src*=".svg"] {
    height: clamp(260px, 76vw, 370px);
  }
}
