/* Layout and base styles adapted from WayneJin0918/home, commit 7e17d7ede80eb8d7bb19a6644f2f267889ec182c. */
:root {
            --primary-color: #0056b3; /* 经典的学术蓝 */
            --accent-color: #d82644;   /* 强调色 */
            --text-color: #333333;
            --bg-color: #ffffff;
            --secondary-text: #666666;
            --link-hover: #b32424;
            --light-bg: #f9f9f9;
        }

        body {
            background-color: var(--bg-color);
            font-family: 'Lato', sans-serif;
            font-size: 16px;
            line-height: 1.7;
            color: var(--text-color);
            margin: 0;
            padding: 0;
        }

        h1, h2, h3 {
            font-family: 'Merriweather', serif;
            font-weight: 700;
        }

        a {
            color: var(--primary-color);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        a:hover {
            color: var(--link-hover);
            text-decoration: underline;
        }

        .container {
            max-width: 960px;
            margin: 40px auto;
            padding: 0 20px;
        }

        /* --- Header Section (Profile & Bio) --- */
        .profile-header {
            display: flex;
            align-items: center; /* 垂直居中 */
            justify-content: space-between;
            gap: 50px;
            margin-bottom: 60px;
            border-bottom: 1px solid #eee;
            padding-bottom: 50px;
        }

        .bio-text {
            flex: 1;
        }

        .bio-text h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            margin-top: 0;
            letter-spacing: -0.5px;
            color: #222;
        }

        .role-title {
            font-size: 1.1rem;
            margin-bottom: 15px;
            line-height: 1.6;
        }

        .contact-info {
            font-size: 1rem;
            color: var(--secondary-text);
            margin-bottom: 20px;
        }

        /* 社交按钮样式优化 */
        .social-links {
            margin-top: 25px;
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        .social-links a {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: #f0f2f5;
            padding: 8px 16px;
            border-radius: 50px; /* 圆角胶囊样式 */
            font-size: 0.9rem;
            color: #444;
            text-decoration: none;
            transition: all 0.2s ease;
            font-weight: 600;
            border: 1px solid transparent;
        }

        .social-links a:hover {
            background: #fff;
            border-color: #ddd;
            color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        }

        .highlight-box {
            background-color: #f0f7ff;
            border-left: 4px solid var(--primary-color);
            padding: 12px 16px;
            margin-top: 25px;
            border-radius: 0 4px 4px 0;
            font-size: 0.95rem;
            color: #000;
        }

        /* --- Profile Image (CSS Implementation) --- */
        .profile-image-container {
            flex-shrink: 0;
            width: 300px;
            height: 300px;
            position: relative;
        }

        /* CSS直接切圆角，不需要Canvas */
        .profile-photo {
            width: 100%;
            height: 100%;
            object-fit: cover; /* 保证图片不变形 */
            border-radius: 50%;
            box-shadow: 0 8px 24px rgba(0,0,0,0.12);
            border: 4px solid #fff;
        }

        /* --- Section Styling --- */
        .section-title {
            color: var(--text-color);
            border-bottom: 2px solid #eee;
            padding-bottom: 10px;
            margin-top: 60px;
            margin-bottom: 30px;
            font-size: 1.75rem;
            position: relative;
        }

        /* 标题下的小红条 */
        .section-title::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 60px;
            height: 2px;
            background-color: var(--accent-color);
        }

        ul {
            padding-left: 20px;
        }

        li {
            margin-bottom: 8px;
        }

        /* --- Category Subtitle for Projects (Collapsible) --- */
        .category {
            margin-top: 30px;
            margin-bottom: 10px;
        }

        .category[open] .category-title .chevron {
            transform: rotate(90deg);
        }

        .category-title {
            font-family: 'Merriweather', serif;
            font-size: 1.2rem;
            color: var(--primary-color);
            margin: 0;
            padding: 10px 14px;
            background: linear-gradient(90deg, #eef4fa 0%, rgba(238,244,250,0) 100%);
            border-left: 3px solid var(--accent-color);
            border-radius: 0 4px 4px 0;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            list-style: none;
            user-select: none;
            transition: background 0.2s ease;
        }

        .category-title::-webkit-details-marker {
            display: none;
        }

        .category-title:hover {
            background: linear-gradient(90deg, #e3eef9 0%, rgba(227,238,249,0) 100%);
        }

        .category-title i.cat-icon {
            color: var(--accent-color);
        }

        .category-title .chevron {
            margin-left: auto;
            font-size: 0.85rem;
            color: var(--secondary-text);
            transition: transform 0.25s ease;
        }

        .category-body {
            padding-top: 20px;
        }

        .category-title .tbd-badge {
            font-family: 'Lato', sans-serif;
            font-size: 0.75rem;
            font-weight: 700;
            background: var(--accent-color);
            color: #fff;
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 8px;
            letter-spacing: 0.5px;
        }

        .category-count {
            font-family: 'Lato', sans-serif;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--secondary-text);
            background: #fff;
            border: 1px solid #e0e0e0;
            padding: 1px 8px;
            border-radius: 10px;
            margin-left: 6px;
        }

        .venue-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-family: 'Lato', sans-serif;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1;
            letter-spacing: 0.25px;
            padding: 4px 9px;
            border: 1px solid transparent;
            border-radius: 999px;
            margin-left: 6px;
            vertical-align: middle;
            white-space: nowrap;
            transform: translateY(-1px);
        }

        .venue-badge::before {
            content: '';
            width: 5px;
            height: 5px;
            border-radius: 50%;
            background: currentColor;
            opacity: 0.75;
        }

        .venue-badge.accepted {
            background: #eaf6ef;
            color: #18724a;
            border-color: #b9dfca;
        }

        .venue-badge.techreport {
            background: #eef3f8;
            color: #435b73;
            border-color: #d0dce8;
        }

        .venue-badge.submitted {
            background: #fff6e5;
            color: #8a5b12;
            border-color: #ead5aa;
        }

        .tbd-placeholder {
            color: #888;
            font-style: italic;
            padding: 10px 18px;
            background: #fafafa;
            border: 1px dashed #ddd;
            border-radius: 6px;
            margin-bottom: 20px;
        }

        /* --- Publications --- */
        .publication {
            display: flex;
            gap: 25px;
            margin-bottom: 40px;
            align-items: flex-start;
        }

        .publogo {
            width: 180px;
            height: auto;
            border-radius: 6px;
            box-shadow: 0 4px 10px rgba(0,0,0,0.08);
            flex-shrink: 0;
            object-fit: cover;
            border: 1px solid #eee;
            transition: transform 0.2s;
        }

        .publogo-contain {
            height: 120px;
            object-fit: contain;
            background: #fff;
        }

        .publogo-world {
            width: 200px;
            height: 78px;
            object-fit: cover;
            object-position: center;
        }

        .publication:hover .publogo {
            transform: scale(1.02);
        }

        .pub-content {
            flex: 1;
            min-width: 0;
        }

        .pub-content > strong {
            font-size: 1.15rem;
            color: #1a1a1a;
            font-family: 'Merriweather', serif;
            display: block;
            margin-bottom: 6px;
            line-height: 1.4;
        }

        .pub-content > strong a {
            font-size: inherit;
            color: inherit;
            font-family: inherit;
            display: block;
        }

        .pub-content .authors .venue-badge {
            margin-left: 7px;
        }

        .pub-content .authors strong {
            display: inline;
            font: inherit;
            font-weight: 700;
            color: inherit;
            margin: 0;
        }

        .pub-content .authors {
            color: #555;
            margin: 8px 0;
            font-size: 1rem;
            line-height: 1.6;
        }

        .pub-content .affiliation {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px;
            color: #78828c;
            margin: -2px 0 10px;
            font-size: 0.88rem;
            line-height: 1.5;
        }

        .pub-content .affiliation i {
            color: #9aa5b1;
            font-size: 0.78rem;
        }

        .pub-content .affiliation .venue-badge {
            margin-left: 3px;
        }

        .pub-content .links {
            margin-top: 12px;
        }

        .pub-content .links a {
            display: inline-block;
            margin-right: 15px;
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .github-stars {
            text-transform: none;
            letter-spacing: 0;
            font-weight: 600;
            margin-left: 4px;
        }

        .github-stars .fa-star {
            color: #f5a623;
            font-size: 0.75rem;
            margin-right: 2px;
        }

        /* --- Experience & Lists --- */
        .experience-list {
            list-style: none;
            padding: 0;
        }

        .experience-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 20px;
            border-bottom: 1px dashed #eee;
            padding-bottom: 20px;
        }

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

        .exp-details strong {
            display: block;
            font-size: 1.1rem;
            color: #222;
            margin-bottom: 4px;
        }

        .exp-details span {
            color: #555;
        }

        .exp-date {
            text-align: right;
            min-width: 140px;
            color: #777;
            font-feature-settings: "tnum"; /* 表格数字对齐 */
            font-size: 0.95rem;
        }

        /* --- News Tag --- */
        .news-date {
            font-family: monospace;
            background: #eef4fa;
            color: var(--primary-color);
            padding: 2px 8px;
            border-radius: 4px;
            margin-right: 10px;
            font-size: 0.9rem;
            font-weight: bold;
        }

        .news-scroll {
            max-height: 128px;
            overflow-y: auto;
            list-style: none;
            padding: 4px 14px 4px 0;
            margin: 0;
            scrollbar-width: thin;
            scrollbar-color: #c9d5e2 transparent;
        }

        .news-scroll li {
            margin-bottom: 10px;
        }

        .news-scroll::-webkit-scrollbar {
            width: 6px;
        }

        .news-scroll::-webkit-scrollbar-thumb {
            background: #c9d5e2;
            border-radius: 999px;
        }

        /* --- Footer --- */
        .visitor-map {
            margin-top: 80px;
            padding-top: 40px;
            border-top: 1px solid #eee;
            text-align: center;
            opacity: 0.8;
            margin-bottom: 40px;
        }

        /* --- Responsive Design --- */
        @media (max-width: 768px) {
            .profile-header {
                flex-direction: column-reverse;
                text-align: center;
                gap: 30px;
            }

            .bio-text h1 {
                font-size: 2.2rem;
            }

            .social-links {
                justify-content: center;
            }

            .profile-image-container {
                width: 220px;
                height: 220px;
            }

            .publication {
                flex-direction: column;
                align-items: center;
                text-align: center;
            }

            .pub-content {
                width: 100%;
            }

            .pub-content .affiliation {
                justify-content: center;
            }

            .publogo {
                width: 100%;
                max-width: 320px;
                margin-bottom: 15px;
            }

            .publogo-world {
                height: auto;
                aspect-ratio: 2.55 / 1;
                object-fit: cover;
            }

            .experience-item {
                flex-direction: column;
                align-items: flex-start;
            }

            .exp-date {
                text-align: left;
                margin-top: 5px;
                font-size: 0.9rem;
            }
        }
