@font-face {
  font-family: PTMono;
  src: url(../fonts/PTMono-Regular.ttf);
}

@font-face {
  font-family: PTSerif;
  src: url(../fonts/PTSerif-Regular.ttf);
}

@font-face {
  font-family: PTSansBold;
  src: url(../fonts/PTSans-Bold.ttf);
}

@font-face {
  font-family: PTSans;
  src: url(../fonts/PTSans-Regular.ttf);
}

@font-face {
  font-family: NotoSans;
  src: url(../fonts/NotoSans-Regular.ttf);
}

@font-face {
  font-family: NotoSansBold;
  src: url(../fonts/NotoSans-Bold.ttf);
}

:root {
  --main-bg-color: #fff;
  --text-color: #1D1E22;
  --text-color-light: #8D8D8D;
  --text-color-extra-light: rgba(0, 0, 0, 0.08);
  --emphasis-color: #62c8f3;
  --link-color: #0094FF;
  --attention-color: #258F00;
  --x-small-margin: 5px;
  --small-margin: 10px;
  --medium-margin: 20px;
  --medium-large-margin: 25px;
  --large-margin: 30px;
  --x-large-margin: 60px;
  --large-negative-margin: -30px;
  --x-large-negative-margin: -60px;
  --page-width: 1000px;
}

@keyframes fadein {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media only screen and (max-width: 1000px) {
  :root {
    --page-width: 800px;
  }
}

@media only screen and (max-width: 768px) {
  :root {
    --x-small-margin: 3px;
    --small-margin: 6px;
    --medium-margin: 12px;
    --large-margin: 24px;
    --x-large-margin: 48px;
    --large-negative-margin: -24px;
    --x-large-negative-margin: -48px;
    --page-width: 700px;
  }
}

html,
body {
  padding: 0;
  margin: 0;
  font-family: NotoSans, sans-serif;
  font-size: 100%;
}

a {
  color: var(--link-color);
}

p {
  color: var(--text-color);
}

.container {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  width: var(--page-width);
  margin: auto;
}

.container .inside {
  padding: 3em;
  box-sizing: border-box;
  flex: 1;
  text-align: left;
  width: 800px;
}

.container menu {
  width: 220px;
  padding: 0;
  margin: 0;
}

/* Article */

article h1 {
  font-size: 2rem;
  font-family: PTSerif;
  margin-bottom: var(--small-margin);
}

article h2 {
  font-size: 1.2rem;
  margin-top: 0;
  font-weight: 100;
  margin-bottom: var(--large-margin);
}

article h3 {
  font-size: 1.2rem;
  color: var(--text-color-light);
  margin-top: var(--large-margin);
}

article p {
  font-size: 0.9rem;
  line-height: 180%;
}

article p a {
  font-family: NotoSansBold;
  text-decoration: underline;
}

article img {
  max-width: 100%;
  margin: var(--medium-margin) 0 var(--x-small-margin) 0;
}

article img+img {
  margin: var(--x-small-margin) 0;
}

article li {
  font-size: 0.9rem;
  margin: var(--small-margin) 0;
  line-height: 180%;
}

article code {
  font-size: 1.0rem;
}

article pre	{
	white-space: pre-wrap;
}

article pre code {
  border-radius: 6px;
  padding: var(--large-margin) !important;
}

article .skills, article .stats {
  border-top: 1px solid var(--text-color-extra-light);
  border-bottom: 1px solid var(--text-color-extra-light);
  padding: var(--x-small-margin) 0;
}

article .stats p {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

article .skills .pill {
  font-family: PTSerif;
  background: #79E089;
  color: white;
  padding: var(--x-small-margin) var(--small-margin);
  border-radius: 14px;
  margin: 0 var(--small-margin) 0 0;
}

article .skills .pill.markdown {
  background-color: #E079AA;
}

article .skills .pill.javascript {
  background-color: #798ce0;
}

article .skills .pill.json {
  background-color: #79dce0;
}

article .skills .pill:first-child {
  margin-left: var(--small-margin);
}

article .stats .download {
  display: inline-flex;
  background-color: var(--link-color);
  color: white;
  border-radius: 20px;
  text-decoration: none;
  padding: 0 var(--small-margin);
  margin-right: var(--x-small-margin);
  align-items: center;
}

article .stats .download img {
  width: 15px;
  margin: 0 var(--x-small-margin) 0 0;
}

article .stats p .right > * {
  margin-left: var(--small-margin);
}

article .gallery {
  display: flex;
}

article .gallery img {
  width: 175px;
}

article p strong {
  font-family: NotoSansBold;
}

article em {
  font-family: monospace;
  font-style: normal;
  font-size: 1.2rem;
  color: crimson;
}

article table {
	width: 100%;
	margin: 40px 0;
	border-collapse: collapse;
	font-size: 13px;
	line-height: 1.5em;
}

article th, article td {
	text-align: left;
	padding-right: 20px;
	vertical-align: top;
}

article table td, article td {
	border-spacing: none;
	border-style: solid;
	padding: 10px 15px;
	border-width: 1px 0 0 0;
}

article tr>td {
	border-top: 1px solid #eaeaea;
}

article tr:nth-child(odd)>td {
	background: #fcfcfc;
}

article thead th, article th {
	text-align: left;
	padding: 10px 15px;
	height: 20px;
	font-size: 13px;
	font-weight: bold;
	color: #444;
	border-bottom: 1px solid #dadadc;
	cursor: default;
	white-space: nowrap;
}

/* Subscribe Form */

.subscribe {
  border: 1px solid var(--text-color-extra-light);
  box-sizing: border-box;
  padding: var(--medium-margin);
  margin-top: var(--x-large-margin);
}

.subscribe h2 {
  margin: 0;
  color: var(--text-color-light);
  font-size: 1.2rem;
}

.subscribe input[type='email'] {
  font-family: PTMono;
  border: 1px solid var(--text-color);
  ;
  padding: var(--small-margin);
  border-radius: 3px;
}

.subscribe input[type='submit'] {
  font-family: NotoSansBold;
  background: var(--text-color);
  color: white;
  border: 0;
  border-radius: 3px;
  margin-left: var(--small-margin);
  padding: var(--x-small-margin);
}

/* Menu */

menu {
  position: relative;
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
}

.menu {
  padding-left: 0;
}

.menu a {
  color: var(--text-color);
  text-decoration: none;
  opacity: 0.8;
  cursor: pointer;
}

.menu a:hover {
  opacity: 1;
}

.menu a.expand::before {
  content: "";
  display: block;
  background: center url(../img/right-chevron.svg) no-repeat;
  background-size: contain;
  margin-top: 1px;
  width: 11px;
  height: 20px;
  float: left;
  opacity: 0.4;
  transform: rotate(0);
  transition: transform 0.15s ease;
  margin-right: 11px;
}

.menu a.expand.expanded::before {
  transform: rotate(90deg);
}

.menu a.expand.expanded+ul {
  display: block;
}

.menu li {
  list-style: none;
  font-size: 1rem;
  margin: var(--medium-margin) 0;
}

.menu li ul {
  border-left: 1px solid var(--text-color-extra-light);
  margin-left: var(--x-small-margin);
  display: none;
}

.menu li li {
  list-style-type: disc;
  font-size: 0.9rem;
}

menu[data-selected='building-includes'] li[data-id='building'] a.expand::before,
menu[data-selected='building-markdown'] li[data-id='building'] a.expand::before,
menu[data-selected='building-templates'] li[data-id='building'] a.expand::before,
menu[data-selected='building-local-vs-live-sites'] li[data-id='building'] a.expand::before,
menu[data-selected='hosting-custom-domains'] li[data-id='hosting'] a.expand::before,
menu[data-selected='hosting-custom-404'] li[data-id='hosting'] a.expand::before,
menu[data-selected='hosting-security'] li[data-id='hosting'] a.expand::before,
menu[data-selected='hosting-syncing'] li[data-id='hosting'] a.expand::before,
menu[data-selected='hosting-deleting-sites'] li[data-id='hosting'] a.expand::before,
menu[data-selected='hosting-bandwidth-limits'] li[data-id='hosting'] a.expand::before,
menu[data-selected='hosting-sub-folders'] li[data-id='hosting'] a.expand::before,
menu[data-selected='recipes-basic-site'] li[data-id='recipes'] a.expand::before,
menu[data-selected='recipes-documentation'] li[data-id='recipes'] a.expand::before,
menu[data-selected='recipes-blog'] li[data-id='blog'] a.expand::before {
  transform: rotate(90deg);
}

menu[data-selected='building-includes'] li[data-id='building'] ul,
menu[data-selected='building-markdown'] li[data-id='building'] ul,
menu[data-selected='building-templates'] li[data-id='building'] ul,
menu[data-selected='building-local-vs-live-sites'] li[data-id='building'] ul,
menu[data-selected='hosting-custom-domains'] li[data-id='hosting'] ul,
menu[data-selected='hosting-custom-404'] li[data-id='hosting'] ul,
menu[data-selected='hosting-security'] li[data-id='hosting'] ul,
menu[data-selected='hosting-syncing'] li[data-id='hosting'] ul,
menu[data-selected='hosting-deleting-sites'] li[data-id='hosting'] ul,
menu[data-selected='hosting-bandwidth-limits'] li[data-id='hosting'] ul,
menu[data-selected='hosting-sub-folders'] li[data-id='hosting'] ul,
menu[data-selected='recipes-basic-site'] li[data-id='recipes'] ul,
menu[data-selected='recipes-documentation'] li[data-id='recipes'] ul,
menu[data-selected='recipes-blog'] li[data-id='recipes'] ul {
  display: block;
}

menu[data-selected='building-includes'] li[data-id='includes'] a,
menu[data-selected='building-markdown'] li[data-id='using-markdown'] a,
menu[data-selected='building-templates'] li[data-id='templates'] a,
menu[data-selected='building-local-vs-live-sites'] li[data-id='local-vs-live-sites'] a,
menu[data-selected='hosting-custom-domains'] li[data-id='custom-domains'] a,
menu[data-selected='hosting-custom-404'] li[data-id='custom-404'] a,
menu[data-selected='hosting-sub-folders'] li[data-id='sub-folders'] a,
menu[data-selected='hosting-syncing'] li[data-id='syncing'] a,
menu[data-selected='hosting-deleting-sites'] li[data-id='deleting-sites'] a,
menu[data-selected='hosting-bandwidth-limits'] li[data-id='bandwidth-limits'] a,
menu[data-selected='hosting-security'] li[data-id='security'] a,
menu[data-selected='recipes-basic-site'] li[data-id='basic-site'] a,
menu[data-selected='recipes-documentation'] li[data-id='documentation'] a,
menu[data-selected='recipes-blog'] li[data-id='blog'] a {
  font-family: NotoSansBold;
}

/* Header */

header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--medium-large-margin);
  box-sizing: border-box;
}

header .logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

header .logo .icon {
  width: 35px;
}

header .logo .text {
  height: 25px;
  margin-left: 15px;
}

header nav .subnav a {
  margin: 0 var(--medium-margin);
  color: var(--text-color);
  text-decoration: none;
}

header nav .subnav a.download {
  font-family: NotoSansBold;
}


/* Footer */

footer {
  border-top: 1px solid var(--text-color-extra-light);
  padding: var(--large-margin)
}

footer nav {
  display: flex;
}

footer nav a {
  margin-left: var(--medium-margin);
  color: var(--text-color);
  text-decoration: none;
}

footer nav a:first-child {
  margin-left: 0;
}

footer nav a.home {
  flex: 1;
}

