/* Research Page Styles - Cognitive Science of Yoga */

.research-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 5vw, 2rem);
}

/* Two-column layout */
.research-layout {
    display: flex;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: flex-start;
}

/* Main papers list */
.research-main {
    flex: 2;
    min-width: 0;
}

.research-main h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3a7bd5;
}

/* Paper cards */
.paper-card {
    background: white;
    padding: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #3a7bd5;
}

.paper-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.paper-card h3 {
    color: #2c3e50;
    margin-bottom: 0.4rem;
    font-size: 1.15rem;
}

.paper-card h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.paper-card h3 a:hover {
    color: #3a7bd5;
}

.paper-authors {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-style: italic;
}

.paper-venue {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.paper-abstract {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.paper-tags {
    margin-top: 0.8rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.paper-tag {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: #e8f4fd;
    color: #3a7bd5;
    font-weight: 600;
}

.download-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.download-card {
    background: white;
    border: 1px solid #e3eaef;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.download-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}

.download-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.download-card h3 a:hover {
    color: #3a7bd5;
}

.download-description {
    color: #5e6a77;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.download-link {
    display: inline-block;
    text-decoration: none;
    background: #2a6b5e;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
}

.download-link:hover {
    background: #21564c;
}

/* Sidebar */
.research-sidebar {
    flex: 1;
    position: sticky;
    top: 80px;
    max-width: 360px;
}

.sidebar-block {
    background: #f0f4f8;
    padding: clamp(1rem, 3vw, 1.5rem);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2a6b5e;
}

.sidebar-block h3 {
    color: #2a6b5e;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.sidebar-block p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
}

.sidebar-block li {
    padding: 0.5rem 0;
    color: #555;
    font-size: 0.9rem;
    border-bottom: 1px solid #ddd;
}

.sidebar-block li:last-child {
    border-bottom: none;
}

.sidebar-block li strong {
    color: #2c3e50;
}

/* Expandable methodology items */
.method-item {
    padding: 0;
    border-bottom: 1px solid #ddd;
}

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

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    cursor: pointer;
    user-select: none;
}

.method-header:hover {
    color: #2a6b5e;
}

.method-arrow {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    color: #888;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.method-item.open .method-arrow {
    transform: rotate(180deg);
}

.method-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #666;
    padding: 0 0;
}

.method-item.open .method-detail {
    max-height: 300px;
    padding: 0 0 0.8rem 0;
}

/* No papers */
.no-papers {
    text-align: center;
    padding: 3rem;
    color: #888;
    background: white;
    border-radius: 8px;
}

@media (max-width: 1024px) {
    .research-layout {
        flex-direction: column;
    }

    .research-sidebar {
        position: static;
        max-width: 100%;
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .research-content {
        padding: 2rem 1rem;
    }

    .paper-card h3 {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .paper-abstract {
        -webkit-line-clamp: 5;
        line-clamp: 5;
        font-size: 0.9rem;
    }
}

/* Night Mode */
body.night-mode .research-main h2 {
    color: #e0e0e0;
    border-color: #2a5a9d;
}

body.night-mode .paper-card {
    background: #252525;
    border-color: #2a5a9d;
}

body.night-mode .paper-card h3,
body.night-mode .paper-card h3 a {
    color: #e0e0e0;
}

body.night-mode .paper-card h3 a:hover {
    color: #6aadeb;
}

body.night-mode .paper-authors {
    color: #aaa;
}

body.night-mode .paper-venue {
    color: #888;
}

body.night-mode .paper-abstract {
    color: #b0b0b0;
}

body.night-mode .paper-tag {
    background: #1a2a3a;
    color: #6aadeb;
}

body.night-mode .download-card {
    background: #252525;
    border-color: #3a3a3a;
}

body.night-mode .download-card h3 a {
    color: #e0e0e0;
}

body.night-mode .download-card h3 a:hover {
    color: #6aadeb;
}

body.night-mode .download-description {
    color: #b0b0b0;
}

body.night-mode .download-link {
    background: #2f7d6e;
}

body.night-mode .download-link:hover {
    background: #3a927f;
}

body.night-mode .sidebar-block {
    background: #1a2a20;
    border-color: #3a7a5a;
}

body.night-mode .sidebar-block h3 {
    color: #7ec8a0;
}

body.night-mode .sidebar-block p,
body.night-mode .sidebar-block li {
    color: #b0b0b0;
    border-color: #333;
}

body.night-mode .sidebar-block li strong {
    color: #e0e0e0;
}

/* Collaboration logos */
.collab-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: flex-start;
    margin: 1rem 0;
}

.collab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 64px;
    gap: 0.3rem;
}

.collab-item img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 6px;
}

@media (max-width: 480px) {
    .collab-item {
        width: 58px;
    }

    .collab-item img {
        width: 50px;
        height: 50px;
    }
}

.collab-item span {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

a.collab-item {
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}

a.collab-item:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}

body.night-mode .collab-item span {
    color: #999;
}

body.night-mode .method-header:hover {
    color: #7ec8a0;
}

body.night-mode .method-detail {
    color: #999;
}

body.night-mode .method-arrow {
    color: #777;
}
