/* page.css: styles for specific pages */

/* remove default table borders/backgrounds and align media to the top */
.pubtable {
  border-collapse: collapse;
  border-spacing: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.pubtable, .pubtable tr, .pubtable td, .pubtable th {
  border: none !important;
  background: transparent !important;
}
.pubtable td, .pubtable th {
  vertical-align: top;
  padding: 0.4rem 0; /* keep some spacing between rows */
}
.pubtable-img, .pubtable-img img {
  margin-top: 0;
  display: block;
  margin-right: 1rem; /* add horizontal spacing between image and text */
}

/* adjust desktop image sizing to be larger while preserving aspect ratio */
.pubtable-img img {
  width: 96% !important;
  max-width: 420px !important; /* hard cap to prevent images becoming too large */
  height: auto !important;
  margin: 0 auto;
  display: block;
  box-sizing: border-box;
  margin-top: 0.4em; /* add a bit of top padding to images to visually align with text */
}

@media (max-width: 949px) {
  /* stack each pubtable row so image appears above its text */
  .pubtable, .pubtable tbody, .pubtable tr, .pubtable td {
    display: block;
    width: 100%;
  }
  .pubtable tr {
    margin-bottom: 1.25rem; /* spacing between image-text pairs */
    padding-bottom: 0.5rem;
    border-bottom: none;
  }
  .pubtable-img {
    margin-right: 0; /* remove horizontal gap on mobile */
    margin-bottom: 0.25rem; /* reduced space between image and its text */
    min-width: 0;
    text-align: center; /* center image container */
  }
  /* unified mobile image sizing: nearly full width but capped to avoid overflow */
  .pubtable-img img {
    width: 80% !important;
    max-width: 360px !important; /* safe cap for narrow viewports */
    height: auto !important;
    margin: 0 auto;
    display: block;
    box-sizing: border-box;
    max-width: 100% !important; /* ensure no overflow */
  }
}

/* make links in project table bold, keep sidebar links normal */
.pubtable a {
  font-weight: 700;
}
.sidebar a {
  font-weight: 400;
}
