/* 让 publications-table 区域内 <br> 换行无额外间距 */
.publications-table br {
    display: block;
    margin: 0;
    line-height: 0.3;
    height: 0.2em;
}
@import "./styles.css";


:root{
    --h-title-color:#3948d2;
    --content-max-width: 1200px; /* 统一内容列宽 */
    --blog-card-bg:#fff;
    --blog-border:#e9ecef;
}

.header {
    border-bottom: solid 2px var(--bs-blue);
    z-index: 10000;
}

.bg-bottom {
    background-color: var(--h-title-color);
}

.top-section {
    position: relative;
    padding: 10rem 0;
    background-position: center;
    background-size: cover;
    height: 25rem;
}

.top-section h2 {
    font-weight: 400;
}

.top-section .top-section-content {
    position: relative;
    z-index: 1;
}

.top-section:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

section header h2{
    font-family: "Kanit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
    color: var(--h-title-color);
    font-size: 2.3rem;
    line-height: 3rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

/* 调整section的padding来减少上方间距 */
section {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

section.bg-gradient-primary-to-secondary-light:first-of-type {
    padding-top: 1rem;
}

section .main-body{
    font-size: 1.3rem;
    font-weight: 200;
    line-height: 2.4rem;
}

/* 统一各模块(header 与内容)的列宽 */
section .container > header,
section .container > .main-body{
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
}


.bg-gradient-primary-to-secondary-light {
    background: linear-gradient(45deg, #fcfcfc, #ffffff) !important;
}

.bg-gradient-primary-to-secondary-gray {
    background: linear-gradient(45deg, #f0f0f0, #f1f1f1) !important;
}



.on-top {
    position: relative;
    z-index: 10000;
}

.top-bg {
    background-position: center;
    background-size: fill;
    width: 100%;
    height: 100%;
}

.top-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}


#avatar {
    position: relative;
    height: 0;
    top:min(-65px,max(-100px,calc(-1*100vw/12)));
    max-width: 55em;
    margin: 0 1.5rem 0 0;
    float: right;
    z-index: 9000;
}

#avatar img {
    /* Avatar size: medium on desktop, smaller on small screens */
    height: max(120px, min(220px, calc(100vw/6)));
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem; /* Increase spacing between avatar and text below */
}

@media screen and (max-width: 991px) {
    #avatar {
        margin: 0;
    }
    #avatar img {
        /* Keep avatar reasonable on tablets/phones */
        height: max(120px, min(180px, calc(100vw/4)));
    }
}

.container {
    padding-left: 2rem; /* 增加左侧内边距 */
    padding-right: 2rem; /* 增加右侧内边距 */
}

/* Remove underline from links in home section */
#home a {
    text-decoration: none;
}
#home a:hover {
    text-decoration: none;
}

/* Publications Section - 现代化卡片式布局 */
.publications-list {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.publication-item {
    display: grid;
    grid-template-columns: 260px 1fr; /* 固定图片列 + 自适应内容列 */
    column-gap: 2rem; /* 图片与文字间距 */
    align-items: start; /* 顶部对齐 */
    justify-content: center; /* 整体居中 */
    margin-bottom: 1.6rem; /* 条目间距保持 */
    padding: 1.25rem 1rem; /* 紧凑内边距 */
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    transition: none;
}

.publication-item:hover {
    /* Remove all hover effects for embedded style */
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.pub-image {
    width: 100%; /* 在网格中占满自身列 */
    max-width: 260px; /* 与列宽一致 */
    height: auto; /* 保持比例 */
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
    background: transparent;
    padding: 0;
    border: none;
}

.pub-content {
    min-width: 0;
    text-align: left; /* 确保正文在内容列内左对齐，TL;DR 会沿此起点对齐 */
}

/* TL;DR concise summary block */
.pub-tldr {
    display: inline-block; /* 不占满整行，背景随文字宽度收缩 */
    margin-top: 0.35rem;
    margin-bottom: 0.6rem;
    color: #444;
    background: rgba(41,55,240,0.04); /* subtle tint */
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.3;
    max-width: 100%;
    word-break: break-word; /* 防止长词撑开背景 */
}

.pub-title {
    font-size: 1.18rem; /* slightly smaller */
    font-weight: 600;
    color: var(--h-title-color);
    line-height: 1.2; /* tighter lines */
    margin-bottom: 0.35rem; /* reduce gap to authors */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* standard property for compatibility */
    -webkit-box-orient: vertical;
}

.pub-authors {
    font-size: 0.98rem;
    color: #4a5568;
    line-height: 1.25;
    margin-bottom: 0.35rem;
}

.author-me {
    font-weight: 700; /* stronger weight */
    color: #000000;   /* black */
    text-decoration: none; /* remove underline */
}

.pub-venue {
    font-size: 0.95rem;
    color: #718096;
    font-style: normal; /* remove italic */
    margin-bottom: 1rem;
}

.pub-links {
    display: flex;
    gap: 1rem; /* tighten gap */
    flex-wrap: wrap;
}

.pub-links a {
    color: var(--h-title-color);
    text-decoration: none; /* remove underline for minimal style */
    font-size: 0.95rem;
    font-weight: 500; /* slightly emphasized */
    padding: 0 0.15rem; /* minimal horizontal padding */
    border: none;
    transition: color 0.15s ease;
}

.pub-links a:hover {
    color: #1f2fc7; /* subtle darker blue on hover */
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .publication-item {
        display: block; /* 移动端改为块级顺序堆叠 */
        padding: 1.5rem;
        text-align: center;
    }
    
    .pub-image {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 1.5rem auto;
    }
    
    .pub-content {
        width: 100%;
    }
    
    .pub-links {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .pub-links a {
        font-size: 0.85rem;
        padding: 0.3rem 0.6rem;
    }
}

.publications-table {
    width: 100%;
}

.publications-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.publications-table td {
    padding: 1.25rem 1.5rem;
    vertical-align: top; /* 与图片顶部对齐 */
    border-bottom: 1px solid #e9ecef;
}

.publications-table td:first-child {
    width: 300px;              /* 增加图片列宽度以容纳更大的图片 */
    padding-right: 2rem;       /* 增加图片与文字的间距 */
}

.publications-table img {
    width: 100%;               /* 让图片适应容器宽度 */
    max-width: 280px;          /* 最大宽度限制 */
    height: auto;              /* 自动高度保持比例 */
    object-fit: contain;       /* 确保图片完整显示不被裁剪 */
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #f8fafc;       /* 添加背景色填充空白区域 */
    padding: 0.5rem;          /* 内边距让图片不贴边 */
    border: 1px solid #e2e8f0; /* 添加细边框 */
}

.publications-table img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.publications-table td {
    padding: 1.5rem;           /* 增加内边距 */
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0; /* 更淡的分割线 */
    background: #ffffff;       /* 确保背景为白色 */
}

.publications-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    border-radius: 12px;       /* 圆角表格 */
    overflow: hidden;          /* 隐藏圆角外的内容 */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); /* 添加阴影 */
}

.publications-table td:last-child {
    line-height: 1.4;          /* 改善可读性 */
}

.publications-table strong {
    font-size: 1.25rem;        /* 稍微减小标题字体 */
    color: var(--h-title-color);
    display: block;
    margin-bottom: 0.5rem;     /* 增加标题与作者的间距 */
    line-height: 1.3;
    font-weight: 600;
}

.publications-table .author-me {
    font-weight: 600;
    color: var(--h-title-color);
    margin-bottom: 0.5rem;
}

.publications-table em {
    color: #666;
    font-style: italic;
    display: block;
    margin: 0.05rem 0;         /* 年份上下距离更小 */
}

.publications-table a {
    color: var(--h-title-color);
    text-decoration: none;
    margin-right: 0.6rem;      /* 链接之间距离更紧凑 */
    font-size: 1.05rem;        /* 增大arXiv链接字体 */
}

.publications-table a:hover {
    text-decoration: underline;
}

/* 行 hover 高亮，提升分辨性 */
.publications-table tr:hover td {
    background: #fafafa;
}

/* Awards section */
.publications-table ul {
    list-style: none;
    padding: 0;
}

.publications-table li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.publications-table li:before {
    content: "•";
    color: var(--h-title-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .publications-table td:first-child {
        width: 140px;          /* 移动端更紧凑 */
        padding-right: 1rem;
    }
    
    .publications-table img {
        max-width: 120px;      /* 移动端图片适中大小 */
        padding: 0.3rem;      /* 减少内边距 */
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* section间距在移动端进一步减小 */
    section {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
    
    section header h2 {
        font-size: 2rem;
        line-height: 2.5rem;
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    
    /* 仍保留横向滚动的兜底，避免表格在小屏过度拥挤 */
    .publications-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Publications Section Styles - Jon Barron Style */
.publications-list {
    max-width: var(--content-max-width);
    margin: 0 auto;
}

/* Blog list */
.blog-list{
    max-width: var(--content-max-width);
    margin: 1rem auto 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.blog-card{
    background: var(--blog-card-bg);
    border: 1px solid var(--blog-border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: transform .15s ease, box-shadow .15s ease;
}
.blog-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.blog-card-body{ padding: 1.1rem 1.25rem; }
.blog-title{ font-size: 1.35rem; margin: 0 0 .35rem; }
.blog-title a{ color: var(--h-title-color); text-decoration: none; }
.blog-title a:hover{ text-decoration: underline; }
.blog-meta{ color:#666; font-size: .95rem; margin-bottom: .25rem; }
.blog-desc{ margin: .25rem 0 0; color:#333; font-size: 1.1rem; line-height: 1.6; }
.tag{ display:inline-block; padding:.15rem .5rem; margin-left:.35rem; background:#f3f6ff; color:#3951d2; border:1px solid #e1e6ff; border-radius: 999px; font-size:.8rem; }

@media (min-width: 900px){
    .blog-list{ grid-template-columns: 1fr 1fr; }
}

.publication-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

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

/* Consolidated publication styles above; duplicates removed. */

/* Jon Barron style mobile optimization */
@media (max-width: 768px) {
    .publication-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .pub-image {
        margin-right: 0;
        margin-bottom: 1rem;
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .pub-content {
        width: 100%;
    }
}

/* Social Media Icons Styles */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 1rem 0 2rem 0; /* 减少上边距，增加下边距 */
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f8f9fa;
    color: #6c757d;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.3rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
    border: 1px solid #e9ecef;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Individual icon colors on hover */
.social-icon:nth-child(1):hover { /* Email */
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.social-icon:nth-child(2):hover { /* Google Scholar */
    background: #4285f4;
    color: white;
    border-color: #4285f4;
}

.social-icon:nth-child(3):hover { /* GitHub */
    background: #24292e;
    color: white;
    border-color: #24292e;
}

/* Removed LinkedIn 4th icon hover style since no 4th icon is present */

/* Responsive adjustments for social icons */
@media (max-width: 768px) {
    .social-icons {
        gap: 1rem;
        margin: 2rem 0;
    }
    
    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* Align social icons directly under the home subtitle and left-align them */
section#home .social-icons {
    justify-content: flex-start; /* 左对齐 */
    margin: 0.25rem 0 1.5rem 0;  /* 更靠近副标题 */
    padding-left: 0;             /* 确保无额外缩进 */
}

