:root { color-scheme: light; }

body {
  margin: 0;
  background: #fff;
  color: #333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

a { color: #1a5bb8; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 970px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* header */
#head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  margin-top: 28px;
}
#head .pic { text-align: right; }
#head .pic img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
}
h1 { font-size: 34px; font-weight: normal; margin: 0; }
.sub {
  font-style: italic;
  color: #999;
  font-size: 18px;
  margin: 6px 0 14px;
  max-width: 440px;
}
.icons { display: flex; gap: 10px; }
.icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #333;
  display: grid;
  place-items: center;
}
.icons a:hover { background: #1a5bb8; }
.icons svg { width: 20px; height: 20px; fill: #fff; }

hr {
  height: 1px;
  border: 0;
  margin: 28px 0 0;
  background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0.6), rgba(0,0,0,0));
}

/* timeline */
.entry {
  display: grid;
  grid-template-columns: 90px 120px 1fr;
}
.time {
  font-size: 14px;
  color: #aaa;
  text-align: right;
  padding-right: 10px;
}
.ico {
  position: relative;
  border-left: 2px solid #cfcfcf;
  padding-left: 10px;
}
.dot {
  position: absolute;
  top: 0;
  left: -8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cfcfcf;
  border: 2px solid #fff;
}
.ico img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #eee;
  background: #fff;
  padding: 4px;
  box-sizing: border-box;
}
.desc {
  font-size: 17px;
  padding: 0 0 26px 16px;
}
.desc p { margin: 0 0 8px; }
.desc .title { font-size: 18px; color: #222; margin-bottom: 2px; }
.desc .title b { font-weight: 600; }
.desc .prev { font-size: 14px; color: #999; font-style: italic; margin-bottom: 4px; }

/* present vs past */
.entry.current .dot { background: #1a5bb8; }
.entry.current .time { color: #1a5bb8; font-weight: 600; }
.entry:not(.current):not(.group) .desc { color: #666; }
.entry:not(.current):not(.group) .ico img { opacity: 0.85; }
.entry.group .desc { padding-bottom: 14px; }
.entry.group .desc span {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
}
.entry.group .ico { min-height: 28px; }
.small { font-size: 15px; color: #777; }
.nw { white-space: nowrap; }

/* section titles */
.ctitle {
  font-size: 34px;
  font-weight: normal;
  line-height: inherit;
  margin: 44px 0 18px;
}

/* projects */
.project {
  padding: 10px 0 12px;
  border-bottom: 1px solid #eee;
}
.project b { color: #222; }
.project .tags { font-size: 13px; color: #999; margin-top: 2px; }

/* publications */
.pub {
  font-size: 15px;
  border-left: 4px solid #aaa;
  padding: 2px 0 2px 12px;
  margin-bottom: 14px;
}
.pub .venue { color: #999; margin-left: 6px; white-space: nowrap; }
.pub .authors { display: block; color: #555; }

ul.plain { padding-left: 20px; margin: 0; }
ul.plain li { margin-bottom: 8px; }

/* footer */
footer.container {
  text-align: center;
  margin: 32px auto 0;
  padding-bottom: 20px;
  font-size: 15px;
  color: #666;
}
footer p { margin: 0; }

@media (max-width: 760px) {
  .container { padding-left: 22px; padding-right: 22px; }
  #head { grid-template-columns: 1fr; gap: 16px; text-align: center; }
  #head .pic { text-align: center; }
  #head .pic img { width: 180px; height: 180px; }
  .sub { margin-left: auto; margin-right: auto; }
  .icons { justify-content: center; }
  .entry { grid-template-columns: 80px 1fr; }
  .time { display: none; }
  .ico img { width: 60px; height: 60px; }
  .desc { font-size: 16px; }
  .desc::before { content: attr(data-time); display: block; font-size: 13px; color: #aaa; }
  .entry.current .desc::before { color: #1a5bb8; font-weight: 600; }
  .entry.group .ico { border-left: 0; }
}

/* 404 */
.notfound { text-align: center; padding-top: 18vh; padding-bottom: 40px; }
.notfound p { color: #666; }
