/* ===== TYPOGRAPHY & ROOT ===== */
:root {
  font-family: 'Barlow', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --text-color: #444444;
  --heading-color: rgba(0, 0, 0, 0.75);
  --muted-color: #888;
}

body {
  color: var(--text-color);
  font-family: 'Barlow', Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  background-color: #fff;
}

h4 {
  color: var(--heading-color);
  font-weight: 600 !important;
}

/* ===== LINKS ===== */
a {
  color: #111;
  text-decoration: none;
}
a:hover {
  color: #111;
  text-decoration: none;
}

/* Blue marker highlight for body-text links (adapted from iamtaolong.github.io) */
p > a {
  position: relative;
  font-weight: 500;
  color: #000 !important;
  background-image:
    linear-gradient(104deg, rgba(66,133,244,0) 0.9%, rgba(66,133,244,1) 2.4%, rgba(66,133,244,0.5) 5.8%, rgba(66,133,244,0.1) 93%, rgba(66,133,244,0.7) 96%, rgba(66,133,244,0) 98%),
    linear-gradient(183deg, rgba(66,133,244,0) 0%, rgba(66,133,244,0.3) 7.9%, rgba(66,133,244,0) 15%);
  background-repeat: no-repeat;
  background-size: 100% 30%, 100% 30%;
  background-position: 0 100%, 0 100%;
  padding: 2px 5px;
  border-radius: 7.5px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.3s cubic-bezier(0, 0.8, 0.13, 1), transform 0.3s cubic-bezier(0, 0.8, 0.13, 1);
}
p > a:hover {
  background-size: 100% 80%, 100% 70%;
  transform: scale(1.05);
}

/* ===== LAYOUT ===== */
.site-content {
  max-width: 880px;
  margin: 0 auto;
}

.page-content {
  padding: 0 1.5rem;
}

.wrapper {
  padding-bottom: 4rem;
}

/* ===== NAVBAR ===== */
.navbar {
  border-bottom: none;
}
.navbar-nav .nav-link {
  color: #444 !important;
  font-weight: 400 !important;
  padding: 0.2rem 0.75rem !important;
  font-size: .95rem;
}
.navbar-nav .nav-link:hover {
  color: #000 !important;
}
.navbar-brand {
  font-weight: 500;
  font-size: 1rem;
  color: #222 !important;
}

/* ===== PROFILE PHOTO ===== */
.profile-photo {
  width: 100%;
  max-width: 220px;
  border-radius: 78% 22% 78% 22% / 22% 78% 22% 78%;
  padding-right: 5px;
  padding-bottom: 5px;
}

/* ===== NEWS TABLE ===== */
.news-table {
  width: 100%;
  border-collapse: collapse;
}
.news-table td {
  padding: 0.3rem 0;
  vertical-align: top;
}
.news-date {
  white-space: nowrap;
  width: 90px;
  font-size: .85rem;
  font-weight: 200;
  color: #777;
  padding-right: 1.2rem;
}
.news-text {
  font-size: .9rem;
  line-height: 1.55;
}

/* ===== BADGES ===== */
.badge-oral {
  display: inline-block;
  background-color: #c0392b;
  color: #fff;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  vertical-align: middle;
}

.badge-venue {
  display: inline-block;
  background-color: #eef0f4;
  color: #333;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: .8rem;
  font-weight: 400;
}

.badge-venue-ml {
  background-color: #dff0d8;
  color: #3c763d;
}
.badge-venue-neurips {
  background-color: #e8dff5;
  color: #5b3d8c;
}
.badge-venue-icml {
  background-color: #dbeeff;
  color: #1a5d99;
}

/* ===== PUBLICATION CARDS ===== */
.pub-row {
  padding-bottom: 1.4rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid #f2f2f2;
}

.pub-img {
  width: 90%;
  max-width: 190px;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.pub-img:hover {
  opacity: 0.85;
}

.pub-placeholder {
  width: 90%;
  max-width: 190px;
  height: 110px;
  background-color: #f4f6fa;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: .85rem;
  font-style: italic;
}

.pub-title {
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: .25rem;
}

.pub-authors {
  font-size: .875rem;
  font-weight: 300;
  margin-bottom: .2rem;
  color: #555;
}

.pub-meta {
  font-size: .875rem;
  margin-bottom: .3rem;
  line-height: 1.5;
}

.pub-links {
  font-size: .875rem;
  font-weight: 400;
  margin-top: .3rem;
}
.pub-links a {
  color: #333 !important;
  margin-right: 1rem;
  background: none !important;
  transform: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 400;
  transition: color 0.15s;
}
.pub-links a:hover {
  color: #000 !important;
  text-decoration: underline;
}

/* Author highlight */
.author-me {
  font-weight: 600;
  border-bottom: 2px dotted #aaa;
  padding-bottom: 1px;
}

/* ===== EXPERIENCE ===== */
.exp-row {
  margin-bottom: 1.2rem;
}
.exp-date {
  font-size: .82rem;
  font-weight: 200;
  color: #777;
}
.exp-title {
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: .1rem;
}
.exp-org {
  font-size: .88rem;
  font-weight: 300;
  margin-bottom: .1rem;
}
.exp-detail {
  font-size: .82rem;
  font-weight: 200;
  color: #888;
}

/* ===== CONTACT ===== */
.contact-item {
  font-size: .93rem;
  margin-bottom: .5rem;
}
.contact-item i {
  width: 20px;
  margin-right: 8px;
  color: #777;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid #eee;
}
footer p {
  font-size: .78rem;
  color: #bbb;
  text-align: center;
  margin: 0;
}

/* ===== RESPONSIVE ===== */
@media only screen and (max-width: 767px) {
  .page-content {
    padding: 0 1rem;
  }
  .profile-photo {
    max-width: 180px;
    display: block;
    margin: 0 auto;
  }
  .news-date {
    width: 80px;
    font-size: .78rem;
  }
  .pub-img, .pub-placeholder {
    max-width: 100%;
    width: 60%;
    margin: 0 auto;
    display: block;
  }
}
