/* General body settings */
body,
html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: 'Raleway', sans-serif;
    scroll-behavior: smooth;
}

/* Parallax sections */
.parallax-section {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
}

/* Parallax background image */
.parallax-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(-1px) scale(2); /* Background moves slower */
    z-index: -1;
}

/* Timeline box content */
.timeline-content {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    width: 60%;
    max-width: 600px;
    z-index: 2;
    transform: translateZ(0); /* Content moves at a different speed */
}

.timeline-date {
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 900;
    font-size: 4vw;
    line-height: 0.9em;
    -webkit-text-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.4);
    text-shadow: 0 0.3rem 0.9rem rgba(0, 0, 0, 0.4);
    margin-top: 0;
    margin-bottom: 0.5em;
}

.blurb {
    font-size: 1.50vw;
}

/* Apply different speeds for parallax scroll effect */
.parallax-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    transform-origin: center;
    will-change: transform;
}

/* Slow parallax for images */
.parallax-image {
    transform: translateY(calc(-1px * var(--scroll)));
}

/* Faster parallax for content */
.timeline-content {
    transform: translateY(calc(2px * var(--scroll)));
}

@media screen and (max-width: 600px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    h3 {
        font-size: 1.25em;
    }

    .parallax {
        font-size: 100%;
    }
}

/* Styles for the floating button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #131630;
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    font-size: 1.2em;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: #333a70;
}