/* ==========================================================================
   1. 全局变量与基础重置 (Global Variables & Reset)
   ========================================================================== */
:root {
    --primary-color: #1e3a8a;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ==========================================================================
   2. 头部样式 (Header: Logo, Search & Navigation)
   ========================================================================== */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* 第一模块：Logo 与 搜索框 */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-logo {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1.8rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    letter-spacing: -0.5px;
}
.brand-logo .brand-main {
    color: #1a3c70; /* 深蓝色 */
    font-weight: 800;
}
.brand-logo .brand-ext {
    color: #2ba2cc; /* 亮天蓝色 */
    font-weight: 300;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 500px;
    width: 100%;
}

.search-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    outline: none;
    font-size: 0.95rem;
}
input:focus::placeholder {
    color: transparent;
    transition: opacity 0.2s ease;
}

.search-box button {
    padding: 8px 18px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background-color: var(--primary-hover);
}

/* 第二模块：导航菜单 */
.header-nav {
    border-top: 1px solid var(--border-color);
    background-color: #fafafa;
}

.nav-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0 24px;
    padding: 0;
    overflow: visible;
    white-space: nowrap;
}

.nav-list > li {
    padding: 12px 0;
}

.nav-list a {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    text-transform: capitalize;
}

.nav-list a:hover {
    color: var(--primary-color);
    font-weight:600 ;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
    white-space: normal;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown {
    display: block;
}

.nav-dropdown .bio-subtabs-header {
    padding: 0;
}

.nav-dropdown .bio-subtab {
    display: inline-block;
    text-decoration: none;
}

/* ==========================================================================
   3. 面包屑导览 (Breadcrumbs - 内页专用)
   ========================================================================== */
.breadcrumb-wrapper {
    background-color: #edf2f7;
    padding: 10px 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 6px;
}

/* ==========================================================================
   4. 主体与卡片网格 (Main Grid & Cards - 首页)
   ========================================================================== */
main {
    flex: 1;
    padding: 24px 0;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* 响应式网格系统 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background-color: #e2e8f0;
}

.card-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-area {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary-color);
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.sidebar-list{display: grid; gap: 10px;}

.sidebar-item-title{line-height: 1rem;}

/* 分页组件 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--text-main);
    border-radius: 4px;
    transition: all 0.2s;
}

.page-btn.active,
.page-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* ==========================================================================
   5. 文献详情页样式 (Article Detail - 内页)
   ========================================================================== */
.article-detail {
    background: #ffffff;
    padding: 32px;
    /*border-radius: 8px;*/
    /*border: 1px solid var(--border-color);*/
}

.article-detail h1 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--primary-color);
    line-height: 1.3;
}

.article-detail .meta-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.article-content h2 {
    font-size: 1.5rem;
    margin: 28px 0 14px;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    color: var(--text-main);
}

.article-content h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px;
    color: #1e293b;
}

.article-content p {
    margin-bottom: 16px;
    color: #334155;
    font-size: 1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px 0;
    display: block;
}

/* 作者简历 */
.author-resume {
    margin-top: 40px;
    padding: 20px;
    background: #f8fafc;
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
}

.author-resume h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

/* ==========================================================================
   6. 页脚模块 (Footer: Related Posts & Recent Posts)
   ========================================================================== */
.footer {
    background-color: #0f172a;
    color: #f1f5f9;
    padding: 40px 0;
    margin-top: 10px;
}

.footer-module h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #60a5fa;
    border-bottom: 1px solid #334155;
    padding-bottom: 8px;
}

.footer-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.footer-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 自定义滚动条样式 */
.footer-list::-webkit-scrollbar {
    width: 6px;
}
.footer-list::-webkit-scrollbar-thumb {
    background-color: #334155;
    border-radius: 3px;
}

.footer-item {
    display: flex;
    gap: 12px;
    background: #1e293b;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.footer-item:hover {
    background: #334155;
}

.footer-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.footer-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 0.85rem;
}

.footer-item-title {
    font-weight: 500;
    color: #e2e8f0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.footer-item-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* 通用页脚 */
.footer-nav {
    /* list-style: none; */
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 10px; */
}

.footer-nav a {
    font-size: 0.85rem;
    color: var(--bg-color);
    font-weight: 500;
    text-transform: capitalize;
}

.footer-nav a:hover {
    color: var(--text-muted);
}

/* ==========================================================================
   6. 作者概要模块
   ========================================================================== */
.author-profile-card {
    display: flex;
    gap: 24px;
    align-items: center;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.author-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #1a3c70;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.author-title-group h1 {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.author-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   Tailwind CSS 提取样式表 (style.css)
   ========================================================================== */

/* 1. 布局与间距 (Layout & Spacing) */
.p-6 {
    padding: 1.5rem;
}

.pt-6 {
    padding-top: 1.5rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.\-mt-0\.5 {
    margin-top: -0.125rem;
}

.my-6 {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.mx-0\.5 {
    margin-left: 0.125rem;
    margin-right: 0.125rem;
}

.mr-0\.5 {
    margin-right: 0.125rem;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
}

.gap-x-2 {
    column-gap: 0.5rem;
}

.gap-y-1 {
    row-gap: 0.25rem;
}

.w-full {
    width: 100%;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.h-20{height: 5rem}

.overflow-hidden {
    overflow: hidden;
}

/* 2. 排版与字体 (Typography) */
.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.italic {
    font-style: italic;
}

.leading-relaxed {
    line-height: 1.625;
}

.text-center {
    text-align: center;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.no-underline {
    text-decoration-line: none;
}

/* 3. 颜色与背景 (Colors & Backgrounds) */
.bg-white {
    background-color: rgb(255 255 255);
}

.text-slate-900 {
    color: rgb(15 23 42);
}

.text-slate-600 {
    color: rgb(71 85 105);
}

.text-slate-500 {
    color: rgb(100 116 139);
}

.text-slate-400 {
    color: rgb(148 163 184);
}

.text-slate-300 {
    color: rgb(203 213 225);
}

.text-blue-600 {
    color: rgb(37 99 235);
}

/* 4. 边框与阴影 (Borders & Shadows) */
.border {
    border-width: 1px;
    border-style: solid;
}

.border-t {
    border-top-width: 1px;
    border-top-style: solid;
}

.border-slate-100 {
    border-color: rgb(241 245 249);
}

.border-slate-200 {
    border-color: rgb(226 232 240);
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* 5. Flex 弹性布局 (Flexbox) */
.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.inline {
    display: inline;
}

/* 6. 交互与状态 (Interactions & States) */
.hover\:text-blue-800:hover {
    color: rgb(30 64 175);
}

.hover\:text-blue-600:hover {
    color: rgb(37 99 235);
}

.hover\:font-bold:hover {
    font-weight: 700;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.object-cover {
    object-fit: cover;
}

.layout-3-1 {
    display: grid;
    grid-template-columns: 3fr 1fr; /* 核心：左侧占3份，右侧占1份 */
    gap: 2rem; /* 左右两栏之间的间距 */
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.sidebar {
}

/* 7. 响应式断点 (Media Queries) */
@media (min-width: 640px) {
    .sm\:p-10 {
        padding: 2.5rem;
    }
}

/* ==========================================================================
   7. 移动端自适应适配 (Responsive Design)
   ========================================================================== */
@media (max-width: 768px) {
    .layout-3-1 {
        grid-template-columns: 1fr; /* 变为单列 */
    }
}
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .article-detail {
        padding: 16px;
    }

    .article-detail h1 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr; /* 页脚在移动端由双栏变为单栏垂直堆叠 */
    }
}
@media (max-width: 768px) {
    .footer-list {
        grid-template-columns: 1fr; /* 移动端恢复为单列 */
    }
}


/* ==========================================================================
   研究领域页 (Research Area)
   ========================================================================== */
.target-overview-box {
    background-color: #f8fafc;
    /* border: 1px solid #e2e8f0; */
    /* border-radius: 8px; */
    padding: 24px 0;
    margin-bottom: 30px;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);*/
}

.target-overview-box h1 {
    font-size: 1.75rem;
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 700;
    border-left: 4px solid #2563eb;
    padding-left: 12px;
    line-height: 1.2;
}

.target-overview-box p {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.target-overview-box p:last-child {
    margin-bottom: 0;
}
.bio-subtabs-header {
    padding: 15px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 10px 12px;
    flex-shrink: 0;
    align-items: stretch;
}

.bio-subtab {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;

    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    color: #334155;

    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;

    transition:
            background-color 0.2s,
            border-color 0.2s,
            color 0.2s;
}

/* 长名称完整显示，允许换行 */
.bio-subtab > span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bio-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    min-width: 28px;
    padding: 2px 7px;

    font-size: 12px;
    line-height: 1.5;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #475569;

    background: #eef2f6;
    border-radius: 6px;
}

.bio-subtab:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

/* 当前选中的分类 */
.bio-subtab.active {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #2563eb;
}

.bio-subtab.active .bio-tab-count {
    color: #fff;
    background: #2563eb;
}

.bio-subtab:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}


/* ==========================================================================
   日期下拉框
   ========================================================================== */
.select-container {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.custom-select {
    position: relative;
    width: 200px;
    margin: 0.5rem 0;
    user-select: none;
}

.select-trigger {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.select-trigger:hover {
    border-color: #d1d5db;
}

.select-trigger.active {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-gray {
    color: rgb(107 114 128);
}

.select-trigger i {
    transition: transform 0.2s ease;
}

.select-trigger.active i {
    transform: rotate(180deg);
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;  /* 左边框透明 */
    border-right: 5px solid transparent; /* 右边框透明 */
    border-top: 5px solid #9ca3af;          /* 上边框有颜色，形成向下箭头 */
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 240px;
    overflow-y: auto;
}

.select-options.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s ease;
}

.select-option:hover {
    background-color: #f9fafb;
}

.select-option.selected {
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* 滚动条美化 */
.select-options::-webkit-scrollbar {
    width: 6px;
}
.select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.select-options::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.select-options::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
