@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap");
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=Kalam:wght@300;400;700&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, .contribute {
    --color: rgba(30, 30, 30);
    --bgColor: rgba(245, 245, 245);
    min-height: 100vh;
    display: grid;
    align-content: center;
    gap: 2rem;
    padding: 1rem 2rem;
    font-family: "Chakra Petch", serif;
    letter-spacing: 0.7px;
    color: var(--color);
    background: #303030;
}

h1 {
    text-align: center;
    color: cyan;
    font-size: 2.5rem;
}

ul {
    --col-gap: 2rem;
    --row-gap: 2rem;
    --line-w: 0.25rem;
    display: grid;
    grid-template-columns: var(--line-w) 1fr;
    grid-auto-columns: max-content;
    column-gap: var(--col-gap);
    list-style: none;
    width: min(60rem, 90%);
    margin-inline: auto;
}

/* line */
ul::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 20;
    background: rgb(225, 225, 225);
    border-radius: calc(var(--line-w) / 2);

}

/* columns*/

/* row gaps */
ul li:not(:last-child) {
    margin-bottom: var(--row-gap);
}

/* card */
ul li {
    grid-column: 2;
    --inlineP: 1.5rem;
    margin-inline: var(--inlineP);
    grid-row: span 2;
    display: grid;
    grid-template-rows: min-content min-content min-content;
}

/* date */
ul li .date {
    --dateH: 3rem;
    height: var(--dateH);
    margin-inline: calc(var(--inlineP) * -1);

    text-align: center;
    background-color: var(--accent-color);

    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    /* text-transform: uppercase; */
    display: grid;
    place-content: center;
    position: relative;
    border-radius: calc(var(--dateH) / 2) 0 0 calc(var(--dateH) / 2);
}

/* date flap */
ul li .date::before {
    content: "";
    width: var(--inlineP);
    aspect-ratio: 1;
    background: var(--accent-color);
    background-image: linear-gradient(rgba(0, 0, 0, 0.2) 100%, transparent);
    position: absolute;
    top: 100%;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    right: 0;
}

/* circle */
ul li .date::after {
    content: "";
    position: absolute;
    width: 2rem;
    aspect-ratio: 1;
    background: var(--bgColor);
    border: 0.3rem solid var(--accent-color);
    border-radius: 50%;
    top: 50%;

    transform: translate(50%, -50%);
    right: calc(100% + var(--col-gap) + var(--line-w) / 2);

}

/* title descr */
ul li .title,
ul li .descr {
    background: var(--bgColor);
    position: relative;
    padding-inline: 1.5rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

ul li .title {
    overflow: hidden;
    padding-block-start: 1.5rem;
    padding-block-end: 1rem;
    font-weight: 500;
}

ul li .descr {
    padding-block-end: 1.5rem;
    font-weight: 300;
    color: black;
    padding-top: 15px;
    font-family: 'Poppins';
}

/* shadows */
ul li .title::before,
ul li .descr::before {
    content: "";
    position: absolute;
    width: 90%;
    height: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    left: 50%;
    border-radius: 50%;
    filter: blur(4px);
    transform: translate(-50%, 50%);
}

ul li .title::before {
    bottom: calc(100% + 0.125rem);
}

ul li .descr::before {
    z-index: -1;
    bottom: 0.25rem;
}

@media (min-width: 40rem) {
    ul {
        grid-template-columns: 1fr var(--line-w) 1fr;
    }

    ul::before {
        grid-column: 2;
    }

    ul li:nth-child(odd) {
        grid-column: 1;
    }

    ul li:nth-child(even) {
        grid-column: 3;
    }

    /* start second card */
    ul li:nth-child(2) {
        grid-row: 2/4;
    }

    ul li:nth-child(odd) .date::before {
        clip-path: polygon(0 0, 100% 0, 100% 100%);
        left: 0;
    }

    ul li:nth-child(odd) .date::after {
        transform: translate(-50%, -50%);
        left: calc(100% + var(--col-gap) + var(--line-w) / 2);
    }

    ul li:nth-child(odd) .date {
        border-radius: 0 calc(var(--dateH) / 2) calc(var(--dateH) / 2) 0;
    }
}

.credits {
    margin-top: 1rem;
    text-align: right;
}

.credits a {
    color: var(--color);
}

.fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}




/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px; /* Default width */
    transition: width 0.3s; /* Animation for width */
}

::-webkit-scrollbar-thumb {
    background: rgba(30, 30, 30, 0.5); /* Default thumb color */
    border-radius: 10px; /* Rounded corners */
    transition: background 0.3s; /* Animation for background color */
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(30, 30, 30, 0.8); /* Thumb color on hover */
}

::-webkit-scrollbar-track {
    background: rgba(245, 245, 245, 0.5); /* Track color */
    border-radius: 10px; /* Rounded corners */
}