/* experiences.css */
.main-content {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    padding: 2rem 0;
}

.experiences-container {
    display: flex;
    gap: 2rem; /* Consistent gap */
    padding: 2rem 1rem; /* Consistent padding */
    max-width: 1200px;
    margin: 0 auto;
    min-height: auto;
    justify-content: center;
}

.description-section {
    flex: 0 0 380px;
    position: sticky;
    top: 2rem;
    height: fit-content;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95); /* Consistent background */
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Consistent border */
}

.description-section h1 {
    font-size: 2.25rem;
    color: #1e293b;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #8b5cf6;
}

.description-section p {
    margin-bottom: 1.25rem;
    color: #64748b;
}

.experiences-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
}

.filter-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 0;
    border: 1px solid rgba(241, 245, 249, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid transparent;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.filter-toggle-btn:hover {
    color: #8b5cf6;
}

.filter-toggle-active {
    color: #8b5cf6;
}

.filter-toggle-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.filter-toggle-active .filter-toggle-icon {
    transform: rotate(180deg);
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.filter-separator {
    color: #94a3b8;
}

.active-filter-type,
.active-filter-tech {
    font-weight: 500;
    color: #8b5cf6;
}

.filter-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.filter-section-open {
    max-height: 500px;
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(241, 245, 249, 0.8);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-heading {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin: 0;
}

.filter-buttons,
.tech-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.375rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.95);
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tech-filter-buttons .filter-btn {
    padding: 0.375rem 0.75rem;
}

.tech-filter-buttons .tech-icon {
    width: 14px;
    height: 14px;
}

.filter-btn.active .tech-icon {
    filter: brightness(3);
}

.filter-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.filter-btn.active {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
}

.experiences-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 800px;
    margin: 0;
}

.experience-card {
    background: rgba(255, 255, 255, 0.95); /* Consistent background */
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(241, 245, 249, 0.3); /* Consistent border */
    flex: 1 1 400px;
    position: relative;
    overflow: hidden;
}

.experience-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.experience-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #8b5cf6, #8b5cf6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.experience-card:hover::after {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.company-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 12px;
    padding: 0.5rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.company {
    color: #8b5cf6;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.duration {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.duration::before {
    content: '📅';
    font-size: 0.875rem;
}

.location {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location::before {
    content: '📍';
    font-size: 0.875rem;
}

.technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.tech-tag {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.tech-tag:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-1px);
}

.tech-icon {
    width: 16px;
    height: 16px;
}

.tech-icon.hidden {
    display: none;
}

@font-face {
    font-family: 'NotoColorEmojiLimited';
    unicode-range: U+1F1E6-1F1FF;
    src: url(https://raw.githack.com/googlefonts/noto-emoji/main/fonts/NotoColorEmoji.ttf);
}

.flag {
    display: inline-block;
    font-size: 1.2em;
    margin-right: 0.5em;
    font-family: 'NotoColorEmojiLimited', -apple-system, BlinkMacSystemFont, "Segoe UI Emoji", "Segoe UI Symbol";
    font-display: block;
}

@media (max-width: 1280px) {
    .experiences-container {
        max-width: 100%;
        padding: 2rem;
    }
    
    .experience-card {
        flex: 1 1 350px;
    }
}

@media (max-width: 1024px) {
    .main-content {
        display: block;
        padding: 1rem;
    }

    .experiences-container {
        flex-direction: column;
        gap: 2rem;
        padding: 1rem;
    }

    .description-section {
        position: static;
        flex: none;
        max-height: none;
        backdrop-filter: none;
    }

    .experiences-grid {
        padding: 0;
    }
    
    .filter-buttons,
    .tech-filter-buttons {
        padding: 0;
        flex-wrap: wrap;
    }
    
    .filter-container {
        margin: 0 1rem;
    }
}

@media (max-width: 768px) {
    .experience-card {
        flex: 1 1 100%;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .company-logo {
        width: 45px;
        height: 45px;
    }

    .title {
        font-size: 1.25rem;
    }
}

.dark .description-section,
.dark .experience-card {
    background: rgba(30, 41, 59, 0.95); /* Consistent dark background */
    border-color: rgba(255, 255, 255, 0.1); /* Consistent dark border */
}

.dark .description-section h1 {
    color: #f1f5f9;
}

.dark .title {
    color: #f8fafc;
}

.dark .company {
    color: #8b5cf6;
}

.dark .duration,
.dark .location {
    color: #64748b;
}

.dark .tech-tag {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
    border-color: rgba(139, 92, 246, 0.3);
}

.dark .technologies {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .filter-btn {
    background: rgba(30, 41, 59, 0.95);
    color: #94a3b8;
    border-color: rgba(139, 92, 246, 0.3);
}

.dark .filter-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.dark .filter-btn.active {
    background: #8b5cf6;
    color: #1e293b;
    border-color: #8b5cf6;
}

.dark .filter-heading {
    color: #e2e8f0;
}

.dark .filter-container {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark .filter-section-open {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark .filter-toggle-btn {
    color: #94a3b8;
}

.dark .filter-toggle-btn:hover,
.dark .filter-toggle-active {
    color: #8b5cf6;
}

.dark .active-filters {
    color: #94a3b8;
}
