/* ========== CSS Variables ========== */
:root {
    --primary: #1a6b8a;
    --primary-dark: #124f68;
    --primary-light: #e8f4f8;
    --accent: #e07b39;
    --accent-light: #fdf0e8;
    --text-dark: #1c2b36;
    --text-mid: #3a5568;
    --text-light: #6b8a9c;
    --bg-page: #f5f8fa;
    --bg-white: #ffffff;
    --border-light: #dde8ee;
    --shadow-card: 0 2px 16px rgba(26,107,138,.10), 0 1px 4px rgba(0,0,0,.05);
    --shadow-hover: 0 6px 28px rgba(26,107,138,.18), 0 2px 8px rgba(0,0,0,.08);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ========== Reset & Base ========== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.7;
}

/* ========== Navigation ========== */
#mainNav {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    transition: box-shadow 0.3s;
}
#mainNav.scrolled {
    box-shadow: 0 2px 20px rgba(26,107,138,.12);
}
#mainNav .container-fluid { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.navbar-brand {
    font-family: 'Crimson Pro', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary) !important;
    padding: 1rem 0;
    letter-spacing: 0.02em;
}
.nav-link {
    color: var(--text-mid) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    letter-spacing: 0.03em;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: var(--primary-light);
}

/* ========== Hero Banner ========== */
.hero-banner {
    position: relative;
    height: 340px;
    background: url('https://lzhstone95.github.io/Homepage/static/assets/img/ahu.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,30,45,0.25) 0%,
        rgba(10,30,45,0.65) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 2.5rem;
}
.hero-banner .hero-text {
    flex: 1;
}
.hero-banner h1 {
    font-family: 'Crimson Pro', serif;
    font-size: 2.6rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-banner .hero-subtitle {
    color: rgba(255,255,255,0.85);
    font-size: 1rem;
    margin-top: 0.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 400;
}

/* ========== Hero Avatar ========== */
.hero-avatar {
    flex-shrink: 0;
    margin-left: 2rem;
}
.hero-avatar img {
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 4px solid #fff;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    transition: transform 0.3s;
}
.hero-avatar img:hover { transform: scale(1.03); }

/* ========== Page Layout ========== */
.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 2.5rem;
}

/* ========== Section ========== */
.content-section {
    margin-top: 2.5rem;
}
.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.section-header .section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary-light);
    border-radius: 8px;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.section-title {
    font-family: 'Crimson Pro', serif;
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    letter-spacing: 0.01em;
}
.section-extra {
    margin-left: auto;
    font-size: 0.85rem;
}
.section-extra a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border: 1.5px solid var(--primary);
    border-radius: 20px;
    transition: all 0.2s;
}
.section-extra a:hover {
    background: var(--primary);
    color: #fff;
}

/* ========== Card ========== */
.card-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.75rem 2rem;
    transition: box-shadow 0.3s;
}
.card-section:hover {
    box-shadow: var(--shadow-hover);
}

/* ========== Bio Section ========== */
#home .bio-text {
    text-align: justify;
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 0.965rem;
}
#home .bio-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--primary);
}
#home .bio-text a:hover { border-bottom-style: solid; }

.bio-meta {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}
.bio-timeline {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}
.bio-timeline li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.45rem 0;
    font-size: 0.9rem;
    color: var(--text-mid);
    border-bottom: 1px dashed #eee;
}
.bio-timeline li:last-child { border-bottom: none; }
.bio-timeline li::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 0.55rem;
    flex-shrink: 0;
}
.bio-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.88rem;
    color: var(--text-mid);
}
.bio-contact span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.bio-contact i { color: var(--primary); font-size: 1rem; }

/* ========== News ========== */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.92rem;
    color: var(--text-mid);
    line-height: 1.6;
}
.news-list li:last-child { border-bottom: none; padding-bottom: 0; }
.news-list li:first-child { padding-top: 0; }
.news-date {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    margin-top: 0.1rem;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.news-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-light);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* ========== Members ========== */
.members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.member-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem 1rem 1rem;
    text-align: center;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    transition: transform 0.25s, box-shadow 0.25s;
}
.member-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.member-card img {
    width: 90px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
.member-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #a51e22;
    margin-bottom: 0.2rem;
}
.member-degree {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 0.15rem;
}
.member-topic {
    font-size: 0.76rem;
    color: var(--primary);
    font-weight: 500;
    background: var(--primary-light);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    display: inline-block;
    margin-top: 0.2rem;
}

/* ========== Teaching ========== */
.teaching-list { list-style: none; padding: 0; margin: 0; }
.teaching-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}
.teaching-item:last-child { border-bottom: none; padding-bottom: 0; }
.teaching-item:first-child { padding-top: 0; }
.teaching-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-light), #d0eaf5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}
.teaching-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
}
.teaching-meta {
    font-size: 0.82rem;
    color: var(--text-light);
}
.teaching-badge {
    display: inline-block;
    font-size: 0.73rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
    margin-right: 0.4rem;
}
.badge-required {
    background: #fff3e0;
    color: #c67c00;
}
.badge-elective {
    background: #e8f4f8;
    color: var(--primary);
}

/* ========== Course Resource Tags ========== */
.course-resources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.55rem;
}
.res-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.22rem 0.6rem;
    border-radius: 20px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
}
.res-tag i { font-size: 0.78rem; }
.res-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,.12);
}
/* 7种颜色方案 */
.res-tag-1  { background:#fff3e0; color:#c67c00; border-color:#f5d28a; }
.res-tag-1:hover  { background:#ffe0a0; }
.res-tag-2  { background:#e3f2fd; color:#1565c0; border-color:#90caf9; }
.res-tag-2:hover  { background:#bbdefb; }
.res-tag-3  { background:#e8f5e9; color:#2e7d32; border-color:#a5d6a7; }
.res-tag-3:hover  { background:#c8e6c9; }
.res-tag-4  { background:#fce4ec; color:#c62828; border-color:#f48fb1; }
.res-tag-4:hover  { background:#f8bbd0; }
.res-tag-5  { background:#ede7f6; color:#4527a0; border-color:#b39ddb; }
.res-tag-5:hover  { background:#d1c4e9; }
.res-tag-6  { background:#e0f7fa; color:#00695c; border-color:#80deea; }
.res-tag-6:hover  { background:#b2ebf2; }
.res-tag-7  { background:#f3e5f5; color:#6a1b9a; border-color:#ce93d8; }
.res-tag-7:hover  { background:#e1bee7; }

/* ========== PDF Preview Modal ========== */
.pdf-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.pdf-modal-overlay.active { display: flex; }
.pdf-modal {
    background: #fff;
    border-radius: 12px;
    width: min(90vw, 900px);
    height: min(88vh, 700px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    overflow: hidden;
}
.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    background: var(--primary);
    color: #fff;
}
.pdf-modal-title {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pdf-modal-close {
    background: rgba(255,255,255,.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background 0.15s;
}
.pdf-modal-close:hover { background: rgba(255,255,255,.35); }
.pdf-modal-body {
    flex: 1;
    overflow: hidden;
}
.pdf-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.pdf-modal-note {
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
    color: var(--text-light);
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.pdf-modal-note a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.pdf-modal-note a:hover { text-decoration: underline; }

/* ========== Publications ========== */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub-item {
    display: flex;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--border-light);
    align-items: flex-start;
}
.pub-item:last-child { border-bottom: none; padding-bottom: 0; }
.pub-item:first-child { padding-top: 0; }
.pub-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.15rem;
}
.pub-body { flex: 1; line-height: 1.65; }
.pub-title {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.2s;
}
.pub-title:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { font-size: 0.87rem; color: var(--text-mid); margin-top: 0.2rem; }
.pub-venue { font-size: 0.84rem; color: var(--text-light); font-style: italic; margin-top: 0.15rem; }
.pub-year {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    margin-left: 0.4rem;
    vertical-align: middle;
}

/* ========== Honors ========== */
.honors-list { list-style: none; padding: 0; margin: 0; }
.honor-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
}
.honor-item:last-child { border-bottom: none; padding-bottom: 0; }
.honor-item:first-child { padding-top: 0; }
.honor-star {
    color: #e8a217;
    font-size: 1.2rem;
    margin-top: 0.05rem;
    flex-shrink: 0;
}
.honor-text { font-size: 0.92rem; color: var(--text-mid); line-height: 1.6; }

/* ========== Services ========== */
.service-list { list-style: none; padding: 0; margin: 0; }
.service-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.92rem;
    color: var(--text-mid);
    line-height: 1.6;
}
.service-item:last-child { border-bottom: none; padding-bottom: 0; }
.service-item:first-child { padding-top: 0; }
.service-item::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.6rem;
}

/* ========== Footer ========== */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 1rem;
    font-size: 0.84rem;
    margin-top: 3rem;
}
.site-footer a { color: rgba(255,255,255,0.85); }

/* ========== Divider ========== */
.section-divider {
    height: 3px;
    width: 48px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    margin: 0.2rem 0 1.1rem;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-banner { height: 280px; }
    .hero-banner h1 { font-size: 1.8rem; }
    .hero-content { padding: 0 1.5rem; }
    .hero-avatar { margin-left: 1rem; }
    .hero-avatar img { width: 110px; height: 150px; }
    .page-container { padding: 0 1.2rem 3rem; }
    .card-section { padding: 1.25rem 1.25rem; }
    .members-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
}
@media (max-width: 480px) {
    .hero-banner { height: 240px; }
    .hero-banner h1 { font-size: 1.45rem; }
    .hero-avatar img { width: 90px; height: 120px; }
}
