/* Experience Section Styles */
#experience .timeline {
    max-width: 1200px;
    margin: 0;
}

#experience .timeline-item {
    padding-left: 0;
}

#experience .timeline-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    position: relative;
    /* overflow: hidden; Removed to allow content to expand and shadows to show */
}

#experience .timeline-text-content {
    flex: 1;
    z-index: 10;
    position: relative;
}



/* Keyword Container - Positioned in flow on the right */
.experience-keywords {
    /* position: absolute; Removed to prevent clipping */
    /* top: 50%; */
    /* right: 16px; */
    /* transform: translateY(-50%); */
    position: relative;
    width: 250px;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.4s ease;
    /* Align vertically with text if needed, or let it sit at top */
    align-self: center;
    flex-shrink: 0;
}

#experience .timeline-content:hover .experience-keywords {
    opacity: 1;
}

/* Keyword Groups */
.keyword-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

/* Keywords Section Title */
.keywords-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    width: 100%;
}

/* Keyword Tags (Bubbles) */
.keyword-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: white;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Show keywords on hover - already handled by parent opacity */

/* Tech Stack Style - Blue */
.keyword-tag.tech {
    background: #EFF6FF;
    color: var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Research Area Style - Purple */
.keyword-tag.research {
    background: #F5F3FF;
    color: var(--accent);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

/* Frameworks Style - Green */
.keyword-tag.framework {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Floating Animation for Bubbles */
@keyframes float-bubble {

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

    50% {
        transform: translateY(-4px);
    }
}

/* Apply random delays for floating effect when hovered */
#experience .timeline-content:hover .keyword-tag:nth-child(3n+1) {
    animation: float-bubble 3s ease-in-out infinite;
}

#experience .timeline-content:hover .keyword-tag:nth-child(3n+2) {
    animation: float-bubble 4s ease-in-out infinite 1s;
}

#experience .timeline-content:hover .keyword-tag:nth-child(3n) {
    animation: float-bubble 3.5s ease-in-out infinite 0.5s;
}

/* Staggered transition delays - simplified to apply generally */
.keyword-group:nth-child(1) .keyword-tag {
    transition-delay: 0.05s;
}

.keyword-group:nth-child(2) .keyword-tag {
    transition-delay: 0.15s;
}

.keyword-group:nth-child(3) .keyword-tag {
    transition-delay: 0.25s;
}

/* Responsive */
@media (max-width: 900px) {
    .experience-keywords {
        display: none;
    }
}

@media (max-width: 768px) {
    #experience .timeline-content {
        flex-direction: column;
        gap: 24px;
    }

    #experience .timeline-text-content {
        max-width: 100%;
    }
}

/* Underline Styles from Resume */
.underline {
    text-decoration: underline;
    font-weight: 600;
}

/* Experience Specific Typography to match Resume */
#experience .timeline-text-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

#experience .experience-role {
    font-size: 1rem;
    color: #2563eb !important;
    /* Resume Blue */
    font-weight: 600;
    margin-bottom: 12px;
}

#experience .timeline-list li strong {
    color: #2563eb;
    font-weight: 700;
}

#experience .timeline-date {
    font-weight: 600;
    color: #4b5563;
}

/* Reset list styles for consistent look */
#experience .timeline-list {
    margin-left: 0;
    padding-left: 0;
}

#experience .timeline-list>li {
    margin-bottom: 15px;
    list-style-type: none;
}

#experience .timeline-list ul li {
    margin-bottom: 4px;
    color: #374151;
    line-height: 1.6;
}

/* Timeline List Strong Elements - Consistent sizing */
.timeline-list li>strong {
    font-size: 1.05rem;
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
}