
/* Last Week in Health AI - Premium Design */

:root {
    /* Clinical Green Color Palette */
    --primary: #0d9488;      /* Clinical Teal-600 */
    --primary-light: #14b8a6;  /* Teal-500 */
    --primary-dark: #0f766e;   /* Teal-700 */
    --secondary: #10b981;     /* Emerald-500 */
    --accent: #059669;        /* Emerald-600 */
    --danger: #ef4444;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --bg: #ffffff;
    --surface: #f0fdfa;  /* Teal-50 - very light green */
    --text: var(--gray-900);
    --text-muted: var(--gray-600);
    --border: #99f6e4;  /* Teal-200 - light green border */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Spacing */
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    font-size: 16px;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Header */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    box-shadow: var(--shadow-lg);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 4rem;
    line-height: 1;
}

.site-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.tagline {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Filters Bar */
.filters-bar {
    background: var(--bg);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-container {
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Papers Grid */
.papers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.paper-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paper-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.source-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.source-pubmed { background: #10b981; color: white; }
.source-arxiv { background: #059669; color: white; }
.source-biorxiv { background: #f59e0b; color: white; }
.source-medrxiv { background: #ef4444; color: white; }

.paper-title {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 0.5rem 0;
}

.paper-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.paper-title a:hover {
    color: var(--primary);
}

.paper-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.relevance-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.type-badge {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.paper-authors {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.paper-summary {
    color: var(--text);
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
}

.domains-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.domain-tag {
    background: var(--primary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Community Impact Badges */
.community-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.community-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    transition: transform 0.2s, box-shadow 0.2s;
}

.community-badge:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge-high-impact {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    animation: pulse-glow 2s ease-in-out infinite;
}

.badge-rising {
    background: linear-gradient(135deg, #4ECDC4, #44A08D);
}

.badge-viral {
    background: linear-gradient(135deg, #F093FB, #F5576C);
}

.badge-code {
    background: linear-gradient(135deg, #14b8a6, #0f766e);
}

.badge-citations {
    background: linear-gradient(135deg, #0d9488, #0f766e);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 107, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    }
}

/* Expandable Paper Content */
.paper-expanded-content {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 5000px;
        transform: translateY(0);
    }
}

.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.expanded-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.expanded-section:last-child {
    border-bottom: none;
}

.expanded-section.highlight {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05), rgba(5, 150, 105, 0.05));
    padding: 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    border-bottom: none;
}

.expanded-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expanded-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.expanded-section p {
    line-height: 1.8;
    color: var(--text);
    font-size: 0.95rem;
}

.expanded-key-points {
    list-style: none;
    padding: 0;
    margin: 0;
}

.expanded-key-points li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--gray-100);
    line-height: 1.7;
}

.expanded-key-points li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.25rem;
}

.expanded-key-points li:last-child {
    border-bottom: none;
}

.expanded-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .expanded-two-column {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.expanded-tags-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .expanded-tags-grid {
        grid-template-columns: 1fr;
    }
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.domain-tag.clickable {
    cursor: pointer;
    transition: all 0.2s;
}

.domain-tag.clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--primary-dark);
}

.keyword-tag {
    background: var(--secondary);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Share Section */
.share-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.share-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-twitter:hover {
    border-color: #1DA1F2;
    color: #1DA1F2;
    background: rgba(29, 161, 242, 0.1);
}

.share-linkedin:hover {
    border-color: #0077B5;
    color: #0077B5;
    background: rgba(0, 119, 181, 0.1);
}

.share-copy:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(13, 148, 136, 0.1);
}

.share-btn .icon {
    font-size: 1.1rem;
}

/* Expand Button Enhancements */
.expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

.expand-icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

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

.expand-btn.expanded .expand-text::after {
    content: " Summary";
}

.expand-btn.expanded .expand-text::before {
    content: "Hide Full";
}

.expand-btn:not(.expanded) .expand-text::after {
    content: " Summary";
}

.expand-btn:not(.expanded) .expand-text::before {
    content: "Read Full";
}

.expand-text {
    font-weight: 600;
}

/* Cite Button */
.cite-btn {
    position: relative;
}

/* Citation Modal */
.citation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.citation-modal.active {
    display: flex;
}

.citation-content {
    background: white;
    border-radius: var(--radius-lg);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.citation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border);
}

.citation-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.citation-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.5rem;
    transition: color 0.2s;
}

.citation-close:hover {
    color: var(--text);
}

.citation-body {
    padding: 2rem;
}

.citation-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.citation-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
}

.citation-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.citation-tab:hover {
    color: var(--primary);
}

.citation-format {
    display: none;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.citation-format.active {
    display: block;
}

.citation-format pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text);
}

.citation-copy-btn {
    margin-top: 1rem;
    width: 100%;
}

.paper-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Paper Detail Page */
.paper-header {
    background: var(--bg);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.paper-detail {
    max-width: 1000px;
    padding: 2rem 0;
}

.paper-detail h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.metadata-item {
    font-size: 0.9rem;
}

.metadata-item a {
    color: var(--primary);
    text-decoration: none;
}

.metadata-item a:hover {
    text-decoration: underline;
}

.section {
    margin-bottom: 2.5rem;
}

.section h2 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 1rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.section h3 {
    font-size: 1.25rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text);
    font-weight: 600;
}

.section p {
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 1rem;
}

.section ul {
    padding-left: 1.5rem;
    line-height: 1.8;
}

.highlight-section {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05), rgba(5, 150, 105, 0.05));
    padding: 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.summary-text {
    font-size: 1.1rem;
    line-height: 1.8;
    font-weight: 400;
}

.key-points-list {
    list-style: none;
    padding: 0;
}

.key-points-list li {
    padding: 0.875rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.key-points-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.25rem;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-secondary {
    background: var(--secondary);
}

.abstract-box {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--gray-300);
    line-height: 1.8;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3, .footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-meta {
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.disclaimer {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.5rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.no-results p {
    color: var(--text-muted);
}

/* Analytics Dashboard */
.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.paper-of-week {
    margin-bottom: 3rem;
}

.featured-paper {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.05), rgba(5, 150, 105, 0.05));
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.featured-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

.featured-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.featured-title a:hover {
    color: var(--primary);
}

.featured-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.featured-summary {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text);
}

.featured-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.analytics-section {
    margin: 3rem 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.chart-card canvas {
    max-height: 300px;
}

.trending-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
}

.trending-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: transform 0.2s;
}

.trending-tag:hover {
    transform: translateY(-2px);
}

.trending-domain {
    background: var(--primary);
    color: white;
}

.trending-method {
    background: var(--accent);
    color: white;
}

.trend-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Calendar/Heatmap View */
.calendar-section {
    margin: 2rem 0;
}

.view-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.view-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid transparent;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.view-btn:hover {
    background: var(--bg);
    color: var(--primary);
}

.view-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-container {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.calendar-week-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.calendar-week-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.week-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.week-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-year {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.week-count {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.week-label-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-activity-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-200);
    overflow: hidden;
}

.activity-fill {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
    transition: height 0.3s ease;
}

/* Community Discussion Section */
.community-discussion {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
}

.discussion-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.discussion-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.discussion-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.discussion-link:hover {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: translateY(-1px);
}

.discussion-link .icon {
    font-size: 1rem;
}

.discussion-count {
    background: var(--gray-200);
    color: var(--text);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.discussion-link:hover .discussion-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .site-title {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-number {
        font-size: 2rem;
    }

    .papers-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .two-column {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .paper-detail h1 {
        font-size: 1.5rem;
    }

    .logo-section {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .site-title {
        font-size: 1.5rem;
    }

    .paper-title {
        font-size: 1.1rem;
    }
}
