@font-face {
  font-family: 'YeZiGong'; 
  src: url('YeZiGongChangJingHongXingKai.ttf') format('truetype');
  font-weight: Medium;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('Quicksand/Quicksand-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('Quicksand/Quicksand-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('Quicksand/Quicksand-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('Quicksand/Quicksand-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Quicksand';
  src: url('Quicksand/Quicksand-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
  background-image: url("../images/texture.jpeg");
  font-weight: 500;  /* 正文至少 Medium */
  font-size: 1.6em;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', Verdana, "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

#page {
  background-color: #ffffff;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  margin-bottom: 20px;
  width: 1200px;
  max-width: 100%;
  text-align: left;
  border-left: 2px solid #f1f1f1;
  border-right: 2px solid #f1f1f1;
  border-top: 2px solid #f1f1f1;
  border-bottom: 2px solid #f1f1f1;
  overflow-x: hidden;
 }

/* 正文元素至少 Medium，覆盖 bootstrap 等可能较细的默认值 */
#main p, #main li, #main span, #main .news-content, #main .research-authors, #main .research-venue {
  font-weight: 500;
}

 .news-container {
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-left: 4px solid #165fa9;
  border-radius: 6px;
  padding: 18px 15px 5px 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.news-container:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-left-color: #1b4874;
}

.news-title {
  font-size: 22px;
  font-weight: 600;  /* SemiBold：小节标题 */
  font-style: italic;
  color: #b30000;
  margin: 0 0 3px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8e8e8;
  letter-spacing: -0.3px;
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

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

.news-item:hover {
  background-color: #fafafa;
  margin: 0 -6px;
  padding-left: 6px;
  padding-right: 6px;
  border-radius: 4px;
}

.news-content {
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  flex: 1;
}

.news-date {
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: brown;
  flex-shrink: 0;
  margin-left: 16px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.news-link {
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.news-link:hover {
  text-decoration: underline;
}

/* Profile Links - Button Style */
.profile-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: #4a90e2;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.profile-link i {
  margin-right: 6px;
  font-size: 14px;
}

.profile-link:hover {
  background-color: #4a90e2;
  color: white;
  border-color: #4a90e2;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
  text-decoration: none;
}
 
 #inner-page{
    padding: 20px 26px 26px 26px;
 }

#main { 
  border-bottom: 1px solid #d9d9d9;
 }

.row-thin {
  margin-left: 2%;
  margin-right: 2%;
}


.img_research {
  width: 280px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  object-fit: cover;
}

.img_research:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.links a{
  text-decoration: none;
}

.links a:hover{
  text-decoration: underline;
}

.paper-link{
  margin-right: 5px;
  color: #4CAF50;
}

.code-link{
  margin-right: 5px;
  color: orange;
}

.title-link{
  color: black
}

.slides-link{
  margin-right: 5px;
  color: purple
}

.video-link{
  margin-right: 5px;
  color: pink
}

.blog-link{
  margin-right: 5px;
  color: red;
}


@media only screen and (max-width: 1000px) {
  .flex-col {
    display: none;
  }
}

.date {
  font-style: italic;
  color:brown;
  float:right;
}

h2 {
  font-weight: 600;  /* Bold：大标题 */
  font-style: italic;
  border-bottom: 2px solid #cecfcf; 
  padding-bottom: 5px;            
  margin-bottom: 15px;    
  display: block;  
}

ul.my_table{
  list-style:none;
  margin: 0;
  padding: 0 0 10px 0;
}


ul.my_table.edu_table > li.my_item{
  display: grid;
  grid-template-columns: 90px 1fr;  /* logo列固定宽度 */
  column-gap: 14px;
  align-items: center;              /* 垂直居中 */
  padding: 10px 0;
  clear: both;
}

/* 兼容：img 可能在 li 下，也可能在 li>div 里 */
ul.my_table.edu_table > li.my_item > img,
ul.my_table.edu_table > li.my_item > div > img{
  float: none !important;
  margin: 0 !important;             /* 压掉 inline margin-left/right */
  justify-self: center;
}

/* 内容区排版 */
ul.my_table.edu_table > li.my_item p{
  margin: 0;
  line-height: 1.35;
}

ul.my_table.res_table > li.my_item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
  align-items: start;           
  padding: 24px 16px;
  clear: both;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 0;
  transition: all 0.2s ease;
}

ul.my_table.res_table > li.my_item:first-child {
  padding-top: 16px;
}

ul.my_table.res_table > li.my_item:last-child {
  border-bottom: none;
  padding-bottom: 16px;
}

ul.my_table.restable > li.my_item > img,
ul.my_table.res_table > li.my_item > div{
  float: none !important;
  margin: 0 !important;
  justify-self: start;
}

/* Research item styling */
.research-item {
  transition: all 0.2s ease;
}

.research-item:hover {
  background-color: #fafafa;
  border-radius: 6px;
  transform: translateX(2px);
}

.research-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.research-title {
  font-size: 21px;
  font-weight: 600;  /* SemiBold：小节标题 */
  color: #1a1a1a;
  margin: 0 0 4px 0;
  line-height: 1.4;
  letter-spacing: -0.3px;
}

.research-authors {
  font-size: 15px;
  color: #666;
  font-style: normal;
  margin: 0 0 4px 0;
  line-height: 1.5;
}

.research-venue {
  font-size: 14px;
  color: #888;
  font-style: italic;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

/* 摘要框样式 */
.abstract-box {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-left: 3px solid #4a90e2;
  border-radius: 6px;
  padding: 0 18px;
  margin: 0;
  position: relative;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform-origin: top;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease, 
              padding-top 0.4s ease,
              padding-bottom 0.4s ease,
              margin-top 0.4s ease;
}

.abstract-box.expanded {
  max-height: 500px;
  opacity: 1;
  padding-top: 16px;
  padding-bottom: 16px;
  margin-top: 10px;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.35s ease 0.05s, 
              padding-top 0.4s ease,
              padding-bottom 0.4s ease,
              margin-top 0.4s ease;
}

.abstract-box:hover {
  border-left-color: #357abd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.abstract-content {
  font-size: 15px;
  line-height: 1.75;
  color: #4a4a4a;
  margin: 0;
  font-weight: 500;  /* Medium：正文 */
}


.research-links {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.paper-link {
  color: #4CAF50;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: 1px solid #4CAF50;
  display: inline-block;
}

.paper-link:hover {
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.abstract-btn {
  color: #4a90e2;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: 1px solid #4a90e2;
  display: inline-block;
  user-select: none;
}

.abstract-btn:hover {
  background-color: #4a90e2;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.abstract-btn.active {
  background-color: #4a90e2;
  color: white;
}

/* ============================================
   Responsive Design for Mobile Devices
   ============================================ */

/* Tablet and below (max-width: 1024px) */
@media only screen and (max-width: 1024px) {
  #page {
    width: 95%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
  }
  
  #inner-page {
    padding: 15px 20px;
    box-sizing: border-box;
    max-width: 100%;
  }
  
  .row-thin {
    margin-left: 1%;
    margin-right: 1%;
    width: 98%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .row-thin > * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .img_research {
    width: 240px;
    max-width: 100%;
  }
  
  .col-md-12 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Mobile devices (max-width: 768px) */
@media only screen and (max-width: 768px) {
  body {
    font-size: 1.4em;
  }
  
  #page {
    width: 100%;
    margin: 0;
    border-left: none;
    border-right: none;
  }
  
  #inner-page {
    padding: 15px;
  }
  
  .row-thin {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .row-thin > * {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* Prevent text overflow */
  p, span, div, h1, h2, h3, h4, h5, h6, li, a {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  a {
    word-break: break-all;
  }
  
  /* Profile Header Section - Complete Redesign */
  .row-thin:first-of-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 0 0 0;
  }
  
  /* Hide br tags in mobile Profile section */
  .row-thin:first-of-type br {
    display: none;
  }
  
  .row-thin:first-of-type > div[style*="float:left"],
  .row-thin:first-of-type > div[style*="float:right"] {
    float: none !important;
    width: 100%;
    max-width: 100%;
  }
  
  /* Profile Image */
  .row-thin:first-of-type > div[style*="float:right"] {
    order: -1;
    margin-bottom: 15px;
    margin-top: 0;
  }
  
  .row-thin:first-of-type > div[style*="float:right"] img {
    float: none !important;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  /* Profile Name and Title */
  .row-thin:first-of-type > div[style*="float:left"] {
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0;
    line-height: 1.4;
  }
  
  .row-thin:first-of-type > div[style*="float:left"] > span:first-child {
    display: block;
    margin-bottom: 6px;
    line-height: 1.2;
  }
  
  span[style*="font-size:50px"] {
    font-size: 32px !important;
    display: inline-block;
    margin-right: 8px;
  }
  
  span[style*="font-size:35px"] {
    font-size: 26px !important;
    display: inline-block;
  }
  
  .row-thin:first-of-type > div[style*="float:left"] > span:not(:first-child):not(:last-child) {
    display: block;
    margin: 2px 0;
    font-size: 16px;
    color: #666;
  }
  
  /* Profile Links - Mobile */
  .profile-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin-top: 8px;
  }
  
  .profile-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #4a90e2;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  
  .profile-link:hover {
    background-color: #4a90e2;
    color: white;
    border-color: #4a90e2;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
    text-decoration: none;
  }
  
  .profile-link i {
    margin-right: 5px;
    font-size: 13px;
  }
  
  /* News container */
  .row-thin {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .row-thin > * {
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* News container */
  .news-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 15px !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .news-container.col-md-12 {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100%;
    max-width: 100%;
  }
  
  .col-md-12 {
    width: 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
  }
  
  .news-title {
    font-size: 20px;
  }
  
  .news-item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .news-content {
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .news-date {
    margin-left: 0;
    margin-top: 6px;
    align-self: flex-end;
  }
  
  .news-list {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Research section */
  ul.my_table.res_table {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0;
    box-sizing: border-box;
  }
  
  ul.my_table.res_table > li.my_item {
    grid-template-columns: 1fr;
    column-gap: 0;
    padding: 20px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .img_research {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
    justify-self: center;
    box-sizing: border-box;
  }
  
  .research-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .research-title {
    font-size: 18px;
  }
  
  .research-authors {
    font-size: 14px;
  }
  
  .research-venue {
    font-size: 13px;
  }
  
  .research-links {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .paper-link,
  .abstract-btn {
    font-size: 13px;
    padding: 5px 10px;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* Education and Experience sections */
  ul.my_table.edu_table {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0;
    box-sizing: border-box;
  }
  
  ul.my_table.edu_table > li.my_item {
    grid-template-columns: 70px 1fr;
    column-gap: 12px;
    padding: 15px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  ul.my_table.edu_table > li.my_item > img,
  ul.my_table.edu_table > li.my_item > div > img {
    width: 50px !important;
    height: 50px !important;
  }
  
  ul.my_table.edu_table > li.my_item > div {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  
  /* Headings */
  h2 {
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  h3 {
    font-size: 18px;
  }
}

/* Small mobile devices (max-width: 480px) */
@media only screen and (max-width: 480px) {
  body {
    font-size: 1.2em;
  }
  
  #inner-page {
    padding: 12px;
  }
  
  /* Profile Section - Small Mobile */
  .row-thin:first-of-type > div[style*="float:right"] {
    margin-bottom: 12px;
  }
  
  .row-thin:first-of-type > div[style*="float:right"] img {
    width: 120px;
    height: 120px;
  }
  
  span[style*="font-size:50px"] {
    font-size: 28px !important;
  }
  
  span[style*="font-size:35px"] {
    font-size: 22px !important;
  }
  
  .row-thin:first-of-type > div[style*="float:left"] > span:not(:first-child):not(:last-child) {
    font-size: 14px;
    margin: 2px 0;
  }
  
  /* Profile Links - Small Mobile */
  .profile-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
  }
  
  .profile-link {
    padding: 6px 10px;
    font-size: 12px;
    flex: 0 0 auto;
  }
  
  .profile-link i {
    margin-right: 4px;
    font-size: 12px;
  }
  
  .news-title {
    font-size: 18px;
  }
  
  .news-content {
    font-size: 14px;
  }
  
  .news-date {
    font-size: 13px;
  }
  
  .research-title {
    font-size: 16px;
  }
  
  .research-authors {
    font-size: 13px;
  }
  
  .research-venue {
    font-size: 12px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .paper-link,
  .abstract-btn {
    font-size: 12px;
    padding: 4px 8px;
  }
  
  ul.my_table.edu_table > li.my_item {
    grid-template-columns: 60px 1fr;
    column-gap: 10px;
  }
  
  ul.my_table.edu_table > li.my_item > img,
  ul.my_table.edu_table > li.my_item > div > img {
    width: 45px !important;
    height: 45px !important;
  }
}
