/* Additions to the JA Mono template. Loaded after the template's own CSS on every page. */

/* The date each post was published, on its project tile. The template only showed it in the panel that
   slides up on hover (and the home page not at all), so it now sits in the tile's corner and fades out
   when that panel, which shows it too, slides in. */
.articles-list.ja-isotope-wrap.packery .item .article-date {
  position: absolute;
  left: 40px;
  bottom: 40px;
  padding: 6px 10px;
  background: #2727a4;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  -webkit-transition: opacity 350ms;
  -o-transition: opacity 350ms;
  transition: opacity 350ms;
}
.articles-list.ja-isotope-wrap.packery .item:hover .article-date {
  opacity: 0;
}

/* The home page's hover panel: the date next to the category. */
.articles-list.ja-isotope-wrap.packery .item .mod-articles-category-date {
  margin-left: 10px;
  color: #ffffff;
}

/* The four boxes in the home page's Introduction (Projects, Me, Code, Code): when they sit side by side,
   their icons, titles, texts and links each start on the same line, however long each text is. The
   boxes share one grid's rows through subgrid. (The texts used to end in <br/> tags to push the links
   down, which only lined them up at some widths; the export removes them.) */
@media (min-width: 768px) {
  .acm-features.style-1 > .row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  /* Float clearfixes, which would take up grid cells. */
  .acm-features.style-1 > .row:before,
  .acm-features.style-1 > .row:after,
  .acm-features.style-1 .features-item:before,
  .acm-features.style-1 .features-item:after {
    display: none;
  }
  .acm-features.style-1 .features-item {
    display: grid;
    grid-row: span 4;
    grid-template-rows: subgrid;
    row-gap: 0;
    justify-items: center;
    width: auto;
    /* Side padding is a share of the box here, not of the whole row as before (5% of the row was
       20% of a box). 10% leaves room for "Surf My Academic GitHub" on one line on a 1920px screen. */
    padding-left: 10%;
    padding-right: 10%;
  }
  .acm-features.style-1 .feature-content {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
    justify-items: center;
    align-items: start;
  }
  /* A link is a block in the grid, where a bottom border would run once under a two-line link.
     An underline marks each line, as the border did. */
  .acm-features.style-1 .feature-content > a {
    border-bottom: 0;
    text-decoration: underline;
    text-decoration-color: #2727a4;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
  }
  .acm-features.style-1 .features-item.style-dark .feature-content > a,
  .acm-features.style-1 .features-item.style-highlight .feature-content > a {
    text-decoration-color: #ffffff;
  }
}
