/* CSS Reset: http://meyerweb.com/eric/tools/css/reset */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/**************************************************/
/* Page colors aligned with https://qiayuanl.github.io/ (light academic style). */

html {
  background-color: #ffffff;
}

#body{
  font-family: 'Asap', roboto, sans-serif;
  font-size: 1em;
  line-height: 1.5em;
  color: #150c21;
  background-color: #ffffff;
}

#main {
  max-width: 54em;
  width: 100%;
  margin: 0px auto;
  position: relative;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: rgb(20, 110, 190);
}

a:hover {
  text-decoration: none;
  border-bottom: 1px solid rgb(20, 110, 190);
}

i {
  font-style: italic;
}

b {
  font-weight: 700;
}

h1 {
  font-size: 2.4em;
  line-height: 2.4em;
  font-weight: 500;
}

/**************************************************/
/* Profile image and description. */

#intro {
  padding-top: 6em;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2em;
}

#intro-text {
  width: 40em;
  max-width: 100%;
  flex: 1 1 auto;
  min-width: 0;
}

#intro-text p {
  margin: 0 0 0.6em;
  line-height: 1.45em;
  text-wrap: pretty;
}

#intro-text > p:last-child {
  margin-bottom: 0;
}

.intro-education {
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  text-wrap: unset;
  padding-bottom: 0.15em;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

#intro-image {
  margin: 0 auto;
  flex-shrink: 0;
  align-self: center;
  width: min(12em, 36vw);
  max-width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1em;
  position: relative;
}

#intro-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/**************************************************/
/* Education & experience (resume-style strip). */

#resume-panel {
  clear: both;
  width: 100%;
  display: flow-root;
  margin-top: 2.25em;
  padding: 1.75em 0 2.25em;
  border-top: 1px solid #e8eaed;
  border-bottom: 1px solid #e8eaed;
  line-height: 1.5em;
}

/* Table row forces two columns even when grid support/layout is quirky. */
.resume-grid {
  display: table;
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.resume-column {
  display: table-cell;
  width: 50%;
  vertical-align: top;
  box-sizing: border-box;
}

.resume-column:first-child {
  padding-right: 1.5rem;
}

.resume-column:last-child {
  padding-left: 1.5rem;
}

@media (max-width: 40em) {
  .resume-grid {
    display: block;
  }

  .resume-column {
    display: block;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .resume-column:first-child {
    margin-bottom: 2rem;
    padding-right: 0;
  }

  .resume-column:last-child {
    padding-left: 0;
  }
}

.resume-heading {
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #150c21;
  margin: 0 0 1.15em;
  line-height: 1.3;
}

.resume-entry {
  display: flex;
  gap: 0.85em;
  margin-bottom: 1.35em;
  align-items: flex-start;
}

.resume-entry:last-child {
  margin-bottom: 0;
}

.resume-badge {
  flex: 0 0 2.5em;
  width: 2.5em;
  height: 2.5em;
  border-radius: 6px;
  background: #f5f6f8;
  border: 1px solid #e8eaed;
  font-size: 0.62em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #150c21;
  letter-spacing: 0.04em;
  line-height: 1.1;
  text-align: center;
}

.resume-badge--logo {
  flex: 0 0 4.75em;
  width: 5.5em;
  height: 5.5em;
  padding: 0;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-radius: 0;
}

.resume-badge--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0;
}

.resume-entry-main {
  flex: 1;
  min-width: 0;
}

.resume-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
}

.resume-org {
  font-weight: 600;
  color: #150c21;
  border-bottom: none;
}

.resume-org-suffix {
  font-weight: 600;
  color: #150c21;
}

.resume-when {
  font-size: 0.88em;
  font-style: italic;
  color: #150c21;
  white-space: nowrap;
}

.resume-meta {
  font-size: 0.92em;
  color: #150c21;
  margin: 0.25em 0 0;
  line-height: 1.45;
}

.resume-meta a {
  border-bottom: none;
}

.resume-meta a:hover {
  border-bottom: 1px solid rgb(20, 110, 190);
}

/**************************************************/
/* Section buttons. */

#menu {
  display: flex;
}

.menu-item {
  float: left;
  margin-right: 2em;
}

h2 {
  font-size: 1.6em;
  line-height: 2.4em;
  margin-top: 0.5em;
  color: #150c21;
  font-weight: 500;
}

.selected h2 {
  color: #150c21;
  font-weight: 700;
}

.button {
  display: inline-block;
  cursor: pointer;
  border: none;
  background: none;
  color: #150c21;
  font-size: 1.6em;
  line-height: 2.4em;
  margin-top: 0.5em;
  margin-right: 1em;
  float: left;
  padding: 0;
  font-weight: 500;
}

.button:hover {
  color: #150c21;
  font-weight: 700;
}

.button:active,
.button.is-checked {
  color: #150c21;
  font-weight: 700;
}

.button-group:after {
  content: '';
  display: block;
  clear: both;
}

/**************************************************/
/* Isotope grid list of items. */

.grid {
  padding-bottom: 6em;
}

/* clear fix */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

.description {
  margin-bottom: 1em;
  padding-bottom: 0.5em;
}

.list-item {
  width: 100%;
  line-height: 1em;
  margin-top: 1em;
}

.list-item p.date {
  display: inline-block;
  width: 3em;
  color: #150c21;
}

/* Paper rows: clear floats, extra gap before the next paper */
.list-item.publication:not(.description)::after {
  content: '';
  display: table;
  clear: both;
}

.list-item.publication:not(.description) {
  margin-bottom: 1.5em;
}

/**************************************************/
/* Gallery of 3 preview videos. */

.previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  grid-auto-rows: minmax(100px, auto);
  height: 12.5em;
}

/* 无视频/链接占位时不占高度，避免 Highlights 顶部空白 */
.previews:not(:has(a, video)) {
  display: none;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}

.previews video {
  border-radius: 5px;
}

.previews a:hover {
  border: none;
}

.preview1 {
  grid-column: 1;
  width: 100%;
}
.preview2 {
  grid-column: 2;
  width: 100%;
}
.preview3 {
  grid-column: 3;
  width: 100%;
}

/**************************************************/
/* Buttons for showing more or less highlights. */

.toggle-button {
  margin-top: 1em;
}

.toggle-button a {
  color: #150c21;
}

.toggle-button a:hover {
  color: rgb(20, 110, 190);
}

/**************************************************/
/* Publication details (thumbnail media, title, and description). */

.thumbnail {
/*  width: 21%;*/
  width: 18%;
  float: left;
  margin-right: 2%;
}

.thumbnail:hover {
  border-bottom: none;
}

.thumbnail img {
  margin-top: 0.4em;
  border-radius: 5px;
  width: 100%;
  height: 100%;
}

.thumbnail video {
  margin-top: 0.4em;
  border-radius: 5px;
  width: 100%;
  height: 100%;
}

/* 论文缩略图上下留白，与右侧文字区对齐更舒适 */
.list-item.publication:not(.description) .thumbnail {
  margin-top: 0.05em;
  margin-bottom: 0.85em;
}

.list-item.publication:not(.description) .thumbnail img,
.list-item.publication:not(.description) .thumbnail video {
  margin-top: 0;
  margin-bottom: 0;
  display: block;
}

h3 {
  font-size: 1em;
  line-height: 1.5em;
}

h3 a {
  color: #150c21;
}

h3 a:hover {
  color: rgb(20, 110, 190);
}

.publication {
  margin-bottom: 0.5em;
}

.publication p {
  font-size: 1em;
  line-height: 1.5em;
  color: #150c21;
}

.project-description {
  width: 80%;
  float: left;
}

/**************************************************/
/* Subtle footer at the bottom of the page. */

#footer {
  color: #150c21;
  position: absolute;
  bottom: 0;
  line-height: 1.65em;
  padding-bottom: 0.5em;
}

#footer p {
  margin: 0;
}
