/* main */

@media (min-width: 960px) {
    .bd-page-width {
        max-width: 100rem;
    }
}




.github-profile-button a {
    font-weight: 500;
    color: var(--pst-color-text-base);
    transition: opacity 0.2s ease;
}
.github-profile-button a:hover {
    opacity: 0.7;
}
.github-profile-button img {
    filter: invert(1); /* makes GitHub icon white in dark mode */
}


/* Video Scroll */
.video-container {
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    padding: 1rem;
    overflow: hidden;
}

.video-scroll {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.video-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.video-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 0 0 400px;
    height: 225px;
    background: #000;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.video-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-scroll.dragging {
    cursor: grabbing;
}
.video-scroll {
    cursor: grab;
}
/*=====================*/

/* Modern News Timeline */
.news-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 20px;
}

.news-section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.news-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.news-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 60px;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 3px 8px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
    background: #ffffff;
}

.news-card:hover::before {
    transform: scaleX(1);
}

/* Enhanced styles for clickable news cards */
.news-card[data-link] {
    cursor: pointer;
    position: relative;
}

.news-card[data-link]::after {
    content: '🔗';
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    font-size: 0.7rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.news-card[data-link]:hover::after {
    opacity: 1;
}

.news-card[data-link]:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
}

.news-card.achievement::before { background: linear-gradient(90deg, #10b981, #059669); }
.news-card.research::before { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.news-card.publication::before { background: linear-gradient(90deg, #ef4444, #dc2626); }
.news-card.journal::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.news-card.conference::before { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.news-card.industry::before { background: linear-gradient(90deg, #06b6d4, #0891b2); }
.news-card.agriculture::before { background: linear-gradient(90deg, #ec4899, #db2777); }
.news-card.published::before { background: linear-gradient(90deg, #14b8a6, #0d9488); }

.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.news-date {
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.news-card:hover .news-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.news-card.achievement .news-icon { background: linear-gradient(135deg, #10b981, #059669); }
.news-card.research .news-icon { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.news-card.publication .news-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.news-card.journal .news-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.news-card.conference .news-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.news-card.industry .news-icon { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.news-card.agriculture .news-icon { background: linear-gradient(135deg, #ec4899, #db2777); }
.news-card.published .news-icon { background: linear-gradient(135deg, #14b8a6, #0d9488); }

.news-content {
    font-size: 0.8rem;
    line-height: 1.3;
    color: #374151;
    font-weight: 500;
    margin: 0;
}

.news-card:hover .news-content {
    color: #1f2937;
}

/* Year sections */
.year-section {
    margin-bottom: 2rem;
}

/* .year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.25rem 0.5rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
} */

/* .year-header:hover {
    background: #e9ecef;
} */

/* .year-header:focus {
    outline: 1px solid #000000;
    outline-offset: 2px;
} */

.year-title {
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    margin-right: 0.5rem;
}

.year-badge {
    background: #007bff;
    color: white;
    padding: 0.3rem 0.25rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    min-width: 40px;
    text-align: center;
}

.year-badge::after {
    content: '▼';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.year-header.collapsed .year-badge::after {
    transform: translateY(-50%) rotate(180deg);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.news-grid.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.news-grid.expanded {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Ensure news cards animate properly when expanding */
.news-grid.expanded .news-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.news-grid.collapsed .news-card {
    animation: none;
    opacity: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.15s; }
.news-card:nth-child(3) { animation-delay: 0.2s; }
.news-card:nth-child(4) { animation-delay: 0.25s; }
.news-card:nth-child(5) { animation-delay: 0.3s; }
.news-card:nth-child(6) { animation-delay: 0.35s; }
.news-card:nth-child(7) { animation-delay: 0.4s; }
.news-card:nth-child(8) { animation-delay: 0.45s; }

/* Responsive design */
@media (max-width: 768px) {
    .news-container {
        padding: 0 15px;
        margin: 1.5rem auto;
    }
    
    .news-section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 0.6rem;
    }
    
    .news-card {
        padding: 0.6rem;
        min-height: 50px;
    }
    
    .year-title {
        font-size: 1.125rem;
    }
    
    .news-icon {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .news-content {
        font-size: 0.75rem;
    }
    
    .news-date {
        font-size: 0.65rem;
    }
}

/* Dark mode support for Sphinx Book Theme */
[data-theme="dark"] .news-card {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .news-card:hover {
    background: #374151;
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .news-date {
    color: #9ca3af;
}

[data-theme="dark"] .news-content {
    color: #d1d5db;
}

[data-theme="dark"] .news-card:hover .news-content {
    color: #f9fafb;
}

[data-theme="dark"] .year-title {
    color: #e9ecef;
}

[data-theme="dark"] .year-header {
    background: #343a40;
    border-color: #495057;
}

[data-theme="dark"] .year-header:hover {
    background: #495057;
}

[data-theme="dark"] .year-badge {
    background: #007bff;
}

[data-theme="dark"] .year-badge::after {
    color: #adb5bd;
}

/* Alternative dark mode selectors for different theme implementations */
.theme-dark .news-card,
.dark .news-card,
[class*="dark"] .news-card {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f9fafb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-dark .news-card:hover,
.dark .news-card:hover,
[class*="dark"] .news-card:hover {
    background: #374151;
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.theme-dark .news-date,
.dark .news-date,
[class*="dark"] .news-date {
    color: #9ca3af;
}

.theme-dark .news-content,
.dark .news-content,
[class*="dark"] .news-content {
    color: #d1d5db;
}

.theme-dark .news-card:hover .news-content,
.dark .news-card:hover .news-content,
[class*="dark"] .news-card:hover .news-content {
    color: #f9fafb;
}

.theme-dark .year-title,
.dark .year-title,
[class*="dark"] .year-title {
    color: #e9ecef;
}

.theme-dark .year-header,
.dark .year-header,
[class*="dark"] .year-header {
    background: #343a40;
    border-color: #495057;
}

.theme-dark .year-header:hover,
.dark .year-header:hover,
[class*="dark"] .year-header:hover {
    background: #495057;
}

.theme-dark .year-badge,
.dark .year-badge,
[class*="dark"] .year-badge {
    background: #007bff;
}

.theme-dark .year-badge::after,
.dark .year-badge::after,
[class*="dark"] .year-badge::after {
    color: #adb5bd;
}

.theme-dark .news-section-title,
.dark .news-section-title,
[class*="dark"] .news-section-title {
    background: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-dark .news-section-title::after,
.dark .news-section-title::after,
[class*="dark"] .news-section-title::after {
    background: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
}

.theme-dark .news-icon,
.dark .news-icon,
[class*="dark"] .news-icon {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.theme-dark .news-card:hover .news-icon,
.dark .news-card:hover .news-icon,
[class*="dark"] .news-card:hover .news-icon {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.theme-dark .news-grid.collapsed {
    opacity: 0;
}

[data-theme="dark"] .news-grid.expanded {
    opacity: 1;
}

