#timeline-container {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    background: #ffffff;
    position: relative;
    width: max-content;
    overflow: visible;
    padding-bottom: 32px;
}

#timeline-container.timeline-container-vertical {
    width: 100%;
    padding: 8px 0 24px;
    border: 0;
    box-shadow: none;
}

.timeline-vertical {
    --timeline-axis: #64a294;
    --timeline-accent: #d6333f;
    position: relative;
    width: min(100%, 928px);
    margin: 0 auto;
}

.timeline-vertical::before {
    position: absolute;
    top: 12px;
    bottom: 16px;
    left: 168px;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, #b9ddd4, var(--timeline-axis) 12%, var(--timeline-axis) 88%, #b9ddd4);
    content: "";
}

.timeline-vertical-item {
    position: relative;
    display: grid;
    grid-template-columns: 144px 32px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin-bottom: 24px;
}

.timeline-vertical-date {
    padding-top: 14px;
    color: #737373;
    font-size: 12px;
    line-height: 1.45;
    text-align: right;
}

.timeline-vertical-date strong {
    display: block;
    color: #404040;
    font-size: 14px;
}

.timeline-vertical-marker {
    position: relative;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin: 16px auto 0;
    border: 3px solid #fff;
    border-radius: 999px;
    background: var(--timeline-axis);
    box-shadow: 0 0 0 2px var(--timeline-axis);
}

.timeline-vertical-card {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(38, 73, 65, 0.08);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.timeline-vertical-card:hover {
    border-color: #acd2c8;
    box-shadow: 0 9px 24px rgba(38, 73, 65, 0.13);
    transform: translateY(-1px);
}

.timeline-vertical-card:focus-within {
    outline: 3px solid rgba(97, 153, 137, 0.3);
    outline-offset: 2px;
}

.timeline-vertical-card-action {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.timeline-vertical-card-action:focus-visible {
    outline: 0;
}

.timeline-vertical-image {
    display: block;
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    background: #f5f5f5;
}

.timeline-vertical-heading {
    padding: 16px 18px 0;
}

.timeline-vertical-body {
    padding: 0 18px 17px;
}

.timeline-vertical-site {
    margin: 0 0 5px;
    color: #619989;
    font-size: 12px;
    font-weight: 700;
}

.timeline-vertical-title {
    margin: 0;
    color: #262626;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.timeline-vertical-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 0;
    color: #525252;
    font-size: 13px;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.timeline-vertical-description.timeline-vertical-description-expanded {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
}

.timeline-vertical-description-toggle {
    display: inline-flex;
    margin: 8px 0 0;
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--timeline-axis);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.timeline-vertical-description-toggle[hidden] {
    display: none;
}

.timeline-vertical-description-toggle:hover {
    text-decoration: underline;
}

.timeline-vertical-description-toggle:focus-visible {
    outline: 2px solid var(--timeline-axis);
    outline-offset: 3px;
    border-radius: 2px;
}

.timeline-vertical-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 13px;
    color: #a3a3a3;
    font-size: 11px;
}

@media (max-width: 640px) {
    .timeline-vertical {
        padding-left: 2px;
    }

    .timeline-vertical::before {
        left: 9px;
    }

    .timeline-vertical-item {
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 10px;
        margin-bottom: 18px;
    }

    .timeline-vertical-date {
        grid-column: 2;
        grid-row: 1;
        padding: 0 0 2px;
        text-align: left;
    }

    .timeline-vertical-date strong {
        display: inline;
        margin-right: 6px;
    }

    .timeline-vertical-marker {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 12px;
        height: 12px;
        margin-top: 4px;
    }

    .timeline-vertical-card {
        grid-column: 2;
        grid-row: 2;
        border-radius: 13px;
    }

    .timeline-vertical-heading {
        padding: 14px 14px 0;
    }

    .timeline-vertical-body {
        padding: 0 14px 14px;
    }
}

#timeline-container .timeline-section {
    display: grid;
    width: max-content;
}

#timeline-container .timeline-years {
    position: relative;
    height: 56px;
    background: transparent;
    color: #9ca3af;
    font-weight: 700;
    letter-spacing: 0.6px;
    border-bottom: none;
    align-items: end;
    padding-bottom: 14px;
}

#timeline-container .timeline-years::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    height: 4px;
    border-radius: 9999px;
    background: #d1d5db;
}

#timeline-container .timeline-years .year-cell {
    position: relative;
    font-size: 20px;
    color: inherit;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

#timeline-container .timeline-years .year-cell::after {
    display: none;
}

#timeline-container .timeline-years .year-cell.year-cell-current {
    color: #4b5563;
}

#timeline-container .timeline-years .year-cell.year-cell-current::after {
    border-color: #d97745;
}

#timeline-container .timeline-months {
    height: 24px;
    background: transparent;
    border-bottom: none;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-items: center;
}

#timeline-container .timeline-grid {
    display: grid;
    grid-auto-rows: 80px;
    position: relative;
    background: repeating-linear-gradient(
        to bottom,
        #f8fafc 0,
        #f8fafc 80px,
        #ffffff 80px,
        #ffffff 160px
    );
}

#timeline-container .timeline-grid .grid-cell {
    border-right: 1px dashed #e2e8f0;
    border-bottom: 1px solid #f1f5f9;
}

#timeline-container .timeline-grid .project-box {
    position: absolute;
    height: 12px;
    line-height: 12px;
    padding: 0 10px;
    top: 34px;
    border-radius: 2px;
    background: #cbd5e1;
    color: #1f2937;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
    border: none;
    transition: transform 0.15s ease;
    overflow: visible;
    z-index: 2;
    width: 120px;
    margin-left: 15px;
    text-decoration: none;
    color: inherit;
}

#timeline-container .timeline-grid .project-box.project-box-clickable {
    cursor: pointer;
}

#timeline-container .timeline-grid .project-box:hover {
    transform: translateY(-1px);
}

#timeline-container .timeline-grid .project-box .project-icon {
    position: absolute;
    left: -36px;
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid rgba(100, 116, 139, 0.6);
    transform: translateY(-50%);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
    background-size: cover;
    background-position: center;
    z-index: 2;
}

#timeline-container .timeline-grid .project-box .project-icon.project-icon-has-image {
    border-color: rgba(255, 255, 255, 0.9);
}

#timeline-container .timeline-grid .project-box .project-label {
    position: absolute;
    left: 0;
    top: -24px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    padding: 2px 8px;
    z-index: 3;
    isolation: isolate;
}

#timeline-container .timeline-grid .project-box .project-label::before {
    content: '';
    position: absolute;
    inset: -4px -12px;
    background: rgba(255, 255, 255, 0.92);
    filter: blur(6px);
    border-radius: 999px;
    z-index: -1;
}

body {
    padding: 0;
}

.timeline-scroll {
    cursor: grab;
}

.timeline-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.timeline-scroll.is-dragging * {
    user-select: none;
}

.timeline-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #d1e5db;
    background: #f4f9f7;
    color: #256e5b;
    font-weight: 600;
}

.timeline-chip-muted {
    border-color: #e5e7eb;
    background: #f8fafc;
    color: #4b5563;
}

.timeline-today-marker {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.timeline-today-line {
    width: 2px;
    background: linear-gradient(180deg, rgba(217, 119, 69, 0) 0%, rgba(217, 119, 69, 0.45) 45%, rgba(217, 119, 69, 0) 100%);
    border-radius: 9999px;
}

.timeline-today-badge {
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 9999px;
    background: #d97745;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 8px 20px -10px rgba(217, 119, 69, 0.5);
}
