@charset "utf-8";
@import "normalize";

$breakpoint--mobile: 720px;
$breakpoint--tablet: 960px;
$breakpoint--laptop: 1440px;
$breakpoint--desktop: 1600px;

@mixin min-screen($min-width: $body-width) {
  @media screen and (min-width: $min-width) {
    @content;
  }
}

@mixin max-screen($max-width: $body-width) {
  @media screen and (max-width: $max-width) {
    @content;
  }
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

body,
html {
  height: 100%;
}

html {
  font-size: 15px;
  color: #32363b;

  @include min-screen($breakpoint--laptop) {
    font-size: 17px;
  }

  @include min-screen($breakpoint--desktop) {
    font-size: 19px;
  }
}

h2 {
  color: #388282;
}

h3,
h4,
h5,
h6 {
  color: #444;
}

code {
  color: #555c64;
  font-size: 0.75em;
  font-family: "IBM Plex Mono", "SF Mono", "Source Code Pro", Consolas,
    "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
}

h3 > code {
  border-radius: 4px;
  background-color: #f6f8f8;
  padding: 0.2rem 0.3rem;
  position: relative;
  left: -0.2rem;
}

ul code,
p code,
pre {
  border-radius: 3px;
}
aside code,
ul code,
p code {
  display: inline-block;
  vertical-align: middle;
  padding: 0 0.3rem;
  background: #f6f8f8;
  position: relative;
  top: -1px;
}

body {
  text-rendering: optimizeLegibility;
  font-family: "Inter", Helvetica, Arial, sans-serif;
  letter-spacing: 0.2px;
}

$color--link: #4179ad;
$sidebar-width: 13rem;

a,
a code {
  color: $color--link;
}

a {
  &:hover {
    text-decoration: underline;
  }
}

main {
  display: flex;

  > section {
    flex-direction: column;

    @include min-screen($breakpoint--mobile) {
      flex-direction: row;
    }
  }
}

section {
  display: flex;
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  align-items: flex-start;
}

header {
  box-sizing: content-box;
  height: 70px;
  background-color: #f6f8f8;
  border-bottom: 3px solid #ddd;
  margin-bottom: 2rem;
  display: flex;

  section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 0;
  }

  nav:nth-child(1) {
    flex: 1 1 auto;
    margin: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  a.version {
    color: #8a6c3c;
    padding: 0;
  }

  nav {
    flex: 0 1 auto;
    display: flex;
    justify-content: stretch;

    a {
      border-radius: 4px;
      height: 70px;
      padding: 0 1rem;
      line-height: 70px;
      position: relative;

      h1 {
        font-weight: bold;
        font-size: 1.2rem;
        margin: 0;
      }

      &.disabled {
        cursor: default;
        color: #ddd;
      }

      &.fat {
        &:hover {
          text-decoration: none;
        }

        &:not(.disabled) {
          cursor: pointer;

          &:hover,
          &:active {
            background-color: #f0f3f3;

            &:before {
              content: "";
              display: block;
              width: 0;
              height: 0;
              border-left: 4px solid transparent;
              border-right: 4px solid transparent;
              border-bottom: 4px solid #fff;
              position: absolute;
              bottom: -4px;
              left: 50%;
              transform: translateX(-50%);
              z-index: 1;
            }

            &:after {
              content: "";
              display: block;
              width: 0;
              height: 0;
              border-left: 7px solid transparent;
              border-right: 7px solid transparent;
              border-bottom: 7px solid #ddd;
              position: absolute;
              bottom: -2px;
              left: 50%;
              transform: translateX(-50%);
            }
          }
        }
      }
    }
  }
}

@import "navigation";
@import "content";
