/* Publications Page Styles */

/* Page Title */
.page-title {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(135deg, #8B0000 0%, #a52a2a 100%);
    margin-bottom: 40px;
    border-radius: 10px;
}

.page-title h1 {
    font-size: 42px;
    font-family: times;
    color: #fff;
    margin-bottom: 10px;
    font-weight: normal;
}

.page-title p {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    font-family: times;
}

/* Main Layout - Left Sidebar + Right Content */
.publications-wrapper {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Left Sidebar Navigation */
.sidebar-nav {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-nav h3 {
    font-size: 22px;
    font-family: times;
    color: #8B0000;
    padding: 15px 20px;
    background-color: #00275f;
    color: #fff;
    border-radius: 8px 8px 0 0;
    margin: 0;
}

.sidebar-nav ul {
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.sidebar-nav li {
    border-bottom: 1px solid #eee;
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-size: 18px;
    font-family: times;
    transition: all 0.3s;
    position: relative;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #f5f5f5;
    color: #8B0000;
    padding-left: 30px;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #8B0000;
}

/* Right Content Area */
.publications-content {
    flex: 1;
    min-width: 0;
}

/* Year Section */
.year-section {
    margin-bottom: 50px;
}

.year-title {
    font-size: 36px;
    font-family: times;
    color: #00275f;
    border-bottom: 3px solid #00275f;
    padding-bottom: 5px;
    margin-bottom: 30px;
    font-weight: normal;
}

/* Paper Item */
.paper-item {
    display: flex;
    gap: 30px;
    padding: 25px;
    margin-bottom: 25px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.paper-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

/* Paper Image */
.paper-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.paper-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Paper Content */
.paper-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.paper-title {
    font-size: 20px;
    font-family: times;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 600;
}

.paper-title:hover {
    color: #8B0000;
    cursor: pointer;
}

.paper-authors {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.paper-authors .corresponding {
    font-weight: bold;
}

.paper-journal {
    font-size: 14px;
    color: #8B0000;
    font-family: times;
    line-height: 1.6;
}

.paper-journal strong {
    font-weight: bold;
}

.paper-journal em {
    font-style: italic;
}

/* DOI Link */
.paper-journal a {
    color: #8B0000;
    text-decoration: none;
    border-bottom: 1px dotted #8B0000;
    transition: all 0.3s;
}

.paper-journal a:hover {
    background-color: #8B0000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    /* Switch to vertical layout on tablet and mobile */
    .publications-wrapper {
        flex-direction: column;
        gap: 20px;padding: 0;
    }
    
    /* Sidebar becomes horizontal filter bar */
    .sidebar-nav {
        width: 100%;
        position: static;
        order: -1;
    }
    
    .sidebar-nav h3 {
        display: none;
    }
    
    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
        border-radius: 8px;
    }
    
    .sidebar-nav li {
        border-bottom: none;
    }
    
    .sidebar-nav a {
        padding: 8px 16px;
        font-size: 14px;
        background-color: #f5f5f5;
        border-radius: 20px;
        white-space: nowrap;
    }
    
    .sidebar-nav a:hover,
    .sidebar-nav a.active {
        background-color: #8B0000;
        color: #fff;
        padding-left: 16px;
    }
    
    .sidebar-nav a.active::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .paper-item {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .paper-image {
        width: 100%;
        height: 180px;
    }
    
    .page-title {
        padding: 30px 15px;
        margin-bottom: 20px;
    }
    
    .page-title h1 {
        font-size: 28px;
    }
    
    .page-title p {
        font-size: 16px;
    }
    
    .year-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .paper-title {
        font-size: 17px;
    }
    
    .paper-authors {
        font-size: 14px;
    }
    
    .paper-journal {
        font-size: 13px;
    }
    
    .sidebar-nav ul {
        gap: 8px;
        padding: 10px;
    }
    
    .sidebar-nav a {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Publication Stats */
.pub-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #8B0000;
    font-family: times;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* Content Detail Page Styles */
.content-detail {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.detail-title {
    font-size: 28px;
    font-family: times;
    color: #00275f;
    margin-bottom: 20px;
    line-height: 1.4;
    font-weight: 600;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.detail-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-meta span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background-color: #8B0000;
    border-radius: 50%;
}

.detail-thumb {
    margin-bottom: 30px;
    text-align: center;
}

.detail-thumb img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.detail-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.detail-content p {
    margin-bottom: 20px;
}

.detail-content h2,
.detail-content h3,
.detail-content h4 {
    color: #00275f;
    margin: 30px 0 15px;
    font-family: times;
}

.detail-content h2 {
    font-size: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.detail-content h3 {
    font-size: 20px;
}

.detail-content h4 {
    font-size: 18px;
}

.detail-content ul,
.detail-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.detail-content li {
    margin-bottom: 8px;
}

.detail-content a {
    color: #8B0000;
    text-decoration: none;
    border-bottom: 1px dotted #8B0000;
    transition: all 0.3s;
}

.detail-content a:hover {
    background-color: #8B0000;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border-bottom: none;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.detail-content blockquote {
    border-left: 4px solid #8B0000;
    padding: 15px 20px;
    margin: 20px 0;
    background-color: #f8f9fa;
    font-style: italic;
    color: #666;
}

/* Prev/Next Navigation */
.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.prev,
.next {
    flex: 1;
    max-width: 48%;
}

.prev span,
.next span {
    display: block;
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.prev a,
.next a {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    line-height: 1.5;
    transition: color 0.3s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prev a:hover,
.next a:hover {
    color: #8B0000;
}

.next {
    text-align: right;
}

/* Responsive for Detail Page */
@media (max-width: 768px) {
    .content-detail {
        padding: 25px;
    }
    
    .detail-title {
        font-size: 22px;
    }
    
    .detail-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .prev-next {
        flex-direction: column;
    }
    
    .prev,
    .next {
        max-width: 100%;
    }
    
    .next {
        text-align: left;
    }
}
