

html,
body {
    scroll-snap-type: none !important;
    height: auto !important;
    overflow-y: auto !important;
}

footer {

    text-align: center;
}


.container {
    height: auto !important;
    scroll-snap-align: none !important;
}

.archive-header {
    text-align: center;
    padding: 60px 0 40px;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}


.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(255, 255, 255, 0.245);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    z-index: 1;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
    z-index: 2;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.left {
    left: 0;
}

.right {
    left: 50%;
}


.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -11.73px;
    background-color: var(--contact-blue);
    border: 4px solid var(--bg-color);
    top: 24px;
    border-radius: 50%;
    z-index: 4;
    box-shadow: 0 0 10px rgba(59, 131, 246, 0.762);
}

.right::after {
    left: -12.2px;
}

.archive-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.archive-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.date-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    border: 1px solid var(--glass-border);
}

.archive-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.archive-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}


.tech-challenge-box {
    background: rgba(239, 68, 68, 0.1);

    border-left: 3px solid #EF4444;
    padding: 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #e5e5e5;
}

.archive-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.archive-tag {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--contact-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-sidekick {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;

    box-sizing: border-box;
    padding: 10px 40px;

    pointer-events: none;

    display: flex;
    align-items: center;

}


.left .timeline-sidekick {
    left: 100%;
}


.right .timeline-sidekick {
    right: 100%;
}

/* The actual image card styling */
.sidekick-card {
    pointer-events: auto;

    width: 100%;
    padding: 15px;
    /* Slightly tighter padding for images */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidekick-image {
    width: 100%;
    height: 100%;

    object-fit: cover;
    /* Ensures image doesn't stretch */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidekick-caption {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

.archive-sidebar {
    position: fixed;
    left: -300px;

    top: 0;
    height: 100vh;
    width: 300px;
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    overflow: visible;
    /* Glass effect for the main panel */
    background: rgba(20, 20, 20, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.archive-sidebar.active {
    left: 0;
}



.sidebar-toggle {
    position: absolute;
    right: -48px;
    /* Push it outside the sidebar to the right */
    top: 250px;
    /* Vertical position */
    width: 48px;
    height: 48px;


    background: rgba(20, 20, 20, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;



    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 0 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* This inner div handles the scrolling */
.sidebar-content {
    height: 100%;
    width: 100%;
    overflow-y: auto;

    padding: 100px 20px 20px 20px;
    box-sizing: border-box;


    scrollbar-width: none;

    -ms-overflow-style: none;

}


.sidebar-content::-webkit-scrollbar {
    display: none;
}


.sidebar-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-date {
    font-size: 0.75rem;
    color: var(--contact-blue);
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.3;
}

.timeline-item {
    scroll-margin-top: 120px;
}

.timeline-item.left .sidekick-stack {
    grid-column: 2;
    width: 100%;
}

.timeline-item.right .sidekick-stack {
    grid-column: 1;
    width: 100%;
}


.sidekick-stack {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Space between each image */
}

.timeline-item.left .sidekick-stack {
    grid-column: 2;
    align-items: flex-start; 
}



.timeline-item.right .sidekick-stack {
    grid-column: 1;
    align-items: flex-end;   
}


.sidekick-stack .sidekick-card {
    margin: 0 !important;
    width: 100%;       
    max-width: 100%;
}
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 23px;
    }

    .left::after,
    .right::after {
        left: 18.5px;
    }

    .right {
        left: 0%;
    }

    .timeline-sidekick {
        position: relative;
        /* Reset to normal flow */
        left: auto !important;
        right: auto !important;
        width: 100%;
        height: auto;
        padding: 0;

        margin-top: 20px;

    }

    .sidekick-image {
        height: auto;
        max-height: 100%;
    }

    .sidekick-stack {
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 20px; /* Space between text and first image */
    }
}
.custom-spacer1 {

    margin-top: 0%; 
}




@media (min-width: 769px) {


    .timeline-item {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: start !important;
        padding: 40px 0;
        width: 100%;
        left: 0 !important;
    }


    .timeline-sidekick {
        display: contents !important;
    }


    .sidekick-card {
        width: fit-content !important; 
        max-width: 100%;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        border-radius: 20px;
        padding: 15px;
        box-sizing: border-box;
        

        margin-top: -90% !important; 
        margin-bottom: 0 !important;
    }

    .sidekick-image {
        width: 100%;          
        height: auto;         
        max-width: 100%;     
        max-height: 630px;     
        object-fit: cover;    
        display: block;
        border-radius: 12px;
    }




    .timeline-item.left > .archive-card {
        grid-column: 1;
        justify-self: end;
    }
    .timeline-item.left .sidekick-card {
        grid-column: 2;
        justify-self: start;
    }


    .timeline-item.right > .archive-card {
        grid-column: 2;
        justify-self: start; 
    }
    .timeline-item.right .sidekick-card {
        grid-column: 1;

        justify-self: end; 
    }


    .timeline-item::after {
        top: 24px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
    }

    .right::after {
        left: 50% !important;
    }

    .custom-spacer1, 
    .custom-spacer2, 
    .custom-spacer3, 
    .custom-spacer4, 
    .custom-spacer5, 
    .custom-spacer6 {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        display: block; 
    }
    

    .custom-spacer1 .sidekick-card,
    .custom-spacer2 .sidekick-card,
    .custom-spacer3 .sidekick-card,
    .custom-spacer4 .sidekick-card,
    .custom-spacer5 .sidekick-card,
    .custom-spacer6 .sidekick-card {
        margin-top: 0 !important;
    }
}

@media (max-width: 768px) {
   

   
        .custom-spacer1 {
            margin-top: 0% !important;
        }

        .custom-spacer2 {
            margin-top: 5% !important;
        }

        .custom-spacer3 {
            margin-top: 10% !important;
        }
        .custom-spacer4 {
            margin-top: 10% !important;
        }

        .custom-spacer5 {
            margin-top: 111% !important;
        }
        
        .custom-spacer6 {
            margin-top: 9% !important;
        }
    
}