:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --link-color: #007BFF;
    --link-hover-color: #0056b3;
    --hover-bg-color: #f0f0f0;
    --hover-shadow-color: rgba(0, 0, 0, 0.1);
    --sidebar-bg-color: #f4f4f4;
    --publication-bg-color: #f188e10a;
    --foot-bg-color: #eeeeee;
    --foot-text-color: #909090;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --link-color: #5393ff;
        --link-hover-color: #82aaff;
        --hover-bg-color: #333333;
        --hover-shadow-color: rgba(255, 255, 255, 0.1);
        --sidebar-bg-color: #1e1e1e;
        --publication-bg-color: #2a2a2a;
        --foot-bg-color: #1e1e1e;
        --foot-text-color: #cccccc;
    }
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

header, footer {
    text-align: center;
    padding: 10px 0;
}

header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--bg-color);
}

header .logo-table {
    margin-left: 0;    /* 移除左边距使其真正靠左 */
}

header img, footer img {
    margin: 0 1px;
}

.main-content {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.sidebar {
    width: 15vw; /* Sidebar width as a percentage of viewport width */
    background-color: var(--sidebar-bg-color);
    padding: 10px;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
}

.content {
    flex: 1; /* Take remaining space */
    padding: 20px;
}

@media (max-width: 1200px) {
    .sidebar {
        width: 20vw; /* Adjust sidebar width */
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 25vw; /* Adjust sidebar width */
    }
}

@media (max-width: 768px) {
    header {
        position: relative;
    }

    .sidebar {
        width: 100%; /* Full width sidebar on small screens */
        position: relative; /* Position relative */
        top: auto;
        height: auto; /* Adjust height */
        max-height: none;
        overflow-y: visible;
        margin-bottom: 20px; /* Space between sidebar and content */
    }

    .content {
        width: 100%; /* Full width content */
        margin-left: 0; /* Remove left margin */
        padding: 0 10px; /* Add some padding */
    }
}

nav .nav-table {
    width: 100%;
    font-family: "Times New Roman", sans-serif;
    font-weight: bold;
    font-size: 18px;
}

nav .menu a {
    display: block;
    padding: 5px 0 5px 10px;
    color: var(--link-color);
    font-family: "Times New Roman", sans-serif;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
    line-height: 20px;
}

nav .menu a:hover {
    color: var(--link-hover-color);
}

.articlesubtitle {
    color: var(--text-color);
    font-family: "Times New Roman", sans-serif;
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
}

ul.articlesubtitle {
    list-style-type: disc;
    padding: 10px;
    margin-left: 20px;
}

ul.articlesubtitle li {
    margin-bottom: 10px;
}

.articletitle {
    color: #EE7700;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: bold;
}

.foot {
    color: var(--foot-text-color);
    font-family: "Times New Roman", sans-serif;
    font-size: 12px;
    background-color: var(--foot-bg-color);
    padding: 20px 0;
}

footer p {
    margin: 0;
}

.article {
    color: var(--text-color);
    font-family: "Times New Roman", sans-serif;
    font-size: 12px;
    line-height: 18px;
}

.publication-list {
    list-style: none;
    padding: 0;
}

.publication-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    background-color: var(--publication-bg-color);
    transition: background-color 0.3s, box-shadow 0.3s;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.publication-item:hover {
    background-color: var(--hover-bg-color);
    box-shadow: 0 4px 8px var(--hover-shadow-color);
}

.publication-image {
    width: 200px; /* Increased width */
    height: auto;
    margin-right: 20px;
    margin-top: 3px;
    margin-bottom: 10px;
    transition: transform 0.3s;
}


.publication-item:hover .publication-image {
    transform: scale(1.1);
}

.publication-info {
    flex: 1;
    min-width: 200px; /* Ensure a minimum width for the info section */
}

.publication-title {
    font-size: 1.2em;
    color: var(--link-color);
}

.people-title {
    font-size: 1em;
    color: var(--text-color);
}

.publication-title a {
    text-decoration: none;
}

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

.publication-details {
    font-size: 1em;
    color: var(--text-color);
    margin-top: 15px;
}

.people-image {
    width: 100px; /* Increased width */
    height: auto;
    margin-right: 20px;
    margin-top: 3px;
    margin-bottom: 10px;
    transition: transform 0.3s;
}

@media (max-width: 768px) {
    .publication-item {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center align items */
        text-align: center; /* Center align text */
    }

    .publication-image {
        width: 100%; /* Full width image */
        margin-right: 0; /* Remove right margin */
        margin-bottom: 10px; /* Add bottom margin */
    }

    .publication-info {
        width: 100%; /* Full width info section */
        min-width: 0; /* Remove minimum width constraint */
    }
}

.network {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
}

.person {
    margin: 5px 0;
    transition: color 0.3s;
}

.name {
    cursor: pointer;
    transition: color 0.3s, text-decoration 0.3s;
}

.name:hover {
    color: rgb(19, 19, 157);
}

.title {
    font-style: italic;
}

.blog-hero {
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(238, 119, 0, 0.12), rgba(0, 123, 255, 0.08));
}

.blog-kicker {
    margin: 0 0 10px;
    color: #EE7700;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-main-title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.3;
}

.blog-intro,
.blog-toolbar-text,
.blog-card-excerpt,
.blog-detail-lead,
.blog-detail-section p,
.blog-empty {
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.7;
}

.blog-toolbar {
    margin-bottom: 20px;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.blog-filter {
    border: 1px solid rgba(0, 123, 255, 0.25);
    background-color: transparent;
    color: var(--text-color);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.blog-filter.active,
.blog-filter:hover {
    background-color: var(--link-color);
    color: #ffffff;
    border-color: var(--link-color);
}

.blog-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(360px, 1fr);
    gap: 24px;
    align-items: start;
}

.blog-list {
    display: grid;
    gap: 18px;
}

.blog-card,
.blog-detail {
    border-radius: 12px;
    background-color: var(--publication-bg-color);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.blog-card {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--hover-shadow-color);
    background-color: var(--hover-bg-color);
}

.blog-card-image,
.blog-detail-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.blog-card-body,
.blog-detail {
    padding: 20px;
}

.blog-card-category {
    margin: 0 0 8px;
    color: #EE7700;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-card-title,
.blog-detail-title {
    margin: 0 0 10px;
    color: var(--text-color);
    line-height: 1.4;
}

.blog-detail-title {
    font-size: 28px;
}

.blog-card-meta {
    margin: 0 0 14px;
    color: var(--foot-text-color);
    font-size: 14px;
}

.blog-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background-color: rgba(0, 123, 255, 0.12);
    color: var(--link-color);
    font-size: 13px;
    font-weight: bold;
}

.perspective-stack {
    display: grid;
    gap: 18px;
}

.perspective-item {
    padding: 22px;
    border-radius: 12px;
    background-color: var(--publication-bg-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.perspective-title {
    margin: 0 0 12px;
    color: var(--text-color);
    font-size: 24px;
    line-height: 1.4;
}

.perspective-item p {
    margin-top: 0;
    margin-bottom: 14px;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.8;
}

.perspective-text {
    padding-left: 14px;
    border-left: 3px solid rgba(238, 119, 0, 0.35);
}

.blog-detail-lead {
    margin-bottom: 20px;
    font-weight: bold;
}

.blog-detail-section + .blog-detail-section {
    margin-top: 18px;
}

.blog-detail-section h3 {
    margin-bottom: 10px;
    color: #EE7700;
    font-size: 18px;
}

.blog-empty {
    padding: 24px;
    border-radius: 12px;
    background-color: var(--publication-bg-color);
}

@media (max-width: 1200px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 18px;
    }

    .blog-main-title {
        font-size: 24px;
    }

    .blog-card-image,
    .blog-detail-image {
        height: 200px;
    }

    .blog-card-body,
    .blog-detail {
        padding: 16px;
    }

    .perspective-item {
        padding: 18px;
    }

    .perspective-title {
        font-size: 21px;
    }
}
