/* Shared Styles for Collections (Publications, Learning, Teaching) */

/* Tag badges */
.tag-badge {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 4px 2px 0;
    font-size: 0.75em;
    font-weight: 500;
    color: #fff;
    background-color: #4a4a4a;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.tag-badge:hover {
    background-color: #2a2a2a;
    text-decoration: none;
    color: #fff;
}

.tag-badge.active {
    background-color: #0366d6;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
}

.status-badge.under-review {
    background-color: #ffeaa7;
    color: #6c5b00;
}

.status-badge.accepted {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.award,
.award-badge {
    display: inline-block;
    padding: 2px 8px;
    margin-left: 8px;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    background-color: #fff3cd;
    color: #856404;
}

/* Filter section */
.filter-section {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f6f8fa;
    border-radius: 8px;
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #586069;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 72px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-tags.expanded {
    max-height: none;
}

.filter-toggle {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 0;
    font-size: 0.8em;
    color: #0366d6;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
}

.filter-toggle:hover {
    color: #0256b9;
}

.filter-toggle.hidden {
    display: none;
}

.filter-tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.8em;
    color: #24292e;
    background-color: #e1e4e8;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background-color: #d1d5da;
}

.filter-tag.active {
    background-color: #0366d6;
    color: #fff;
}

.filter-tag .tag-count {
    margin-left: 4px;
    opacity: 0.7;
}

.clear-filter {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.8em;
    color: #cb2431;
    background-color: transparent;
    border: 1px solid #cb2431;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-filter:hover {
    background-color: #cb2431;
    color: #fff;
}

.clear-filter.hidden {
    display: none;
}

/* Results count */
.results-count {
    margin-bottom: 16px;
    font-size: 0.9em;
    color: #586069;
}

/* Card list */
.card-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Card base styles */
.card {
    padding: 16px 0;
    border-bottom: 1px solid #e1e4e8;
}

.card:last-child {
    border-bottom: none;
}

.card.hidden {
    display: none;
}

.card-title {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.card-title a {
    color: #0366d6;
    text-decoration: none;
}

.card-title a:hover {
    text-decoration: underline;
}

.card-meta {
    margin: 0 0 4px 0;
    font-size: 0.9em;
    color: #586069;
}

.card-venue {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #6a737d;
}

.card-summary {
    margin: 8px 0;
    font-size: 0.9em;
    color: #444;
    line-height: 1.5;
}

.card-tags {
    margin-top: 8px;
}

.card-links {
    margin-top: 8px;
}

.card-link {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 6px;
    font-size: 0.75em;
    color: #0366d6;
    background-color: #f1f8ff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.card-link:hover {
    background-color: #dbedff;
    text-decoration: none;
}

/* Individual page styles */
.page-title {
    margin-bottom: 16px;
    font-size: 1.5em;
    line-height: 1.3;
}

.page-meta {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e4e8;
}

.page-tags {
    margin: 16px 0;
}

.page-links {
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid #e1e4e8;
    border-bottom: 1px solid #e1e4e8;
}

.page-summary {
    margin: 24px 0;
    padding: 16px;
    background-color: #f6f8fa;
    border-radius: 8px;
}

.page-summary h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1em;
    color: #24292e;
}

.page-summary p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
}

.page-content {
    margin-top: 24px;
}

/* ==========================================================================
   Shared section-specific selectors (deduplicated from individual CSS files)
   These target the prefixed class names used in HTML templates.
   ========================================================================== */

/* Index containers */
.publications-index,
.teaching-index,
.learning-index,
.blog-index {
    max-width: 100%;
}

/* Filter sections */
.publications-filter,
.teaching-filter,
.learning-filter,
.blog-filter {
    margin-bottom: 24px;
    padding: 16px;
    background-color: #f6f8fa;
    border-radius: 8px;
}

.publications-filter h3,
.teaching-filter h3,
.learning-filter h3,
.blog-filter h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #586069;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* List containers */
.publication-list,
.teaching-list,
.learning-list,
.blog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Cards */
.publication-card,
.teaching-card,
.learning-card,
.blog-card {
    padding: 16px 0;
    border-bottom: 1px solid #e1e4e8;
}

.publication-card:last-child,
.teaching-card:last-child,
.learning-card:last-child,
.blog-card:last-child {
    border-bottom: none;
}

.publication-card.hidden,
.teaching-card.hidden,
.learning-card.hidden,
.blog-card.hidden {
    display: none;
}

/* Card titles */
.pub-card-title,
.teaching-card-title,
.learning-card-title,
.blog-card-title {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    line-height: 1.3;
}

.pub-card-title a,
.teaching-card-title a,
.learning-card-title a,
.blog-card-title a {
    color: #0366d6;
    text-decoration: none;
}

.pub-card-title a:hover,
.teaching-card-title a:hover,
.learning-card-title a:hover,
.blog-card-title a:hover {
    text-decoration: underline;
}

/* Card meta */
.pub-card-authors,
.teaching-card-meta,
.blog-card-meta {
    margin: 0 0 4px 0;
    font-size: 0.9em;
    color: #586069;
}

.learning-card-meta {
    margin: 0 0 4px 0;
    font-size: 0.85em;
    color: #6a737d;
}

/* Card venue */
.pub-card-venue,
.teaching-card-venue {
    margin: 0 0 8px 0;
    font-size: 0.85em;
    color: #6a737d;
}

/* Card summary */
.pub-card-summary,
.teaching-card-summary,
.learning-card-summary,
.blog-card-summary {
    margin: 8px 0;
    font-size: 0.9em;
    color: #444;
    line-height: 1.5;
}

/* Card tags */
.pub-card-tags,
.teaching-card-tags,
.learning-card-tags,
.blog-card-tags {
    margin-top: 8px;
}

/* Card links */
.pub-card-links,
.teaching-card-links,
.learning-card-links,
.blog-card-links {
    margin-top: 8px;
}

/* Link buttons */
.pub-link,
.teaching-link,
.learning-link,
.blog-link {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 6px;
    font-size: 0.75em;
    color: #0366d6;
    background-color: #f1f8ff;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.pub-link:hover,
.teaching-link:hover,
.learning-link:hover,
.blog-link:hover {
    background-color: #dbedff;
    text-decoration: none;
}

/* Individual page containers */
.publication-page,
.teaching-page,
.learning-page,
.blog-page {
    max-width: 100%;
}

/* Page titles */
.publication-page .pub-title,
.teaching-page .teaching-title,
.learning-page .learning-title,
.blog-page .blog-title {
    margin-bottom: 16px;
    font-size: 1.5em;
    line-height: 1.3;
}

/* Page meta */
.publication-page .pub-meta,
.teaching-page .teaching-meta,
.learning-page .learning-meta,
.blog-page .blog-meta {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e4e8;
}

/* Page tags */
.publication-page .pub-tags,
.teaching-page .teaching-tags,
.learning-page .learning-tags,
.blog-page .blog-tags {
    margin: 16px 0;
}

/* Page links */
.publication-page .pub-links,
.teaching-page .teaching-links {
    margin: 16px 0;
    padding: 12px 0;
    border-top: 1px solid #e1e4e8;
    border-bottom: 1px solid #e1e4e8;
}

/* Page summary / abstract */
.publication-page .pub-abstract,
.publication-page .pub-summary,
.teaching-page .teaching-summary,
.learning-page .learning-summary,
.blog-page .blog-summary {
    margin: 24px 0;
    padding: 16px;
    background-color: #f6f8fa;
    border-radius: 8px;
}

.publication-page .pub-abstract h3,
.publication-page .pub-summary h3,
.teaching-page .teaching-summary h3,
.learning-page .learning-summary h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1em;
    color: #24292e;
}

.publication-page .pub-abstract p,
.publication-page .pub-summary p,
.teaching-page .teaching-summary p,
.learning-page .learning-summary p,
.blog-page .blog-summary p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.6;
    color: #444;
}

/* Page content */
.publication-page .pub-content,
.teaching-page .teaching-content,
.learning-page .learning-content,
.blog-page .blog-content {
    margin-top: 24px;
}

/* Quotation styling */
#quotation {
    font-style: italic;
    font-size: 0.95em;
    color: #666;
    border-left: 2px solid #ccc;
    padding-left: 10px;
    margin-top: 20px;
}
