figure[data-ratio=auto] img {
  max-width: 100%;
}

.nav-container.container {
  --bs-gutter-x: 0;
}

.nav-container + * {
  margin-top: 92px;
}

.content {
  /* fixes the footer to the bottom of the screen, even if there's no content to push it down */
  min-height: calc(100vh - 82px - 180px);
}

.content article p {
  text-align: justify;
}

table figure {
  margin: 0;
}

span.rotate {
  display: inline-block;
}

.rotate {
  animation: rotation 4s infinite linear;
}

.container #sidebar .list-group {
  --bs-list-group-border-color: var(--bs-border-color-translucent);
}

.years span::after {
  content: ' · ';
}

.years span:last-of-type::after {
  content: '';
  display: none;
}

.img-badge {
  float: right;
  padding-left: 0.75rem;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
}

/* BLOCKQUOTES */

blockquote {
  display: block;
  padding-left: 1em;
  border-left: calc(var(--bs-border-width) * 2) solid var(--bs-border-color);
}

/* TAGS */

.card-footer.tags {
  padding-top: 5px;
  padding-left: 16px;
}

.badge.tag {
  padding-top: calc(var(--bs-badge-padding-y) + 1px);
}

.badge.tag:hover:not(.text-bg-primary) {
  background-color: rgb(127, 140, 141) !important;
}

/* BLOGROLL */

.blogroll .list-group-item {
  background-color: rgba(var(--bs-border-color-rgb), 0.25);
  border-left-width: 0;
  border-right-width: 0;
  border-top-width: 0;
}

.blogroll .list-group-item:last-of-type {
  border-bottom-width: 0;
}

.blogroll .list-group-item:hover {
  background-color: rgba(var(--bs-border-color-rgb), 0.5);
}

/* HOTLINKS */

div#hotlinks
{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 4px;
  font-family: var(--bs-font-sans-serif);
}

div#hotlinks a
{
  display: block;
  text-align: center;
  padding: 16px 0 6px;
  text-decoration: none;
  border-radius: 4px;
  background-color: rgba(var(--bs-border-color-rgb), 0.25);
  font-weight: 500;
}

div#hotlinks figure {
  margin-bottom: 0;
}

div#hotlinks a:hover
{
  background-color: rgba(var(--bs-border-color-rgb), 0.5);
}

div#hotlinks a.hotlink p.hotlink-name
{
  margin: 0;
}

/* FONTS */

nav, .btn, .badge, .rounded-pill, form .control-label, form input {
  font-family: var(--bs-font-sans-serif);
}

.btn, .rounded-pill {
  font-weight: 600;
}

/* MEDIA QUERIES */

@media screen and (max-width: 767px) {
  .container-sm, .container {
    max-width: initial;
  }
}

@media screen and (min-width: 576px) {
  div#hotlinks {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (min-width: 768px) {
  .nav-container {
    margin-top: 20px;
    margin-bottom: 20px;
    --bs-gutter-x: -3rem;
  }

  .navbar-brand {
    transform: translateY(-2px);
  }

  .nav-container > nav {
    border-radius: 16px;
  }

  .nav-container > nav > .container {
    --bs-gutter-x: 3rem;
  }

  .nav-item {
    position: relative;
  }

  .nav-item.active::after {
    content: '•';
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 8px;
    text-shadow: #fff 0 1px 3px, #eee 0 0 7px;
  }

  .nav-container + * {
    margin-top: 122px;
  }

  .content {
    /* fixes the footer to the bottom of the screen, even if there's no content to push it down */
    min-height: calc(100vh - 112px - 180px);
  }

  div#hotlinks
  {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media screen and (min-width: 992px) {
  /* Comfortable reading width */
  .content:not(.home):not(.links) .container, .nav-container:not(.home):not(.links), footer:not(.home):not(.links) .container {
    max-width: 50rem;
  }
}

@media screen and (min-width: 1200px) {
  div#hotlinks {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bg-adaptive {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
}

@media screen and (prefers-color-scheme: dark) {
  .bg-adaptive {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
  }
}
