/* =========================================
   Modern Portfolio Archive Styles (2025)
   ========================================= */

/* --- Preamble Section --- */
.portfolio-preamble {
    text-align: center;
    max-width: 800px;
    margin: 40px auto 60px;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.preamble-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    /* Increased from 2.5rem */
    font-weight: 800;
    color: #2d3748;
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #2d3748 0%, #5472D2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.preamble-text {
    font-size: 1.15rem;
    /* Increased from 1.1rem */
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 32px;
    font-weight: 400;
}

.preamble-cta {
    display: inline-block;
    padding: 14px 36px;
    background-color: #5472D2;
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(84, 114, 210, 0.3);
    font-size: 1.125rem;
    /* Increased from 1rem */
    letter-spacing: 0.02em;
}

.preamble-cta:hover,
.preamble-cta:focus {
    background-color: #435eb3;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(84, 114, 210, 0.4);
    color: #fff;
    text-decoration: none;
}

.preamble-cta:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(84, 114, 210, 0.3);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .preamble-title {
        font-size: 2.25rem;
        /* Increased from 2rem */
    }

    .portfolio-preamble {
        margin-bottom: 40px;
        margin-top: 20px;
    }
}

/* --- Grid Layout --- */
.portfolio-grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: stretch;
    margin-top: 30px;
}

/* --- Sidebar & Filters --- */
.portfolio-sidebar {
    position: relative;
}

.portfolio-filters-sticky {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.filters-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5rem;
    /* Increased from 1.25rem */
    font-weight: 700;
    color: #2d3748;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 12px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 1rem;
    /* Increased from 0.9rem */
}

/* Active Filters Groups in Sidebar */
.active-filters-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    min-height: 0;
}

.active-filters-group .filter-chip {
    padding: 4px 10px;
    font-size: 1rem;
    /* Increased from 0.8rem */
    background: #ebf8ff;
    border: 1px solid #bee3f8;
}

/* Input & Select Styling */
.portfolio-input,
.portfolio-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    /* Increased from 0.95rem */
    color: #2d3748;
    background-color: #f7fafc;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.portfolio-input:focus,
.portfolio-select:focus {
    border-color: #5472D2;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(84, 114, 210, 0.15);
    outline: none;
}

.search-wrapper,
.select-wrapper {
    position: relative;
}

.search-icon,
.select-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    pointer-events: none;
    font-size: 1rem;
    /* Increased from 0.9rem */
}

/* Reset Button */
.btn-reset-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #edf2f7;
    color: #4a5568;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
    pointer-events: none;
    font-size: 1rem;
    /* Explicitly set to 1rem */
}

.btn-reset-filters.is-visible {
    opacity: 1;
    pointer-events: auto;
    background-color: #feb2b2;
    color: #c53030;
}

.btn-reset-filters.is-visible:hover {
    background-color: #fc8181;
    color: #fff;
}

/* --- Active Filters Chips (Global - kept for compatibility if needed, but sidebar uses scoped) --- */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    min-height: 0;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    background: #ebf8ff;
    color: #2c5282;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 1rem;
    /* Increased from 0.9rem */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #bee3f8;
}

.filter-chip:hover {
    background: #bee3f8;
    transform: translateY(-1px);
}

.chip-remove {
    margin-left: 8px;
    font-size: 1rem;
    /* Increased from 0.8rem */
    opacity: 0.7;
}

.filter-chip:hover .chip-remove {
    opacity: 1;
}

/* --- Portfolio Card --- */
.portfolio-card {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #edf2f7;
    align-items: flex-start;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.portfolio-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: #e2e8f0;
}

.portfolio-card__inner {
    display: flex;
    width: 100%;
    align-items: flex-start;
    gap: 30px;
}

/* Image Column */
.portfolio-card__image {
    flex: 0 0 200px;
    width: 200px;
}

.portfolio-image-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.portfolio-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-thumbnail {
    transform: scale(1.05);
}

/* Content Column */
.portfolio-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Header & Title */
.portfolio-card__header {
    margin-bottom: 12px;
}

.portfolio-card__title {
    font-size: 1.75rem;
    /* Increased from 1.5rem */
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
    font-family: 'Montserrat', sans-serif;
    /* Modern heading font */
    color: #2d3748;
}

.portfolio-card__title a {
    color: inherit;
    text-decoration: none;
    background-image: linear-gradient(120deg, #e2e8f0 0%, #e2e8f0 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.2em;
    background-position: 0 100%;
    transition: background-size 0.25s ease-in;
}

.portfolio-card__title a:hover {
    background-size: 100% 88%;
    color: #2d3748;
}

/* Meta Data */
.portfolio-card__meta {
    font-size: 1.05rem;
    /* Increased from 0.95rem */
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 24px;
}

.meta-item {
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.meta-label {
    font-weight: 700;
    color: #718096;
    margin-right: 6px;
    font-size: 1rem;
    /* Increased from 0.9em */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    color: #2d3748;
    font-weight: 500;
}

/* Workplace Badges (New Style) */
.workplace-section {
    margin-top: 12px;
    display: block;
}

.workplace-section--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.workplace-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.workplace-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f7fafc;
    color: #5472D2;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 1rem;
    /* Increased from 0.85rem */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.workplace-badge:hover {
    background-color: #5472D2;
    color: #fff;
    border-color: #5472D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(84, 114, 210, 0.2);
}

.workplace-badge.workplace-badge--static {
    cursor: default;
    background-color: #f7fafc;
    color: #2d3748;
    border-color: #e2e8f0;
}

.workplace-badge.workplace-badge--static:hover {
    background-color: #f7fafc;
    color: #2d3748;
    border-color: #e2e8f0;
    transform: none;
    box-shadow: none;
}

.workplace-separator {
    color: #cbd5e0;
    margin: 0 6px;
    font-size: 1rem;
    /* Increased from 0.8rem */
    font-weight: 300;
}


/* Action Buttons */
.portfolio-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    width: 100%;
}

.profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 1rem;
    /* Increased from 0.9rem */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.profile-link--orcid {
    background-color: #A6CE39;
    color: #fff;
}

.profile-link--scopus {
    background-color: #007398;
    color: #fff;
}

.profile-link--wos {
    background-color: #5E33BF;
    color: #fff;
}

.profile-link--scholar {
    background-color: #4285F4;
    color: #fff;
}

.profile-link--university {
    background-color: #2d3748;
    color: #fff;
}

.profile-link--external {
    background-color: #edf2f7;
    color: #4a5568;
}

.profile-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    /* color: #fff; */
}

/* .profile-link--external:hover { 
    background-color: #cbd5e0;
     color: #2d3748; 
    } */

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.empty-state__icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.no-results-message {
    text-align: center;
    padding: 40px;
    font-size: 1.15rem;
    /* Increased from 1.1rem */
    color: #718096;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .portfolio-grid-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .portfolio-sidebar {
        position: static;
        z-index: 10;
    }

    .portfolio-filters-sticky {
        position: static;
    }
}

/* --- Single Portfolio View --- */
.portfolio-single {
    margin-top: 15px;
}

.portfolio-single-view {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #edf2f7;
    margin-bottom: 30px;
}

.portfolio-single-view .portfolio-card__image {
    width: 100%;
    flex: none;
    max-width: 300px;
    margin: 0 auto 24px;
}

.portfolio-single-view .portfolio-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.portfolio-single-view .portfolio-card__title {
    font-size: 2.5rem;
    /* Increased from 2rem */
    margin-bottom: 16px;
}

.portfolio-single-view .portfolio-card__description {
    font-size: 1.15rem;
    /* Increased from 1.05rem */
    line-height: 1.8;
    color: #2d3748;
}

/* --- Publications Section --- */
.publications-section {
    margin-top: 40px;
}

.publications-section__title {
    font-size: 2rem;
    /* Increased from 1.75rem */
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.publications-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .publications-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.publication-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.publication-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e0;
}

.publication-card__counter {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 3rem;
    font-weight: 900;
    color: #f7fafc;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
    font-family: 'Montserrat', sans-serif;
}

.publication-card__content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.publication-card__title {
    font-size: 1.25rem;
    /* Increased from 1.15rem */
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 16px;
    line-height: 1.4;
    padding-right: 20px;
    /* Space for counter if needed, though counter is background */
}

.publication-card__meta {
    font-size: 1rem;
    /* Increased from 0.9rem */
    color: #4a5568;
}

.publication-meta-item {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.publication-meta-label {
    font-size: 1rem;
    /* Increased from 0.75rem */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a0aec0;
    margin-bottom: 4px;
    font-weight: 600;
}

.publication-meta-value {
    color: #2d3748;
    line-height: 1.5;
}

.publication-meta-value--authors {
    font-style: italic;
}

.publication-meta-value--source {
    font-weight: 500;
    color: #4c51bf;
}

/* --- Publication Badges --- */
.publication-indexing-wrapper {
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.publication-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.publication-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background-color: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1rem;
    /* Increased from 0.8rem */
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.2s ease;
    white-space: nowrap;
}

/* .publication-badge:hover {
    background-color: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
} */

.publication-badge--quartile {
    background-color: #ebf8ff;
    color: #2c5282;
    border-color: #bee3f8;
}

.publication-badge--scopus {
    background-color: #fffaf0;
    color: #9c4221;
    border-color: #fbd38d;
}

.publication-badge--wos {
    color: #833CA3;
    border-color: rgba(131, 60, 163, 0.35);
    background: rgba(131, 60, 163, 0.07);
}

.publication-card__actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-publication {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #ebf4ff;
    color: #4c51bf;
    font-size: 1rem;
    /* Increased from 0.875rem */
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}

.btn-publication:hover {
    background-color: #4c51bf;
    color: #ffffff;
    text-decoration: none;
}

.btn-publication svg {
    margin-right: 6px;
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .portfolio-single-view .portfolio-card__image {
        margin-bottom: 0;
    }
}