/* Fira Sans — humanist sans-serif, full Greek + Latin support */
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,300;0,400;0,600;0,700;1,400;1,600&subset=greek,latin&display=swap');

/* Academic palette: warm ivory background, dark charcoal text */
:root,
body,
html,
.dark,
.dark body,
header,
footer {
  background-color: #faf8f5 !important;
  background: #faf8f5 !important;
  color: #2d2d2d !important;
  font-family: "Fira Sans", sans-serif !important;
}

/* Base fallback for sections; individual widgets override below */
.home-section,
section {
  background-color: #faf8f5;
  color: #2d2d2d !important;
  font-family: "Fira Sans", sans-serif !important;
}

/* Reduce the theme's default 110px vertical padding to something compact */
.home-section {
  padding: 40px 0 !important;
}

/* Navbar: subtle bottom border instead of shadow, ivory background */
.navbar,
.dark .navbar {
  background: #faf8f5 !important;
  box-shadow: none !important;
  border-bottom: 1px solid #e0dbd4 !important;
}

/* Navbar brand (site title) */
.navbar-brand,
.dark .navbar-brand {
  color: #1a1a2e !important;
  font-family: "Fira Sans", sans-serif !important;
  font-weight: 700 !important;
}

/* Navbar links */
.navbar .nav-link,
.dark .navbar .nav-link,
.dark .navbar .navbar-nav .nav-link,
#navbar-main .main-menu-item ul li .nav-link,
.dark #navbar-main .main-menu-item ul li .nav-link {
  color: #2d2d2d !important;
  font-family: "Fira Sans", sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
}

/* Navbar brand size */
.navbar-brand {
  font-size: 1.15rem !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.45rem;
  white-space: nowrap;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.navbar-brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a2e !important;
}

.navbar-brand-title {
  font-size: 0.65rem;
  font-weight: 400;
  color: #666 !important;
  letter-spacing: 0.02em;
}

.navbar-brand img.navbar-avatar,
.navbar-brand .navbar-avatar {
  display: inline-block !important;
  width: 42px !important;
  height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  min-height: unset !important;
  max-height: unset !important;
  border-radius: 50% !important;
  clip-path: none !important;
  object-fit: cover !important;
  object-position: center !important;
  flex-shrink: 0 !important;
  border: 1.5px solid rgba(26, 58, 92, 0.2) !important;
  vertical-align: middle !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.dark .navbar .nav-link:hover,
.dark .navbar .nav-link:focus {
  color: #2c5a8f !important;
}

.navbar .nav-link.active,
.dark .navbar .nav-link.active,
.dark .navbar .navbar-nav .nav-link.active {
  color: #1a3a5c !important;
}

/* Navbar collapse background (light mode) */
.navbar-collapse {
  background-color: #faf8f5 !important;
}

/* Serif headings for academic feel */
h1, h2, h3, h4, .section-heading h1 {
  color: #1a1a2e !important;
  font-family: "Fira Sans", sans-serif !important;
  font-weight: 700 !important;
}

/* About widget sidebar: tame font sizes */
.portrait-title h2 {
  font-size: 2.2rem !important;
  text-shadow: 0 1px 3px rgba(26, 58, 92, 0.18) !important;
}

.portrait-title h3 {
  font-size: 0.9rem !important;
}

.col-md-7 .article-style,
.biography-text {
  font-size: 0.92rem !important;
  line-height: 1.65 !important;
}

.ul-interests li,
.ul-edu li {
  font-size: 0.88rem !important;
}

.ul-interests .section-subheading,
.ul-edu .section-subheading {
  font-size: 0.85rem !important;
}

/* Organisation links in bio */
#profile .org-links,
.org-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35em;
  margin: 0.35em 0 0.1em;
  text-align: center !important;
  width: 100%;
}
.org-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: 0.9rem;
  text-decoration: none !important;
  color: #444 !important;
}
.org-link:hover {
  color: #1a3a5c !important;
}
.org-icon {
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

.org-icon[alt="ISI"] {
  width: 39px;
  height: 39px;
}

.org-icon[alt="ATHENA RC"] {
  width: 18px;
  height: 18px;
}

/* Section headings */
.home-section .section-heading h1 {
  font-size: 1.4rem !important;
}

/* Academic dark blue links (non-navbar) */
a {
  color: #1a3a5c !important;
}
a:hover {
  color: #2c5a8f !important;
}

/* Cards and experience tabs: light background */
.card,
.dark .card {
  background: #fff !important;
  border: 1px solid #e0dbd4 !important;
}

.dark .experience .text-muted,
.experience .text-muted {
  color: #5a5a5a !important;
}

.dark .experience .card-text,
.dark .experience .card-text p,
.experience .card-text,
.experience .card-text p {
  color: #2d2d2d !important;
}

.experience .m-2 .border.exp-fill {
  background-color: #c8d6e5 !important;
}

.experience .m-2 .border,
.experience .col.border-right {
  border-color: #c8d6e5 !important;
}

/* Publication listing — horizontal layout */
.pub-row {
  display: flex;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eae6e1;
  gap: 0.6rem;
  line-height: 1.5;
}

.pub-row:last-child {
  border-bottom: none;
}

.pub-index {
  flex-shrink: 0;
  width: 1.8rem;
  text-align: right;
  padding-top: 0.18rem;
}

.pub-num {
  font-size: 0.72rem;
  font-weight: 700;
  color: #bbb !important;
  line-height: 1;
}

.pub-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 3.4rem;
  padding-top: 0.15rem;
}

.pub-type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.pub-type-journal {
  background: #1a3a5c;
  color: #fff !important;
}

.pub-type-conf {
  background: #c8d6e5;
  color: #1a1a2e !important;
}

.pub-type-clickable {
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}
.pub-type-clickable:hover {
  filter: brightness(0.85);
  transform: scale(1.07);
}

.pub-year-col {
  flex-shrink: 0;
  width: 3rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.15rem;
}

.pub-year {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  background: #ede9e4;
  color: #666 !important;
  text-decoration: none !important;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.pub-year-clickable:hover {
  filter: brightness(0.85);
  transform: scale(1.07);
  cursor: pointer;
}

.pub-views {
  font-size: 0.72rem;
  color: #aaa !important;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.25em;
  margin-top: 0.15em;
}

.pub-sparkline-link {
  display: block;
  margin-top: 0.2em;
}

.pub-sparkline {
  display: block;
  width: 54px;
  height: auto;
  opacity: 0.75;
  transition: opacity 0.15s;
}

.pub-sparkline-link:hover .pub-sparkline {
  opacity: 1;
}

.pub-links {
  flex-shrink: 0;
  width: 3.2rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding-top: 0.1rem;
}

.pub-link-btn {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.2rem;
  border-radius: 3px;
  border: 1.5px solid #1a3a5c;
  color: #1a3a5c !important;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.pub-link-btn:hover {
  background: #1a3a5c !important;
  color: #fff !important;
}

.pub-link-pdf {
  border-color: #c0392b;
  color: #c0392b !important;
}

.pub-link-pdf:hover {
  background: #c0392b !important;
  color: #fff !important;
}

.pub-link-arxiv {
  border-color: #b7591c;
  color: #b7591c !important;
}

.pub-link-arxiv:hover {
  background: #b7591c !important;
  color: #fff !important;
}

.pub-actions {
  flex-shrink: 0;
  width: 3.8rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  padding-top: 0.1rem;
}

.pub-link-bib {
  border-color: #1a7a4a;
  color: #1a7a4a !important;
}

.pub-link-bib:hover {
  background: #1a7a4a !important;
  color: #fff !important;
}

.pub-link-code {
  border-color: #6f42c1;
  color: #6f42c1 !important;
}

.pub-link-code:hover {
  background: #6f42c1 !important;
  color: #fff !important;
}

.pub-link-preview {
  border-color: #4a7c8e;
  color: #4a7c8e !important;
}

.pub-link-preview:hover {
  background: #4a7c8e !important;
  color: #fff !important;
}

.pub-details {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
}

.pub-title-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
}

a.pub-title {
  color: #1a1a2e !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

a.pub-title:hover {
  color: #2c5a8f !important;
}

.pub-authors-line {
  color: #777 !important;
  font-size: 0.78rem;
  margin-top: 0.15rem;
  line-height: 1.4;
}

.pub-venue-line {
  font-size: 0.78rem;
  color: #1a3a5c !important;
  font-style: italic;
  margin-top: 0.1rem;
}

/* News listing */
.news-type-milestone {
  background: #5a7a4a;
  color: #fff !important;
}

.news-type-eusome {
  background: #1a5fa8;
  color: #fff !important;
}

.news-type {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  background: #d4a948;
  color: #fff !important;
}

.news-summary-line {
  font-size: 0.8rem;
  color: #666 !important;
  margin-top: 0.15rem;
  line-height: 1.45;
}

.pub-badge {
  display: inline-block;
  font-size: 0.65rem !important;
  font-weight: 600;
  color: #1a3a5c !important;
  padding: 0.08rem 0.4rem;
  margin-left: 0.3rem;
  border: 1px solid #c8d6e5;
  border-radius: 3px;
  text-decoration: none !important;
  vertical-align: middle;
  transition: background-color 0.15s;
}

.pub-badge:hover {
  background-color: #e8f0fe !important;
  color: #2c5a8f !important;
}

/* Under Review badge — shown on submitted papers */
.pub-under-review {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  color: #7a3d00;
  background: #fff4e0;
  padding: 0.07rem 0.38rem;
  margin-left: 0.35rem;
  border: 1px solid #e8990a;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* Larger variant used on single publication page */
.pub-under-review-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #7a3d00;
  background: #fff4e0;
  padding: 0.15rem 0.55rem;
  margin-left: 0.4rem;
  border: 1px solid #e8990a;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

/* Publication filter bar: centered with vertical spacing */
.pub-filter-bar {
  justify-content: center !important;
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

/* Search and filter dropdowns */
.filter-search.form-control,
.pub-filters.form-control,
.dark .filter-search.form-control,
.dark .pub-filters.form-control {
  background-color: #fff !important;
  border: 1px solid #e0dbd4 !important;
  color: #2d2d2d !important;
  font-family: "Fira Sans", sans-serif !important;
}

.filter-search.form-control:focus,
.pub-filters.form-control:focus {
  border-color: #c8d6e5 !important;
  box-shadow: 0 0 0 0.15rem rgba(26, 58, 92, 0.15) !important;
}

/* Stats collapsible toggle */
.stats-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0;
  border: 1px solid #e0dbd4;
  border-radius: 6px;
  background: #f5f2ee;
  user-select: none;
  transition: background 0.15s ease;
}
.stats-toggle:hover {
  background: #ede9e4;
}
.stats-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444 !important;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.stats-toggle-chevron {
  font-size: 0.75rem;
  color: #888 !important;
  transition: transform 0.25s ease;
}
.stats-toggle[aria-expanded="true"] .stats-toggle-chevron {
  transform: rotate(180deg);
}

/* Collapsible panel */
.stats-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}
.stats-panel--open {
  max-height: 600px;
}

/* Scholar metrics dashboard */
.scholar-dashboard {
  background: #fff;
  border: 1px solid #e0dbd4;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.5rem;
}

.scholar-metrics {
  display: flex;
  justify-content: space-around;
  text-align: center;
  margin-bottom: 0.8rem;
}

.scholar-metric-value {
  font-family: "Fira Sans", sans-serif !important;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a2e !important;
  line-height: 1.2;
}

.scholar-metric-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888 !important;
  font-weight: 600;
}

.scholar-type-counts {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.4rem 0 0.5rem;
  border-top: 1px solid #e0dbd4;
  margin-bottom: 0.5rem;
}

.scholar-type-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.scholar-type-count {
  font-family: "Fira Sans", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a2e !important;
}

.pub-type-book {
  background: #6b8fa3;
  color: #fff !important;
}

.scholar-chart {
  margin-bottom: 0.4rem;
}

.scholar-chart-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888 !important;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.scholar-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.scholar-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scholar-bar-clickable {
  cursor: pointer;
}
.scholar-bar-clickable:hover .scholar-bar {
  background: #e67e22;
}
.scholar-bar-clickable:hover .scholar-bar-year {
  color: #e67e22 !important;
  font-weight: 700;
}

.scholar-bar-count {
  font-size: 0.6rem;
  color: #888 !important;
  margin-bottom: 2px;
}

.scholar-bar {
  width: 100%;
  max-width: 40px;
  background: #1a3a5c;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: background 0.15s;
}

.scholar-bar-group:hover .scholar-bar {
  background: #2c5a8f;
}

.scholar-bar-year {
  font-size: 0.6rem;
  color: #aaa !important;
  margin-top: 3px;
  white-space: nowrap;
}

.scholar-source {
  font-size: 0.7rem;
  color: #aaa !important;
  text-align: right;
}

.scholar-source a {
  color: #1a3a5c !important;
  font-size: 0.7rem !important;
}

/* Narrow content width to ~900px */
.container,
.container-xl,
.universal-wrapper {
  max-width: 900px !important;
}

/* ===== Single publication page ===== */
.pub {
  padding-top: 1.5rem;
}

.pub .article-container {
  max-width: 800px;
  margin: 0 auto;
}

.pub-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.pub-type-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.pub-type-tag.pub-type-journal {
  background: #1a3a5c;
  color: #fff !important;
}

.pub-type-tag.pub-type-conf {
  background: #c8d6e5;
  color: #1a1a2e !important;
}

.pub-date-tag {
  font-size: 0.78rem;
  color: #888 !important;
  font-weight: 600;
}

.pub-page-title {
  font-size: 1.6rem !important;
  line-height: 1.3 !important;
  margin-bottom: 0.6rem !important;
}

.pub-page-authors {
  font-size: 0.92rem;
  color: #555 !important;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

.pub-page-venue {
  font-size: 0.9rem;
  color: #1a3a5c !important;
  font-style: italic;
  margin-bottom: 1rem;
}

.pub-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.pub-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem !important;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border: 1px solid #c8d6e5;
  border-radius: 4px;
  text-decoration: none !important;
  color: #1a3a5c !important;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}

.pub-action-btn:hover {
  background: #e8f0fe !important;
  border-color: #a0b8d0;
  color: #2c5a8f !important;
}

.pub-action-btn.pub-action-primary {
  background: #1a3a5c;
  color: #fff !important;
  border-color: #1a3a5c;
}

.pub-action-btn.pub-action-primary:hover {
  background: #2c5a8f !important;
  border-color: #2c5a8f;
}

.pub-divider {
  border: none;
  border-top: 1px solid #e0dbd4;
  margin: 0.5rem 0 1.2rem;
}

.pub-section {
  margin-bottom: 1.5rem;
}

.pub-section-title {
  font-size: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888 !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem;
  font-family: "Fira Sans", sans-serif !important;
}

.pub-abstract-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #2d2d2d !important;
  text-align: justify;
}

.pub-details-grid {
  background: #fff;
  border: 1px solid #e0dbd4;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  margin-bottom: 1.5rem;
}

.pub-detail-row {
  display: flex;
  padding: 0.4rem 0;
  border-bottom: 1px solid #f0ece7;
  font-size: 0.88rem;
}

.pub-detail-row:last-child {
  border-bottom: none;
}

.pub-detail-label {
  flex-shrink: 0;
  width: 110px;
  font-weight: 600;
  color: #888 !important;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding-top: 0.1rem;
}

.pub-detail-value {
  flex: 1;
  color: #2d2d2d !important;
}

.pub-detail-value a {
  color: #1a3a5c !important;
  text-decoration: none !important;
}

.pub-detail-value a:hover {
  color: #2c5a8f !important;
}

.pub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.pub-tag {
  display: inline-block;
  font-size: 0.75rem !important;
  font-weight: 600;
  color: #1a3a5c !important;
  background: #f0ece7;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.15s;
}

.pub-tag:hover {
  background: #e0dbd4 !important;
  color: #2c5a8f !important;
}

/* Dedicated contact page layout */
.contact-page {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  padding: 1rem 0 2rem;
}

.contact-page-form {
  flex: 2;
  min-width: 0;
}

.contact-page-info {
  flex: 1;
  min-width: 220px;
}

.contact-page-section-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a1a2e !important;
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #1a3a5c;
}

.contact-info-block {
  margin-bottom: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: #333 !important;
}

.contact-info-item i {
  width: 1.1rem;
  text-align: center;
  color: #1a3a5c !important;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.contact-info-item a {
  color: #1a3a5c !important;
  text-decoration: none;
}

.contact-info-item a:hover {
  text-decoration: underline;
}

.contact-info-sub-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888 !important;
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .contact-page {
    flex-direction: column;
    gap: 2rem;
  }
}

/* Teaching page */
.teaching-page {
  padding: 1rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.teaching-block {
  padding: 1.5rem 0;
  border-bottom: 1px solid #e0dbd4;
}

.teaching-block:last-child {
  border-bottom: none;
}

.teaching-block-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.teaching-block-meta {
  flex-shrink: 0;
  width: 6rem;
  padding-top: 0.15rem;
}

.teaching-period {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888 !important;
}

.teaching-block-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.teaching-institution {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e !important;
  margin: 0;
}

.teaching-role {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff !important;
  background: #1a3a5c;
  border-radius: 3px;
  padding: 0.1rem 0.45rem;
}

.teaching-program-box {
  margin-left: 7.2rem;
  margin-bottom: 0.9rem;
  padding: 0.6rem 0.9rem;
  background: #f8f6f3;
  border-left: 3px solid #1a3a5c;
  border-radius: 0 4px 4px 0;
}

.teaching-program-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888 !important;
  margin-bottom: 0.2rem;
}

.teaching-program-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a3a5c !important;
  text-decoration: none;
}

.teaching-program-name:hover {
  text-decoration: underline;
}

.teaching-program-spec {
  font-size: 0.78rem;
  color: #666 !important;
  margin-top: 0.2rem;
}

.teaching-courses {
  margin-left: 7.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.teaching-course-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a2e !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.teaching-course-name i {
  color: #1a3a5c !important;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.teaching-course-name a {
  color: #1a3a5c !important;
  text-decoration: none;
}

.teaching-course-name a:hover {
  text-decoration: underline;
}

.teaching-course-desc {
  font-size: 0.85rem;
  color: #555 !important;
  padding-left: 1.5rem;
  line-height: 1.5;
}

.teaching-course-code {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #5a7a9a;
  background: #eef3f8;
  padding: 0.1em 0.5em;
  border-radius: 3px;
  margin-left: 0.4em;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

.teaching-course-meta {
  padding-left: 1.5rem;
  margin-top: 0.35rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.8rem;
}

.teaching-semester {
  color: #888;
}
.teaching-semester i {
  margin-right: 0.3em;
  color: #aaa;
}

.teaching-eclass-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  color: #fff !important;
  background: #2e7d32;
  padding: 0.15em 0.6em;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.15s;
}
.teaching-eclass-link:hover {
  background: #1b5e20;
}

body.dark .teaching-course-code { background: #283040; color: #80b8f0; }
body.dark .teaching-semester { color: #70709a; }
body.dark .teaching-eclass-link { background: #2e6030; }
body.dark .teaching-eclass-link:hover { background: #3a7a40; }

@media (max-width: 576px) {
  .teaching-block-header {
    flex-direction: column;
    gap: 0.4rem;
  }
  .teaching-program-box,
  .teaching-courses {
    margin-left: 0;
  }
}

/* Contact form */
.contact-form {
  background: #f8f6f3;
  border: 1px solid #e0dbd4;
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
}

.contact-form-row {
  display: flex;
  gap: 1rem;
}

.contact-form-row .contact-form-group {
  flex: 1;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.contact-form-group label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555 !important;
  margin-bottom: 0.3rem;
}

.contact-form-group input,
.contact-form-group textarea {
  border: 1px solid #d0cac4;
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 0.15s;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: #1a3a5c;
}

.contact-form-group textarea {
  resize: vertical;
}

.contact-form-btn {
  display: inline-block;
  background: #1a3a5c;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s;
}

.contact-form-btn:hover {
  background: #2c5a8f;
}

@media (max-width: 576px) {
  .contact-form-row {
    flex-direction: column;
    gap: 0;
  }
}

/* PDF slide panel */
.pdf-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  transition: opacity 0.3s ease;
  opacity: 0;
}
.pdf-overlay--visible {
  display: block;
  opacity: 1;
}

.pdf-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: #fff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
}
.pdf-panel--open {
  transform: translateX(0);
}

.pdf-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e0dbd4;
  background: #f5f2ee;
  flex-shrink: 0;
}
.pdf-panel-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444 !important;
}
.pdf-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pdf-panel-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #666 !important;
  padding: 0.2rem 0.4rem;
  line-height: 1;
  text-decoration: none !important;
  transition: color 0.15s;
}
.pdf-panel-btn:hover {
  color: #1a3a5c !important;
}
.pdf-frame {
  flex: 1;
  border: none;
  width: 100%;
}

body.pdf-panel-active {
  overflow: hidden;
}

@media (max-width: 768px) {
  .pdf-panel {
    width: 100%;
  }
}

/* ── Mobile navbar ───────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  /* Hide desktop brand text so it doesn't push the hamburger off-screen */
  .navbar-brand-text {
    display: none !important;
  }

  /* Hamburger icon — must be visible on ivory background */
  .navbar-toggler {
    color: #2d2d2d !important;
    padding: 0.4rem 0.6rem !important;
    z-index: 1032 !important;
  }
  .navbar-toggler i,
  .navbar-toggler span {
    color: #2d2d2d !important;
    font-size: 1.3rem !important;
  }

  /* Dropdown panel that opens when hamburger is clicked */
  #navbar-main .navbar-collapse {
    position: absolute !important;
    top: 100% !important;       /* sit flush below the navbar bar */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #faf8f5 !important;
    border-bottom: 1px solid #e0dbd4 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    z-index: 1031 !important;
    padding: 0.5rem 0 1rem !important;
  }

  /* Nav links inside the dropdown */
  #navbar-main .navbar-collapse .nav-link {
    padding: 0.55rem 1.2rem !important;
    font-size: 1rem !important;
    color: #2d2d2d !important;
    text-align: left !important;
  }

  /* Keep the navbar itself as a positioning context */
  #navbar-main {
    position: relative !important;
  }
}

/* ── Widget section headings: compact ───────────────────────────────────── */
.home-section .section-heading h1 {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Distinct backgrounds per widget ────────────────────────────────────── */
/* About  — base ivory */
.home-section.wg-about,
section[id="about"] {
  background: #faf8f5 !important;
}

/* Experience — very light warm grey */
.home-section.wg-experience,
section[id="experience"] {
  background: #f3f0ec !important;
}

/* Publications — soft blue-grey tint */
.home-section.wg-pages,
section[id="publications"] {
  background: #f0f4f8 !important;
}

/* News — light warm tone */
.home-section.wg-collection,
section[id="news"] {
  background: #f5f2ee !important;
}

/* Teaching — pale sage */
.home-section.wg-markdown:not(:first-of-type),
section[id="teaching"] {
  background: #f2f5f2 !important;
}

/* Contact — lightest blue */
.home-section.wg-contact,
section[id="contact"] {
  background: #eef2f7 !important;
}

/* Remove the single-border divider now that sections have distinct bg */
.home-section + .home-section {
  border-top: none;
}

/* Absolute removal of attribution and extra text */
.powered-by,
footer p:nth-child(2),
.site-footer,
.blox-attribution {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE
   body.dark is set by the theme's Light / Dark / Auto toggle.
   Uses body.dark prefix (specificity +element) to beat existing .dark rules.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Base — deep navy-dark */
body.dark,
body.dark header,
body.dark footer {
  background-color: #16162a !important;
  background: #16162a !important;
  color: #d8d4ce !important;
}

/* Widget section backgrounds */
body.dark .home-section,
body.dark section { color: #d8d4ce !important; }
body.dark .home-section.wg-about,
body.dark section[id="about"]                            { background: #16162a !important; }
body.dark .home-section.wg-experience,
body.dark section[id="experience"]                       { background: #1a1a2e !important; }
body.dark .home-section.wg-pages,
body.dark section[id="publications"]                     { background: #181c2e !important; }
body.dark .home-section.wg-collection,
body.dark section[id="news"]                             { background: #1c1a2e !important; }
body.dark .home-section.wg-markdown:not(:first-of-type),
body.dark section[id="teaching"]                         { background: #181c18 !important; }
body.dark .home-section.wg-contact,
body.dark section[id="contact"]                          { background: #181a24 !important; }


/* Headings */
body.dark h1, body.dark h2, body.dark h3, body.dark h4,
body.dark .section-heading h1 { color: #d8d4ce !important; text-shadow: none !important; }

/* Links */
body.dark a { color: #80b8f0 !important; }
body.dark a:hover { color: #a0c8ff !important; }

/* Cards / Experience */
body.dark .card { background: #202038 !important; border-color: #303048 !important; }
body.dark .experience .text-muted { color: #70709a !important; }
body.dark .experience .card-text,
body.dark .experience .card-text p { color: #b8b8d0 !important; }
body.dark .experience .m-2 .border.exp-fill { background-color: #244468 !important; }
body.dark .experience .m-2 .border,
body.dark .experience .col.border-right { border-color: #244468 !important; }

/* Bio / About */
body.dark .portrait-title h2 { color: #d8d4ce !important; text-shadow: none !important; }
body.dark .portrait-title h3 { color: #9090b8 !important; }
body.dark .col-md-7 .article-style,
body.dark .biography-text { color: #b8b8d0 !important; }
body.dark .ul-interests li,
body.dark .ul-edu li { color: #b8b8d0 !important; }
body.dark .org-link { color: #8888a8 !important; }
body.dark .org-link:hover { color: #80b8f0 !important; }

/* Publication list rows */
body.dark .pub-row { border-bottom-color: #282840 !important; }
body.dark .pub-num { color: #404060 !important; }
body.dark .pub-type-journal { background: #1e4070 !important; color: #d8d4ce !important; }
body.dark .pub-type-conf { background: #223050 !important; color: #a0b8d8 !important; }
body.dark .pub-year { background: #222236 !important; color: #70709a !important; }
body.dark .pub-views { color: #505070 !important; }

/* Publication link buttons */
body.dark .pub-link-btn { border-color: #3a6898 !important; color: #80b8f0 !important; background: transparent !important; }
body.dark .pub-link-btn:hover { background: #3a6898 !important; color: #fff !important; }
body.dark .pub-link-pdf { border-color: #883020 !important; color: #f08080 !important; }
body.dark .pub-link-pdf:hover { background: #883020 !important; color: #fff !important; }
body.dark .pub-link-arxiv { border-color: #804018 !important; color: #d89060 !important; }
body.dark .pub-link-arxiv:hover { background: #804018 !important; color: #fff !important; }
body.dark .pub-link-bib { border-color: #186838 !important; color: #60c090 !important; }
body.dark .pub-link-bib:hover { background: #186838 !important; color: #fff !important; }
body.dark .pub-link-code { border-color: #502898 !important; color: #9878d8 !important; }
body.dark .pub-link-code:hover { background: #502898 !important; color: #fff !important; }
body.dark .pub-link-preview { border-color: #306070 !important; color: #60a8c0 !important; }
body.dark .pub-link-preview:hover { background: #306070 !important; color: #fff !important; }

/* Publication text */
body.dark a.pub-title { color: #c0d0e8 !important; }
body.dark a.pub-title:hover { color: #80b8f0 !important; }
body.dark .pub-authors-line { color: #70709a !important; }
body.dark .pub-venue-line { color: #80b8f0 !important; }
body.dark .pub-venue-link { color: #80b8f0 !important; }
body.dark .pub-badge { color: #80b8f0 !important; border-color: #244468 !important; }
body.dark .pub-badge:hover { background-color: #1a2e48 !important; color: #a0c8ff !important; }
body.dark .pub-under-review { color: #f0b050 !important; background: #2a1e00 !important; border-color: #a06010 !important; }
body.dark .pub-under-review-tag { color: #f0b050 !important; background: #2a1e00 !important; border-color: #a06010 !important; }

/* Scholar dashboard */
body.dark .scholar-dashboard { background: #202038 !important; border-color: #303048 !important; }
body.dark .scholar-metric-value,
body.dark .scholar-type-count { color: #d8d4ce !important; }
body.dark .scholar-metric-label,
body.dark .scholar-chart-title,
body.dark .scholar-source { color: #505070 !important; }
body.dark .scholar-type-counts { border-top-color: #303048 !important; }
body.dark .scholar-bar { background: #3a6898 !important; }
body.dark .scholar-bar-group:hover .scholar-bar { background: #80b8f0 !important; }
body.dark .scholar-bar-clickable:hover .scholar-bar { background: #c06020 !important; }
body.dark .scholar-bar-count,
body.dark .scholar-bar-year { color: #505070 !important; }
body.dark .scholar-source a { color: #80b8f0 !important; }

/* Stats toggle */
body.dark .stats-toggle { background: #202038 !important; border-color: #303048 !important; }
body.dark .stats-toggle:hover { background: #28283e !important; }
body.dark .stats-toggle-label { color: #b8b8d0 !important; }
body.dark .stats-toggle-chevron { color: #50508a !important; }

/* Search / filter dropdowns */
body.dark .filter-search.form-control,
body.dark .pub-filters.form-control {
  background-color: #202038 !important;
  border-color: #303048 !important;
  color: #d8d4ce !important;
}

/* PDF slide panel */
body.dark .pdf-panel { background: #16162a !important; }
body.dark .pdf-panel-header { background: #202038 !important; border-bottom-color: #303048 !important; }
body.dark .pdf-panel-title { color: #b8b8d0 !important; }
body.dark .pdf-panel-btn { color: #70709a !important; }
body.dark .pdf-panel-btn:hover { color: #80b8f0 !important; }

/* Teaching page */
body.dark .teaching-block { border-bottom-color: #303048 !important; }
body.dark .teaching-institution { color: #d8d4ce !important; }
body.dark .teaching-period,
body.dark .teaching-program-label { color: #50508a !important; }
body.dark .teaching-program-box { background: #202038 !important; border-left-color: #3a6898 !important; }
body.dark .teaching-program-name { color: #80b8f0 !important; }
body.dark .teaching-program-spec { color: #70709a !important; }
body.dark .teaching-course-name { color: #d8d4ce !important; }
body.dark .teaching-course-name a,
body.dark .teaching-course-name i { color: #80b8f0 !important; }
body.dark .teaching-course-desc { color: #9090b8 !important; }

/* Contact page */
body.dark .contact-form { background: #202038 !important; border-color: #303048 !important; }
body.dark .contact-form-group label { color: #80809a !important; }
body.dark .contact-form-group input,
body.dark .contact-form-group textarea {
  background: #16162a !important;
  border-color: #303048 !important;
  color: #d8d4ce !important;
}
body.dark .contact-form-group input:focus,
body.dark .contact-form-group textarea:focus { border-color: #80b8f0 !important; }
body.dark .contact-page-section-title { color: #d8d4ce !important; border-bottom-color: #3a6898 !important; }
body.dark .contact-info-item { color: #b8b8d0 !important; }
body.dark .contact-info-item i { color: #80b8f0 !important; }
body.dark .contact-info-item a { color: #80b8f0 !important; }
body.dark .contact-info-sub-title { color: #50508a !important; }

/* News */
body.dark .news-type { background: #906020 !important; }
body.dark .news-type-eusome { background: #1a5fa8 !important; }
body.dark .news-summary-line { color: #70709a !important; }

/* Single publication page */
body.dark .pub-date-tag,
body.dark .pub-section-title { color: #50508a !important; }
body.dark .pub-page-authors { color: #80809a !important; }
body.dark .pub-page-venue { color: #80b8f0 !important; }
body.dark .pub-abstract-text { color: #b8b8d0 !important; }
body.dark .pub-details-grid { background: #202038 !important; border-color: #303048 !important; }
body.dark .pub-detail-row { border-bottom-color: #282840 !important; }
body.dark .pub-detail-label { color: #50508a !important; }
body.dark .pub-detail-value { color: #b8b8d0 !important; }
body.dark .pub-detail-value a { color: #80b8f0 !important; }
body.dark .pub-tag { background: #202038 !important; color: #80b8f0 !important; }
body.dark .pub-tag:hover { background: #28283e !important; }
body.dark .pub-action-btn {
  background: #202038 !important;
  border-color: #303048 !important;
  color: #80b8f0 !important;
}
body.dark .pub-action-btn:hover {
  background: #243a5a !important;
  border-color: #3a6898 !important;
  color: #a0c8ff !important;
}
body.dark .pub-action-btn.pub-action-primary {
  background: #1e4070 !important;
  border-color: #3a6898 !important;
  color: #d8d4ce !important;
}
body.dark .pub-divider { border-top-color: #303048 !important; }

/* Footer */
body.dark footer { background: #16162a !important; color: #50508a !important; }
body.dark footer a { color: #606090 !important; }

/* Dual logo: light/dark mode switching */
.logo-light { display: inline-block; }
.logo-dark  { display: none; }
body.dark .logo-light { display: none; }
body.dark .logo-dark  { display: inline-block; }

/* ── Settings (gear) dropdown ───────────────────────────────────────────── */
.settings-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3em;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.settings-lang-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #888;
  line-height: 1;
}

.settings-menu {
  min-width: 148px;
  padding: 0.4rem 0;
  border: 1px solid #e0dbd4;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.settings-section-header {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #bbb;
  padding: 0.55rem 1rem 0.2rem;
  pointer-events: none;
}

.settings-item-icon {
  width: 1rem;
  text-align: center;
  margin-right: 0.45rem;
  color: #aaa;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.settings-menu .dropdown-item {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  padding: 0.3rem 1rem;
}

.settings-lang-active {
  cursor: default;
  font-weight: 600;
  color: #1a3a5c !important;
  opacity: 1 !important;
}

.settings-lang-active .settings-item-icon {
  color: #1a3a5c;
}

.settings-menu .dropdown-divider {
  margin: 0.3rem 0;
  border-color: #e8e4df;
}

/* Dark mode overrides */
body.dark .settings-lang-badge { color: #60608a; }

body.dark .settings-menu {
  background: #202038 !important;
  border-color: #303048 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}

body.dark .settings-section-header { color: #40406a !important; }

body.dark .settings-menu .dropdown-item { color: #b8b8d0 !important; }
body.dark .settings-menu .dropdown-item:hover {
  background: #282840 !important;
  color: #d8d4ce !important;
}
body.dark .settings-item-icon { color: #50508a !important; }

body.dark .settings-lang-active { color: #80b8f0 !important; }
body.dark .settings-lang-active .settings-item-icon { color: #80b8f0 !important; }

body.dark .settings-menu .dropdown-divider { border-color: #303048 !important; }

/* --- Project card stats pills --- */
.project-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.6rem 0 0.4rem 0;
}

.project-stat-pill {
  background: #f0ede8;
  border-radius: 4px;
  padding: 3px 10px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.project-stat-pill .stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1a1a2e;
}

.project-stat-pill .stat-label {
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- Project page stats band strip --- */
.project-stats-band {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  background: #f0ede8;
  border-top: 1px solid #e0dbd4;
  border-bottom: 1px solid #e0dbd4;
  margin: 0 0 2rem 0;
  padding: 0;
  font-family: "Fira Sans", sans-serif;
}

.project-stats-band-item {
  flex: 1;
  text-align: center;
  padding: 14px 20px;
  border-right: 1px solid #e0dbd4;
}

.project-stats-band-item:last-child {
  border-right: none;
}

.project-stats-band-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
}

.project-stats-band-label {
  font-size: 0.65rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* --- Stats bar: strip out section and paragraph padding --- */
.home-section.wg-blank {
  padding: 4px 0 !important;
}

.home-section.wg-blank p {
  margin: 0 !important;
}

/* --- Slider / Carousel: undo global .dark override inside carousel --- */
.carousel .wg-hero,
.carousel .wg-hero.dark {
  background: transparent !important;
  background-color: transparent !important;
}

.carousel .wg-hero .hero-title,
.carousel .wg-hero .hero-lead,
.carousel .wg-hero p,
.carousel .wg-hero h1 {
  color: #d0e8f5 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.carousel .wg-hero .btn {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  background: rgba(255, 255, 255, 0.12) !important;
}

.carousel .wg-hero .btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
}

/* --- Slider / Carousel: compact layout --- */
.wg-hero {
  padding: 1rem 0 !important;
}

.wg-hero .hero-title {
  font-size: 1.4rem !important;
  margin-bottom: 0.3rem !important;
}

.wg-hero .hero-lead {
  font-size: 0.95rem !important;
  margin-bottom: 0.4rem !important;
}

.wg-hero .btn {
  padding: 0.25rem 0.8rem !important;
  font-size: 0.85rem !important;
}

.carousel-indicators {
  margin-bottom: 0.3rem !important;
}

/* --- Slider / Carousel arrows: visible on light backgrounds --- */
.carousel-control-prev,
.carousel-control-next {
  width: 3rem;
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  background-size: 55%;
  filter: none;
}

.carousel-indicators li {
  background-color: rgba(0, 0, 0, 0.35);
  border-top: none;
  border-bottom: none;
  border-radius: 2px;
  height: 4px;
}

.carousel-indicators li.active {
  background-color: rgba(0, 0, 0, 0.75);
}

/* Theme toggle icon: moon in light mode, sun in dark mode */
.theme-icon-dark { display: none; }
.theme-icon-light { display: inline; }
body.dark .theme-icon-dark { display: inline; }
body.dark .theme-icon-light { display: none; }

/* Spacing between main nav items and icon buttons */
.nav-icons-separated {
  border-left: 1px solid rgba(0, 0, 0, 0.12);
  margin-left: 1rem;
  padding-left: 0.5rem;
}
body.dark .nav-icons-separated {
  border-left-color: rgba(255, 255, 255, 0.15);
}

/* ================================================================
   DARK MODE — deep navy academic palette
   bg:      #1b2235   secondary: #202840   surface: #243050
   text:    #ccd6e8   muted:     #8394ae   heading: #e2eaf5
   link:    #7ab8e8   primary:   #5490c8   border:  rgba(255,255,255,0.09)
   ================================================================ */

/* Base backgrounds and text */
body.dark,
body.dark html,
body.dark body,
body.dark header,
body.dark footer {
  background-color: #1b2235 !important;
  background: #1b2235 !important;
  color: #ccd6e8 !important;
}

body.dark .home-section,
body.dark section {
  background-color: #1b2235 !important;
  color: #ccd6e8 !important;
}

body.dark .home-section:nth-of-type(even),
body.dark section:nth-of-type(even) {
  background-color: #202840 !important;
}

/* Navbar */
body.dark .navbar {
  background: #161c2d !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

body.dark .navbar-collapse {
  background-color: #161c2d !important;
}

body.dark .navbar-brand,
body.dark .navbar-brand-name {
  color: #e2eaf5 !important;
}

body.dark .navbar-brand-title {
  color: #8394ae !important;
}

body.dark .navbar .nav-link,
body.dark .navbar .navbar-nav .nav-link,
body.dark #navbar-main .main-menu-item ul li .nav-link {
  color: #ccd6e8 !important;
}

body.dark .navbar .nav-link:hover,
body.dark .navbar .nav-link:focus {
  color: #7ab8e8 !important;
}

body.dark .navbar .nav-link.active,
body.dark .navbar .navbar-nav .nav-link.active {
  color: #7ab8e8 !important;
}

/* Headings */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark .section-heading h1 {
  color: #e2eaf5 !important;
}

/* Links */
body.dark a {
  color: #7ab8e8 !important;
}
body.dark a:hover {
  color: #a0ccf0 !important;
}

/* Cards */
body.dark .card {
  background: #243050 !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
}

body.dark .dark .experience .text-muted,
body.dark .experience .text-muted {
  color: #8394ae !important;
}

body.dark .experience .card-text,
body.dark .experience .card-text p {
  color: #ccd6e8 !important;
}

body.dark .experience .m-2 .border.exp-fill {
  background-color: #5490c8 !important;
}

body.dark .experience .m-2 .border,
body.dark .experience .col.border-right {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Publication rows */
body.dark .pub-row {
  border-bottom-color: rgba(255, 255, 255, 0.09) !important;
}

body.dark .pub-num {
  color: #506080 !important;
}

body.dark a.pub-title {
  color: #e2eaf5 !important;
}
body.dark a.pub-title:hover {
  color: #7ab8e8 !important;
}

body.dark .pub-authors-line {
  color: #8394ae !important;
}

body.dark .pub-venue-line {
  color: #7ab8e8 !important;
}

body.dark .pub-type-conf {
  background: #2d4060 !important;
  color: #ccd6e8 !important;
}

body.dark .pub-year {
  background: #2a3550 !important;
  color: #8394ae !important;
}

body.dark .pub-views {
  color: #506080 !important;
}

body.dark .pub-link-btn {
  border-color: #5490c8 !important;
  color: #7ab8e8 !important;
  background: transparent !important;
}
body.dark .pub-link-btn:hover {
  background: #5490c8 !important;
  color: #fff !important;
}

body.dark .pub-link-pdf {
  border-color: #d96b5e !important;
  color: #d96b5e !important;
}
body.dark .pub-link-pdf:hover {
  background: #d96b5e !important;
  color: #fff !important;
}

body.dark .pub-link-arxiv {
  border-color: #d0844e !important;
  color: #d0844e !important;
}
body.dark .pub-link-arxiv:hover {
  background: #d0844e !important;
  color: #fff !important;
}

body.dark .pub-link-bib {
  border-color: #4aaa70 !important;
  color: #4aaa70 !important;
}
body.dark .pub-link-bib:hover {
  background: #4aaa70 !important;
  color: #fff !important;
}

body.dark .pub-link-code {
  border-color: #9b72d8 !important;
  color: #9b72d8 !important;
}
body.dark .pub-link-code:hover {
  background: #9b72d8 !important;
  color: #fff !important;
}

body.dark .pub-badge {
  color: #7ab8e8 !important;
  border-color: rgba(90, 144, 200, 0.35) !important;
}
body.dark .pub-badge:hover {
  background-color: rgba(90, 144, 200, 0.15) !important;
  color: #a0ccf0 !important;
}

body.dark .pub-under-review {
  color: #e8c87a !important;
  background: rgba(180, 130, 20, 0.15) !important;
  border-color: rgba(180, 130, 20, 0.5) !important;
}
body.dark .pub-under-review-tag {
  color: #e8c87a !important;
  background: rgba(180, 130, 20, 0.15) !important;
  border-color: rgba(180, 130, 20, 0.5) !important;
}

/* News */
body.dark .news-summary-line {
  color: #8394ae !important;
}

/* Scholar dashboard */
body.dark .scholar-dashboard {
  background: #243050 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}

body.dark .scholar-metric-value,
body.dark .scholar-type-count {
  color: #e2eaf5 !important;
}

body.dark .scholar-metric-label,
body.dark .scholar-chart-title,
body.dark .scholar-bar-count,
body.dark .scholar-bar-year,
body.dark .scholar-source {
  color: #506080 !important;
}

body.dark .scholar-type-counts {
  border-top-color: rgba(255, 255, 255, 0.09) !important;
}

body.dark .scholar-bar {
  background: #5490c8 !important;
}
body.dark .scholar-bar-group:hover .scholar-bar {
  background: #7ab8e8 !important;
}

body.dark .scholar-source a {
  color: #7ab8e8 !important;
}

/* Stats toggle */
body.dark .stats-toggle {
  background: #243050 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}
body.dark .stats-toggle:hover {
  background: #2a3a60 !important;
}
body.dark .stats-toggle-label {
  color: #ccd6e8 !important;
}
body.dark .stats-toggle-chevron {
  color: #8394ae !important;
}

/* Filter inputs */
body.dark .filter-search.form-control,
body.dark .pub-filters.form-control {
  background-color: #243050 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #ccd6e8 !important;
}

/* Single pub page */
body.dark .pub-details-grid {
  background: #243050 !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
}

body.dark .pub-detail-row {
  border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

body.dark .pub-abstract-text {
  color: #ccd6e8 !important;
}

body.dark .pub-page-authors {
  color: #8394ae !important;
}

body.dark .pub-page-venue {
  color: #7ab8e8 !important;
}

body.dark .pub-action-btn {
  background: #243050 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #7ab8e8 !important;
}
body.dark .pub-action-btn:hover {
  background: #2d4068 !important;
  border-color: #5490c8 !important;
  color: #a0ccf0 !important;
}
body.dark .pub-action-btn.pub-action-primary {
  background: #5490c8 !important;
  border-color: #5490c8 !important;
  color: #fff !important;
}
body.dark .pub-action-btn.pub-action-primary:hover {
  background: #7ab8e8 !important;
  border-color: #7ab8e8 !important;
}

body.dark .pub-divider {
  border-top-color: rgba(255, 255, 255, 0.09) !important;
}

body.dark .pub-section-title {
  color: #506080 !important;
}

body.dark .pub-date-tag {
  color: #8394ae !important;
}

body.dark .pub-type-tag.pub-type-conf {
  background: #2d4060 !important;
  color: #ccd6e8 !important;
}

/* Org links */
body.dark .org-link {
  color: #8394ae !important;
}
body.dark .org-link:hover {
  color: #7ab8e8 !important;
}

/* Section heading */
body.dark .home-section .section-heading h1 {
  color: #e2eaf5 !important;
}

/* Dropdown menus */
body.dark .dropdown-menu {
  background: #161c2d !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
body.dark .dropdown-item {
  background: #161c2d !important;
  color: #ccd6e8 !important;
}
body.dark .dropdown-item:hover,
body.dark .dropdown-item:focus {
  background: #1e2840 !important;
  color: #e2eaf5 !important;
}

/*************************************************
 * Split Slider Widget — zero padding, full bleed
 *************************************************/
.home-section.wg-split-slider {
  padding: 0 !important;
  animation: none;
  animation-delay: unset;
}
.home-section.wg-split-slider .home-section-bg {
  padding: 0 !important;
}
.home-section.wg-split-slider .carousel-inner .wg-hero {
  animation: none;
  clear: none;
}
