/* The sidebar menu */
#sidenav {
  height: 100%;
  width: 270px;
  position: fixed;
  z-index: 0;
  /*left: 0;*/
  overflow-x: hidden;
  /* Disable horizontal scroll */
  text-align: right;
  font-family: 'Exo', sans-serif;
  /*background-color: #f2f2f2;*/
}

/* The navigation menu links */
#sidenav a {
  padding: 10px 16px 0px 0px;
  margin: 0px;
  text-decoration: none;
  font-size: 17px;
  color: #717171;
  display: block;
}

#sidenav .focus {
  /*color: black;*/
  color: #c53538;
  font-size: 22px;
  /*font-weight: 800;*/
}

/* When you mouse over the navigation links, change their color */
#sidenav a:hover {
  color: #9f0211;
}

.crop {
  height: 170px;
  overflow: hidden;
}

#profilepic {
  border-radius: 0px 0px 0px 30px;
  margin-top: -30px;
  width: 730px;
  height: 164px;
  text-align: right;
  background-position-x: calc(50% - 25px);
  background-repeat: no-repeat;
  background-color: white;
  background-attachment: fixed;
}

/* Style page content */
#main {
  padding: 30px 0px;
  margin-left: 270px;
  background-color: white;
  border-radius: 20px;
  -moz-box-shadow: 2px 0px 16px #CCCCCC;
  -webkit-box-shadow: 2px 0px 16px #CCCCCC;
  box-shadow: 2px 0px 15px #CCCCCC;
  padding-bottom: 10px;
}

#content {
  padding: 0px 25px;
}

.center {
  width: 1000px;
  margin: 0 auto;
}

body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  /*font-family: 'Montserrat', sans-serif;*/
  font-family: 'Lato', sans-serif;
  /*font-family: 'Raleway', sans-serif;*/

  font-size: 14px;
  background-color: #eeeeee;
}
.firstname {
  text-indent: 0px;
}

a {
  color: #F5474B;
}

img.latex {
  -moz-box-shadow: 0px 0px 0px #999;
  -webkit-box-shadow: 0px 0px 0px #999;
  margin-bottom: 0px;
  padding-top: 0px;
  margin-top: 0px;

}

img.shadow {
  margin: 0px;
  -moz-box-shadow: 0px 0px 5px #bbbbbb;
  -webkit-box-shadow: 0px 0px 5px #bbbbbb;
  box-shadow: 0px 0px 5px #bbbbbb;
}


.block {
  display: block;
  background-color: #DDDDDD;
  width: 6px;
  height: 6px;
  position: absolute;
  border-radius: 25%;
}

.block_done {
  background-color: #e3c9c9;
}

.redblock {
  background-color: #e7d5d6;
  width: 12px;
  height: 12px;
}

#canvas {
  bottom: 20px;
  width: 150px;
  left: 160px;
  position: absolute;
  /*background-color: white;*/
  height: 50px;
  /*display: block;*/
}

h1 {

  /*font-family: Georgia;*/
  /*font-family: "HelveticaNeue-CondensedBold", sans-serif;*/
  font-family: "Exo", sans-serif;
  font-size: 24px;
  line-height: 50px;
  margin-top: 0px;
  margin-bottom: 0px;
  font-weight: 600;
  /*text-align: center;*/

  color: #c53538;

  /*margin-left: -50px;*/
}

h2 {
  font-family: "Raleway", sans-serif;
  font-size: 21px;
  line-height: 50px;
  margin-top: 0px;
  margin-bottom: 0px;
  font-weight: 600;
  color: #c53538;
  text-align: center;
}

h3 {
  /*font-family: "HelveticaNeue-CondensedBold", sans-serif;*/
  font-family: sans-serif;
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 2px;
  color: #444444;
}

h4 {
  font-family: Georgia;
  font-size: 25px;
  font-weight: normal;
  margin-bottom: 16px;
  margin-top: 10px;
}

p {
  text-indent: 30px;
  margin-top: 0px;
}

table {
  font-size: 14px;
}

table tr {
  padding-bottom: 30px;
}

.prize {
  font-size: 15px;
  color: #3b70ac;
  text-decoration: none;
}

.field {
  display: block;
  font-size: 15px;
  color: #3b70ac;
  text-decoration: none;
}

.prize2 {
  font-size: 15px;
  /*color: #c23232;*/
  color: #3b70ac;
  text-decoration: none;
}


#about {
  margin-top: 10px;
}

#work,
#research,
#fun,
#code,
#consult {
  padding-top: 10px;
}

.cdiv {
  text-align: center;
  width: 100%;
}

.cdiv table {
  width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.cdiv td {
  text-align: center;
}

.cdiv img {
  width: 120px;
}

.work {
  margin-bottom: 25px;
}

a.normaltext {
  text-decoration: none;
  color: inherit;
}


.ulink {
  text-decoration: none;
  padding-right: 10px;
}

.card_img {
  width: 250px;
  display: flex;
  justify-content: center;
}

.card_img img {
  width: 250px;
  border-radius: 8px;
  flex-shrink: 0;
}

#work .card_img img {
  width: 150px;
}

.card_text {
  text-align: left;
  font-size: 14px;
  vertical-align: top;
  flex: 1 1 0;
}
.card_text h3 {
  margin-top: 0px;
}

.card {
  margin-bottom: 30px;
  /* margin-left: -12px; */
  display: flex;
  gap: 15px;
  align-items: stretch
}

.author {
  color: #666666;
}

#research h2 {
  color: black;
}

#work .card_img a {
  display: flex;
  justify-content: center;
  align-items: center;
}

a {
  /*color: #F5474B;*/
  color: #c8494c;
  text-decoration: none;
}

.dot {
  height: 8px;
  width: 8px;
  margin-bottom: 2px;
  background-color: #dddddd;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  /*display: none;*/
}

.focus .dot {
  /*display: none;*/
  background-color: #c53538;
}

.divider {
  margin-top: 10px;
  margin-bottom: 30px;
  text-align: center;
}

.divider2 {
  height: 6px;
  background-color: #eeeeee;
  margin-top: 50px;
  margin-bottom: 0px;
  text-align: center;
  border-radius: 50%;
}

hr {
  /*margin-left: -25px;*/
  height: 12px;
  border: 0;
  box-shadow: inset 0 12px 12px -12px rgba(0, 0, 0, 0.5);
}

.press {
  color: #2464ac;
}

.conf {
  font-size: 18px;
  display: block;
  margin: 0px;
  padding: 0px;
  padding-top: 0px;
  color: #c58200;
}

#personal .conf, #personal-design .conf {
  font-size: 15px;
}

#toggle-fun {
  background: #bb6567;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 16px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  margin: 20px auto 10px auto;
  display: block;
  transition: background 0.2s;
}
#toggle-fun:hover, #toggle-fun:focus {
  background: #a82a2c;
}

#news-list li.news-hidden {
  display: none;
}
.toggle-news-link {
  display: block;
  text-align: left;
  margin: 0 0 15px 40px;
  color: #a82a2c;
  font-size: 15px;
  /* font-weight: 600; */
  /* text-decoration: underline; */
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.toggle-news-link:hover, .toggle-news-link:focus {
  color: #c8494c;
}


#news-list.truncated {
  position: relative;
}
#news-list.truncated::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3em;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #fff 90%);
}




.sbr {
  line-height: 8px;
}

#nameonly {
  font-family: 'Exo', sans-serif;
  font-weight: 800;
  font-size: 31px;
  text-align: center;
  display: none;
}

#myname {
  width: 320px;
  position: relative;
  left: -65px;
  font-family: 'Exo', sans-serif;
  font-weight: 800;
  font-size: 31px;
  line-height: 0.8;
  padding-right: 15px;
  padding-top: 50px;
  padding-bottom: 60px;
  padding-left: 0px;
}

#myname p {
  margin: 0px;
  text-align: right;
}

.lastname {
  color: #666666;
}

#mythainame {
  font-family: "Sarabun", sans-serif;
  font-weight: 500;
  color: #999999;
  font-size: 21px;
  padding-top: 2px;
  padding-left: 10px;
  display: inline-block;
}

.cdiv {
  margin: 0 auto;
  width: 90%;
  display: flex;
  /* gap: 32px; */
  align-items: stretch;   /* Make all children same height */
  justify-content: center;
}
.cdiv > div {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-width: 160px;
  background: none;
}

@media screen and (min-width: 980px) {
  #myname {
    font-size: 31px;
    left: -65px;
  }
  .center {
    width: 1000px;
  }
  #sidenav {
    width: 270px;
    display: block;
  }
  #main {
    margin-left: 270px;
  }
  .dot {
    display: inline-block;
  }
    
  #canvas {
    display: block;
  }
  #nameonly {
    display: none;
  }
}

@media screen and (min-width: 900px) and (max-width: 979px) {
  #myname {
    font-size: 17px;
    left: -180px;
  }
  .center {
    width: 880px;
  }
  #sidenav {
    width: 150px;
    display: block;
  }
  #main {
    margin-left: 150px;
  }
  .dot, #canvas {
    display: none;
  }
  #nameonly {
    display: none;
  }
}


@media screen and (max-width: 899px) {
  #myname {
    font-size: 16px;
    left: -180px;
  }
  #sidenav {
    width: 150px;
    display: none;
  }
  #main {
    margin-left: 0;
  }
  .center {
    width: 730px;
  }
  #nameonly {
    display: block;
    margin-top: 10px;
  }

  #profilepic {
    border-radius: 0px;
  }
}


@media screen and (max-width: 740px) {
  #main {
    padding: 0px;
    padding-bottom: 30px;
  }
  #sidenav {
    padding-top: 15px;
  }

  #sidenav a {
    font-size: 18px;
  }

  .center {
    width: 95%;
    /* width: 100%; */
    margin: 0 auto;
    box-sizing: border-box;
  }
  #nameonly {
    font-size: 2em;
    margin-bottom: 0;
  }
  #nameonly p {
    margin-bottom: 0px;
  }

  #profilepic {
    width: 100%;
    margin-left: 0px;
    border-radius: 0px;
  }
  #content {
    padding: 0 15px;
  }
  .crop {
    margin-top: 20px;
    height: 165px;
    overflow: hidden;
    /* right: 100px; */
    /* margin-left: 70vw; */
    /* margin-right: 60px; */
  }

  .card_img {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    
  }
  #work .card_img, #research .card_img {
    /* width: 250px; */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
  }
  .card_img img {
    width: 90%;
    /* max-width: 300px; */
  }

  .card_img a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 90%;
  }
  .cdiv {
    flex-wrap: wrap;
  }
  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 0px;
    margin-bottom: 10vw;
  }

  .firstname {
    font-size: 6vw;
  }
}

