/* I tried to condense this to the best of my ability but some stuff I felt like was too delicate (?) for me to touch... sorry in advance*/
body {
    margin: 0;
    border: 0;
    background-color: #031927;
    color: #F6F7EB;
    padding-bottom: 60px;
}

h1 {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: silkscreen;
    font-size: 70px;
    padding: 80px;
    margin: 0;
}

h3 {
    font-family: silkscreen;
    text-align: center;
    font-size: 40px;
    padding: 20px;
}

h4 {
    font-size: 30px;
    font-family: silkscreen;
    text-align: center;
}

.container {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.container p {
    display: flex;
    align-items: center;
    cursor: default;
    font-family: Victor mono;
    text-align: center;
    border: 1px solid #4281A4;
    padding: 25px;
    margin: 40px;
    font-size: 30px;
}

button {
    background-color: #97EAD2;
    color: #031927;
    font-family: silkscreen;
    display: block;
    margin: auto;
}

section {
    padding-top: 30px;
    padding-bottom: 30px;
}

#titlePage {
    background-image: url(chip.jpeg);
    background-size: cover;
    width: 400px;
    background-position: center;
    background-attachment: fixed;
    filter: grayscale(100);
    position: fixed;
    top: 50vh;
    left: 50vw;
    transform: translate(-50%, -50%);
    animation-name: closeOut;
    animation-duration: 1ms;
    /* Firefox requires this to apply the animation */

    animation-direction: alternate;
    animation-timeline: scroll(y);
}

#sect-00 div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;
}

@keyframes closeOut {
    0% {
        width: 400px;
        opacity: 1;
        height: 60vh;
    }

    1% {
        width: 500px;
        opacity: 1;
        height: 60vh;
    }

    4% {
        width: 100vw;
        opacity: 0.5;
        height: 30vh;
        color: transparent;
    }

    5% {
        width: 100vw;
        height: 10px;
        opacity: 0;

    }

    6% {}
}

#subtitle {
    animation: 2s infinite scrollToStart;
}

@keyframes scrollToStart {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(20px);
    }

    100% {
        transform: translateY(0px);
    }
}

#timeline {
    display: flex;
    justify-content: center;
    position: fixed;
    overflow: hidden;
    background-color: #031927;
    top: 90%;
    width: 100%;
    left: 0px;
}

#timeline button {
    border: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    border-radius: 50%;
    background-color: #97EAD2;
    z-index: 99999;
}

#timeline button:hover {
    background-color: #4281A4;
}

#timeline div {
    display: flex;
    padding: 15px;
}

#data {
    justify-content: center;
    align-items: center;
    text-align: center;

}

#data .flourish-embed iframe {
    max-width: 800px !important;
}

#sources {
    display: flex;
    justify-content: center;
}

#programmers {
    display: flex;
    justify-content: center;
    align-content: center;
}

#programmers button {
    display: flex;
    justify-content: center;
    align-content: center;
    cursor: pointer;
    font-size: 15px;
}

.spacer {
    height: 600px;
}

.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 25px;
    width: 250px;
    height: 250px;
    overflow: none;
}

.modal-content {
    display: flex;
    flex-direction: column;
    background-color: #F6F7EB;
    margin: 20% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 80%;
    color: #031927;
}

.close {
    color: #aaaaaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

section {
    height: 100svh
}

/* these two below written by chat GPT then i tweaked them */
.reveal {
    opacity: 1;
    transform: translateY(0);
    position: fixed;
    top: 0px;
}

#modalSection {
    display: flex;
}

.button {
    display: inline-flex;
    padding: 0.5rem 1rem;
    border: 1px solid #F6F7EB;
    border-radius: 3px;
    cursor: pointer;
    outline: none;
}

.button:active {
    transform: scale(0.9);
}

.modal-button {
    margin: 0;
    background-color: #031927;
    border: none;
    font-size: 1.5rem;
    color: #F6F7EB;
}

.programmerModal {
    max-width: 600px;
    height: 50vh;
    /* Adjusted to 100vh */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #F6F7EB;
    font-family: Victor mono;
    border-radius: 10px;
    z-index: 2;
    background-color: #F6F7EB;
    overflow: auto;
    /* Added to enable scrolling if content exceeds viewport height */
}

.programmerModal img {
    display: flex;
    width: 200px;
    height: auto;
    padding: 15px;
}

.programmerModal.active {
    top: 15%;
}

.modalHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #97EAD2;
    color: #031927;
    border-bottom: 1px solid #F6F7EB;
}

.modalBody {
    display: flex;
    justify-content: center;
    align-items: center;
    align-content: center;
    flex-direction: column;
    padding: 1rem;
    color: #031927;
}

#overlay {
    opacity: 0.5;
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    background-color: #888;
}

#overlay.active {
    display: block;
}

@media screen and (max-width:400px) {
    .button {
        font-size: 10px;
    }

    #dawn p {
        padding: 3px;
    }

    #deep p {
        padding: 3px;
    }

    .programmerModal {
        width: 250px;
    }

    .programmerModal img {
        width: 100px
    }



}

@media screen and (max-width:600px) {
    .container p {
        font-size: 15px;
        margin: 10px;
        padding: 10px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 17px;
    }

    h1 {
        font-size: 30px
    }

    #timeline button {
        border: none;
        width: 15px;
        height: 15px;
        cursor: pointer;
        background-color: #97EAD2;
    }

    #timeline div {
        display: inline-flex;
        padding: 10px;
    }

    img {
        width: 320px;
        height: 600px;
    }

    #programmers button {
        display: flex;
        justify-content: center;
        align-content: center;
        cursor: pointer;
        font-size: 10px;
    }

    .programmerModal {
        width: 300px;
        height: 400px;
    }

    .programmerModal img {
        width: 100px
    }

    .modalBody {
        font-size: 12px;
    }

    #birth p {
        padding: 3px;
        margin: 0;
    }

}

@media screen and (min-width:601px) {
    .container p {
        font-size: 17px;
        margin: 20px;
        padding: 10px;
    }

    h3 {
        font-size: 40px;
    }

    h4 {
        font-size: 30px;
    }

    h1 {
        font-size: 50px
    }

    #timeline div {
        display: inline-flex;
        padding: 10px;
    }

    img {
        width: 600px;
        height: 700px;
    }

    .programmerModal {
        font-size: 15px;
        width: 500px;
    }

    .programmerModal img {
        width: 110px
    }
}

@media screen and (min-width:721px) {
    .container p {
        font-size: 20px;
        margin: 20px;
        padding: 10px;
    }

    h3 {
        font-size: 40px;
    }

    h1 {
        font-size: 50px
    }

    #timeline div {
        display: inline-flex;
        padding: 10px;
    }

    img {
        width: 600px;
        height: 700px;
    }
}

@media screen and (min-width:911px) {
    .container p {
        font-size: 23px;
        margin: 20px;
        padding: 10px;
    }

    h3 {
        font-size: 40px;
    }

    h1 {
        font-size: 50px
    }

    #timeline div {
        display: inline-flex;
        padding: 10px;
    }

    img {
        width: 600px;
        height: 700px;
    }
}