/* Import Noto Sans (English) and Noto Sans SC (Simplified Chinese) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC&display=swap');

html {
  font-size: 1.5rem;
  font-family: 'Noto Sans', Arial, Helvetica, sans-serif; /* Default font set to Noto Sans */
}

body {
  caret-color: transparent;
  font-family: 'Noto Sans', Arial, Helvetica, sans-serif; /* Default font set to Noto Sans */
}

:lang(zh), :lang(zh-CN) {
  font-family: 'Noto Sans SC', 'Noto Sans', Arial, Helvetica, sans-serif;
}

.smaller-font {
  font-size: 0.8em;
}

table {
  border-collapse: separate;
  border-spacing: 15px 0;
}

td {
  padding: 4px 0;
}

/* Navbar Styles */
ul.navbar {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #23252D;
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background-size: 600% 600%;
  animation: navbar-gradient-move 16s ease-in-out infinite;
  background-position: 100% 100%, 100% 100%, 100% 100%;
}

ul.navbar top {
  float: left;
  text-decoration: none;
}

ul.navbar top a {
  display: block;
  color: #f3f3f3;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s;
  background: transparent;
  border: 1px solid transparent;
  font-weight: 1000;
  text-shadow: 0 0px 0px rgba(255, 255, 255, 0) !important;
}

ul.navbar top a:hover {
  background: #32343b;
  backdrop-filter: blur(14px) saturate(200%);
  -webkit-backdrop-filter: blur(14px) saturate(200%);
  color: #fff;
  border: 1px solid #b6b6b603;
  text-shadow: 0 0px 0px rgba(255, 255, 255, 0) !important;
}

/* Container Styles */
.container {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
}

.left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  min-width: 0;
}

.right-column {
  flex: 3;
  padding: 0.5rem 0.85rem;
  background-color: #efefef;
  min-width: 0;
}

/* Footer Styles */
#jsfooter,
#jsfooter-small {
  background-color: white;
  color: black;
  text-align: center;
  padding: 20px;
}

/* Responsive Styles */
@media (min-width: 768px) {
  .footer-large-screen {
    display: block;
  }

  .footer-small-screen {
    display: none;
  }
}

@media (max-width: 768px) {
  .left-column,
  .right-column {
    flex: 100%;
    max-width: 100%;
    padding: 0.5rem 0.5rem;
  }

  .container {
    display: flex;
    flex-direction: column;
  }

  .footer-large-screen {
    display: none;
  }

  .footer-small-screen {
    display: block;
  }
}

.navbar-container {
  display: flex;
  justify-content: center;
}

/* Gallery Styles */
.gallery {
  display: flex;
  flex-wrap: wrap;
}

.gallery-item {
  position: relative;
  width: 17rem;
  margin: 0.5rem;
  overflow: hidden;
  border: 0.3rem solid #000;
  border-radius: 0.5rem;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item .comment {
  text-align: center;
  font-style: italic;
  margin-top: 10px;
}

/* Larger Gallery Styles */
.gallery2x {
  display: flex;
  flex-wrap: wrap;
}

.gallery2x-item {
  position: relative;
  width: 34rem;
  margin: 0.5rem;
  overflow: hidden;
  border: 0.3rem solid #000;
  border-radius: 0.5rem;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.gallery2x-item img {
  width: 100%;
  height: 100%;
  transition: transform 0.3s;
}

.gallery2x-item:hover img {
  transform: scale(1.1);
}

.gallery2x-item .comment {
  text-align: center;
  font-style: italic;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .gallery2x-item {
    width: 17rem;
  }
}

/* Image Container Styles */
.image-container {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.image-container img {
  border: 2px solid black;
  margin-right: 10px;
  transition: transform 0.2s;
  width: 300px;
}

.image-container a {
  color: black;
  text-decoration: none;
}

.image-container a:hover img {
  border-color: #1eaad1;
  transform: scale(1.04);
}

.comment-title {
  font-weight: bold !important;
}

@media (max-width: 900px) {
  .image-container img {
    width: 180px;
}
}

@media (max-width: 768px) {
  .image-container img {
    width: 300px;
    margin-right: 0px;
}
}

/* Button Styles */
button {
  display: inline-block;
  background-color: white;
  padding: 5px;
  width: 270px;
  color: black;
  text-align: center;
  border: 5px #bbbbbb;
  border-radius: 3px;
  font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
  font-size: 1rem;
  cursor: pointer;
  margin: 5px;
  transition: all 0.4s;
}

button:hover {
  background-color: #f0f0f0;
}

/* Collapsible Text */
details {
  font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
  padding: 5px 20px;
  margin-bottom: 10px;
}

summary {
  padding: 5px 0;
  cursor: pointer;
  user-select: none;
}

/* Page Navigation Styles */
ul.navbar2 {
  list-style-type: none;
  margin: 20px;
  padding: 20px;
  overflow: hidden;
  text-align: center; /* Center the text */
}
@media (max-width: 895px) {
  ul.navbar2 {
      margin: 10px;
      padding: 5px;
  }
}

/* Hide the index section nav on small screens */
@media (max-width: 768px) {
  ul.navbar2 {
    display: none !important;
  }
}

ul.navbar2 li {
  display: block; /* Display list items as block */
  margin-bottom: 10px; /* Add some space between items */
}

ul.navbar2 li a {
  display: block;
  color: black; /* Set text color to black */
  text-align: center;
  padding: 14px 16px;
  text-decoration: none; /* Remove underline */
}

ul.navbar2 li a:hover {
  text-decoration: underline;
  text-decoration-color: black;
}

/* Index Name Card Styles */
.index-namecard {
  position: relative;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 5px 5px rgba(0,0,0,0.1);
}

.index-namecard .profile-photo {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 2rem;
  margin-left: 0.5rem;
}

.index-namecard .text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly !important;
  height: 100%;
  gap: 0.5rem;
  overflow-x: hidden
}

.index-namecard h1 {
  font-size: 1.8rem;
  font-weight: bold;
  color: #000000;
  margin: 0;
  margin-top: 0;
  margin-bottom: 0.1rem;
}

.index-namecard p {
  font-size: 1rem;
  color: #555;
  margin: 0;
  line-height: 1.4;
}

.index-namecard .location {
  font-size: 0.9rem;
  color: #888;
  margin-top: 0.25rem;
  font-style: italic;
}

.index-namecard .small-button {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  padding: 0;
  padding-left: 0.25rem;
  padding-right: 0.25rem;
  font-size: 1rem;
  width: auto;
  height: auto;
  color: #000000;
  font-weight: bold;
  border: none;
  border-radius: 0;
  cursor: pointer;
  background-color: transparent;
  margin-bottom: 0 !important;
  border-bottom: transparent 2px solid;
}

.index-namecard .small-button:hover {
  flex-wrap: wrap;
  background-color: transparent;
  border-bottom: rgb(131, 131, 131) 4px solid;
}

/* Responsive styles for index name card */
@media (max-width: 768px) {
    .index-namecard {
      flex-direction: column;
      align-items: center;
      text-align: center;
      padding: 0.5rem;
      gap: 0.5rem;
      width: 92%;
      margin: 20px auto;
      position: relative;
      overflow-x: hidden;
    }
    .index-namecard h1 {
      font-size: 1.3rem;
      font-weight: bold;
    }
    .index-namecard p {
      font-size: 0.85rem;
    }
    .index-namecard .location {
      font-size: 0.7rem;
      font-style: normal;
    }
    .index-namecard .profile-photo {
      width: 5rem;
      height: 5rem;
      border-radius: 50%;
      object-fit: cover;
      margin-right: 0rem;
      margin-left: 0rem;
    }
    .index-namecard .text-content {
      gap: 0.1rem;
    }
}

/* Index Education section */
.education-section {
  margin-top: 20px;
  font-size: 0.98rem;
}

.education-item {
  display: flex;
  margin-bottom: 20px;
}

.education-date {
  font-size: 1rem;
  flex: 1;
  font-weight: bold;
  margin-right: 1rem;
}

.education-details {
  flex: 3;
  font-size: 1rem;
  overflow-x: hidden;
}

.education-header {
  display: flex;
  justify-content: space-between;
}

.education-institution {
  font-size: 1rem;
  font-weight: bold;
}

.education-location {
  font-size: 1rem;
  color: #666;
  overflow-x: hidden;
}

.education-degree {
  font-size: 1rem;
  color: #333;
  overflow-x: hidden;
}

.education-remarks {
  font-size: 0.9rem;
  color: #555;
}

@media (max-width: 768px) {
  .education-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
    margin-bottom: 24px;
  }
  .education-date {
    font-size: 0.95rem;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.1rem;
  }

  .education-location {
    margin-bottom: 0.1rem;
    position: relative;
    overflow: visible;
  }

  .education-details {
    font-size: 0.95rem;
    width: 100%;
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0px;
  }
  .education-header {
    flex-direction: column;
    gap: 2px;
    position: relative;
  }

  .education-degree {
    position: relative;
    overflow: visible;
  }

.education-remarks {
  margin-left: 2.05rem;
  font-size: 0.9rem;
  color: #555;
  position: relative;
}

  .education-date::before {
    content: "";
    display: inline-block;
    position: absolute;
    left: 0rem;
    top: 0.2rem;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: black;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em'><path d='M8 14q-.425 0-.712-.288T7 13t.288-.712T8 12t.713.288T9 13t-.288.713T8 14m4 0q-.425 0-.712-.288T11 13t.288-.712T12 12t.713.288T13 13t-.288.713T12 14m4 0q-.425 0-.712-.288T15 13t.288-.712T16 12t.713.288T17 13t-.288.713T16 14M5 22q-.825 0-1.412-.587T3 20V6q0-.825.588-1.412T5 4h1V3q0-.425.288-.712T7 2t.713.288T8 3v1h8V3q0-.425.288-.712T17 2t.713.288T18 3v1h1q.825 0 1.413.588T21 6v14q0 .825-.587 1.413T19 22zm0-2h14V10H5z'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }

  .education-institution::before {
    content: "";
    display: inline-block;
    position: absolute;
    left: -2rem;
    top: 0.2rem;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: black;
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='1em' height='1em'><path fill='currentColor' d='M496 128v16a8 8 0 0 1-8 8h-24v12c0 6.627-5.373 12-12 12H60c-6.627 0-12-5.373-12-12v-12H24a8 8 0 0 1-8-8v-16a8 8 0 0 1 4.941-7.392l232-88a8 8 0 0 1 6.118 0l232 88A8 8 0 0 1 496 128m-24 304H40c-13.255 0-24 10.745-24 24v16a8 8 0 0 0 8 8h464a8 8 0 0 0 8-8v-16c0-13.255-10.745-24-24-24M96 192v192H60c-6.627 0-12 5.373-12 12v20h416v-20c0-6.627-5.373-12-12-12h-36V192h-64v192h-64V192h-64v192h-64V192z'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }

  .education-location::before {
    content: "";
    display: inline-block;
    position: absolute;
    left: -2rem;
    top: 0.2rem;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: #666;
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='1em' height='1em'><path fill='currentColor' d='M6 0a4.88 4.88 0 0 0-5 4.76c0 1.77.8 2.69 1.82 4c.9 1.13 1.93 2.15 2.82 3.1a.48.48 0 0 0 .72 0c.9-1 2-2 2.81-3.1c.94-1.27 1.83-2.23 1.83-4A5.11 5.11 0 0 0 6 0m0 7a2 2 0 1 1 2-2a2 2 0 0 1-2 2'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    z-index: 10001;
    overflow: visible;
  }

  .education-degree::before {
    content: "";
    display: inline-block;
    position: absolute;
    left: -2rem;
    top: 0.2rem;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: #333;
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em'><path fill='currentColor' d='M5 13.18v4L12 21l7-3.82v-4L12 17zM12 3L1 9l11 6l9-4.91V17h2V9z'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }
}

/* Index Research Section */
.indexresearch-section {
  margin-top: 20px;
  font-size: 0.98rem;
}

.indexresearch-section li {
  margin-bottom: 8px;
}

/* Index Work Section */
.work-section {
  margin-top: 20px;
}

.work-item {
  display: flex;
  margin-bottom: 20px;
}

.work-date {
  font-size: 1rem;
  flex: 1;
  font-weight: bold;
}

.work-details {
  flex: 3;
}

.work-header {
  display: flex;
  justify-content: space-between;
}

.work-logo {
  margin-right: 10px;
}

.work-logo img {
  width: 2.4rem;
  height: auto;
}

.work-company {
  font-size: 1rem;
  font-weight: bold;
}

.work-logo-company-group {
  display: flex;
  align-items: center;
  gap: 0px;
  flex-wrap: nowrap;
}

.work-location {
  font-size: 1rem;
  color: #666;
  margin-left: auto;
}

.work-position {
  font-size: 1rem;
  font-weight: bold;
  font-style: italic;
  margin-top: 10px;
}

.work-description {
  font-size: 0.95rem;
  color: #555;
  margin-top: 10px;
}

.work-highlights {
  font-size: 0.95rem;
  margin-top: 10px;
  list-style-type: disc;
  padding-left: 20px;
}

.work-highlights li {
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .work-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0px;
    margin-bottom: 24px;
  }
  .work-date {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }
  .work-details { 
    width: 100%; 
  }
  /* ----  Header layout  ---- */
  .work-header {
    display: flex;
    flex-direction: column;      /* stack title-group & location */
    align-items: flex-start;
    gap: 4px;
  }
  /* Logo + Company stay on the SAME line */
  .work-logo-company-group {
    display: flex;
    align-items: center;
    gap: 0px;
    flex-wrap: nowrap;
  }
  .work-company {
    font-size: 1rem;
    font-weight: bold;
    margin-left: 0.25rem;
  }
  .work-logo {
    margin-left: 0.1rem;
  }
  /* Location forced to next line */
  .work-location {
    align-self: flex-start;
    font-size: 0.95rem;
    color: #666;
    margin-left: 0 !important;
  }
  
  .work-position {
    font-size: 1rem;
    font-weight: bold;
    font-style: normal;
    margin-top: 0 !important;
  }
    .work-description {
    font-size: 0.95rem;
    margin-left: 2.05rem;
    color: #555;
    margin-top: 2px;
  }
  .work-highlights {
    margin-left: 2.05rem;
    font-size: 0.95rem;
    margin-top: 2px;
  }
  .work-date::before {
    content: "";
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: black;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em'><path d='M8 14q-.425 0-.712-.288T7 13t.288-.712T8 12t.713.288T9 13t-.288.713T8 14m4 0q-.425 0-.712-.288T11 13t.288-.712T12 12t.713.288T13 13t-.288.713T12 14m4 0q-.425 0-.712-.288T15 13t.288-.712T16 12t.713.288T17 13t-.288.713T16 14M5 22q-.825 0-1.412-.587T3 20V6q0-.825.588-1.412T5 4h1V3q0-.425.288-.712T7 2t.713.288T8 3v1h8V3q0-.425.288-.712T17 2t.713.288T18 3v1h1q.825 0 1.413.588T21 6v14q0 .825-.587 1.413T19 22zm0-2h14V10H5z'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }
    .work-logo-company-group::before {
    content: "";
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: black;
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em'><path fill='currentColor' d='M21 20h2v2H1v-2h2V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1zM8 11v2h3v-2zm0-4v2h3V7zm0 8v2h3v-2zm5 0v2h3v-2zm0-4v2h3v-2zm0-4v2h3V7z'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }
  .work-location::before {
    content: "";
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: #666;
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='1em' height='1em'><path fill='currentColor' d='M6 0a4.88 4.88 0 0 0-5 4.76c0 1.77.8 2.69 1.82 4c.9 1.13 1.93 2.15 2.82 3.1a.48.48 0 0 0 .72 0c.9-1 2-2 2.81-3.1c.94-1.27 1.83-2.23 1.83-4A5.11 5.11 0 0 0 6 0m0 7a2 2 0 1 1 2-2a2 2 0 0 1-2 2'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }
  .work-position::before {
    content: "";
    display: inline-block;
    width: 0.9rem;
    height: 0.9rem;
    margin-right: 0.35rem;
    margin-left: 0.8rem;
    background-color: black;
    mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='1em' height='1em'><path fill='currentColor' fill-rule='evenodd' d='M8 7a4 4 0 1 1 8 0a4 4 0 0 1-8 0m0 6a5 5 0 0 0-5 5a3 3 0 0 0 3 3h12a3 3 0 0 0 3-3a5 5 0 0 0-5-5z' clip-rule='evenodd'/></svg>");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
  }
}

/* Index Awards Section */
.awards-section {
  margin-top: 20px;
  font-size: 0.98rem;
}

.awards-section li {
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .awards-section li {
    margin-bottom: 5px;
}
}

/* Index Contacts Section */
.contact-section {
  margin-top: 20px;
  font-size: 0.98rem;
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 100%;
  overflow-x: hidden
}

.contact-links li {
  border-bottom: transparent;
  overflow-x: hidden
}

.contact-links li.nolink {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #eee;
  overflow-x: hidden;
}

.contact-links li.nolink:hover {
  background-color: #f9f9f9;
}

.contact-links a.link-wrapper {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.3s ease;
  overflow-x: hidden;
}

.contact-links a.link-wrapper:hover {
  background-color: #f9f9f9;
}

.contact-links .icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  padding-top: 0;
}

.contact-links .label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
  margin-right: 0.5rem;
  flex-shrink: 0;
  text-overflow: ellipsis;
}

.contact-links .link {
  font-size: 0.8rem;
  color: #525252;
  text-overflow: ellipsis;
}

.contact-links .separator {
  flex-grow: 1;
  height: 1px;
  background-color: #ccc;
  margin: 0 0.5rem;
}

@media (max-width: 768px) {

.contact-links .icon {
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.contact-links .label {
  font-weight: 600;
  color: #333;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.contact-links .link {
  font-size: 0.7rem;
  color: #525252;
  max-width: 15rem;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.contact-links li.nolink {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.9rem;
}
.contact-links a.link-wrapper {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.9rem;
}
}

@media (max-width: 460px) {
.contact-links .icon {
  margin-right: 0.3rem;
  flex-shrink: 0;
}

.contact-links .label {
  font-weight: 600;
  margin-right: 0.3rem;
}

.contact-links .link {
  font-size: 0.6rem;
  color: #525252;
  max-width: 8rem;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.contact-links li.nolink {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.9rem;
}
.contact-links a.link-wrapper {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  font-size: 0.9rem;
}
}

/* CSS for Research Page */
.research-body {
  font-family: 'Noto Sans', Arial, Helvetica, sans-serif; /* Apply font set to Noto Sans */
  line-height: 1.6;
  color: #444;
  margin: 0;
  padding: 0;
  background-color: #efefef;
}
.research-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0.5em;
  padding-left: 3em;
  padding-right: 3em;
}
.research-header {
  background-color: #535361;
  color: white;
  padding: 1rem 0;
  text-align: center;
}
.research-header h1 {
  margin: 0;
  font-size: 0.9rem;
}
.research-header p {
  margin: 0.5rem 0 0;
  font-size: 1rem;
}
.research-tabs {
  font-size: 1rem;
  background-color: #efefef;
  padding: 0.3rem;
  margin-bottom: 0.2rem;
  margin-top: 1rem;
}
.research-tabs ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.research-tabs ul li {
  margin: 0 0.5rem;
}
.research-tabs ul li button {
  background: none;
  border: none;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  padding-left: 0rem;
  padding-right: 0rem;
  cursor: pointer;
  font-weight: 600;
  color: #23252D;
  border-radius: 0;
  transition: all 0.3s ease;
}
.research-tabs ul li button:hover {
  box-shadow: inset 0 -5px 0 #23252D; /* Underline effect without changing the button size by thickening the boader */
  background-color: #cad7db;
}
.research-tabs ul li button.research-active {
  background-color: #23252D;
  color: white;
}
.research-section {
  margin-bottom: 1rem;
  display: none;
}
.research-section.research-active {
  display: block;
}
.research-h2 {
  color: #444;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
  font-size: 1.1rem;
}
.research-h3 {
  color: #444;
  font-size: 1.0rem;
  margin-top: 1rem;
}
.research-project,
.research-publication,
.research-presentation {
  background-color: white;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}
.research-ul {
  padding-left: 1.5rem;
}


@media (max-width: 768px) {
  .research-header h1 {
    font-size: 0.9rem;
  }
  .research-header p {
    font-size: 0.9rem;
  }
  .research-tabs ul li {
    margin: 0.2rem;
  }
  .research-container {
    padding: 10px;
  }
  .research-h2 {
    font-size: 1.0rem;
  }
  .research-h3 {
    font-size: 1.0rem;
  }
}

/* Responsive styles for image-container */
@media (max-width: 768px) {
  .image-container {
    flex-direction: column;
    align-items: center;
  }

  .image-container img {
    margin-right: 0;
    margin-bottom: 10px;
  }
}

@media (min-width: 769px) {
  .image-container {
    flex-direction: row;
  }

  .image-container img {
    margin-right: 10px;
    margin-bottom: 0;
  }
}

/* Hyperlink Styles */
a {
  text-decoration: none;
  color: #2f5183d8;
  text-shadow: 0 0 6px rgba(180, 190, 210, 0.2);
}

.a:hover {
  filter: brightness(1.3) contrast(1.15);
  text-shadow: 0 0 10px rgba(200, 210, 230, 0.4);
}

.bold-link {
  text-decoration: none;
  font-weight: 600;
  color: #2f5183d8;
  text-shadow: 0 0 6px rgba(180, 190, 210, 0.2);
}

.bold-link:hover {
  filter: brightness(1.3) contrast(1.15);
  text-shadow: 0 0 10px rgba(200, 210, 230, 0.4);
}


/* Animated Gradient Link Styles */
.animated-gradient-link {
  display: inline-block;
  font-weight: normal;
  background:
    linear-gradient(120deg,
      #35507a 0%,
      #4a5d80 20%,
      #7a8ba3 40%,
      #5c6b82 60%,
      #232a36 80%,
      #1a1f28 100%
    ),
    linear-gradient(90deg,
      #b0b6c3 0%,
      #9fa5b2 25%,
      #7e8490 50%,
      #5a5f6b 75%,
      #3a4250 100%
    );
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: link-gradient-move 12s ease-in-out infinite;
  transition: filter 0.3s, text-shadow 0.3s;
  text-shadow: 0 0 6px rgba(180, 190, 210, 0.2);
}

.animated-gradient-link:hover {
  filter: brightness(1.3) contrast(1.15);
  text-shadow: 0 0 10px rgba(200, 210, 230, 0.4);
}

@keyframes link-gradient-move {
  0% {
    background-position: 0% 50%, 100% 50%;
  }
  50% {
    background-position: 100% 50%, 0% 50%;
  }
  100% {
    background-position: 0% 50%, 100% 50%;
  }
}
/* Animated gradient link styles */
  .particle-link-radiant-link {
      position: relative;
      display: inline-block;
      font-weight: bold;
      background: linear-gradient(120deg,
          #35507a 0%, #4a5d80 20%, #7a8ba3 40%, #5c6b82 60%, #232a36 80%, #1a1f28 100%);
      background-size: 400% 400%;
      background-clip: text;
      -webkit-background-clip: text;
      color: transparent;
      -webkit-text-fill-color: transparent;
      animation: particle-link-link-gradient-move 12s ease-in-out infinite;
      cursor: pointer;
      text-shadow: 0 0 6px rgba(180, 190, 210, 0.2);
  }

  .particle-link-radiant-link:hover {
      filter: brightness(1.3) contrast(1.15);
      text-decoration: underline;
      text-shadow: 0 0 10px rgba(200, 210, 230, 0.4);
  }

  @keyframes particle-link-link-gradient-move {
      0% { background-position: 0% 50%, 100% 50%; }
      50% { background-position: 100% 50%, 0% 50%; }
      100% { background-position: 0% 50%, 100% 50%; }
  }

  /* In-line wrapper for positioning particles */
  .particle-link-link-wrapper {
      position: relative;
      display: inline-block;
  }

  .particle-link-particle {
    position: absolute;
    width: 2.5px;
    height: 2.5px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
    transform: scale(0.8);
    z-index: 1;
    filter: blur(1px);
}

  .particle-link-particle.particle-link-front {
      z-index: 3;
  }


/* End of hyperlink related styles */


h2 {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0.8em 0 0.7em 0;
}


/* Carousel / Gallery Styles */
.carousel {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
  max-height: 60vh; /* prevent carousel from growing taller than viewport */
}

.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
  align-items: center; /* vertically center slides inside the carousel */
}

.carousel-slide {
  flex: 0 0 100%; /* each slide occupies the full carousel width */
  max-width: 100%;
  box-sizing: border-box;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh; /* limit very tall images so they scale down */
  object-fit: contain; /* show the whole image without cropping (use 'cover' to fill/crop) */
  transition: all 0.4s ease;
}

.carousel-slide img:hover {
  scale: 1.05;
  transition: scale 1s ease;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: none;
  padding: 2px 2px; /* make buttons thinner */
  border-radius: 4px;
  cursor: pointer;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 0.95rem;
  width: auto; /* override generic button width so carousel controls stay compact */
}

.carousel-button:hover {
  background: rgba(0, 0, 0, 0.3);;
}

.carousel-button.prev { left: 8px; }
.carousel-button.next { right: 8px; }

.carousel-button:focus { outline: 2px solid rgba(255,255,255,0.9); }

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0 6px 0;
  position: absolute; /* ensure dots are visible above slides */
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 45;
  pointer-events: auto;
}

.carousel-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.18);
  cursor: pointer;
}

.carousel-dots button:hover {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.61);
  cursor: pointer;
}

.carousel-dots button.active {
  background: #0e2431;
  width: 12px;
  height: 12px;
}

/* Hide dots when there is only one slide - uses :has() where supported. 
   Fallback: if you need wider browser support, add a small JS check to hide the dots when there is only one .carousel-slide. */
.carousel:has(.carousel-track > .carousel-slide:only-child) .carousel-dots {
  display: none !important;
}

/* Make carousel buttons smaller on very small screens */
@media (max-width: 420px) {
  .carousel-button { padding: 4px 6px; height: 32px; min-width: 32px; font-size: 0.9rem; }
}

/* Mobile-only hamburger menu */
/* Hide mobile hamburger on larger screens */
@media (min-width: 768px) {
  .mobile-navbar {
    display: none;
  }
}

/* Show mobile hamburger and hide desktop nav on small screens */
@media (max-width: 768px) {
  /* Hide desktop nav items (original) */
  ul.navbar {
    display: none;
  }

  .mobile-navbar {
    display: block;
    width: 100%;
    position: fixed;     /* fixed to top so navbar remains visible when scrolling */
    top: 0;
    left: 0;
    right: 0;
    height: 56px; /* navbar height on mobile */
    background: rgba(255,255,255,0.98);
    padding: 6px 12px;
    box-sizing: border-box;
    z-index: 10000;
  }

  .mobile-nav-container {
    position: relative;
    max-width: 100%;
  }

  /* invisible checkbox to toggle menu */
  .mobile-checkbox {
    position: absolute;
    height: 36px;
    width: 36px;
    top: 12px;
    right: 12px; /* moved to top-right */
    z-index: 10003;
    opacity: 0;
    cursor: pointer;
  }

  /* hamburger icon (label for checkbox) */
  .mobile-hamburger {
    display: block;
    height: 26px;
    width: 36px;
    position: absolute;
  top: 12px;
  right: 12px; /* moved to top-right */
  z-index: 10002;
    cursor: pointer;
    /* make it a positioned container for absolutely-positioned lines */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
  }

  .mobile-hamburger .m-line {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    height: 4px;
    width: 100%;
    border-radius: 10px;
    background: #0e2431; /* match site's link color */
    transition: transform 0.28s ease, opacity 0.18s ease;
    transform-origin: center;
  }

  /* position the three bars: top, center, bottom */
  .mobile-hamburger .m-line1 { top: 0; }
  .mobile-hamburger .m-line2 { top: 50%; transform: translateY(-50%); }
  .mobile-hamburger .m-line3 { bottom: 0; }

  /* Sliding menu overlay */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 56px; /* match .mobile-navbar height */
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    transform: translateX(-120%);
    transition: transform 0.4s ease-in-out;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, #efefef 100%);
    box-shadow: 0 6px 30px rgba(0,0,0,0.18);
    z-index: 10001;
  }

  .mobile-menu ul {
    padding-left: 0;
    margin: 0;
  }

  .mobile-menu li {
    list-style: none;
    margin-bottom: 1.1rem;
    font-size: 1.25rem;
    font-weight: 600;
  }

  .mobile-menu a {
    text-decoration: none;
    color: #0e2431;
    display: block;
    padding: 6px 8px;
  }

  .mobile-menu a:hover {
    background: rgba(14,36,49,0.06);
    border-radius: 6px;
  }

  /* Toggle states via checkbox (CSS only) */
  .mobile-checkbox:checked ~ .mobile-menu {
    transform: translateX(0);
  }

  /* When checked: move top and bottom into center and rotate to form an X */
  .mobile-checkbox:checked + .mobile-hamburger .m-line1 {
    transform: translateY(11px) rotate(45deg);
  }

  .mobile-checkbox:checked + .mobile-hamburger .m-line2 {
    opacity: 0;
    transform: scaleX(0);
  }

  .mobile-checkbox:checked + .mobile-hamburger .m-line3 {
    transform: translateY(-11px) rotate(-45deg);
  }

  /* Add some space on top of left column on smaller screen */
  .left-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  padding-top: 1.5rem;
}
}