/* Timeline Container */
.timeline-container {
    display: flex;
    gap: 0;
    margin-top: 40px;
    margin-bottom: 40px;
    position: relative;
    min-height: 100vh;
    
    /* CSS Variables for all Breakpoints */
    --sidebar-width: 200px;
    --sidebar-padding: 40px;
    --line-position: 100px;
    --arrow-offset: -10px;
    --marker-left-offset: -208px;
    --marker-top: 100px;
}

/* Sidebar with Arrow and Line */
.timeline-sidebar {
    position: relative;
    width: var(--sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: var(--sidebar-padding);
}

.timeline-arrow-head {
    position: absolute;
    top: calc(var(--navbar-height) - 50px);
    left: calc(var(--line-position) + var(--arrow-offset));
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 18px solid var(--primary-color);
    z-index: 100;
}

.timeline-line {
    position: absolute;
    left: var(--line-position);
    top: 25px;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
    z-index: 10;
}

.timeline-content {
    flex: 1;
    padding-left: 100px;
    padding-right: 80px;
    width: 100%;
    max-width: none; 
    position: relative;
}

/* Timeline Entry */
.timeline-entry {
    position: relative;
    margin-bottom: 100px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1.5fr) minmax(0, 0.5fr);
    gap: 120px;
    align-items: flex-start;
}

.timeline-marker {
    position: absolute;
    left: var(--marker-left-offset);
    top: var(--marker-top);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--background-color);
    border: 4px solid var(--primary-color);
    z-index: 15;
}

.company-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 20px;
    overflow-wrap: break-word;
}

.company-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border: 3px solid var(--secondary-color);
    flex-shrink: 0;
}

.company-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--neutral-color);
    margin: 0;
    word-break: break-word;
    max-width: 220px;
}

.position-section {
    padding-top: 20px;
}

.position-title {
    font-size: 36px;
    font-weight: bold;
    margin: 0 0 12px 0;
    color: var(--neutral-color);
    line-height: 1.2;
    word-break: break-word;
}

.position-meta {
    font-size: 15px;
    color: #999;
    margin: 0 0 20px 0;
    font-style: italic;
    word-break: break-word;
}

.position-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--neutral-color);
    margin: 0;
    word-break: break-word;
}

.position-description ul {
    margin-left: 20px;
}

.position-description li {
    margin-bottom: 5px;
    font-size: 1.1em;
}

.position-description p {
    margin-left: 0px;
    margin-bottom: 15px;
    font-size: 1.25em;
}

/* Tablet: 2-Column Layout (768px - 1023px) */
@media only screen and (min-width: 768px) and (max-width: 1023px) {
    .timeline-container {
        --sidebar-width: 150px;
        --sidebar-padding: 30px;
        --line-position: 75px;
        --marker-left-offset: -132px;
        --marker-top: 100px;
    }

    .timeline-content {
        padding-left: 50px;
        padding-right: 30px;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 70px;
    }

    .timeline-marker {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }

    .company-section {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        align-items: center;
        padding-top: 0;
    }

    .company-logo {
        width: 120px;
        height: 120px;
        margin-bottom: 0;
        margin-right: 20px;
        flex-shrink: 0;
    }

    .company-name {
        font-size: 16px;
        max-width: none;
    }

    .position-section {
        padding-top: 0;
    }

    .position-title {
        font-size: 28px;
    }

    .position-description {
        font-size: 15px;
    }
}

/* Mobile: Responsive Layout (max-width 767px) */
@media only screen and (max-width: 767px) {
    .timeline-container {
        --sidebar-width: 100px;
        --sidebar-padding: 20px;
        --line-position: 50px;
        --marker-left-offset: -86px;
        --marker-top: 80px;
    }

    .timeline-content {
        padding-left: 30px;
        padding-right: 20px;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 60px;
    }

    .timeline-marker {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .company-section {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        align-items: center;
        padding-top: 0;
    }

    .company-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
        margin-right: 15px;
        flex-shrink: 0;
    }

    .company-name {
        font-size: 14px;
        max-width: none;
    }

    .position-section {
        padding-top: 0;
    }

    .position-title {
        font-size: 22px;
    }

    .position-meta {
        font-size: 12px;
    }

    .position-description {
        font-size: 14px;
        line-height: 1.6;
    }
}