:root {
  --blue-900: #0b2d5a;
  --blue-700: #124f9a;
  --blue-500: #1e6fd6;
  --blue-200: #d6e6ff;
  --blue-100: #eef4ff;
  --gray-900: #111;
  --gray-700: #333;
  --gray-400: #888;
  --border-light: #e5ecf7;
  --primary-color: #1772d0;
  --accent-color: #f09228;
  --text-color: #333;
  --bg-color: #fff;
  --header-bg: #25282D;
  --header-text: #F0EEEE;
  --font-main: 'Lato', Verdana, Helvetica, sans-serif;
  --section-spacing: 28px;
}

.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: inherit;
  font-weight: 700;
  color: var(--gray-900);
}

.local-name {
  display:block;
  font-family: "Times New Roman", Times, serif;
  font-size: 22px;
  font-weight: 400;  /* stay regular so the bold "Bao Truong" stands out */
  color: #888;
}

.title {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: normal;
  text-align: left;
}

/* Publication: show only selected by default; "Show all" reveals full list */
.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.pub-header h2 {
  margin: 0;
}
.pub-table {
  width: 100%;
  border: 0;
  border-spacing: 0 0;
  border-collapse: collapse;
  margin-right: auto;
  margin-left: auto;
}
.pub-table tbody tr {
  transition: background-color 0.2s ease;
}
.pub-table tbody tr:hover td {
  background-color: var(--blue-100);
}
.pub-table tbody tr td {
  transition: background-color 0.2s ease;
}
.pub-img-cell {
  padding-top: 32px;
  padding-bottom: 36px;
  padding-right: 25px;
  padding-left: 20px;
  width: 25%;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
}
.pub-table tbody tr:first-child .pub-img-cell {
  padding-top: 25px;
}
.pub-table tbody tr:not(:first-child) .pub-img-cell,
.pub-table tbody tr:not(:first-child) .pub-content-cell {
  padding-top: 20px;
}
.pub-content-cell {
  padding-top: 32px;
  padding-bottom: 36px;
  padding-left: 25px;
  padding-right: 20px;
  width: 75%;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-light);
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: inherit;
  font-weight: 300;
  color: var(--gray-700);
}
.pub-table tbody tr:first-child .pub-content-cell {
  padding-top: 25px;
}
.pub-table tbody tr:last-child td {
  border-bottom: none;
}
.pub-content-cell a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: inherit;
  font-weight: 300;
}
.pub-links {
  margin-top: 4px;
}
.pub-links a,
.pub-link-placeholder {
  font-style: italic;
}
.pub-link-placeholder {
  color: var(--gray-400);
}
.pub-content-cell strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: inherit;
  font-weight: 700;
}
.pub-desc {
  margin-bottom: 15px;
  margin-top: 8px;
  font-size: inherit;
  font-style: italic;
  color: #4b5563;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-weight: 300;
}
.pub-full {
  display: none;
}
body.pub-show-all .pub-full {
  display: table-row;
}

.toggle-button.hidden {
  display: none;
}

/* Main container and table utilities */
.main-container {
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
}
.main-container tbody tr {
  padding: 0;
}
.main-container tbody td {
  padding: 0;
}

.profile-table {
  width: 100%;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
  margin-top: 24px;           /* space below the fixed header (moved here from the photo so the intro stays centered on it) */
}
.profile-table tbody tr {
  padding: 0;
}
/* .profile-table prefix is needed to beat `.main-container tbody td { padding: 0 }` */
.profile-table .profile-avatar {
  padding-left: 16px;         /* left edge lines up with the sections below */
  width: 248px;               /* same as the photo, so the intro sits right beside it */
  vertical-align: middle;
  text-align: left;
}
.profile-table .profile-intro {
  padding-left: 56px;         /* gap between photo and intro (~0.23x photo width) */
  vertical-align: middle;
}
/* Keep the intro block shorter than the photo (~0.8x): name and local name share one line */
.profile-table .name {
  padding-top: 0;
  margin-bottom: 6px;
  line-height: 1.2;
}
.profile-table .profile-short {
  margin: 2px 0;
}
.profile-table .name .local-name {
  display: block;             /* own line, under "Bao Truong" */
  margin-top: 6px;            /* small breathing room under "Bao Truong" */
  font-size: 20px;            /* Times runs small next to Lato; 20px reads a bit larger than the 16px title */
}

/* Section tables (experience, education, skills) */
.section-table {
  width: 100%;
  border: 0;
  border-spacing: 0 10px;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
  table-layout: fixed;
}
.table-logo-cell {
  padding: 16px;
  width: 20%;
  vertical-align: middle;
}
.table-content-cell {
  padding: 8px;
  width: 80%;
  vertical-align: middle;
}

#education .section-table {
  border-spacing: 0 24px;
}

#education .logo-contain {
  width: 72px;
  height: 72px;
}

/* Honors list */
#honors ul {
  margin: 0;
  padding-left: 20px;
}

/* Square thumbnails: keep image aspect ratio, no stretch */
.thumb-contain {
  width: 160px;
  height: 160px;
  object-fit: contain;
  object-position: center;
  display: block;
}
.logo-contain {
  width: 80px;
  height: 80px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.edu-school-vollkorn {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}

body.scrolled .fixed-header {
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Section spacing */
#bio, #research, #news, #publication, #education, #honors, #experience {
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
  scroll-margin-top: 70px;
}

/* News scroll box (fixed height, scrollable) */
.news-scroll {
  height: 160px;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px 15px 10px 25px;
  background-color: transparent;
}
.news-scroll ul {
  margin: 0;
  padding-left: 20px;
}
.news-scroll li,
.news-scroll .news-item {
  margin-bottom: 12px;
  font-size: inherit;
  line-height: 1.2;
}
.news-scroll::-webkit-scrollbar {
  width: 6px;
}
.news-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.news-scroll::-webkit-scrollbar-thumb {
  background: #cdd9ee;
  border-radius: 3px;
}
.news-scroll::-webkit-scrollbar-thumb:hover {
  background: #b8c7e4;
}

#honors ul li {
  line-height: 1.2;
  margin-bottom: 10px;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

#research strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}
#experience strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
}

/* Experience/education bullet details */
.item-details {
  margin: 8px 0 0 16px;
  padding: 0;
}
.item-details li {
  margin-bottom: 6px;
  line-height: 1.3;
}

/* Short info next to avatar (profile section only) */
.profile-short {
  margin: 4px 0;
}
.profile-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.profile-email .email-text {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 14px; /* Adjust size as needed to match your layout */
  letter-spacing: -0.02em; /* Keeps monospaced text looking tight and clean */
}

.profile-email a {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  color: inherit; /* Inherits the text color of the parent container */
  text-decoration: none;
}
.profile-email a:hover {
  color: var(--blue-700);
  text-decoration: underline;
}
.no-break {
  white-space: nowrap;
}
.email-icon {
  margin-right: 4px;
}
.text-muted {
  color: var(--gray-400);
}
.px-1 {
  padding-left: 4px;
  padding-right: 4px;
}

/* Social links dock below intro */
.avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.social-links {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  padding: 0.5rem 0.6rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(248, 250, 255, 0.9) 50%,
    rgba(240, 246, 255, 0.85) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 0.75rem;
  border: 1px solid rgba(42, 122, 226, 0.12);
  box-shadow:
    0 4px 16px rgba(42, 122, 226, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  width: fit-content;
}
.profile-intro .social-links {
  margin-top: 8px;
  padding: 0.4rem 0.55rem;
}
.profile-intro .social-links img {
  width: 1.3rem;
  height: 1.3rem;
}
.social-links a,
.social-links a:hover,
.social-links a:visited {
  margin: 0;
  padding: 0.35rem;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.social-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(42, 122, 226, 0.15) 0%,
    transparent 70%
  );
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}
.social-links a:hover::before {
  opacity: 1;
  transform: scale(1.2);
}
.social-links a:hover {
  transform: translateY(-4px) scale(1.1);
}
.social-links img {
  width: 1.5rem;
  height: 1.5rem;
  transition: all 0.3s ease;
  filter: grayscale(20%) brightness(0.9);
  position: relative;
  z-index: 1;
}
.social-links a:hover img {
  filter: grayscale(0%) brightness(1) drop-shadow(0 2px 4px rgba(42, 122, 226, 0.3));
}

/* Avatar (main profile image) size - decrease max-width to make it smaller */
.profile-table .profile-avatar .profile-photo {
  width: 248px;   /* keep in sync with .profile-table .profile-avatar width */
  height: 248px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-sizing: border-box;                    /* border stays inside the photo size */
  border: 4px solid #fff;                    /* thin white ring */
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); /* makes the white ring visible on the white page */
}

/* Responsive: stack avatar above intro on narrow viewports */
@media (max-width: 600px) {
  body {
    overflow-x: hidden;
  }
  #publication {
    max-width: 100%;
    overflow-x: hidden;
  }
  .pub-table {
    max-width: 100%;
    table-layout: fixed;
  }
  .pub-table tr {
    display: block;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
  }
  .pub-table tr.pub-full {
    display: none;
  }
  body.pub-show-all .pub-table tr.pub-full {
    display: block;
  }
  .pub-table tr:last-child {
    border-bottom: none;
  }
  .pub-img-cell {
    display: block;
    width: 100%;
    padding-right: 0;
    padding-bottom: 10px;
    padding-top: 25px;
    text-align: center;
  }
  .pub-img-cell img {
    max-width: 100%;
    width: auto;
    max-height: 200px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  .pub-content-cell {
    display: block;
    width: 100%;
    padding-top: 0;
    padding-bottom: 20px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .pub-content-cell,
  .pub-content-cell .papertitle,
  .pub-content-cell a,
  .pub-desc {
    overflow-wrap: break-word;
    word-wrap: break-word;
    max-width: 100%;
  }
  .profile-table tbody tr {
    display: flex;
    flex-direction: column;
  }
  .profile-table .profile-avatar,
  .profile-table .profile-intro {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    text-align: center;
  }
  .profile-table .profile-avatar {
    order: -1;
    padding-left: 0;
    padding-bottom: 0;
  }
  .profile-table .profile-avatar a {
    display: inline-block;
    max-width: 200px;
  }
  .profile-table .profile-avatar .profile-photo {
    width: 200px;
    height: 200px;
    max-width: 100%;
  }
  .profile-table .profile-intro {
    order: 1;
    padding-top: 12px;
    padding-left: 16px;
    padding-right: 16px;
    text-align: center;
  }
  .profile-table .name {
    text-align: center;
  }
  .profile-table .profile-intro .profile-short {
    text-align: center;
  }
  .profile-table .profile-intro .profile-email {
    justify-content: center;
  }
  .avatar-block {
    width: 200px;
    margin: 0 auto;
  }
  .profile-intro .social-links {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.4rem 0.5rem;
    border-radius: 0.6rem;
  }
  .profile-intro .social-links a {
    padding: 0.25rem;
  }
  .profile-intro .social-links img {
    width: 1.3rem;
    height: 1.3rem;
  }
  .profile-intro,
  .table-content-cell {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .fixed-header nav a {
    margin-left: 12px;
    font-size: 12px;
  }
  /* Experience & Education: stack logo above content on narrow screens (like Miscellanea) */
  #experience .section-table tr,
  #education .section-table tr {
    display: block;
    margin-bottom: 16px;
  }
  #experience .section-table .table-logo-cell,
  #experience .section-table .table-content-cell,
  #education .section-table .table-logo-cell,
  #education .section-table .table-content-cell {
    display: block;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
  #experience .section-table .table-logo-cell,
  #education .section-table .table-logo-cell {
    padding-bottom: 4px;
  }
  .section-table .table-logo-cell .logo-contain {
    max-width: 100%;
  }
}

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* publication note */
.publication-note {
  font-size: 1em;
  color: #888;
  font-style: italic;
  margin-top: -4px;
}

/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Global Typography & Base Styles --- */
html {
  scroll-behavior: smooth;
}

body, td, th, tr, p, a {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 300;
}

body {
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  line-height: 1.5;
  padding-top: 56px;
  /* Fade in animation */
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

p {
  margin: 0.5em 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

a:focus,
a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* Modern link underline effect for paragraph links */
p a:not(.header-logo-link):not(.toggle-button) {
  position: relative;
  display: inline;
}

p a:not(.header-logo-link):not(.toggle-button)::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}

p a:not(.header-logo-link):not(.toggle-button):hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

strong {
  font-family: var(--font-main);
  font-size: inherit;
  font-weight: 700;
}

h2 {
  margin: 0 0 16px 0;
  font-weight: 700;
  font-family: var(--font-main);
  font-size: 22px;
  color: #111;
  position: relative;
  display: inline-block;
  letter-spacing: -0.3px;
}

/* Decorative underline for H2 */
h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  margin-top: 8px;
  border-radius: 2px;
  transition: width 0.3s ease;
}

h2:hover::after {
  width: 60px; /* Dynamic interaction */
}

h3 {
  font-weight: 600;
  font-family: var(--font-main);
  font-size: 17px;
  margin-bottom: 10px;
}

/* --- Layout & Utilities --- */
.container {
  width: 100%;
  max-width: 800px;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
  /* Added padding and box-sizing for mobile spacing */
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

.section-container {
  margin-bottom: var(--section-spacing);
  padding-top: 10px;
  scroll-margin-top: 66px;
}

.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --- Header --- */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(37, 40, 45, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  padding: 11px 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.fixed-header a {
  color: var(--header-text);
  text-decoration: none;
  display: inline-block;
}

.header-logo-link {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.fixed-header nav a {
  margin-left: 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2px;
  position: relative;
  transition: color 0.25s ease;
}

.fixed-header nav a:hover {
  color: #fff;
}

/* Header Link Animation */
.fixed-header nav a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -6px;
  left: 0;
  background-color: var(--accent-color);
  visibility: hidden;
  transform: scaleX(0);
  transition: all 0.3s ease-in-out;
}

.fixed-header nav a:hover::before {
  visibility: visible;
  transform: scaleX(1);
}

.header_icon {
  height: 24px;
  width: 24px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* --- Profile Section --- */
.profile-section {
  display: flex;
  gap: 36px;
  align-items: center;
  margin-bottom: 20px;
}

.profile-photo:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.profile-info {
  flex: 1;
}

.name {
  padding-top: 4px;
  margin: 0 0 10px 0;
  font-family: var(--font-main);
  font-size: 32px;
  font-weight: 700;   /* Lato is only loaded at 400/700, so 500 rendered as regular */
  letter-spacing: 0;
}

/* --- New Classes extracted from HTML --- */

.github-link {
  margin-left: 10px; 
  color: black; 
  font-weight: bold;
}

/* Footer */
.footer-main[hidden] {
  display: none;
}

.site-footer {
  margin-top: 24px;
  padding: 16px;
  border-top: 1px solid var(--border-light);
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}
.footer-meta p {
  margin: 0;
}
.footer-main {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 5fr 5fr;
  align-items: stretch;
  column-gap: 16px;
}
.footer-left {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.footer-quote {
  color: var(--blue-900);
  font-style: italic;
  font-size: 1.1em;
  margin-bottom: 20px;
}
.footer-credit {
  font-size: small;
  color: #6b7280;
  margin: 0;
}
.footer-credit a {
  color: var(--blue-700);
}
.footer-counter {
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-counter-image {
  display: block;
  width: 100%;
  max-width: 305px;
  height: auto;
}

/* --- Components & Utilities --- */
.toggle-button {
  background: none;
  border: 1px solid var(--primary-color); /* Outline style */
  border-radius: 20px; /* Pill shape */
  color: var(--primary-color);
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  margin-top: 10px;
  display: inline-block;
  transition: all 0.3s ease;
}

.toggle-button:hover {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 10px rgba(23, 114, 208, 0.3);
}

/* Google Scholar Colors */
.gs-blue { color: #4285F4; }
.gs-red { color: #EA4335; }
.gs-yellow { color: #FBBC05; }
.gs-green { color: #34A853; }

/* --- Media Queries --- */
@media screen and (max-width: 480px) {
  body, td, th, tr, p, a {
    font-size: 13px;
  }

  strong {
    font-size: inherit;
  }

  .fixed-header nav {
    display: none;
  }

  .header-container {
    justify-content: center;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 14px;
  }

  .fixed-header {
    padding: 5px 0;
  }

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

  .profile-photo {
    max-width: 150px;
  }

  .name {
    font-size: 20px;
  }

  .profile-table .name .local-name {
    font-size: 17px;   /* stay smaller than the 20px name on small phones */
  }

  .chinese_name {
    font-size: 18px;
  }

  .papertitle {
    font-size: inherit;
  }

  /* Force table cells to stack vertically on mobile */
  .pub-table tr {
    display: block;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
  }

  .pub-img-cell {
    display: block;
    width: 100%;
    padding-right: 0;
    text-align: center; /* Center the image */
    padding-bottom: 10px;
  }

  .pub-img-cell img {
    max-width: 100%; /* Ensure image fits within padding */
    width: auto;     /* Allow natural aspect ratio */
    max-height: 200px; /* Prevent image from being too tall */
  }

  .pub-content-cell {
    display: block;
    width: 100%;
    padding-bottom: 20px;
  }

  footer {
    text-align: center;
  }
}
