/* Custom site-wide overrides
   - Reduce page side paddings
   - Slightly widen content container for larger displays
*/

/* Core wrapper used by the theme */
.wrapper {
  /* Use viewport width with an upper bound to reduce huge side whitespaces on large screens */
  width: min(96vw, 1280px);
  padding-left: 10px;
  padding-right: 10px;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure generic container classes (if present) also get reduced paddings */
.container, .container-md, .container-lg {
  padding-left: 12px;
  padding-right: 12px;
}

/* On very large screens, allow a bit wider content while still capping whitespace */
@media (min-width: 1600px) {
  .wrapper {
    width: min(94vw, 1400px);
  }
}

/* Publications list fine-tune: make teaser and text columns breathe a bit more horizontally */
.publications .col-sm-3.abbr,
.publications .col-sm-9 {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* Fill the middle gap on desktop: use left margin next to the fixed sidebar and let width auto */
@media (min-width: 961px) {
  :root {
    /* Left sidebar width is ~232px in theme; add a slightly larger gap to shift content a bit to the right */
    --sidebar-width: 232px;
    --content-gap: 56px; /* +12px more to the right */
  }
  section {
    float: none; /* don't force float so auto width can fill the wrapper */
    width: auto !important;
    max-width: none !important;
    margin-left: calc(var(--sidebar-width) + var(--content-gap));
  }
}

/* On mid-size viewports, reduce right padding to avoid a harsh right indent */
@media (min-width: 961px) and (max-width: 1200px) {
  .wrapper {
    padding-right: 6px;
  }
}
