
a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #1a5ab8;
  text-decoration: underline;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: #fffff8;
  padding-top: 56px;
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body,
td,
th,
tr,
p {
  font-family: 'Vollkorn', serif;
  font-size: 16px;
}

a {
  font-family: 'Vollkorn', serif;
  font-size: 16px;
}

strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
}

h2 {
  margin: 0 0 20px 0;
  font-weight: normal;
  font-family: 'Vollkorn', serif;
  font-size: 26px;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: #a00000;
  margin-top: 8px;
  border-radius: 2px;
  transition: width 0.2s ease;
}

h2:hover::after {
  width: 60px;
}

.papertitle {
  font-family: 'Vollkorn', serif;
  font-size: 15px;
  font-weight: 700;
  color: #111;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: 'Vollkorn', serif;
  font-size: 32px;
  font-weight: normal;
  text-align: left;
}

.local-name {
  display: block;
  font-family: 'Vollkorn', serif;
  font-size: 22px;
  color: #888;
  margin-top: 2px;
  margin-bottom: 12px;
}

.title {
  font-family: 'Vollkorn', serif;
  font-size: 22px;
  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: #fafafa;
}
.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 #f0f0f0;
}
.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 #f0f0f0;
  font-family: 'Vollkorn', serif;
  font-size: 14px;
  font-weight: 300;
  color: #333;
}
.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: 'Vollkorn', serif;
  font-size: 14px;
  font-weight: 300;
}
.pub-content-cell strong {
  font-family: 'Vollkorn', serif;
  font-size: 14px;
  font-weight: 700;
}
.pub-desc {
  margin-bottom: 15px;
  margin-top: 8px;
  font-size: 14px;
  font-style: italic;
  color: #555;
  font-family: 'Vollkorn', serif;
  font-weight: 300;
}
.pub-full {
  display: none;
}
body.pub-show-all .pub-full {
  display: table-row;
}

.toggle-button {
  background: none;
  border: 1px solid #1772d0;
  border-radius: 20px;
  color: #1772d0;
  text-decoration: none;
  cursor: pointer;
  font-family: 'Vollkorn', serif;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 16px;
  margin-top: 10px;
  display: inline-block;
  transition: all 0.3s ease;
}
.toggle-button:hover {
  background-color: #1772d0;
  color: #fff;
  box-shadow: 0 4px 10px rgba(23, 114, 208, 0.3);
}
.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;
}
.profile-table tbody tr {
  padding: 0;
}
.profile-avatar {
  padding: 2.5%;
  width: 37%;
  max-width: 37%;
  vertical-align: middle;
  text-align: center;
}
.profile-intro {
  padding: 2.5%;
  width: 63%;
  vertical-align: middle;
}

/* Section tables (experience, education, miscellanea) */
.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;
}

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

/* Footer */
.site-footer {
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid #eee;
}
.footer-quote {
  color: #a00000;
  font-style: italic;
  font-size: 1.1em;
  margin-bottom: 20px;
}
.footer-credit {
  font-size: small;
  color: #666;
  margin: 0;
}
.footer-credit a {
  color: #a00000;
}

/* 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: 'Vollkorn', serif;
}

/* --- Fixed upper bar (header) --- */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #fffff8;
  padding: 10px 0;
  z-index: 1000;
  font-size: 1.1em;
  border-bottom: 1px solid #ccc;
}

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

.fixed-header a {
  color: #333;
  text-decoration: none;
  display: inline-block;
}

.fixed-header a:hover {
  color: #1772d0;
}

.fixed-header nav a {
  margin-left: 20px;
  font-size: 18px;
  font-weight: 500;
  font-family: 'Vollkorn', serif;
  position: relative;
  transition: color 0.2s;
}

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

.fixed-header nav a::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #1772d0;
  visibility: hidden;
  transform: scaleX(0);
  transition: transform 0.2s ease-in-out;
}

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

.header-logo-link {
  display: flex;
  align-items: center;
  font-family: 'Vollkorn', serif;
  font-size: 22px;
}

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

/* News scroll box (fixed height, scrollable) */
.news-scroll {
  max-height: 160px;
  overflow-y: auto;
  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: 16px;
  line-height: 1.2;
}
.news-scroll::-webkit-scrollbar {
  width: 6px;
}
.news-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.news-scroll::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}
.news-scroll::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

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

#research strong {
  font-family: 'Vollkorn', serif;
}
#experience strong {
  font-family: 'Vollkorn', serif;
}

/* Miscellanea: sub-section headings (Services, Activities, Hobbies) — between main h2 and body text */
#miscellanea .table-logo-cell h2 {
  font-size: 20px;
  margin: 0 0 12px 0;
}
#miscellanea .table-logo-cell h2::after {
  margin-top: 4px;
}
#miscellanea .table-content-cell {
  font-size: 15px;
}
#miscellanea .table-content-cell a {
  font-size: 15px;
}

/* Short info next to avatar (profile section only) */
.profile-short {
  margin: 4px 0;
}
.profile-links {
  margin: 12px 0 0 0;
}

/* Avatar (main profile image) size - decrease max-width to make it smaller */
.profile-table .profile-avatar img {
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 50%;
  /* border: 3px solid #a00000; */
  margin-top: 1.5em;  /* move profile image down */
}

/* 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 #eee;
  }
  .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: block;
  }
  .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 {
    padding-bottom: 0;
  }
  .profile-table .profile-avatar a {
    display: inline-block;
    max-width: 200px;
  }
  .profile-table .profile-avatar img {
    max-width: 200px;
  }
  .profile-table .profile-intro {
    padding-top: 12px;
    text-align: center;
  }
  .profile-table .name {
    text-align: center;
  }
  .profile-table .profile-intro .profile-short {
    text-align: center;
  }
  .profile-table .profile-intro .profile-links {
    text-align: center;
  }
  .profile-intro,
  .table-content-cell {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .fixed-header nav a {
    margin-left: 12px;
    font-size: 14px;
  }
  /* 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%;
  }
  /* Miscellanea: stack label above content to prevent overlap; smaller headings */
  #miscellanea .section-table tr {
    display: block;
    margin-bottom: 16px;
  }
  #miscellanea .section-table .table-logo-cell,
  #miscellanea .section-table .table-content-cell {
    display: block;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
  #miscellanea .section-table .table-logo-cell {
    padding-bottom: 4px;
  }
  #miscellanea .table-logo-cell h2 {
    font-size: 18px;
  }
  .site-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .fixed-header nav {
    display: none;
  }
  .header-container {
    justify-content: center;
  }
  body {
    padding-top: 64px;
  }
}