.publication-list {
  width: 100%;
  max-width: none; /* Removes the 800px cap */
  margin: 0 auto;
  font-family: Arial, sans-serif;
}

.publication-item {
  display: flex;
  align-items: flex-start; /* Aligns image and text to the top */
  gap: 15px;               /* Space between the image and the text */
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.publication-image {
  flex: 0 0 150px;         /* Prevents image from shrinking or growing; sets fixed width */
  display: flex;
  justify-content: center !important;
}

.publication-image img {
  border-radius: 1px;
  display: block;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.publication-details {
  flex: 1;                 /* Allows text container to fill the remaining space */
}

.publication-title {
  margin: 0 0 4px 0;
  font-size: 16px !important;
  color: #222;
}

.publication-authors {
  margin: 0 0 4px 0;
  font-size: 12px !important;
  color: #555;
}

.publication-venue {
  margin: 0 0 4px 0 !important;
  font-style: italic;
  font-size: 14px !important;
  color: #777;
}

.publication-links a {
  display: inline-block;
  margin-right: 7px;
  padding: 2px 5px;
  font-size: 12px; /* Slightly smaller so button labels fit cleanly */
  text-decoration: none !important;
  /* background-color: #0066cc;
  color: #fff; */
  color: #0066cc;
  border: 1px solid #0066cc;
  border-radius: 4px;
}

.publication-links a:hover {
  background-color: #0066cc;
  color: #fff;
}

/* Responsive: Stack image above text on narrow screens */
@media (max-width: 600px) {
  .publication-item {
    flex-direction: column;
  }
  .publication-image {
    flex: none;
    width: 100%;
    max-width: 250px;
  }
}

/* Modal Background Overlay */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Pop-up Box */
.modal-content {
  background-color: #fefefe;
  margin: 1% auto;
  padding: 1px 1px;
  border: 1px solid #888;
  border-radius: 1px;
  width: 95%;             /* Spans nearly the full screen width */
  box-sizing: border-box; /* Ensures padding doesn't push the box past the screen edge */
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
}

/* Close 'X' Button */
.close {
  color: #888;
  float: right;
  font-size: 20px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #000;
}

/* BibTeX Code Formatting */
.monospace {
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  background-color: #f4f4f4;
  padding: 1px;
  border-radius: 1px;
  margin-top: 1px;
  clear: both;
  /* Forces long BibTeX lines (like titles or author lists) to wrap inside the box */
  white-space: pre-wrap;
  word-break: break-word;
}

/* Work Experience Section */
.experience-list,
.experience-list p,
.experience-list li {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.25;
}

.experience-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.experience-logo {
  flex: 0 0 65px; /* Small fixed width for company/university logos */
}

.experience-logo img {
  width: 65px;
  height: 65px;
  object-fit: contain; /* Prevents wide or tall logos from stretching */
  border-radius: 6px;
  display: block;
  background-color: #fff;
  border: 1px solid #eee;
  padding: 4px;
}

.experience-details {
  flex: 1;
}

.experience-header {
  display: flex;
  justify-content: space-between; /* Pushes role left and dates right */
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2px;
}

.experience-role {
  margin: 0;
  font-size: 15px;
  color: #222;
}

.experience-date {
  font-size: 14px;
  color: #777;
}

.experience-company {
  margin: 0 0 7px 0;
  font-size: 14px;
  font-weight: bold;
  color: #555;
}

.experience-bullets {
  margin: 0;
  padding-left: 20px;
  color: #444;
}

.experience-bullets li {
  margin-bottom: 2px;
}

/* Responsive adjustment for narrow screens */
@media (max-width: 600px) {
  .experience-header {
    flex-direction: column;
    gap: 2px;
  }
}
