:root {
  --titleBlur: 50;

  --tabMenuHeight: 45px;

  --cardWidth: 300px;

  /*Adapt nav bar for home page*/
  --navBg: rgba(24, 26, 27, 0);
}

.dark {
  --overlayBg: rgba(24, 26, 27, .5);
  --overlayGradient: linear-gradient(to right, #005c97, #363795);
}

.light {
  --overlayBg: rgba(255, 255, 255, .5);
  --overlayGradient: linear-gradient(to right, #017ac6, #5d60f8);
}

html {
  scroll-behavior: smooth;
}

div#home {
  display: inline-flex;
  flex-direction: column;
  min-height: 200px;
  height: calc(100vh);
  width: 100%;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 1em;
  background: #181a1b;
  z-index: 0;
}

div#home:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: url("../assets/cover.jpg");
  background-size: cover;
  z-index: 1;
  filter: blur(calc(var(--titleBlur) * 0.36px));
  overflow: hidden;
  background-position: center center;
  background-repeat: no;
}

div#home h1 {
  font-size: 3em;
  z-index: 2;
  color: white;
  background-color: rgba(41, 41, 41, .66);
  padding: .5em;
  border-radius: 5px;
  max-width: 85vw;
  box-sizing: border-box;
  cursor: default;
  text-align: center;
}

div#home button {
  user-select: none;
  z-index: 2;
  border: none;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

div#home button a {
  display: flex;
  align-items: center;
  justify-content: center;
}

div#content {
  padding: var(--marginSize);
}

/* div#content #editors_note {
  padding: 0 calc(var(--marginSize) * .5);
} */

div#content #select {
  display: block;
  width: 100%;
  height: var(--tabMenuHeight);
  border-bottom: 1px solid var(--highlightColor);
  white-space: no-wrap;
  overflow-y: hidden;
  overflow-x: auto;
}


div#content #select.stick {
  position: fixed;
  width: calc(100% - (var(--marginSize) * 2));
  top: var(--navBarSize);
  background-color: var(--bgColor);
  padding: 10px 0px;
  z-index: 1;
}

div#content #select div {
  width: max-content;
}

div#content #select button {
  display: inline-block;
  background-color: var(--highlightColor);
  font-size: 1.25em;
  border: none;
  border-top: 1px solid var(--highlightColor);
  border-left: 1px solid var(--highlightColor);
  border-right: 1px solid var(--highlightColor);
  border-radius: 5px 5px 0 0;
  padding: 0.5em 1em;
  margin: 0px;
  height: var(--tabMenuHeight);
  box-sizing: border-box;
  cursor: pointer;
}

div#content #select.stick button {
  border: 1px solid var(--highlightColor);
  border-radius: 5px;
}

div#content #select button.active {
  background-color: transparent;
  background: var(--overlayGradient) left / 100% no-repeat;
}

div#content #articles {
  width: 100%;
  padding: var(--marginSize) 4px;
  padding-top: 3em;
  box-sizing: border-box;
  display: block;
  /* display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--cardWidth), 1fr));
  grid-gap: 3em; */
}

div#content #articles.extraPadding {
  padding-top: calc(3em + var(--tabMenuHeight));
}

/* div#content #articles #wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
} */

div#content #articles article {
  min-width: var(--cardWidth);
  width: var(--cardWidth);
  height: 400px;
  display: inline-block;
  border: 1px solid var(--highlightColor);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .5s;
  margin: 2em;
}

div#content #articles article:hover {
  transform: scale(1.05);
}

div#content #articles article img {
  height: 250px;
  width: var(--cardWidth);
  object-fit: cover;
}

div#content #articles article h2 {
  margin: 10px 10px 15px 10px;
  /* margin: 0; */
  display: -webkit-box;
  max-width: 300px;
  height: 80px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

div#content #articles article p {
  padding: 0 10px;
  margin: 0;
  color: var(--captionColor);
  display: -webkit-box;
  max-width: 300px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

div#content #articles div#noArticles {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: -3rem;
  margin-top: 3rem;
}

@media screen and (min-width: 4000px) {
  :root {
    --tabMenuHeight: 150px;
  }
  
  div#content #articles article {
    min-width: calc(var(--cardWidth) * 3);
    width: calc(var(--cardWidth) * 3);
    height: 1100px;
  }

  div#content #articles article img {
    height: 660px;
    width: calc(var(--cardWidth) * 3);
  }

  div#content #articles article h2 {
    padding: 48px 32px;
  }
  
  div#content #articles article p {
    padding: 0 32px;
    max-width: calc(var(--cardWidth) * 3);
  }
}