/* ==================== */
/* Reset & Base Styles  */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Söhne", "SF Pro Text", sans-serif;
    background: #000000;
    color: #ececec;
    line-height: 1.5;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 浅色主题 */
html[data-theme="light"] body {
    background: #ffffff;
    color: #222222;
}

/* ==================== */
/* Layout               */
/* ==================== */

.container {
    max-width: 840px;
    margin: 0 auto;
    padding: 64px 48px 48px;
}

/* ==================== */
/* Navigation           */
/* ==================== */

nav {
    margin-bottom: 48px;
    display: flex;
    gap: 36px;
    align-items: center;
}

nav a {
    font-size: 14px;
    font-weight: 500;
    color: #9b9b9b;
    text-decoration: none;
    transition: color 0.15s;
}

nav a:hover {
    color: #ececec;
    text-decoration: underline;
}

html[data-theme="light"] nav a {
    color: #656565;
}

html[data-theme="light"] nav a:hover {
    color: #141414;
}

/* 主题切换按钮 */
#theme-toggle {
    margin-left: auto;
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #ececec;
    position: relative;
}

#theme-toggle:hover {
    opacity: 0.7;
}

html[data-theme="light"] #theme-toggle {
    color: #333;
}

#theme-toggle .sun-icon,
#theme-toggle .moon-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

html[data-theme="dark"] #theme-toggle .sun-icon {
    opacity: 0;
    transform: scale(0.8);
}

html[data-theme="dark"] #theme-toggle .moon-icon {
    opacity: 1;
    transform: scale(1);
}

html[data-theme="light"] #theme-toggle .sun-icon {
    opacity: 1;
    transform: scale(1);
}

html[data-theme="light"] #theme-toggle .moon-icon {
    opacity: 0;
    transform: scale(0.8);
}

/* ==================== */
/* Header               */
/* ==================== */

header {
    margin-bottom: 72px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
}

.header-text {
    flex: 1;
    padding-top: 0;
}

.profile-photo {
    flex-shrink: 0;
    width: 200px;
}

.profile-photo img {
    width: 80%;
    height: auto;
    display: block;
}

h1 {
    font-size: 34px; /* 44px */
    font-weight: 400; /* 500 */
    letter-spacing: -0.8px;
    margin-bottom: 48px;
    color: #ffffff;
    line-height: 1.1;
}

html[data-theme="light"] h1 {
    color: #141414;
}

header h1 {
    text-indent: -0.07em;
}

.subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #9b9b9b;
    margin-bottom: 20px;
    line-height: 1.5;
}

html[data-theme="light"] .subtitle {
    color: #656565;
}

.contact {
    font-size: 14px;
    line-height: 2;
    color: #b4b4b4;
}

.contact a {
    color: #b4b4b4;
    text-decoration: none;
    transition: color 0.15s;
}

.contact a:hover {
    color: #ffffff;
    text-decoration: underline;
}

html[data-theme="light"] .contact {
    color: #333333;
}

html[data-theme="light"] .contact a {
    color: #333333;
}

html[data-theme="light"] .contact a:hover {
    color: #141414;
}

.social-links {
    margin-top: 24px; /*48px*/
    font-size: 14px;
    color: #b4b4b4;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.social-links a {
    color: #b4b4b4;
    text-decoration: none;
    transition: color 0.15s;
}

.social-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

html[data-theme="light"] .social-links {
    color: #333333;
}

html[data-theme="light"] .social-links a {
    color: #333333;
}

html[data-theme="light"] .social-links a:hover {
    color: #141414;
}

.social-links i {
    margin-right: 6px;
}

/* ==================== */
/* Sections             */
/* ==================== */

section {
    margin-bottom: 64px;
}

h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 28px;
    color: #ffffff;
    letter-spacing: -0.3px;
}

html[data-theme="light"] h2 {
    color: #141414;
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 48px; /*24px*/
    color: #ffffff;
}

html[data-theme="light"] h3 {
    color: #141414;
}

p {
    font-size: 14px;
    margin-bottom: 12px;
    line-height: 1.7;
    color: #c5c5c5;
}

p a {
    color: #ececec;
    text-decoration: none;
    border-bottom: 1px solid #404040;
}

p a:hover {
    border-bottom-color: #ececec;
}

html[data-theme="light"] p {
    color: #333333;
}

html[data-theme="light"] p a {
    color: #141414;
    border-bottom-color: #d0d0d0;
}

html[data-theme="light"] p a:hover {
    border-bottom-color: #141414;
}

/* ==================== */
/* Publications         */
/* ==================== */

.pub-list {
    list-style: none;
    display: grid;
    gap:54px;
}

.pub-item {
    display: grid;
    grid-template-columns: 
        80px 
        var(--pub-gap-left, 20px) 
        var(--pub-image-width, 180px) 
        var(--pub-gap-right, 20px) 
        1fr;
    row-gap: 20px;
}

/* 调整子元素位置以适应新的grid结构 */
.pub-meta {
    grid-column: 1;
    padding-top: 2px;
}

.pub-image {
    grid-column: 3;
}

.pub-item > div:last-child {
    grid-column: 5;
}

/* For pub-items without images (2-column layout) */
.pub-item:not(:has(.pub-image)) {
    grid-template-columns: 80px var(--pub-gap-left, 20px) 1fr;
}

.pub-item:not(:has(.pub-image)) > div:last-child {
    grid-column: 3;
}

.pub-meta {
    padding-top: 2px;
}

.pub-venue {
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: 0px;
}

.pub-year {
    font-size: 11px;
    color: #6a6a6a;
}

html[data-theme="light"] .pub-venue {
    color: #141414;
}

html[data-theme="light"] .pub-year {
    color: #959595;
}

/* Publication Images */
.pub-image {
    width: var(--pub-image-width, 180px); /* 默认180px，可通过inline style或自定义class覆盖 */
    overflow: hidden;
    background: transparent;
    padding-top: 2px;
}

.pub-image img {
    width: 100%;
    height: auto;
}

.pub-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #ffffff;
}

html[data-theme="light"] .pub-title {
    color: #141414;
}

.pub-authors {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.pub-authors i {
    font-style: italic;
    color: #666;
}

.pub-authors a {
    color: #ececec;
    text-decoration: none;
    border-bottom: 1px solid #404040;
}

.pub-authors a:hover {
    border-bottom-color: #ececec;
}

.first-author {
    color: #ffffff;
    font-weight: 500;
    /*text-decoration: underline;*/
}

.paper-note {
    margin-left: 4px;
    font-weight: 400;
    color: #10a37f;
}

html[data-theme="light"] .pub-authors {
    color: #999;
}

html[data-theme="light"] .pub-authors i {
    color: #999;
}

html[data-theme="light"] .pub-authors a {
    color: #141414;
    border-bottom-color: #d0d0d0;
}

html[data-theme="light"] .pub-authors a:hover {
    border-bottom-color: #141414;
}

html[data-theme="light"] .first-author {
    color: #000000;
}

html[data-theme="light"] .paper-note {
    color: #eb0000;
}

/* ==================== */
/* Service Grid         */
/* ==================== */

.service-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.service-label {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-top: 2px;
}

.service-content {
    font-size: 14px;
    line-height: 1.7;
    color: #c5c5c5;
}

.service-content a {
    color: #ececec;
    text-decoration: none;
    border-bottom: 1px solid #404040;
}

.service-content a:hover {
    border-bottom-color: #ececec;
}

html[data-theme="light"] .service-label {
    color: #141414;
}

html[data-theme="light"] .service-content {
    color: #333333;
}

html[data-theme="light"] .service-content a {
    color: #141414;
    border-bottom-color: #d0d0d0;
}

html[data-theme="light"] .service-content a:hover {
    border-bottom-color: #141414;
}

/* ==================== */
/* Misc Links           */
/* ==================== */

.links {
    font-size: 14px;
    line-height: 2;
}

.links > div:first-child {
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.links a {
    color: #ececec;
    text-decoration: none;
    border-bottom: 1px solid #404040;
}

.links a:hover {
    border-bottom-color: #ececec;
}

html[data-theme="light"] .links > div:first-child {
    color: #141414;
}

html[data-theme="light"] .links a {
    color: #141414;
    border-bottom-color: #d0d0d0;
}

html[data-theme="light"] .links a:hover {
    border-bottom-color: #141414;
}

/* ==================== */
/* Highlight Text       */
/* ==================== */

.highlight-text {
    color: #10a37f;
}

html[data-theme="light"] .highlight-text {
    color: #eb0000;
}






:root {
    --pub-image-width: 180px;
}

:root {
    --pub-gap-left: 10px;   /* 图片左侧间距 */
    --pub-gap-right: 36px;  /* 图片右侧间距 */
}
/* ==================== */
/* Responsive Design    */
/* ==================== */

/* ==================== */
/* Responsive Design    */
/* ==================== */

@media (max-width: 768px) {
    .container {
        padding: 32px 20px 32px;
    }
    
    nav {
        gap: 20px;
        margin-bottom: 32px;
    }
    
    nav a {
        font-size: 13px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }
    
    /* Hide profile photo on mobile */
    .profile-photo {
        display: none;
    }
    
    h1 {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .contact {
        font-size: 13px;
    }
    
    .social-links {
        justify-content: center;
        gap: 16px;
        margin-top: 16px;
    }
    
    .social-links a {
        font-size: 13px;
    }
    
    section {
        margin-bottom: 48px;
    }
    
    h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    h3 {
        font-size: 16px;
        margin-bottom: 32px;
    }
    
    /* Publications on mobile */
    .pub-item {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    /* Hide publication metadata (conference and year) on mobile */
    .pub-meta {
        display: none;
    }
    
    .pub-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .pub-title {
        font-size: 14px;
    }
    
    .pub-authors {
        font-size: 12px;
    }
    
    /* Service grid on mobile */
    .service-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .service-label {
        font-size: 11px;
        padding-top: 0;
    }
    
    .service-content {
        font-size: 13px;
    }
}
