@font-face {
  font-family: "Article";
  src: url("../type/ArticleText-Regular.woff2") format("woff2");
  font-style: normal;
}
@font-face {
  font-family: "Article";
  src: url("../type/ArticleText-RegularItalic.woff2") format("woff2");
  font-style: italic;
}
@font-face {
  font-family: "ArticleExtras";
  src: url("../type/ArticleText-Supplement.woff2") format("woff2");
  font-style: normal;
}

:root {
  --fixed-div-width: 20vw;
  --margin: 10px;
  --text-color: black;
}

* {
  overscroll-behavior: none;
}

#image_bg_container {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: -10;
  overflow: hidden;
}
img {
  -webkit-user-drag: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

h1,
h2,
p {
  margin: 0;
  font-family: "Article", "ArticleExtras";
  color: var(--text-color);
  transition: 0.3s ease-in-out;
}
h1,
h2 {
  font-weight: normal;
  font-size: 1.2em;
}
p,
.keywords_container h2 {
  font-size: 0.8em;
}
a,
a:visited {
  color: var(--text-color);
  text-decoration: none;
  transition: 0.3s ease-in-out;
}

#viewToggleGrid:hover,
#viewToggleList:hover,
.title:hover,
.sort_p:hover,
.filter_p:hover {
  text-decoration: underline;
  cursor: pointer;
}
.active {
  text-decoration: underline;
}

#fixed_div,
#scrolling_div {
  padding: var(--margin);
}
#fixed_div {
  width: calc(var(--fixed-div-width) - var(--margin));
  height: calc(100vh - (2 * var(--margin)));
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
#filter_list_div,
#sort_list_div,
#view_list_div {
  margin-bottom: var(--margin);
}
#filter_list_div p,
#sort_list_div p,
#view_list_div p {
  margin-left: var(--margin);
}
#filter_list_div :first-child,
#sort_list_div :first-child,
#view_list_div :first-child {
  margin-left: 0;
}
.sort_p,
.filter_p,
#view_list_div p {
  width: min-content;
  white-space: nowrap;
}

#scrolling_div {
  width: calc(100vw - var(--fixed-div-width) - (3 * var(--margin)));
  margin-left: calc(var(--fixed-div-width) + var(--margin));
  display: grid;
  grid-template-columns: auto auto;
}
.student_container {
  width: 30vw;
  margin-bottom: 50px;
}
.name_title_container h2 + h2 {
  font-style: regular;
}
.name_title_container :first-child {
  margin-bottom: 0.2em;
  font-style: italic;
}
.keywords_container,
.title,
.name {
  margin-bottom: var(--margin);
}
.keywords_container {
  display: flex;
  white-space: nowrap;
  flex-wrap: wrap;
}
.keywords_container h2 {
  border: var(--text-color) 1px solid;
  transition: 0.3s ease-in-out;
  width: min-content;
  padding: 1px 5px 0 5px;
  border-radius: 13px;
  margin-right: 3px;
  margin-bottom: 3px;
}
.question {
  margin-bottom: calc(var(--margin) / 2);
}

#mobile_gradient,
#name_list_mobile,
#filter_overlay_mobile,
#student_container_mobile,
#mobile_filter_toggle,
#AA {
  display: none;
}

@media (max-width: 499px) {
  :root {
    --fixed-div-width: 60vw;
    --margin: 20px;
  }

  #mobile_gradient {
    display: block;
    width: 100vw;
    height: 100vh;
    position: absolute;
    background: white;
    background: linear-gradient(
      0deg,
      rgba(255, 255, 255, 1) 0%,
      rgba(255, 255, 255, 0) 10%,
      rgba(255, 255, 255, 0) 90%,
      rgba(255, 255, 255, 1) 100%
    );
  }

  #filter_list_div {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
  }

  img {
    filter: blur(20px);
  }

  h2 {
    font-size: 1.5em;
    font-weight: normal;
  }
  h1,
  .keywords_container h2,
  p,
  .name {
    font-size: 0.9em;
  }
  h1,
  h2,
  #question_mobile {
    margin-bottom: var(--margin);
  }

  #sort_list_div,
  #view_list_div,
  #filter_list_div :first-child {
    display: none;
  }
  #filter_list_div {
    position: absolute;
    bottom: calc(2 * var(--margin));
    transform: translate(0, 100vw);
    height: min-content;
  }
  #filter_list_div p {
    margin: 0;
    margin-bottom: 5px;
  }
  #filter_overlay_mobile {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translate(0, 100vw);
  }
  #student_container_mobile,
  #mobile_filter_toggle {
    display: block;
  }
  #student_container_mobile {
    margin-top: 10vh;
    width: 50vw;
  }
  #mobile_filter_toggle,
  #mobile_namelist_toggle {
    position: absolute;
    bottom: var(--margin);
  }
  #mobile_namelist_toggle {
    top: calc(2 * var(--margin));
  }

  #scrolling_div {
    margin: 0;
    display: block;
  }
  #AA {
    display: block;
  }
  .student_container {
    margin-bottom: 0;
    height: 500px;
  }
  .student_container * {
    display: none;
  }
  .keywords_container h2 {
    padding: 2px 5px 0 5px;
    border-radius: 13px;
    margin-right: 5px;
    margin-bottom: 5px;
  }

  #name_list_mobile {
    display: block;
    position: fixed;
    width: 30vw;
    top: var(--margin);
    left: auto;
    right: var(--margin);
  }
  #name_list_mobile p {
    white-space: wrap;
  }
}
