/**
 * SNU Research Portal - Profile Page Styles
 * ==========================================
 * Styles for researcher profile pages with tab navigation.
 * 
 * Faculty profiles: 8 tabs (Overview, Publications, Projects, IPR, Awards, Memberships, Courses, Misc)
 * Scholar profiles: 3 tabs (Overview, Publications, Awards)
 */

/* ===== PROFILE HEADER ===== */
.profile {
    padding: var(--spacing-2xl) 0;
}

.profile__header {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.profile__photo-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.profile__photo {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    border: 3px solid var(--primary-blue-light);
    box-shadow: var(--shadow-md);
}

.profile__photo-placeholder {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-4xl);
    color: white;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

/* Sidebar Info Box */
.profile__sidebar {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
}

.profile__orcid {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.profile__orcid span {
    font-weight: 600;
    color: var(--text-dark);
}

.profile__research-areas h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.profile__keywords {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.profile__keyword {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--primary-blue-light);
    color: var(--primary-blue-dark);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* External Links in Sidebar */
.profile__sidebar-links {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.profile__sidebar-links h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.profile__sidebar-link {
    display: block;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xs);
    color: var(--primary-blue);
}

/* Profile Info */
.profile__info {
    display: flex;
    flex-direction: column;
}

.profile__name {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.profile__title {
    font-size: var(--font-size-lg);
    color: var(--text-medium);
    margin-bottom: var(--spacing-xs);
}

.profile__school {
    font-size: var(--font-size-base);
    color: var(--primary-blue);
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.profile__email {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    margin-bottom: var(--spacing-lg);
}

.profile__email a {
    color: var(--primary-blue);
}

.profile__summary {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.know-more {
    color: var(--primary-blue);
    font-weight: 500;
}

.profile__description {
    font-size: var(--font-size-base);
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

/* External Profile Links */
.profile__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: auto;
}

.profile__link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-blue);
    transition: all 0.2s ease;
}

.profile__link:hover {
    background-color: var(--primary-blue);
    color: var(--text-white);
    border-color: var(--primary-blue);
    text-decoration: none;
}

/* Lab Photo Section */
.profile__lab-photo {
    margin-bottom: var(--spacing-2xl);
}

.profile__lab-photo img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
}

.profile__lab-photo-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--border-light) 100%);
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    color: var(--text-light);
    border: 2px dashed var(--border-medium);
}

/* ===== TAB NAVIGATION - PROMINENT AT TOP ===== */
.tabs {
    margin-top: var(--spacing-xl);
}

.tabs__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background-color: var(--primary-blue);
    padding: 3px;
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-lg);
}

.tabs__btn {
    flex: 1;
    min-width: 100px;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: transparent;
    border: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-radius: var(--border-radius);
}

.tabs__btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.tabs__btn--active {
    background-color: var(--accent-orange);
    color: var(--text-white);
}

/* Tab Content */
.tabs__content {
    display: none;
    padding: var(--spacing-lg);
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
}

.tabs__content--active {
    display: block;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    margin-bottom: var(--spacing-2xl);
}

.content-section:last-child {
    margin-bottom: 0;
}

.content-section__title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-blue);
}

/* ===== PUBLICATIONS TABLE ===== */
.publications-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.publications-table th {
    background-color: var(--bg-gray);
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-light);
}

.publications-table td {
    padding: var(--spacing-md);
    vertical-align: top;
    border-bottom: 1px solid var(--border-light);
}

.publications-table tr:hover {
    background-color: var(--bg-light);
}

/* Publication Type Badge */
.pub-type {
    display: inline-block;
    font-size: var(--font-size-xs);
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.pub-type--open-access {
    color: #28a745;
    font-weight: 500;
}

/* Publication Title */
.pub-title {
    font-weight: 500;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

/* Publication Actions */
.pub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.pub-action {
    font-size: var(--font-size-xs);
    color: var(--primary-blue);
    cursor: pointer;
    transition: color 0.2s ease;
}

.pub-action:hover {
    color: var(--primary-blue-dark);
}

.pub-action--abstract {
    color: var(--accent-orange);
}

/* Publication Abstract */
.pub-abstract {
    display: none;
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: var(--bg-light);
    border-left: 3px solid var(--primary-blue);
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    line-height: 1.6;
}

.pub-abstract--visible {
    display: block;
}

/* Publication Authors */
.pub-authors {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
}

.pub-authors a {
    color: var(--primary-blue);
}

/* Publication Source */
.pub-source {
    color: var(--primary-blue);
    font-style: italic;
}

/* Publication Year & Citations */
.pub-year,
.pub-citations {
    text-align: center;
    font-weight: 500;
}

/* ===== ITEM LIST ===== */
.item-list {
    list-style: none;
}

.item-list li {
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--border-light);
}

.item-list li:last-child {
    border-bottom: none;
}

.item-list__title {
    display: block;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.item-list__meta {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-light);
}

/* ===== ITEM CARDS ===== */
.item-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.item-card:last-child {
    margin-bottom: 0;
}

.item-card__title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.item-card__meta {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    margin-bottom: var(--spacing-sm);
}

.item-card__description {
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    line-height: 1.6;
}

/* ===== COURSES TABLE ===== */
.courses-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

.courses-table th,
.courses-table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.courses-table th {
    background-color: var(--bg-gray);
    font-weight: 600;
    color: var(--text-dark);
}

.courses-table tr:hover {
    background-color: var(--bg-light);
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-sm);
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--text-white);
    font-size: var(--font-size-xs);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--border-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: var(--font-size-sm);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: var(--spacing-3xl);
    color: var(--text-light);
}

.empty-state__icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state__text {
    font-size: var(--font-size-base);
}

/* ===== SDG SECTION ===== */
.sdg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--spacing-md);
}

.sdg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--bg-light);
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.sdg-item__icon {
    width: 60px;
    height: 60px;
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: var(--font-size-xl);
}

.sdg-item__title {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .profile__header {
        grid-template-columns: 200px 1fr;
        gap: var(--spacing-lg);
    }
    
    .tabs__btn {
        min-width: 80px;
        padding: var(--spacing-sm);
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 768px) {
    .profile__header {
        grid-template-columns: 1fr;
    }
    
    .profile__photo-section {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }
    
    .profile__photo,
    .profile__photo-placeholder {
        max-width: 150px;
    }
    
    .profile__sidebar {
        flex: 1;
        min-width: 200px;
    }
    
    .tabs__nav {
        flex-direction: column;
    }
    
    .tabs__btn {
        border-radius: 0;
    }
    
    .tabs__btn:first-child {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .tabs__btn:last-child {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .publications-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .profile__photo-section {
        flex-direction: column;
    }
    
    .profile__photo,
    .profile__photo-placeholder {
        max-width: 100%;
    }
    
    .profile__sidebar {
        width: 100%;
    }
    
    .profile__links {
        flex-direction: column;
    }
    
    .profile__link {
        justify-content: center;
    }
}
