:root {
  --typeface-header: 'Overpass Mono';
  --typeface-text: 'Planet';
  --main-column-width: 660px;
  --accent-color: #298070;
  --gray-color: #7D7F84;
}

@font-face {
  font-family: 'Overpass Mono';
  src: url('../assets/OverpassMono-Regular.ttf') format('truetype');
  font-weight: normal;
}

@font-face {
  font-family: 'Overpass Mono';
  src: url('../assets/OverpassMono-Bold.ttf') format('truetype');
  font-weight: bold;
}

@font-face {
  font-family: 'Planet';
  src: url('../assets/PlanetWeb-Regular.woff2') format('woff2');
  font-weight: 400;
}

html {
  font-family: var(--typeface-text);
  line-height: 1.4;
  color: #222222;
  background: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: grid;
  grid-template-columns: [start] auto [left-sidebar] 210px [main] 660px [right-sidebar] 210px [right-edge] auto [end];
}

a {
  text-decoration: none;
  color: var(--accent-color);
}

a:hover {
  text-decoration: underline;
}

.avatar {
  grid-column: start / main;
  justify-self: center;
  width: 120px;
  border-top: 10px solid var(--accent-color);
  padding-top: 10px;
}

.avatar img {
  margin-left: -20%;
  margin-top: -8%;
  width: 140%;
}

header {
  grid-column: main;
  margin-top: 100px;
}

header h1 {
  font-family: var(--typeface-header);
  font-weight: bold;
  font-size: 48.83px;
  line-height: 60px;
  letter-spacing: -0.03em;
  color: var(--accent-color);
  padding-bottom: 10px;
}

header h2 {
  font-family: var(--typeface-header);
  font-weight: normal;
  font-size: 20px;
  line-height: 31px;
  color: var(--gray-color);
  padding-bottom: 30px;
}

header h3 {
  font-family: var(--typeface-text);
  font-weight: normal;
  font-size: 25px;
  line-height: 40px;
}

p {
  font-family: var(--typeface-text);
  font-size: 20px;
  line-height: 30px;
  margin-bottom: 20px;
}

.intro {
  grid-column: main;
}

.intro p:first-child {
  font-size: 25px;
  line-height: 40px;
}

nav {
  display: grid;
  grid-column: start / end;
  /* subgrid non-DRY approach while we wait for CSS Grid level 2 */
  grid-template-columns: [start] auto [left-sidebar] 210px [main] 660px [right-sidebar] 210px [right-edge] auto [end];
  font-family: var(--typeface-header);
  font-weight: bold;
  letter-spacing: -0.03em;
  background: #EFF1F5;
  font-size: 20px;
  line-height: 30px;
  padding: 40px 0;
}

nav ul {
  list-style-type: none;
  grid-column: main;
}

/* coming soon sections */
nav ul {
  color: #a5a5a5;
}

/* existing sections */
nav ul a,
nav ul li.here {
  color: #5E5F64;
}

nav ul a:hover,
nav ul li.here span {
  background: #FFFFFF;
  border-radius: 5px;
  margin-left: -20px;
  padding-left: 20px;
  padding-right: 40px;
  text-decoration: none;
}

article {
  grid-column: main / right-edge;
  /* subgrid non-DRY approach while we wait for CSS Grid level 2 */
  display: grid;
  grid-template-columns: [main] 660px [right-sidebar] 210px [right-edge];
}

article h3 {
  grid-column: main;
  font-family: var(--typeface-header);
  font-weight: bold;
  font-size: 31.25px;
  line-height: 48px;
  letter-spacing: -0.03em;
  color: var(--accent-color);
  margin-top: 60px;
}

article figure {
  grid-column: main / right-edge;
  /* subgrid non-DRY approach while we wait for CSS Grid level 2 */
  display: grid;
  grid-template-columns: [main] 660px [right-sidebar] 210px [right-edge];
}

article figure img,
article figure video {
  grid-column: main;
  width: 100%;
  border-radius: 5px;
}

article figure figcaption {
  grid-column: right-sidebar;
  padding-left: 30px;
}

article figure figcaption svg {
  margin-bottom: 14px;
}

article figure figcaption p {
  font-size: 16px;
  line-height: 20px;
  color: var(--gray-color);
}

article h3,
article p,
article img,
article video {
  margin-bottom: 20px;
}

article > p.space-top {
  margin-top: 20px;
}

article > p,
article > ul,
article > ol {
  grid-column: main;
}

article > ul,
article > ol {
  padding-left: 15px;
  margin-bottom: 10px;
}

article > ul {
  list-style-type: "\2023   ";
}

article > ul li p,
article > ol li p {
  margin-bottom: 10px;
}

footer {
  grid-column: main;
  margin-top: 50px;
  margin-bottom: 50px;
}

footer p {
  font-size: 25px;
  line-height: 40px;
  color: var(--gray-color);
  margin-bottom: 30px;
}

@media only screen and (max-width: 1080px) {
  body,
  nav {
    grid-template-columns: [start] 20px [left-sidebar] auto [main] 660px [right-sidebar] auto [right-edge] 20px [end];
  }

  article,
  article figure {
    grid-template-columns: [main] 660px [right-sidebar right-edge];
  }

  .avatar {
    grid-column: main;
  }

  header {
    margin-top: 40px;
  }

  article figure figcaption {
    grid-column: main;
    padding-left: 0;
    border-left: 5px solid #ccc;
    padding-left: 15px;
    margin-bottom: 20px;
  }

  article figure figcaption p:last-child {
    margin-bottom: 0;
  }

  article figure figcaption svg {
    display: none;
  }
}

@media only screen and (max-width: 700px) {
  body,
  nav {
    grid-template-columns: [start] 15px [left-sidebar] 0 [main] 1fr [right-sidebar] 0 [right-edge] 15px [end];
  }

  nav {
    font-size: 14px;
    line-height: 20px;
    padding: 30px 0;
  }

  nav ul a:hover,
  nav ul li.here span {
    margin-left: -10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  article,
  article figure {
    grid-template-columns: [main] 1fr [right-sidebar] 0 [right-edge];
  }
}
