body {
  font-size: 100%;
  padding-top: 20px;
  padding-bottom: 10px;
}
@media (min-width: 992px) {
  body {
    padding-top: 56px;
  }
}

.theme-dropdown .dropdown-menu {
  display: block;
  position: static;
  margin-bottom: 20px;
}

.theme-showcase > p > .btn {
  margin: 5px 0;
}

/* Customize container */
@media (min-width: 768px) {
  .container {
    max-width: 940px;
  }
}
.container-narrow > hr {
  margin: 30px 0;
}

.row {
  padding-top: 10px;
}

/* Navbar brand */
.navbar-brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: #3973ac !important;
  letter-spacing: -0.01em;
}
.navbar-brand:hover {
  color: #1a5276 !important;
}

/* Navbar nav links: uppercase, letter-spaced */
.navbar-nav > li > a {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #444 !important;
  border-radius: 4px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-nav > li > a:hover {
  color: #3973ac !important;
  background-color: #edf2fa;
}

/* Navbar dropdown: Font Awesome chevron instead of Bootstrap caret */
.navbar .dropdown-toggle::after { display: none !important; }
.nav-dropdown-arrow {
  font-size: 0.6em;
  margin-left: 0.25em;
  opacity: 0.7;
  transition: transform 0.2s ease;
}
.nav-item.dropdown.show .nav-dropdown-arrow { transform: rotate(180deg); }

/* Dropdown menu styling */
.navbar .dropdown-menu {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 6px 0;
  margin-top: 4px;
}
.navbar .dropdown-item {
  font-size: 0.85rem;
  padding: 7px 18px;
  color: #444;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.navbar .dropdown-item:hover {
  background-color: #edf2fa;
  color: #3973ac;
}

.navbar {
  min-height: 30px !important;
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, #3973ac 0%, #5a9bd4 50%, #2aa198 100%) 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  padding-bottom: 4px;
}

.navbar-logo {
  height: 32px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.navbar-logo:hover {
  opacity: 1;
}

/* Active nav item: pill background */
.nav-item .nav-link.active {
  color: #fff !important;
  font-weight: 600;
  background-color: #3973ac;
  border-bottom: none;
  border-radius: 4px;
}
.nav-item .nav-link.active:hover {
  background-color: #1a5276;
  color: #fff !important;
}


h1, h2 {
  border-bottom: 2px solid #3973ac;
  margin-top: 1.8em;
  padding-bottom: 0.3em;
  font-weight: 600;
  color: #2c3e50;
}

h3, h4 {
  border-bottom: 1px solid #d5e4f0;
  margin-top: 1.4em;
  padding-bottom: 0.2em;
  font-weight: 500;
  color: #2c3e50;
}

h5, h6 {
  margin-top: 1.2em;
  font-weight: 500;
  color: #34495e;
}


a         { color: #3973ac; transition: color 0.2s ease; text-decoration: none; }
a:hover   { color: #1a5276; }
a:visited { color: #3973ac; }

/* Utility: justify text */
.text-justify { text-align: justify; }

/* News scrollable container */
.news-scroll {
  overflow-y: auto;
  max-height: 250px;
  width: 100%;
}

/* Lightbox modal */
.lightbox-content {
  background: transparent;
  border: none;
}
.lightbox-img {
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* Person cards for team page */
.person-card {
  padding: 20px 12px;
  text-align: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease;
}

.person-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.person-card img {
  width: 130px !important;
  height: 130px !important;
  max-width: 130px !important;
  max-height: 130px !important;
  object-fit: cover;
  object-position: center 20%;
  border: 3px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.person-card img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.person-card .name {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 12px;
  margin-bottom: 6px;
}

.person-card .research {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #555;
}

.person-card .collab {
  font-size: 0.8rem;
  color: #777;
  margin-top: 4px;
}

.phd-grid {
  margin-bottom: 20px;
}

/* News section styling */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-item {
  padding: 12px 16px;
  margin-bottom: 6px;
  border-radius: 6px;
  border-left: 3px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background-color: #f9fafb;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.news-item:hover {
  background-color: #edf2fa;
  border-left-color: #3973ac;
}

.news-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
}

.news-icon.paper { color: #2196F3; background-color: #e3f2fd; }
.news-icon.graduation { color: #4CAF50; background-color: #e8f5e9; }
.news-icon.award { color: #F59E0B; background-color: #fef9e7; }
.news-icon.event { color: #9C27B0; background-color: #f3e5f5; }
.news-icon.grant { color: #FF9800; background-color: #fff3e0; }
.news-icon.welcome { color: #00BCD4; background-color: #e0f7fa; }

.news-content {
  flex: 1;
  line-height: 1.6;
}

/* Publications year headers */
.year-header {
  position: sticky;
  top: 0;
  background: linear-gradient(135deg, #3973ac 0%, #5a9bd4 100%);
  color: white;
  padding: 8px 15px;
  margin: 20px 0 10px 0;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 4px;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.year-header:first-of-type {
  margin-top: 0;
}

.pub-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.pub-item:hover {
  background-color: #f8f9fa;
}

/* Publication number */
.pub-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #3973ac;
  background: #fff;
  color: #3973ac;
  font-size: 0.9rem;
  font-weight: 600;
}

.pub-title {
  font-size: 1.02em;
  font-weight: 700;
  color: #2c5d8f;
  margin-bottom: 2px;
}

.pub-authors {
  color: #555;
  margin-bottom: 2px;
}

.pub-venue {
  font-weight: 600;
}

.pub-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge-pub {
  background: #fff;
  color: #3973ac;
  border: 1px solid #3973ac;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.badge-pub:hover {
  background: #3973ac;
  color: #fff;
  text-decoration: none;
}

/* Jump-to-year navigation */
.year-nav-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.year-nav-link {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #3973ac;
  border: 1px solid #d0d8e0;
  border-radius: 14px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.year-nav-link:hover {
  background-color: #3973ac;
  color: #fff;
  text-decoration: none;
  border-color: #3973ac;
}

.year-nav-link:visited {
  color: #3973ac;
}

.year-nav-link:visited:hover {
  color: #fff;
}

/* Back to top button */
#backToTop {
  display: none;
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #3973ac;
  background: #fff;
  color: #3973ac;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 100;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#backToTop:hover {
  background: #3973ac;
  color: #fff;
}

/* Footer */
.site-footer {
  background-color: #f8f9fa;
  border-top: 2px solid #3973ac;
  padding: 24px 0 18px;
  margin-top: 30px;
  text-align: center;
  color: #666;
  font-size: 0.85rem;
}

.footer-social {
  margin-bottom: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #3973ac;
  color: #fff;
  margin: 0 5px;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.footer-social a:hover {
  background-color: #1a5276;
  transform: translateY(-2px);
}

.footer-social a:visited {
  color: #fff;
}

/* Project cards */
.project-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-left: 4px solid #3973ac;
  border-radius: 6px;
  padding: 20px 24px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease;
}

.project-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.project-card h4 {
  border-bottom: none;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2c3e50;
}

.project-card p {
  margin: 0;
  line-height: 1.6;
}

.project-card .funding {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 12px;
  background-color: #edf2fa;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #3973ac;
}
