body {
  --main-color: rgb(45, 45, 45);
  --faint-color: rgb(106, 106, 106);
  --bg-color: white;
  color: var(--main-color);
  background-color: var(--bg-color);
  margin: 0;
}

/* Avoids changing layout for long/short subpages */
html {
  scrollbar-gutter: stable;
}

@media (prefers-color-scheme: dark) {
  body {
    --main-color: rgb(210, 210, 210);
    --faint-color: rgb(196, 196, 196);
    --bg-color: black;
    color: var(--main-color);
    background-color: var(--bg-color);
  }
}

main {
  max-width: min(65ch, 60%);
  margin: 0.5em;
}

h1 {
  text-align: center;
}

#main_wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Open Sans", Arial;
}

@media (max-width: 120ch) {
  main {
    max-width: min(65ch, 100%);
  }
}

@media (prefers-color-scheme: dark) {
  .invert_on_dark {
    filter: invert();
  }
}


/* Nav Bar */

#nav {
  font-size: large;
  border-bottom-style: solid;
  max-width: min(60%, 80ch);

  margin-top: 1em;
  margin-bottom: 0.3em;
  padding-bottom: 0.3em;

  text-align: center;
}

.nav_disabled {
  color: red !important;
  pointer-events: none;
}

#nav a {
  color: var(--main-color);
  font-size: 1.4em;
  font-weight: bold;
  padding-left: 1em;
  padding-right: 1em;
  text-decoration: none;
}

#nav a:hover {
  text-decoration: overline;
}

/* Posts */

.post_date:before {
  content: "🔗";
  color: gray;
  font-size: small;
  text-decoration: none;
}

.post_date {
  text-decoration: none;
}

.long_post {
  margin-top: 1em;
  margin-bottom: 8em;
  border-bottom-style: dotted;
  border-bottom-color: #80808052;
  text-align: justify;
}

.long_post h1 {
  margin-top: 0;
}

.long_post a {
  word-break: break-all;
}

.long_post img {
  max-width: 100%;
}

sup {
  font-family: monospace;
  margin-right: -0.5em;
  margin-left: -0.2em;
}

.reference {
  font-size: small;
}

/* Post List */

#post_list {
  position: fixed;
  font-size: 0.7em;
  left: 1em;
  top: 5em;
  margin: 0.3em;
  max-width: 15vw;
}

#post_list h3 {
  margin: 0;
  color: var(--faint-color);
}

#post_list a {
  display: block;
  margin: 0;
  color: var(--faint-color);
  padding-bottom: 0.3em;
  padding-top: 0.3em;
  text-decoration: none;
}

#post_list a:hover {
  color: red;
  text-decoration: underline;
}

#post_list_toggle {
  position: fixed;
  font-size: 2em;
  left: 0.5em;
  top: 0.5em;
  display: none;
  z-index: 1;
  color: var(--faint-color);
  text-decoration: none;
}

/* Special menu for small devices. */
@media (max-width: 120ch) {
  #post_list {
    display: block;
    position: initial;
    max-width: 80%;
    padding: 1em;
    font-size: 1.5em;
  }

  #post_list_toggle {
    display: block;
  }
}

/* CV Stuff */

.contact_box {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.vusec_logo {
  height: 0.92em;
  margin-bottom: -0.1em;
  background: transparent;
  padding-left: 0.1em;
  padding-right: 0.1em;
}

.text_logo {
  height: 0.92em;
  margin-bottom: -0.1em;
  background: transparent;
  padding-left: 0.1em;
  padding-right: 0.1em;
}

.sep_top {
  border-top: solid;
  padding-top: 0.7em;
}

/* Publication s*/

.pub_list {
  padding-left: 1em;
  padding-right: 1em;
}

.publication {
  font-weight: bold;
  max-width: 95%;
  display: inline;
  color: #562929;
}

@media (prefers-color-scheme: dark) {
  .publication {
    color: #da7878
  }
}

.pub_badge_list {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-top: 0.3em;
}

.pub_box {
  margin-bottom: 1em;
}

.conference {
  display: inline-block;
  font-size: 0.9em;
  background-color: #468fff;
  border-radius: 0.3em;
  color: white;
  padding: 0.2em;
  filter: drop-shadow(0em 0em 0.1em black);
}

.conference_title {
  font-weight: bold;
}

.conference_year {
  color: white;
}

.pub_authorlist {
  color: var(--faint-color);
  font-size: small;
  display: block;
  font-style: italic;
}

.paper_link {
    display: inline-block;
    width: 2ch;
    height: 1.5em;
    background-image: url("../res/img/pdf.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    padding-left: 1em;
}

.video_link {
  display: inline-block !important;
  background-image: url(img/yt.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  width: 1.8em;
  height: 1.1em;
}

/* Work */

.work_list {
  padding-left: 1em;
  padding-right: 1em;
}

.work_box {
  display: block;
  margin-bottom: 0.5em;
  margin-top: 1.5em;
}

.work_desc {
  font-size: small;
}

.work_title {}

.work_company {
  display: inline-block;
  width: 7ch;
  font-weight: bold;
}

.work_company img {
  display: inline-block;
  object-fit: contain;
  height: 0.9em;
  width: 0.8em;
  margin-bottom: -0.05em;
  margin-right: 0.2em;
}

.work_date {
  color: gray;
  display: block;
  padding-top: 0.3em;
  padding-left: 0.3em;
}

@media (prefers-color-scheme: dark) {
  .work_date {
    color: gray;
  }
}