.timeline {
    container: timeline-container/inline-size;
  }
  .timeline-group {
    display: grid;
    gap: 1rem;
    grid-template-areas: "point date" "point event";
    margin-inline: 1rem;
  }
  @container timeline-container (min-width: 80ch) {
    .timeline-group {
      grid-template-areas: "date point event";
      grid-template-columns: 8fr 1fr 8fr;
      place-content: center;
    }
    .timeline-group:nth-child(even) {
      grid-template-areas: "event point date";
    }
    .timeline-group:nth-child(even) .timeline-date {
      --translation: -100px;
      justify-content: flex-start;
    }
    .timeline-group:nth-child(even) .timeline-event {
      --translation: -100px;
      -webkit-margin-start: auto;
              margin-inline-start: auto;
    }
  }
  .timeline-event {
    --box-shadow: 0 1px 6px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.24);
    border-top: 6px solid #1e30f3;
    --easing: cubic-bezier(0.34, 1.56, 0.64, 1);
    --range-start: contain 30%;
    --range-end: contain 50%;
    --translation: 100px;
    grid-area: event;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
  }
  .timeline-event > :not(figure) {
    padding-inline: 1rem;
  }
  @container timeline-container (min-width: 80ch) {
    .timeline-event {
      margin-block: 2rem;
      width: min(100% - 1rem, 30cqw);
      position: relative;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view(block)) {
      .timeline-event {
        opacity: 0;
        -webkit-animation: slide-in var(--easing) both;
                animation: slide-in var(--easing) both;
        animation-timeline: view(block);
        animation-range: var(--range-start) var(--range-end);
        transform-origin: center center;
        transform: translateX(var(--translation));
      }
    }
  }
  .timeline-event figure {
    margin: 0;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-top-right-radius: var(--border-radius);
    border-top-left-radius: var(--border-radius);
  }
  .timeline-event figure img {
    display: block;
    height: 100%;
    width: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    -o-object-position: center;
       object-position: center;
  }
  .timeline-point {
    display: grid;
    grid-area: point;
    place-content: center;
    position: relative;
    width: 100%;
  }
  .timeline-point span {
    --point-size: 16px;
    --point-color: #1e30f3;
    --easing: cubic-bezier(0.34, 1.56, 0.64, 1);
    --range-start: contain 30%;
    --range-end: contain 50%;
    --translation: 100px;
    align-items: center;
    aspect-ratio: 1;
    height: var(--point-size);
    background: var(--point-color);
    border-radius: 100%;
    display: flex;
    flex-direction: column;
  }
  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view(block)) {
      .timeline-point span {
        -webkit-animation: scale-up var(--easing) both;
                animation: scale-up var(--easing) both;
        animation-timeline: view(block);
        animation-range: var(--range-start) var(--range-end);
        transform-origin: center center;
      }
    }
  }
  .timeline-point::after {
    background: #a7aefd;
    content: "";
    display: block;
    height: 100%;
    position: absolute;
    left: calc(50% - (4px / 2));
    margin-inline: auto;
    width: 4px;
    top: 0;
    z-index: -1;
  }
  .timeline-date {
    --range-start: contain 30%;
    --range-end: contain 50%;
    --translation: -100px;
    grid-area: date;
  }
  @container timeline-container (min-width: 80ch) {
    .timeline-date {
      --translation: -100px;
      align-items: center;
      display: flex;
      justify-content: flex-end;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view(block)) {
      .timeline-date {
        -webkit-animation: fade-in linear both;
                animation: fade-in linear both;
        animation-timeline: view(block);
        animation-range: var(--range-start) var(--range-end);
        opacity: 0;
        transform: translateY(var(--translation));
      }
    }
  }
  
  @-webkit-keyframes slide-in {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  @keyframes slide-in {
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  @-webkit-keyframes scale-up {
    0% {
      scale: 1;
    }
    75% {
      scale: 1.2;
    }
    100% {
      scale: 1;
    }
  }
  @keyframes scale-up {
    0% {
      scale: 1;
    }
    75% {
      scale: 1.2;
    }
    100% {
      scale: 1;
    }
  }
  @-webkit-keyframes fade-in {
    75% {
      opacity: 0;
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  @keyframes fade-in {
    75% {
      opacity: 0;
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .message {
    background: yellow;
    font-size: 1.5rem;
    padding-inline: 2rem;
    padding-block: 3rem;
  }
  .message > * {
    width: 60ch;
  }
  @supports (animation-timeline: view()) {
    .message {
      display: none;
    }
  }

  
@media only screen and (max-width: 1000px) {
  .timeline {
    display: flex;
    flex-direction: column;
  }
  
  .timeline-group {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .timeline-event {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-top: 6px solid #1e30f3;
    margin-bottom: 1.5rem;
  }
  
  .timeline-point {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }
  
  .timeline-point span {
    width: 16px;
    height: 16px;
    background-color: #1e30f3;
    border-radius: 50%;
  }
  
  .timeline-date {
    text-align: center; /* Align date text */
    font-size: 0.875rem;
    color: #999;
    margin-bottom: 1rem; /* Add margin bottom to separate date from content */
  }
  
  .timeline-content {
    flex: 1; /* Take remaining space */
  }
}