:root {
  --cardinal: #8000ff;
  --very-light-cardinal: #fff2f4;
  --light-cardinal: #ff94a4;
  --dark-cardinal: #200000;
  --very-light-gray: #f1f1f1;
  --light-gray: #c2c0bf;
  --dark-gray: #8a8b8c;
  --very-dark-gray: #2d2d2d;

  --text: black;
  --background: white;

  --night-text: white;
  --night-background: #121414;

  --page-width: 768px;

  --font-size: 14px;
  --mobile-font-size: 16px;

  --line-height: 24px;
  --mobile-line-height: 26px;

  --section-title-font-size: 20px;
  --mobile-section-title-font-size: 22px;

  --name-font-size: 32px;

  --code-font-size: 12px;
  --code-line-height: 18px;
}

@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato/Lato-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: normal;
  text-rendering: optimizeLegibility;
}

@font-face {
  font-family: 'Lato';
  src: url('../fonts/lato/Lato-Bold.woff2') format('woff2');
  font-style: normal;
  font-weight: bold;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Lato", "Helvetica Neue", Ubuntu, Arial, PingFang, SimHei, sans-serif;
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--text);
  font-weight: normal;
  background: var(--background);
}

@media (prefers-color-scheme: dark) {
  body {
    color: var(--night-text);
    background: var(--night-background);
  }
}

.blockquote {
  font-size: var(--font-size);
  line-height: var(--line-height);
}

body .container,
body .container-fluid {
  max-width: var(--page-width);
}

body .row {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

b.zh {
  font-weight: 900;
}

a,
a:hover,
.highlight {
  color: var(--cardinal);
}

@media (prefers-color-scheme: dark) {
  a,
  a:hover,
  .highlight {
    color: var(--light-cardinal);
  }
}

a {
  text-decoration: none;
  transition: color 0.1s ease-in-out, border-color 0.1s ease-in-out;
}

a:hover {
  text-decoration: underline;
}

.highlight {
  font-weight: bold;
}

body .container-blog{
  max-width: 900px;
}

.section-item {
  margin-top: 20px;
}

.section-head {
  margin-top: 30px;
}

.section-title {
  font-weight: normal;
  font-size: var(--section-title-font-size);
  line-height: var(--line-height);
  display: inline-block;
}

.blog-title {
  font-weight: normal;
  font-size: var(--name-font-size);
  line-height: 30px;
}

.blog-wrapper .section-item .title {
  font-size: 18px;
}

.blog-wrapper .section-item .blog-summary {
  font-size: 13px;
  color: var(--dark-gray)
}

#bloglink{
  font-size: 20px;
  color: var(--cardinal);
}

.col-wrapper {
  padding-left: 10px;
  padding-right: 10px;
}

.blog-content{
  max-width: 800px;
}

.blog-content img {
  max-width: 600px;
}

.sec-wrapper {
  margin-top: 30px;
}

.section-sub {
  font-size: var(--font-size);
  line-height: var(--line-height);
  color: var(--dark-gray);
}

.representative {
  background-color: var(--very-light-cardinal);
  border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
  .representative {
    background-color: var(--dark-cardinal);
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: var(--mobile-font-size);
    line-height: var(--mobile-line-height);
  }

  .blockquote {
    font-size: var(--mobile-font-size);
    line-height: var(--mobile-line-height);
  }

  .section-title {
    font-size: var(--mobile-section-title-font-size);
    line-height: var(--mobile-line-height);
  }

  #bloglink{
    margin-top: 10px;
    font-size: var(--mobile-font-size);
  }

  .blog-title{
    line-height: 35px;
  }

  .blog-content img {
  max-width: calc(100vw - 4rem);
}

}


@media (min-width: 768px) {
  .section-sub {
    padding-left: 0;
  }
}

/*-----------------
 * Home
 *-----------------*/

.home-wrapper .picture img {
  width: 100%;
  max-width: 200px;
  margin-right: 40px;
}

.home-wrapper .description {
  margin-top: 30px;
}

.home-wrapper .description .name {
  font-size: var(--name-font-size);
  margin-bottom: 20px;
}

.home-wrapper .social {
  margin-top: 10px;
  margin-bottom: 0;
  padding: 0;
}

/*------------------
 * Bio
 *------------------*/

.bio-wrapper .info,
.bio-wrapper .info:hover {
  color: var(--text);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .bio-wrapper .info,
  .bio-wrapper .info:hover {
    color: var(--night-text);
  }
}

.bio-wrapper .zh-name:hover {
  text-decoration: none;
  border-bottom: 1.5px dashed currentColor;
}

.bio-wrapper .name-icon {
  margin-left: -3px;
  margin-right: -3px;
}

/*------------------
 * Name
 *------------------*/

.name-wrapper .zh-a,
.name-wrapper .zh-a:hover {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1.5px dashed currentColor;
}

@media (prefers-color-scheme: dark) {
  .name-wrapper .zh-a,
  .name-wrapper .zh-a:hover {
    color: var(--night-text);
  }
}

.name-wrapper .blockquote-footer {
  font-size: var(--font-size);
  line-height: var(--line-height);
  margin-top: 0;
  color: var(--dark-gray);
}

.name-wrapper .blockquote-footer .zh-a,
.name-wrapper .blockquote-footer .zh-a:hover,
.name-wrapper .blockquote-footer .en-a,
.name-wrapper .blockquote-footer .en-a:hover {
  color: currentColor;
}

.name-wrapper .blockquote-footer .en-a,
.name-wrapper .blockquote-footer .en-a:hover {
  text-decoration: underline;
  border-bottom: none;
}

/*------------------
 * Publications
 *------------------*/

.pub-wrapper .section-item {
  margin-top: 15px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pub-wrapper a {
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  .pub-wrapper a {
    color: var(--night-text);
  }
}

.pub-wrapper .title a {
  font-weight: bold;
}

.pub-wrapper .link .venue {
  font-weight: bold;
}

.pub-wrapper .authors {
  color: var(--dark-gray);
}

.pub-wrapper .authors a {
  color: var(--dark-gray);
}

.pub-wrapper .authors me {
  font-weight: bold;
}

.pub-wrapper .figure img {
  max-width: 240px;
  width: 100%;
}

@media (max-width: 767.98px) {
  .pub-wrapper .figure {
    margin-bottom: 10px;
  }
}

/*------------------
 * Bibtex
 *------------------*/

.snippet {
  position: relative;
  background: var(--very-light-gray);
  font-size: var(--code-font-size);
  line-height: var(--code-line-height);
  margin-top: 10px;
  margin-bottom: 0;
  border-radius: 2px;
}

@media (prefers-color-scheme: dark) {
  .snippet {
    background: var(--very-dark-gray);
  }
}

.representative .snippet {
  background: var(--background);
}

@media (prefers-color-scheme: dark) {
  .representative .snippet {
    background: var(--night-background);
  }
}

.snippet .btn {
  transition: opacity 0.1s ease-in-out, border-color 0.1s ease-in-out;
  opacity: 0.9;
  padding: 0.5px 4px;
  position: absolute;
  right: 4px;
  top: 4px;
  font-size: 14px;
  line-height: 21px;
  background-color: var(--background);
  border: 2px solid var(--light-gray);
  border-radius: 2px;
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  .snippet .btn {
    background-color: var(--night-background);
    border-color: var(--dark-gray);
    color: var(--night-text);
  }
}

.snippet .btn:hover {
  opacity: 1;
  background-color: var(--background);
  border-color: var(--dark-gray);
}

@media (prefers-color-scheme: dark) {
  .snippet .btn:hover {
    background-color: var(--night-background);
    border-color: var(--light-gray);
  }
}

.snippet .btn:active {
  opacity: 1;
  background-color: var(--very-light-gray);
  border-color: var(--dark-gray);
}

@media (prefers-color-scheme: dark) {
  .snippet .btn:active {
    background-color: var(--very-dark-gray);
    border-color: var(--light-gray);
  }
}

.snippet code {
  display: block;
  overflow-x: auto;
}

/*------------------
 * Experience
 *------------------*/

.exp-wrapper .title a {
  font-weight: bold;
}

.exp-wrapper a,
.exp-wrapper a:hover {
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  .exp-wrapper a,
  .exp-wrapper a:hover {
    color: var(--night-text);
  }
}

.exp-wrapper .time {
  text-align: right;
}

.exp-wrapper .location {
  color: var(--dark-gray);
}

@media (max-width: 767.98px) {
  .exp-wrapper .time {
    text-align: left;
    color: var(--dark-gray);
  }

  .exp-wrapper .location {
    display: none;
  }
}

/*------------------
 * Footer
 *------------------*/

.citation {
  font-size: var(--code-font-size);
  line-height: var(--code-line-height);
  margin-top: 40px;
  margin-bottom: 30px;
  color: var(--dark-gray);
}

.citation p {
  margin-bottom: 0;
}

.blog-content figure {
  display: flex;               /* makes the images row flexbox */
  flex-wrap: wrap;             /* wrap on smaller screens */
  justify-content: center;      /* center images horizontally */
  gap: 1rem;                   /* space between images */
  margin: 2rem auto;
  max-width: 1000px;
  text-align: center;           /* caption centered */
}

.blog-content > figure > img {
  max-width: 400px;        /* caption centered */
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.blog-content .image-row {
  display: flex;               /* makes the images row flexbox */
  flex-wrap: wrap;             /* wrap on smaller screens */
  justify-content: center;      /* center images horizontally */
  gap: 1rem;                   /* space between images */
  margin: 2rem auto;
  max-width: 1000px;
  text-align: center;           /* caption centered */
  align-items: center;
}

.map-container {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 aspect ratio (480/640 = 0.75) */
  height: 0;
  overflow: hidden;
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}


.blog-content .image-row img {
  max-width: 250px; /* caps size of vertical iPhone images */
  width: 100%; /* responsive shrink on small screens */
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex: 1 0 auto; /* key change */
}

.blog-content .image-row video {
  max-width: 250px;            /* caps size of vertical iPhone images */
  width: 100%;                 /* responsive shrink on small screens */
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  flex: 1 0 auto; /* key change */           /* images grow/shrink for side-by-side layout */
}
.blog-content figure figcaption {
  width: 100%;                 /* caption spans full figure width */
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}
