/* ORCID Research Team Pages - Compact Card Grid */

:root {
    --orcid-green: #a6ce39;
    --orcid-dark: #333;
    --card-bg: #fff;
    --border: #e0e0e0;
    --text-muted: #666;
    --text-light: #999;
    --link: #1976d2;
    --expand-bg: #f5f5f5;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--orcid-dark);
    background: #f8f9fa;
    padding: 20px;
}

/* Header */
.page-header {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--orcid-green);
}

.page-header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 5px;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

.page-header .meta {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-light);
}

.page-header .meta a {
    color: var(--link);
    text-decoration: none;
}

/* Card Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Member Card */
.member-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.card-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.orcid-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.card-header-content {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.member-name a {
    color: var(--orcid-dark);
    text-decoration: none;
}

.member-name a:hover {
    color: var(--orcid-green);
}

.member-role {
    font-size: 12px;
    color: var(--orcid-green);
    font-weight: 500;
}

.member-affiliation {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stats Bar */
.card-stats {
    padding: 8px 15px;
    background: var(--expand-bg);
    display: flex;
    gap: 15px;
    font-size: 11px;
    color: var(--text-muted);
}

.stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-value {
    font-weight: 600;
    color: var(--orcid-dark);
}

/* Expandable Sections */
.card-sections {
    display: none;
}

.card-sections.expanded {
    display: block;
}

.section {
    border-top: 1px solid var(--border);
}

.section-header {
    padding: 8px 15px;
    background: var(--expand-bg);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header:hover {
    background: #eee;
}

.section-content {
    padding: 10px 15px;
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.section-content.collapsed {
    display: none;
}

/* Work Item */
.work-item {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.work-title {
    font-weight: 500;
    color: var(--orcid-dark);
    margin-bottom: 2px;
}

.work-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.work-meta a {
    color: var(--link);
    text-decoration: none;
}

.work-type {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    margin-right: 5px;
}

/* Affiliation Item */
.affiliation-item {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.affiliation-org {
    font-weight: 500;
}

.affiliation-role {
    color: var(--text-muted);
    font-size: 11px;
}

.affiliation-period {
    color: var(--text-light);
    font-size: 10px;
}

/* Expand Button */
.expand-btn {
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    border-top: 1px solid var(--border);
    cursor: pointer;
    font-size: 11px;
    color: var(--link);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.expand-btn:hover {
    background: var(--expand-bg);
}

.expand-btn .arrow {
    transition: transform 0.2s;
}

.expand-btn.expanded .arrow {
    transform: rotate(180deg);
}

/* Landing Page */
.projects-list {
    max-width: 800px;
    margin: 0 auto;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card:hover {
    border-color: var(--orcid-green);
}

.project-name {
    font-size: 16px;
    font-weight: 600;
}

.project-name a {
    color: var(--orcid-dark);
    text-decoration: none;
}

.project-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.project-stats {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
.page-footer {
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--text-light);
    text-align: center;
}

.page-footer a {
    color: var(--orcid-green);
}

/* Responsive */
@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    body {
        padding: 10px;
    }
}
