﻿/* Publications page specific styles only - body and container handled by shared-styles.css */

        .header {
            background: url('/content/publications-hero.jpg') center/cover;
            height: 500px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            color: #fff;
            text-align: center;
            margin-bottom: 40px;
            border-radius: 0 0 20px 20px;
            overflow: hidden;
        }

        .header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
            z-index: 1;
        }

        .header-content {
            position: relative;
            z-index: 2;
            max-width: 800px;
            padding: 40px;
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            box-shadow: var(--glass-shadow);
        }

        .header-content h1 {
            font-size: 3rem;
            font-weight: 800;
            margin-bottom: 16px;
        }

        .header-content p {
            font-size: 1.25rem;
            opacity: 0.9;
        }


        /* Filters Section - Following About/Home design patterns */
        .filter-section {
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            padding: 40px;
            margin-bottom: 40px;
            position: relative;
            overflow: hidden;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            will-change: transform;
            opacity: 0;
            transform: translateY(20px);
            animation: slideInUp 0.8s ease-out forwards;
            box-shadow: var(--glass-shadow);
        }

        .filter-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
            z-index: -1;
        }

        .filter-section:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        }

        @keyframes slideInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .filter-row {
            display: grid;
            grid-template-columns: 1fr 200px 150px;
            gap: 24px;
            align-items: end;
        }

        .filter-group {
            display: flex;
            flex-direction: column;
        }

        .filter-label {
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--text);
            font-size: 1rem;
        }

        .filter-input, .filter-select {
            width: 100%;
            height: 100%;
            padding: 14px 18px;
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            color: var(--text);
            font-size: 1rem;
            transition: all 0.3s ease;
            font-family: inherit;
            box-shadow: var(--glass-shadow);
        }

        .filter-input:focus, .filter-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), var(--glass-shadow);
            transform: translateY(-2px);
        }

        .search-group {
            position: relative;
            width: 100%;
        }

        .search-group .search-icon {
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            pointer-events: none;
            font-size: 1.1rem;
            z-index: 10;
        }
        
        .search-group .filter-input {
            padding-right: 50px;
            width: 100%;
        }

        .btn {
            padding: 12px 24px;
            border-radius: 24px;
            font-weight: 600;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.3s ease, transform 0.2s ease;
            border: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            position: relative;
            overflow: hidden;
        }
        
        .btn::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(rgba(255,255,255,0.2), transparent);
            transform: rotate(30deg);
            transition: all 0.5s;
            opacity: 0;
        }

        .btn-primary {
            background: var(--primary);
            color: var(--bg-light);
        }

        .btn-primary:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }
        
        .btn-primary:hover::before {
            opacity: 1;
            transform: rotate(30deg) translate(50%, 50%);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text);
            border: 1px solid var(--glass-border);
        }

        .btn-secondary:hover {
            background: var(--bg-light);
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }
        
        .btn-secondary:hover::before {
            opacity: 0.5;
            transform: rotate(30deg) translate(50%, 50%);
        }

        .publications-grid {
            display: flex;
            flex-direction: column;
            gap: 32px;
            margin-bottom: 40px;
            padding: 0;
            width: 100%;
        }

        .publication-card {
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            will-change: transform;
            opacity: 0;
            transform: translateY(30px);
            animation: slideInUpStagger 0.8s ease-out forwards;
            box-shadow: var(--glass-shadow);
        }

        @keyframes slideInUpStagger {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .publication-card:nth-child(1) { animation-delay: 0.1s; }
        .publication-card:nth-child(2) { animation-delay: 0.2s; }
        .publication-card:nth-child(3) { animation-delay: 0.3s; }
        .publication-card:nth-child(4) { animation-delay: 0.4s; }
        .publication-card:nth-child(5) { animation-delay: 0.5s; }
        .publication-card:nth-child(6) { animation-delay: 0.6s; }
        .publication-card:nth-child(7) { animation-delay: 0.7s; }
        .publication-card:nth-child(8) { animation-delay: 0.8s; }

        .publication-card:hover {
            transform: translateY(-12px);
            box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
        }

        .publication-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
            z-index: -1;
        }

        .publication-thumbnail {
            height: 200px;
            background: linear-gradient(135deg, var(--primary), var(--accent));
            position: relative;
            overflow: hidden;
            width: 100%;
            padding: 0;
            margin: 0;
            display: block; /* Changed to block */
        }

        .publication-thumbnail img {
            position: absolute; /* Position absolutely within container */
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            display: block;
            margin: 0;
            padding: 0;
        }

        .publication-thumbnail .fallback-icon {
            font-size: 3rem;
            color: rgba(255, 255, 255, 0.8);
        }

        .publication-content {
            padding: 32px;
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        .publication-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
        }

        .domain-tag {
            background: var(--primary);
            color: var(--bg-light);
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.8rem;
            font-weight: 600;
        }

        .publication-rating {
            display: flex;
            align-items: center;
            gap: 4px;
            color: var(--text-muted);
            font-size: 0.9rem;
        }

        .stars {
            color: #ffc107;
        }

        .publication-title {
            font-size: 1.5rem;
            font-weight: 800;
            margin-bottom: 12px;
            color: var(--text);
            line-height: 1.3;
            background: linear-gradient(90deg, var(--text), var(--primary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .publication-authors {
            color: var(--text-light);
            font-size: 0.95rem;
            margin-bottom: 12px;
        }

        .publication-abstract {
            color: var(--text-light);
            font-size: 0.9rem;
            line-height: 1.6;
            margin-bottom: 20px;
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 4.8em; /* ensure consistent height for 4 lines */
        }

        .publication-actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: auto; /* push actions to bottom */
            align-items: stretch;
        }

        .action-btn {
            padding: 10px 18px;
            border-radius: 20px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease, transform 0.2s ease;
            border: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex: 1 1 140px;
            justify-content: center;
            min-width: 110px;
            position: relative;
            overflow: hidden;
        }
        
        .action-btn::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(rgba(255,255,255,0.2), transparent);
            transform: rotate(30deg);
            transition: all 0.5s;
            opacity: 0;
        }

        .action-btn.download {
            background: var(--primary);
            color: var(--bg-light);
        }

        .action-btn.download:hover {
            background: var(--primary-dark);
            transform: translateY(-3px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }
        
        .action-btn.download:hover::before {
            opacity: 1;
            transform: rotate(30deg) translate(50%, 50%);
        }

        .action-btn.view {
            background: transparent;
            color: var(--primary);
            border: 1px solid var(--primary);
        }

        .action-btn.view:hover {
            background: var(--primary);
            color: var(--bg-light);
            transform: translateY(-3px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }
        
        .action-btn.view:hover::before {
            opacity: 1;
            transform: rotate(30deg) translate(50%, 50%);
        }

        .action-btn.preview {
            background: var(--info);
            color: var(--bg-light);
        }

        .action-btn.preview:hover {
            background: #0891b2;
            transform: translateY(-3px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        }
        
        .action-btn.preview:hover::before {
            opacity: 1;
            transform: rotate(30deg) translate(50%, 50%);
        }
        
        .action-btn.locked {
            background: var(--neutral);
            color: var(--bg-light);
        }
        
        .action-btn.locked:hover {
            background: #6b7280;
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }

            /* Comments Section Styles */
            .comments-section {
                margin-top: 20px;
            }

            .comments-header {
                margin-bottom: 20px;
            }

            .comments-title {
                font-size: 1.5rem;
                font-weight: 700;
                color: var(--text);
                display: flex;
                align-items: center;
                gap: 12px;
                margin-bottom: 20px;
            }

            .comments-title i {
                color: var(--primary);
            }

            .publication-rating-section {
                background: var(--glass-bg);
                border: 1px solid var(--glass-border);
                border-radius: 12px;
                padding: 20px;
                margin-bottom: 20px;
                backdrop-filter: var(--glass-blur);
            }

            .rating-form h4 {
                color: var(--text);
                margin-bottom: 15px;
                font-size: 1.1rem;
                font-weight: 600;
            }

            .star-rating {
                display: flex;
                gap: 8px;
                align-items: center;
                margin-bottom: 15px;
            }

            .rating-controls {
                display: flex;
                flex-direction: column;
                gap: 15px;
            }

            .rating-stars-container {
                display: flex;
                align-items: center;
                gap: 15px;
                flex-wrap: wrap;
            }

            .submit-rating-btn {
                padding: 6px 12px !important;
                font-size: 0.85rem !important;
                min-width: auto !important;
                height: auto !important;
                border-radius: 6px !important;
                display: none;
                align-self: flex-start;
            }

            .star-rating i {
                font-size: 1.5rem;
                color: #ddd;
                cursor: pointer;
                transition: all 0.3s ease;
            }

            .star-rating i:hover,
            .star-rating i.active {
                color: #ffc107;
                transform: scale(1.1);
            }

            .add-comment-form {
                background: var(--glass-bg);
                border: 1px solid var(--glass-border);
                border-radius: 12px;
                padding: 20px;
                margin-bottom: 30px;
                backdrop-filter: var(--glass-blur);
            }

            .comment-textarea {
                width: 100%;
                padding: 15px;
                border: 1px solid var(--glass-border);
                border-radius: 8px;
                background: var(--bg-light);
                color: var(--text);
                font-size: 0.95rem;
                line-height: 1.6;
                resize: vertical;
                min-height: 120px;
                font-family: inherit;
                transition: all 0.3s ease;
            }

            .comment-textarea:focus {
                outline: none;
                border-color: var(--primary);
                box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            }

            .comment-form-actions {
                display: flex;
                justify-content: space-between;
                align-items: center;
                margin-top: 15px;
            }

            .character-count {
                color: var(--text-muted);
                font-size: 0.9rem;
            }

            .comment-buttons {
                display: flex;
                gap: 10px;
            }

            .comments-list {
                background: var(--glass-bg);
                border: 1px solid var(--glass-border);
                border-radius: 12px;
                backdrop-filter: var(--glass-blur);
                max-height: 600px;
                overflow-y: auto;
            }

            .comments-loading,
            .comments-empty {
                text-align: center;
                padding: 40px 20px;
                color: var(--text-muted);
            }

            .comments-loading i {
                font-size: 2rem;
                margin-bottom: 15px;
                color: var(--primary);
            }

            .comment-item {
                padding: 20px;
                border-bottom: 1px solid var(--glass-border);
                transition: background-color 0.3s ease;
            }

            .comment-item:last-child {
                border-bottom: none;
            }

            .comment-item:hover {
                background: var(--glass-bg);
            }

            .comment-header {
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                margin-bottom: 12px;
            }

            .comment-author-info {
                display: flex;
                align-items: center;
                gap: 12px;
            }

            .comment-avatar {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: linear-gradient(135deg, var(--primary), var(--accent));
                display: flex;
                align-items: center;
                justify-content: center;
                color: white;
                font-weight: 600;
                font-size: 0.9rem;
            }

            .comment-author-details h4 {
                margin: 0;
                color: var(--text);
                font-size: 1rem;
                font-weight: 600;
            }

            .comment-date {
                color: var(--text-muted);
                font-size: 0.85rem;
                margin-top: 2px;
            }

            .comment-rating {
                display: flex;
                align-items: center;
                gap: 8px;
            }

            .comment-stars {
                display: flex;
                gap: 2px;
            }

            .comment-stars i {
                font-size: 0.9rem;
                color: #ffc107;
            }

            .comment-content {
                margin-left: 52px;
                color: var(--text);
                line-height: 1.6;
                font-size: 0.95rem;
            }

            .comment-actions {
                margin-left: 52px;
                margin-top: 15px;
                display: flex;
                align-items: center;
                gap: 20px;
            }

            .comment-action {
                background: none;
                border: none;
                color: var(--text-muted);
                cursor: pointer;
                display: flex;
                align-items: center;
                gap: 6px;
                font-size: 0.85rem;
                padding: 5px 10px;
                border-radius: 4px;
                transition: all 0.3s ease;
            }

            .comment-action:hover {
                background: var(--glass-bg);
                color: var(--primary);
            }

            .comment-action.liked {
                color: var(--primary);
            }

            @media (max-width: 768px) {
                .comments-section {
                    margin-top: 15px;
                }

                .publication-rating-section,
                .add-comment-form {
                    padding: 15px;
                }

                .rating-stars-container {
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 10px;
                }

                .star-rating {
                    margin-bottom: 0;
                }

                .submit-rating-btn {
                    align-self: stretch;
                    text-align: center;
                }

                .comment-item {
                    padding: 15px;
                }

                .comment-content,
                .comment-actions {
                    margin-left: 0;
                    margin-top: 10px;
                }

                .comment-author-info {
                    flex-direction: column;
                    align-items: flex-start;
                    gap: 8px;
                }

                .comment-form-actions {
                    flex-direction: column;
                    gap: 15px;
                    align-items: stretch;
                }

                .comment-buttons {
                    justify-content: stretch;
                }

                .comment-buttons .btn {
                    flex: 1;
                }
            }

        .publication-date {
            position: absolute;
            top: 16px;
            right: 16px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
        }

        .loading-state, .empty-state, .error-state {
            text-align: center;
            padding: 60px 24px;
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            box-shadow: var(--glass-shadow);
        }

        .loading-state i {
            font-size: 3rem;
            color: var(--primary);
            margin-bottom: 20px;
            animation: spin 2s linear infinite;
        }

        @keyframes spin {
            from { transform: rotate(0deg); }
            to { transform: rotate(360deg); }
        }
        
        /* Section Styles with consistent theme */
        .section-title {
            font-size: 2.5rem;
            font-weight: 800;
            text-align: center;
            margin-bottom: 24px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            position: relative;
            display: inline-block;
            padding: 0 20px;
            width: 100%;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            border-radius: 2px;
        }
        
        /* Divider Styles */
        .divider {
            position: relative;
            height: 4px;
            background: linear-gradient(90deg, var(--primary-light), var(--accent));
            border-radius: 2px;
            margin: 40px auto;
            width: 120px;
            overflow: hidden;
            clear: both;
        }
        
        .divider::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
            animation: shine 2s infinite;
        }
        
        @keyframes shine {
            0% { left: -100%; }
            50% { left: 100%; }
            100% { left: 100%; }
        }

        .loading-state h3, .empty-state h3, .error-state h3 {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 12px;
            color: var(--text);
        }

        .loading-state p, .empty-state p, .error-state p {
            font-size: 1rem;
            color: var(--text-light);
        }

        .publication-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(4px);
            z-index: 2000;
            padding: 20px;
            overflow-y: auto;
        }

        .modal-content {
            background: var(--bg-light);
            border-radius: 16px;
            max-width: 800px;
            margin: 20px auto;
            position: relative;
            box-shadow: var(--glass-shadow);
            border: 1px solid var(--glass-border);
        }

        .modal-header {
            padding: 24px 24px 0 24px;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--text-light);
            transition: color 0.3s ease;
        }

        .modal-close:hover {
            color: var(--accent);
        }

        .modal-body {
            padding: 24px;
        }

        .modal-title {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 12px;
            color: var(--text);
        }

        .modal-authors {
            color: var(--text-light);
            margin-bottom: 20px;
        }

        .modal-abstract {
            color: var(--text);
            line-height: 1.8;
            margin-bottom: 24px;
        }

        .modal-actions {
            display: flex;
            gap: 12px;
            justify-content: center;
            padding-top: 20px;
            border-top: 1px solid var(--glass-border);
        }

        #footer-placeholder {
            margin-top: 40px;
        }

        @media (max-width: 768px) {
            .header {
                height: 350px;
            }

            .header-content h1 {
                font-size: 2.4rem;
            }

            .header-content p {
                font-size: 1.1rem;
            }

            .filter-row {
                grid-template-columns: 1fr;
            }

            .publications-grid {
                grid-template-columns: 1fr;
            }

            .publication-actions {
                flex-direction: column;
            }

            .action-btn {
                flex: none;
            }
        }

        @media (max-width: 480px) {
            .header {
                height: 300px;
            }

            .header-content {
                padding: 20px;
            }

            .header-content h1 {
                font-size: 2rem;
            }

            .header-content p {
                font-size: 1rem;
            }

            .publications-grid {
                gap: 16px;
            }

            .publication-content {
                padding: 20px;
            }
        }


        /* Pagination Styles */
        .pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        .pagination-btn {
            padding: 10px 14px;
            min-width: 44px;
            height: 44px;
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            color: var(--text);
            font-weight: 600;
            font-size: 0.9rem;
            cursor: pointer;
            transition: all 0.3s ease, transform 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            font-family: inherit;
            position: relative;
            overflow: hidden;
            box-shadow: var(--glass-shadow);
        }
        
        .pagination-btn::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(rgba(255,255,255,0.1), transparent);
            transform: rotate(30deg);
            transition: all 0.5s;
            opacity: 0;
        }

        .pagination-btn:hover:not(.disabled):not(.active) {
            background: var(--primary-light);
            color: white;
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        }
        
        .pagination-btn:hover:not(.disabled):not(.active)::before {
            opacity: 1;
            transform: rotate(30deg) translate(50%, 50%);
        }

        .pagination-btn.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .pagination-btn.disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: var(--glass-bg);
        }

        .pagination-info {
            color: var(--text-muted);
            font-size: 0.9rem;
            margin: 0 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .pagination-ellipsis {
            color: var(--text-muted);
            font-size: 0.9rem;
            margin: 0 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 40px;
            height: 40px;
        }

        @media (max-width: 768px) {
            .pagination {
                gap: 4px;
                margin: 20px 0;
            }

            .pagination-btn {
                padding: 6px 10px;
                min-width: 36px;
                height: 36px;
                font-size: 0.85rem;
            }

            .pagination-info {
                font-size: 0.8rem;
                margin: 0 8px;
            }
        }

        /* Stats Bar - Following About/Home design */
        .stats-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--glass-bg);
            backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            padding: 24px 32px;
            margin-bottom: 32px;
            position: relative;
            overflow: hidden;
            box-shadow: var(--glass-shadow);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .stats-bar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
            z-index: -1;
        }

        .stats-bar:hover {
            transform: translateY(-4px);
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        }

        .stats-item {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1rem;
            color: var(--text-light);
        }

        .stats-number {
            font-weight: 800;
            font-size: 1.2rem;
            background: linear-gradient(90deg, var(--primary), var(--accent));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

/* Full-width Publication Card Styles */
.publication-card-full {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--glass-shadow);
    width: 100%;
    box-sizing: border-box;
}

.publication-card-full:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.publication-header {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.publication-thumbnail-small {
    flex-shrink: 0;
    width: 120px;
    height: 160px;
    border-radius: 12px;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.publication-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.publication-thumbnail-small i {
    font-size: 3rem;
    color: var(--primary);
}

.publication-header-content {
    flex: 1;
}

.publication-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: center;
}

.meta-left {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.domain-tag {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.domain-tag i {
    font-size: 0.8rem;
}

.related-tag {
    padding: 6px 12px;
    background: var(--success);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.related-tag i {
    font-size: 0.8rem;
}

.publication-date-small {
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.publication-date-small i {
    font-size: 0.8rem;
}

.publication-title-large {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.publication-authors-large {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.publication-body {
    margin-bottom: 24px;
}

.publication-abstract-full {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 16px;
}

.publication-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px;
}

.publication-keywords i {
    color: var(--primary);
    margin-right: 4px;
}

.keyword-tag {
    padding: 4px 12px;
    background: var(--primary-light);
    color: white;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

.publication-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
}

.publication-stats {
    display: flex;
    gap: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars-inline {
    display: flex;
    gap: 2px;
}

.stars-inline i {
    color: var(--warning);
    font-size: 1rem;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-light);
}

.publication-actions-row {
    display: flex;
    gap: 12px;
}

.publication-link-btn {
    padding: 8px 18px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
    background: var(--primary);
    color: var(--bg-light);
    text-decoration: none;
}

.publication-link-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(rgba(255,255,255,0.2), transparent);
    transform: rotate(30deg);
    transition: all 0.5s;
    opacity: 0;
}

.publication-link-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.publication-link-btn:hover::before {
    opacity: 1;
    transform: rotate(30deg) translate(50%, 50%);
}

.publication-link-btn i {
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .publication-card-full {
        padding: 20px;
    }
    
    .publication-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .publication-thumbnail-small {
        width: 100%;
        height: 200px;
    }
    
    .publication-title-large {
        font-size: 1.4rem;
    }
    
    .publication-footer {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
}

/* Comments Section Styles */
.publication-comments {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--glass-border);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
    }
}

.comments-header h4 {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-section {
    margin-bottom: 20px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.rating-prompt {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rating-prompt span {
    font-weight: 600;
    color: var(--text);
}

.rating-stars {
    display: flex;
    gap: 8px;
}

.rating-stars i {
    font-size: 1.5rem;
    color: var(--warning);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.rating-stars i:hover {
    transform: scale(1.2);
}

.login-prompt {
    margin: 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-prompt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.add-comment-section {
    margin-bottom: 20px;
}

.comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 12px;
    transition: border-color 0.3s ease;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-actions {
    display: flex;
    justify-content: flex-end;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.comments-list {
    margin-top: 20px;
}

.comments-loading, .comments-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.comments-loading i, .comments-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-text {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

/* Compact Inline Rating & Comment Section */
.publication-interaction-compact {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.compact-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.rating-stars-compact {
    display: flex;
    gap: 4px;
}

.rating-stars-compact i {
    font-size: 1rem;
    color: var(--warning);
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
}

.rating-stars-compact i:hover {
    transform: scale(1.15);
    color: var(--warning-dark, #f59e0b);
}

.compact-comment {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-input-compact {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-input-compact:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.comment-input-compact::placeholder {
    color: var(--text-muted);
}

.btn-compact {
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.btn-compact:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-compact i {
    font-size: 0.9rem;
}

.compact-login-prompt {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.compact-login-prompt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.compact-login-prompt a:hover {
    text-decoration: underline;
}

.compact-login-prompt i {
    font-size: 0.9rem;
}

/* Responsive adjustments for compact section */
@media (max-width: 768px) {
    .publication-interaction-compact {
        padding: 10px 12px;
    }
    
    .compact-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .rating-stars-compact i {
        font-size: 0.95rem;
    }
    
    .comment-input-compact {
        font-size: 0.85rem;
        padding: 6px 10px;
    }
}

/* Show More/Less Button for Abstract */
.publication-abstract-wrapper {
    position: relative;
}

.publication-abstract-full.collapsed {
    max-height: 120px;
    overflow: hidden;
    position: relative;
    transition: max-height 0.3s ease;
}

.publication-abstract-full.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, var(--bg-light));
    pointer-events: none;
}

.publication-abstract-full {
    max-height: none;
    transition: max-height 0.3s ease;
}

.show-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.show-more-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

/* Comments Display Section - Compact */
.comments-display-section {
    margin-top: 16px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
}

.comments-header-compact {
    margin-bottom: 12px;
}

.comments-header-compact h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comments-header-compact i {
    font-size: 0.85rem;
    color: var(--primary);
}

.comments-list-compact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comments-loading-compact,
.comments-empty-compact {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.comments-loading-compact i {
    margin-right: 6px;
}

.comment-item-compact {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.comment-item-compact:hover {
    background: var(--glass-bg);
}

.comment-avatar-compact {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.comment-content-compact {
    flex: 1;
    min-width: 0;
}

.comment-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.comment-author-compact {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comment-date-compact {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.comment-text-compact {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
    word-wrap: break-word;
}

.show-more-comments-btn {
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.show-more-comments-btn:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

.show-more-comments-btn i {
    font-size: 0.7rem;
}

/* Responsive */
@media (max-width: 768px) {
    .comments-display-section {
        padding: 10px 12px;
    }
    
    .comment-item-compact {
        padding: 8px;
    }
    
    .comment-avatar-compact {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .comment-author-compact {
        font-size: 0.8rem;
    }
    
    .comment-text-compact {
        font-size: 0.8rem;
    }
}
