/* ====
 quick resets
 ==== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
/*====
 setting up the body
  ====*/
body {
  line-height: 1.4;
  font-family: sans-serif;
  font-size: 1rem;
  font-weight: 200;
  text-align: center;
  background-color: #fff;
}
/* make images easier to deal with */
img {
  display: block;
  width: 100%;
}

/* ====
utility classes
==== */
.container {
  margin: 0 auto;
  padding: 0 2em;
}
.container-flex {
  display: flex;
}

.row {
  display: flex;
  flex-direction: column;
  padding: 1em;
}
@media (min-width: 530px) {
  .row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    width: 100%;
  }
}

/* ====
typography 
====*/
h1 {
  font-size: 1.75rem;
  margin-top: 1.5em;
}
h2 {
  font-size: 1.5rem;
}
h3,
h4 {
  font-size: 1.25rem;
}
p,
li {
  font-size: 1.25rem;
}
li {
  text-align: left;
}

.toc-list-item,
.sidebar-quicklink,
.dropdown-item {
  list-style-type: none;
  font-size: 1.1rem;
}
.article-title {
  margin-top: 2em;
  margin-bottom: 0.5em;
}
.section-title,
.section-subheader {
  margin-bottom: 0.5em;
}

.widget-title {
  font-size: 1.3rem;
}
.widget-link {
  font-size: 0.9rem;
  text-align: left;
}
span {
  color: #fb8500;
  font-weight: 800;
  font-size: 1.9rem;
}
footer span {
  font-size: inherit;
  font-weight: inherit;
}
a {
  text-decoration: none;
  color: inherit;
}
a:hover,
a:focus {
  color: #fb8500;
  text-decoration: underline;
}
.source p,
.signature p {
  font-size: 0.9rem;
}
/* ====
layout 
====*/

/* header */
header h1,
header p {
  text-align: left;
}

header {
  background-color: #f1faee;
  padding: 2em 0;
}
.logo {
  padding: 0 0 3em 3em;
  width: 90vw;
}
@media (max-width: 675px) {
  .logo {
    flex-direction: column;
  }
  .logo p {
    line-height: 1.5;
  }
}
footer {
  display: flex;
  justify-content: space-between;
  flex-basis: auto;
  padding: 1em;
  background-color: #f1faee;
}
@media (max-width: 530px) {
  footer {
    flex-direction: column;
  }
}

/* widgets */
aside {
  width: 350px;
  margin: 2em 0.5em 0 0.5em;
}

.sidebar-widget {
  border: 20px solid #f1faee;
  padding: 1em;
  margin-bottom: 2em;
  text-align: left;
}
@media (max-width: 1000px) {
  aside {
    display: none;
  }
  .row {
    width: 90vw;
  }
}
.widget-sublink,
.sublink-list-item {
  font-size: inherit;
  list-style-type: disc;
  padding-left: 0.5em;
}
.widget-dropdown {
  font-size: inherit;
}

/* main content */
.main-page-content {
  width: 70vw;
  min-height: 60vh;
}
@media (max-width: 1000px) {
  .main-page-content {
    width: 100vw;
    margin: 0 auto;
  }
}
@media (max-width: 530px) {
  .row {
    align-items: center;
  }
}
/* dropdown blocks */
.section-block {
  width: 200px;
  aspect-ratio: 1/1;
  background-color: #fb8500;
  padding: 2em;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1em;
}
.section-block:hover,
.section-block:focus {
  background-color: rgba(251, 133, 0, 0.8);
}
.icon__section-block-dropdown {
  font-size: 3rem;
  color: #ffbf69;
}
.block-dropdown-title {
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 1.2px;
  font-weight: 400;
}
/* dropdowns */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  background-color: #ffbf69;
  color: #fff;
  font-size: inherit;
  padding: 0.5em;
  border-radius: 0.25rem;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
  display: none;
}
.dropdown-menu.active {
  opacity: 1;
  transform: translateY(0);
  display: block;
  z-index: 10;
}
/* .nav dropdowns */
.nav ul {
  position: relative;
}
.nav ul ul {
  transition: max-height 0.3s;
  max-height: 0;
  overflow-y: hidden;
}
.nav ul li:hover > ul {
  overflow-y: hidden;
  max-height: 500px;
}
.nav ul ul li {
  position: relative;
}
/* nav hamburger */
nav {
  position: fixed;
  background-color: #fb8500;
  color: #fff;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 250ms cubic-bezier(0.5, 0, 0.5, 1);
}
.nav__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  height: 100%;
  font-weight: 600;
  font-size: 1.75rem;
  text-decoration: none;
}
.nav__item,
.nav__dropdown-item {
  text-align: center;
}

.nav-link:hover {
  color: #000;
  text-decoration: none;
}
.nav-toggle {
  padding: 0.5em;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: absolute;
  right: 1.5em;
  top: 1em;
  z-index: 1000;
}
.nav-open nav {
  transform: translateX(0);
}
.nav-open .nav-toggle {
  position: fixed;
}
.nav-open .hamburger {
  transform: rotate(6.25turn);
}
.nav-open .hamburger::after {
  opacity: 0;
}
.nav-open .hamburger::before {
  transform: rotate(90deg) translateX(-6px);
}
.hamburger {
  display: flex;
  position: fixed;
  right: 20px;
  top: 30px;
}
.hamburger,
.hamburger::before,
.hamburger::after {
  /* background: rgba(251, 133, 0, 0.8); */
  background: #000;
  width: 2em;
  height: 3.25px;
  border-radius: 1em;
  transition: transform 250ms ease-in-out;
}
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
}
.hamburger::before {
  top: 6px;
}
.hamburger::after {
  bottom: 6px;
}
.nav__dropdown-item {
  list-style-type: none;
}

/* ====
 main articles
====  */
.article-header {
  margin-bottom: 2em;
}
.section-title {
  justify-content: left;
}

.article-body p,
.article-body li {
  margin-bottom: 0.75em;
  line-height: 1.75;
}
.article-body li {
  max-width: 85%;
  margin: 0 auto 0.5em auto;
}
.article-body {
  text-align: left;
}
/* table */
table {
  border: 1px solid #000;
  margin: 1.5em 0;
}
.table-header,
caption {
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.table-header {
  background-color: #f1faee;
}
td {
  padding: 1em;
}

/* styling for code examples */
code {
  background-color: #f1faee;
  padding: 1em;
  margin: 1em 0;
  display: block;
  text-align: left;
  font-size: inherit;
}
.function,
.keyword,
.string,
.number,
.template-string,
.constant,
.property,
.code {
  font-size: inherit;
}
.code {
  color: #fb8500;
}

.keyword {
  color: #1982c4;
}
.string,
.constant,
.number {
  color: #8ac926;
}
.function,
.property {
  color: #ff595e;
}
.template-string {
  color: #390099;
}
