mark {
  background-color: #ffed66;
  padding: 0.2em;
  border-radius: 3px;
}

.search-item {
  display: inline-block;
  margin-left: 1rem;
}

.search-input {
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.9rem;
}
.search-input:focus {
  outline: none;
  border-color: #0092ca;
  box-shadow: 0 0 4px rgba(0, 122, 204, 0.5);
}

/* Import Font Awesome */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

.publication-entry {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-left: 3px solid var(--mm-accent-color, #0092ca);
  background-color: #f9f9f9;
  border-radius: 6px;
  transition: box-shadow 0.2s ease;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 768px) {
  .publication-entry {
    margin-bottom: 0.8rem;
    padding: 0.6rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .publication-entry {
    padding: 0.7rem;
  }
}

@media (min-width: 1025px) {
  .publication-entry {
    padding: 0.8rem;
    max-width: 90%;
  }
}

.publication-entry:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pub-title {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
}

.pub-authors, .pub-journal, .pub-pages {
  margin: 0.15rem 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

.pub-buttons {
  margin-top: 0.4rem;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  margin-right: 0.3rem;
  border: none;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.pub-btn i {
  font-size: 0.8rem;
}

.pub-btn:hover {
  transform: translateY(-1px);
}

.abstract-btn { background-color: #555; }
.abstract-btn:hover { background-color: #333; }

.doi-btn { background-color: #0092ca; }
.doi-btn:hover { background-color: #006b96; }

.pdf-btn { background-color: #d9534f; }
.pdf-btn:hover { background-color: #b52b27; }

.link-btn { background-color: #5cb85c; }
.link-btn:hover { background-color: #449d44; }

/* Best Paper Award Styling */
.best-paper-award {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  font-weight: normal;
}

.best-paper-award i {
  margin-right: 0.2rem;
}

@media (max-width: 768px) {
  .best-paper-award {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
    font-size: 0.75rem;
  }
}

.pub-abstract {
  font-size: 0.95em;
  line-height: 1.5;
  color: #444;
  margin-top: 0.5rem;
  background-color: #fff;
  padding: 0.6rem;
  border-radius: 4px;
  border: 1px solid #0092ca;
  border-left: 3px solid #0092ca;
}

.pub-year {
  margin-top: 2rem;
  color: var(--mm-accent-color, #0092ca);
  border-bottom: 2px solid #0092ca;
  display: inline-block;
  padding-bottom: 0.2rem;
}

/* Teaching Cards Grid */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.teaching-card {
  background: var(--mm-card-bg, #fff);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.teaching-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.teaching-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--mm-link-color, #0092ca);
}

.teaching-card p {
  margin: 0.3rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.teaching-card em {
  color: #555;
  display: block;
  margin-top: 0.4rem;
}

.teaching-card h3 a {
  color: #0092ca;
  text-decoration: none;
  font-weight: 600;
}

.teaching-card h3 a:hover {
  text-decoration: underline;
}

.teaching-grid {
  display: grid;
  gap: 1.5rem; /* space between cards */
  margin-bottom: 3rem; /* space below the grid before next section */
}

/* Card Grid - Minimal Mistakes custom style */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--background-color, #fff);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 1rem; /* reduced from 2rem */
  margin-top: 0; /* ensure top spacing is not excessive */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.card-title {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}


.card-media {
  margin-top: 1rem;
  text-align: center;
}

.card-media img,
.card-media iframe {
  width: 100%;
  border-radius: 0.5rem;
  max-height: 220px;
  object-fit: cover;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem; /* slightly tighter for balance */
  margin-top: 2rem;
  margin-bottom: 3rem;
}


.card-title a {
  color: #0092ca; /* match your theme accent */
  text-decoration: none;
}

.card-title a:hover {
  text-decoration: underline;
  color: #006b96; /* slightly darker shade for hover */
}

.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.card-grid .card,
.teaching-grid .teaching-card {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-color, #333);
}

/* Make headings consistent */
.card-grid .card-title,
.teaching-grid .teaching-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Align link colors with theme */
.card-title a,
.teaching-card h3 a {
  color: var(--link-color, #0092ca);
  text-decoration: none;
}

.card-title a:hover,
.teaching-card h3 a:hover {
  text-decoration: underline;
  color: var(--link-hover-color, #006b96);
}

/* Consistent paragraph spacing */
.card-grid p,
.teaching-grid p {
  margin: 0.3rem 0;
}

/* Ensure media doesn’t add extra space */
.card-media img,
.card-media iframe {
  margin-top: 0.5rem;
  border-radius: 8px;
}

.card-grid,
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.card,
.teaching-card {
  background: var(--background-color, #fff);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 1.25rem;
}

/* Ensure home page content has consistent font size with other pages and expanded width */
.layout--home .archive,
.layout--home .page__content {
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: justify;
  max-width: none; /* Remove max-width restriction */
}

.layout--home .archive p,
.layout--home .page__content p,
.layout--home .archive li,
.layout--home .page__content li {
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: justify;
}

/* Make home page use full width like pages with 'wide' class */
.layout--home .page {
  max-width: 100%;
}

.layout--home .page__inner-wrap,
.layout--home .archive {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Remove right margin to use full available space */
.layout--home .archive {
  margin-right: 0;
  padding-right: 0;
}

/* Responsive font sizing for home page - match other pages exactly */
@media (min-width: 768px) {
  .layout--home .archive,
  .layout--home .page__content,
  .layout--home .archive p,
  .layout--home .page__content p,
  .layout--home .archive li,
  .layout--home .page__content li {
    font-size: 1rem;
  }
}

@media (min-width: 1200px) {
  .layout--home .archive,
  .layout--home .page__content,
  .layout--home .archive p,
  .layout--home .page__content p,
  .layout--home .archive li,
  .layout--home .page__content li {
    font-size: 1.05rem;
  }
}

/* Adjust sidebar positioning for home layout */
.layout--home .sidebar {
  margin-top: 1em;
}

/* Justify text for main content across all pages (excluding structured content) */
.page__content p {
  text-align: justify;
}

/* Specifically target research, teaching, outreach, and other single layout pages */
.layout--single .page__content p {
  text-align: justify;
}

/* Exclude structured content from text justification */
.teaching-grid p,
.publication-entry p,
.archive__item p,
.list__item p,
.entries-list p,
.page__meta p,
.page__date p,
.author__bio p,
.sidebar p {
  text-align: left; /* Keep structured content left-aligned */
}



