.year {
  margin-top: 25px;
  border-bottom: 1px solid var(--muted-color);
}

.year h3 {
  margin-bottom: 10px;
}

.course-list {
  display: grid;
  grid-template-columns: 1fr 1fr; /* two equal-width columns */
  list-style-type: none;
  padding: 1.5em;
}

.course-item {
  font-weight: 1000;
  margin-bottom: 1.5rem;
}

/* highlight */
.math {
  color: var(--secondary-color);
}

.tech {
  color: var(--primary-color);
}

.business {
  color: var(--tertiary-color);
}

.lang {
  color: var(--text-color);
  font-weight: 500 !important;
}

/* legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;

  gap: 1em;
  margin-right: 10px;
}

.legend-item {
  display: flex;
  align-items: center;

  gap: 5px;
}

.legend-color {
  width: 15px;
  height: 15px;
  border-radius: 3px;
}

.math-color { background-color: var(--secondary-color); }
.tech-color { background-color: var(--primary-color); }
.business-color { background-color: var(--tertiary-color); }
.lang-color { background-color: var(--text-color); }







/* portrait mode */
@media screen and (max-width: 900px) {
  /* hide the horizontal scroll bar and remove extra spaces on mobile */
  html,
  body {
    overflow-x: clip; /* use clip cuz hidden will make sticky not working */
  }
  body {
    position: relative;
  }

  body {
    font-size: 15px;
    margin: 1vh 8vw;
    max-width: 100%;
    box-sizing: border-box;
  }

  .kuntiniong {
    display: flex;
    justify-content: center;

    background-color: var(--background-color);
    pointer-events: all;
  }

  .tab-list {
    display: flex;
    justify-content: center;
  }

  section {
    scroll-margin-top: 15vh;
  }

  #home {
    margin: 5vh 0; /* relocate home to center of the phone */
  }

  .nav-bar {
    top: 50px;
    position: sticky;
  }

  .course-list {
    grid-template-columns: 1fr; /* one column */
  }
  
  .legend {
    font-size: 2.5vw;
    justify-content: flex-start;
  }
}

/* mobile devices */
@media (hover: none) {
  .kuntiniong a {
    font-weight: 100;
  }

  .course-list span {
    font-size: 14px;
  }

  .course-item {
    margin-bottom: 1.5rem;
  }
}