@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wdth,wght@75..100,400..700&display=swap');

:root {
  --main-bg-color: #18171C;
  --body-color: #CCDCEC;
  --body-font-width: 95;
  --heading-color: #FFFFFF;
  --heading-font-width: 80;
}

* {
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--main-bg-color);
  background-image: url('img/bg-gradient.png');
  background-size: 100%;
  background-position: center top;
  background-repeat: no-repeat;
  font-family: "Instrument Sans", sans-serif;
  font-weight: 450;
  overflow-x: hidden;
  color: var(--body-color);
  font-variation-settings:
    "wdth" var(--body-font-width);
}

h1 {
  color: var(--heading-color);
  font-size: 40px;
  line-height: 36px;
  letter-spacing: -0.4px;
  font-weight: 700;
  font-variation-settings:
    "wdth" var(--heading-font-width);
}

h2 {
  color: var(--heading-color);
  font-size: 28px;
  line-height: 32px;
  letter-spacing: -0.28px;
  font-weight: 700;
  font-variation-settings:
    "wdth" var(--heading-font-width);
}

.container {
  width: calc(100% - 48px);
  max-width: 1416px;
  margin: 0 auto;
  /*grid-template-columns: repeat(12, 1fr);
  gap: 24px;*/
}

.navigation {
  /*grid-column: span 12;*/
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.navigation__left {
  display: flex;
  gap: 40px;
  align-items: center;
}

.navigation__search {
  display: flex;
  gap: 16px;
  align-items: center;
}

.navigation__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.navigation__avatar {
  border-radius: 12px;
  width: 40px;
}

.navigation__link {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  transition: 0.3s;
  border-radius: 8px;
}

.navigation__link:hover {
  background: rgba(204, 220, 236, 0.08);
}

.navigation__searchBox {
  background-image: url('img/search.svg');
  background-repeat: no-repeat;
  background-position: 12px center;
  padding: 10px 12px 10px 36px;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "Instrument Sans", sans-serif;
  color: white;
  font-size: 14px;
  line-height: 20px;
  border-radius: 8px;
  font-weight: 500;
  width: 480px;
  outline: none;
}

.navigation__searchBox:focus {
  border-color: rgba(255, 255, 255, 0.6);
}

.content {
  position: relative;
  display: flex;
  gap: 60px;
}

.content--borderTop::before {
  content: ' ';
  position: absolute;
  width: calc(100% + 1200px);
  margin-left: -600px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar {
  width: 336px;
  padding: 28px 28px 28px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  flex-grow: 0;
}

.sidebar__details {
  margin-bottom: 32px;
}

.sidebar p {
  font-size: 18px;
  line-height: 24px;
  margin-top: 8px;
}

.sidebar__modules {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__module {
  color: white;
  text-decoration: none;
  font-size: 18px;
  letter-spacing: -0.18px;
  padding: 8px 12px;
  margin-left: -12px;
  font-weight: 700;
  transition: 0.3s;
  border-radius: 8px;
  font-variation-settings:
    "wdth" var(--heading-font-width);
}

.sidebar__module--active {
  background: rgba(204, 220, 236, 0.12);
}

.sidebar__module:not(.sidebar__module--active):hover {
  background: rgba(204, 220, 236, 0.06);
}

.lessons {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: max-content;
  gap: 24px;
  padding-top: 40px;
  width: 100%;
}

.lessons__details {
  grid-column: span 12;
  margin-bottom: 16px;
}

.lessons__title {
  margin-bottom: 20px;
}

.lessons__description {
  font-size: 18px;
  line-height: 28px;
  max-width: 760px;
}

.lesson {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--body-color);
  text-decoration: none;
  transition: 0.3s;
}

a.lesson:hover {
  opacity: 0.6;
}

.lesson__image {
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.lesson__placeholder {
  border-radius: 12px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(204, 220, 236, 0.08);
}

.lesson__details {
  display: flex;
  flex-direction: column;
}

.lesson__title {
  color: var(--heading-color);
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.2px;
  font-weight: 700;
  font-variation-settings:
    "wdth" var(--heading-font-width);
}

.lesson__subtitle {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.episode {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.episode__video {
  grid-column: span 9;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.episode__video video {
  width: 100%;
  border-radius: 20px;
}

.episode__details {
  position: relative;
}

.episode__details span {
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
}

.episode__blurb p {
  font-size: 18px;
  line-height: 28px;
  margin-bottom: 20px;
  font-weight: 450;
}

.episode__data {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card p {
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 16px;
  font-weight: 450;
}

.card p a {
  font-weight: 600;
  color: white;
  transition: 0.3s;
}

.card p a:hover {
  opacity: 0.6;
}

.card p:last-of-type {
  margin-bottom: 0;
}

.card__presenter-details {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card__presenter-photo {
  width: 64px;
  border-radius: 12px;
}

.card__presenter-name {
  display: flex;
  flex-direction: column;
}

.card__presenter-name h3 {
  font-size: 20px;
  line-height: 24px;
  letter-spacing: -0.18px;
  font-weight: 700;
  color: var(--heading-color);
  font-variation-settings:
    "wdth" var(--heading-font-width);
}

.card__presenter-name span {
  font-size: 14px;
  font-weight: 600;
}

.card__title {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}

.card__video {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--body-color);
  text-decoration: none;
  position: relative;
}

.card__video::before {
  position: absolute;
  content: ' ';
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  top: -8px;
  right: -8px;
  bottom: -8px;
  left: -8px;
  opacity: 0;
  transition: 0.3s;
}

.card__video:hover::before {
  opacity: 1;
}

.card__video-thumb {
  border-radius: 8px;
  width: 112px;
  position: relative;
  box-sizing: border-box;
}

.card__thumbnail {
  position: relative;
}

.card__thumbnail .card__video-thumb {
  display: block;
}

.card__video--current .card__thumbnail::after {
  content: ' ';
  position: absolute;
  top: -4px;
  right: -4px;
  bottom: -4px;
  left: -4px;
  border: 2px solid #4ADE80;
  border-radius: 12px;
}

.card_thumbnail-time {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: #18171C;
  color: white;
  font-weight: 550;
  font-size: 10px;
  line-height: 12px;
  z-index: 1;
  padding: 2px 4px;
  border-radius: 4px;
}

.card__video-details {
  display: flex;
  flex-direction: column;
}

.card__video-title {
  font-size: 14px;
  line-height: 16px;
}

.card__video--current .card__video-title {
  font-weight: 600;
  color: var(--heading-color);
}

.card__video-watching {
  font-size: 12px;
  line-height: 16px;
}

.button {
  color: white;
  background: rgba(255, 255, 255, 0.24);
  padding: 12px 20px;
  display: flex;
  gap: 8px;
  font-size: 16px;
  line-height: 20px;
  align-items: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 16px;
  transition: 0.3s;
}

.button:hover {
  background: rgba(255, 255, 255, 0.32);
}

.button__icon {
  width: 20px;
  height: 20px;
}

.button--download {
  position: absolute;
  top: 0;
  right: 0;
}

@media screen and (max-width: 1024px) {
  .sidebar {
    display: none;
    border-right: 0;
  }

  .sidebar--mobile {
    display: block  ;
    width: 100%;
  }

  .lessons {
    display: none;
  }

  .lessons--mobile {
    display: grid;
    padding-bottom: 40px;
  }

  .lesson {
    grid-column: span 12;
  }

  .sidebar__details p {
    font-size: 16px;
    line-height: 20px;
  }

  .lessons__description {
    font-size: 16px;
    line-height: 24px;
  }

  .navigation__searchBox,
  .navigation__right {
    display: none;
  }

  .episode__blurb p {
    font-size: 16px;
    line-height: 24px;
  }

  .episode__video {
    grid-column: span 12;
  }

  .episode__details span {
    font-size: 16px;
  }

  .episode__video video {
    border-radius: 12px;
  }

  .episode__data {
    grid-column: span 12;
    padding-bottom: 40px;
    flex-direction: column-reverse;
  }

  .button--download {
    position: relative;
    margin-top: 24px;
    justify-content: center;
  }

  .content--borderTop {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .content--borderTop::before {
    display: none;
  }

  .sidebar__module--active {
    background: transparent;
  }
  
  .sidebar__module:hover {
    background: rgba(204, 220, 236, 0.06);
  }
}