@import "reset";

/* Import the vars in order of precedence: Hugo config first. */
@import "hugo:vars";
@import "vars-custom";
@import "vars";

@import "helpers";
@import "markdown";

html,
body {
  min-height: 90vh;
}

body {
  font-family: $font-family-base;
  margin: 0;
  padding: 0;
  font-size: $font_size_base;
  color: $black;
  @include dc($color_background);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  fill: currentColor; /* Applies to SVG only */
}

footer {
  @include dc($color_background_footer);
  box-shadow: 0 50vh 0 50vh $color_background_footer;
  border-top: 1px solid darken($color_background_footer, 2%);
  margin-top: 3rem;
  padding-top: 3rem;
  padding-bottom: 3rem;

  & > div {
    min-height: 80px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;

    @media (min-width: $breakpoint_md) {
      flex-direction: row;
    }
  }
}

a {
  color: $color_primary;
  text-decoration: none;
  font-weight: bold;
  &:hover {
    text-decoration: underline;
    opacity: 0.8;
  }
}

ol,
ul {
  list-style: disc;
}

main {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
  padding-bottom: 5rem;
  max-width: 140ch;
  & > * {
    width: 100%;
  }
}

header {
  display: grid;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3rem;

  ul {
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    list-style: none;

    li {
      margin: 0 0.5rem;
      a {
        text-decoration: none;
        text-transform: capitalize;
        &:hover {
          text-decoration: underline;
          opacity: 0.8;
        }
      }
    }
  }

  h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
  }
}

.galleries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  grid-gap: 0.5rem;

  a {
    text-decoration: none;
    color: $color_primary;
  }

  .card {
    padding: 2rem;

    .card-img {
      /* Overlay num-photos in the upper right corner of the image. */
      display: block;
      position: relative;
      overflow: hidden;

      img {
        width: 100%;
        height: auto;
        object-fit: cover;
        border-radius: 0.75rem;
      }

      .num-photos {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.25rem 0.5rem;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 0.25rem;
        color: $white;
        font-size: 0.75rem;
      }
    }

    .body {
      margin-left: 0.75rem;

      h2 {
        font-size: 1.5rem;
        font-weight: bold;
        margin: 1rem 0 0.5rem 0;
      }

      p {
        font-size: 1.25rem;
        line-height: 1.5;
      }
    }
  }
}

/* Utilities */

.serif {
  font-family: $font_family_serif;
}

.mt {
  margin-top: 1rem;
}
