/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  src: local('Lato Light'), local('Lato-Light'), url(https://fonts.gstatic.com/s/lato/v25/S6u9w4BMUTPHh7USSwaPGR_p.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 300;
  src: local('Lato Light'), local('Lato-Light'), url(https://fonts.gstatic.com/s/lato/v25/S6u9w4BMUTPHh7USSwiPGQ.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ink on paper: dark slate text on a slightly warm off-white, mid grey for secondary text */
html { background: #fcfcfb; }
body { color: #1d2433; background: #fcfcfb; }

/* links: no underline at rest; on hover a 1px line in the current colour draws in from the left */
a {
  color: #1772d0;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 calc(100% - 1px);
  -webkit-box-decoration-break: clone;   /* titles that wrap: every line draws its own underline */
  box-decoration-break: clone;
  transition: background-size .28s ease-out, color .15s ease-out;
}

a:focus,
a:hover {
  color: #11549c;
  text-decoration: none;
  background-size: 100% 1px;
}

body,
td,
th,
tr,
p,
a {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

strong {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
}

h2 {
  margin: 0;
  font-weight: normal;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 22px;
}

.papertitle {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
}

/* "Dr." in front of the name: smaller and bold */
.name .honorific {
  font-size: 32px;
  font-weight: 400;
}

/* header watermark: a faint grid of small dots, like a tactile array, fading out towards the bottom */
.hero {
  background-image:
    linear-gradient(to bottom, rgba(252, 252, 251, 0) 40%, #fcfcfb 100%),
    radial-gradient(circle, rgba(29, 36, 51, 0.05) 1.1px, transparent 1.7px);
  background-size: auto, 16px 16px;
  background-position: 0 0, 8px 8px;
}

/* one-line tagline under the name */
.tagline {
  margin: 4px 0 0 0;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #5b6673;
}

/* research overview: one line per area, Zhao-Lab style */
p.areas {
  margin: 0 0 6px 0;
}

/* publication topic tabs */
#pubtabs {
  margin-top: 10px;
}

#pubtabs button {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 13px;
  color: #1772d0;
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 14px;
  padding: 4px 11px;
  margin: 0 6px 6px 0;
  cursor: pointer;
}

#pubtabs button:hover {
  color: #11549c;
  border-color: #11549c;
}

#pubtabs button.active {
  color: #fff;
  background: #1772d0;
  border-color: #1772d0;
}

#pubtabs button .count {
  opacity: 0.7;
  font-size: 12px;
}

/* chronological paper number shown in front of each title */
.pubnum {
  display: inline-block;
  min-width: 1.6em;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 9px;
  background: #eef2f7;
  color: #5b6673;
  font-size: 12px;
  text-align: center;
}

/* flash the row that a numbered link in the Research section points at */
tr.pub:target td {
  box-shadow: inset 0 0 0 2px #11549c;
}

/* ---------- waving robot hand, peeking over the lower-right edge of the photo ---------- */
.avatar {
  position: relative;
}

.hand-wrap {
  position: absolute;
  right: -14px;
  bottom: -12px;
  width: 86px;
  height: 86px;
  z-index: 2;
  transform: rotate(-14deg);
  pointer-events: none;
}

.robohand {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  cursor: pointer;
  pointer-events: auto;
}

/* the hand and its ghost trails all pivot about the wrist */
.robohand .hand,
.robohand .ghost {
  transform-box: view-box;
  transform-origin: 51px 87px;
}

/* ghost trails: flat, blurred silhouettes that follow the wave with a slight lag; hidden when idle */
.robohand .ghost {
  fill: #b7bfc9;
  opacity: 0;
  filter: blur(1px);
  pointer-events: none;
}

/* grey-white hand: one soft gradient over palm and tapered fingers, hairline seams, light edge highlights */
.robohand .body,
.robohand .palm {
  fill: url(#rh-g);
  stroke: #8a939e;
  stroke-width: 0.9;
  stroke-linejoin: round;
}

.robohand .wrist {
  fill: url(#rh-w);
  stroke: #6f7883;
  stroke-width: 0.9;
}

.robohand .seam {
  fill: none;
  stroke: #7f8893;
  stroke-width: 0.7;
  stroke-opacity: 0.65;
  stroke-linecap: round;
}

.robohand .palm-seam {
  stroke-opacity: 0.45;
}

.robohand .hl {
  fill: none;
  stroke: #ffffff;
  stroke-width: 0.9;
  stroke-opacity: 0.6;
  stroke-linecap: round;
}

.robohand .pad {
  fill: #b6bec7;
  opacity: 0.9;
}

/* idle: fingers sway very slightly about their knuckles, staggered */
.robohand .finger {
  transform-box: view-box;
  animation: hand-breathe 3.6s ease-in-out infinite;
}

.robohand .f2 { animation-delay: .35s; }
.robohand .f3 { animation-delay: .7s; }
.robohand .f4 { animation-delay: 1.05s; }
.robohand .thumb { animation-name: thumb-breathe; animation-delay: .5s; }

@keyframes hand-breathe {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-2.2deg); }
}

@keyframes thumb-breathe {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(3deg); }
}

/* wave: the whole hand rocks about the wrist, fingers fan out a little, two ghosts trail behind */
.robohand.wave .hand { animation: hand-wave 1.4s ease-in-out; }
.robohand.wave .g1   { animation: hand-wave 1.4s ease-in-out .05s, ghost-fade-1 1.5s linear; }
.robohand.wave .g2   { animation: hand-wave 1.4s ease-in-out .1s,  ghost-fade-2 1.5s linear; }

@keyframes ghost-fade-1 { 0% { opacity: 0; } 8%, 86% { opacity: .45; } 100% { opacity: 0; } }
@keyframes ghost-fade-2 { 0% { opacity: 0; } 8%, 86% { opacity: .24; } 100% { opacity: 0; } }

.robohand.wave .f1 { animation: fan1 1.4s ease-in-out; }
.robohand.wave .f2 { animation: fan2 1.4s ease-in-out; }
.robohand.wave .f3 { animation: fan3 1.4s ease-in-out; }
.robohand.wave .f4 { animation: fan4 1.4s ease-in-out; }
.robohand.wave .thumb { animation: fan-thumb 1.4s ease-in-out; }

@keyframes hand-wave {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(18deg); }
  40%  { transform: rotate(-12deg); }
  60%  { transform: rotate(18deg); }
  80%  { transform: rotate(-12deg); }
  100% { transform: rotate(0deg); }
}

@keyframes fan1 { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(-7deg); } }
@keyframes fan2 { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(-2deg); } }
@keyframes fan3 { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(3deg); } }
@keyframes fan4 { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(8deg); } }
@keyframes fan-thumb { 0%, 100% { transform: rotate(0); } 30%, 70% { transform: rotate(-10deg); } }

/* a narrow highlight sweeps across the metal while waving */
.robohand .sheen {
  transform-box: view-box;
  transform: translate(-40px, 0);
  opacity: 0;
  filter: blur(0.8px);
}

.robohand.wave .sheen {
  animation: rh-sheen .8s cubic-bezier(.4, 0, .2, 1) .3s;
}

@keyframes rh-sheen {
  0%   { transform: translate(-30px, 0); opacity: 0; }
  20%  { opacity: .8; }
  80%  { opacity: .8; }
  100% { transform: translate(125px, 0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .robohand .hand, .robohand .ghost, .robohand .finger, .robohand .sheen { animation: none !important; }
}

/* ---------- scroll reveal: sections float up and fade in the first time they enter the viewport ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease-out, transform .35s ease-out;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- journey map ---------- */
.journey {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.journey svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
}

.journey .sea {
  fill: #f3f6fa;
}

.journey .land {
  fill: #d7e0ea;
  stroke: #aebccb;
  stroke-width: 0.7;
}

.journey .grid {
  fill: none;
  stroke: #1d2433;
  stroke-opacity: 0.07;
  stroke-width: 0.7;
}

/* the half of the world that is in darkness right now */
.journey .night {
  fill: #1a263d;
  fill-opacity: 0.11;
  pointer-events: none;
}

.journey .arc {
  fill: none;
  stroke: #1772d0;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.8;
  transition: opacity .8s;
}

/* once the journey has been drawn, the solid arcs fade back and dashes keep travelling along them */
.journey svg.flowing .arc {
  opacity: 0.22;
}

.journey .flow {
  fill: none;
  stroke: #1772d0;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 5 14;
  opacity: 0;
  transition: opacity .8s;
}

.journey svg.flowing .flow {
  opacity: 0.95;
  animation: journey-flow 1.1s linear infinite;
}

@keyframes journey-flow {
  to { stroke-dashoffset: -19; }
}

@media (prefers-reduced-motion: reduce) {
  .journey svg.flowing .flow { animation: none; opacity: 0; }
  .journey svg.flowing .arc { opacity: 0.8; }
  .journey .stop.now.lit .pulse { animation: none; }
}

.journey .stop .dot {
  fill: #fff;
  stroke: #9fb0c3;
  stroke-width: 2;
  r: 5;
  transition: fill .4s, stroke .4s, r .4s;
}

.journey .stop.lit .dot {
  fill: #1772d0;
  stroke: #fff;
}

.journey .stop .hit {
  fill: transparent;
  cursor: pointer;
}

.journey .stop text {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  fill: #8a97a6;
  paint-order: stroke;
  stroke: #f3f6fa;
  stroke-width: 3.5px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: fill .4s;
}

.journey .stop.lit text {
  fill: #1d2433;
}

/* conference markers: small diamonds, grey until the side trip reaches them, then teal */
.journey .stop.conf .dot {
  fill: #fff;
  stroke: #9fb0c3;
  stroke-width: 1.5;
}

.journey .stop.conf.lit .dot {
  fill: #2a9d8f;
  stroke: #fff;
}

.journey .stop.conf text {
  font-style: italic;
}

.journey .stop.conf.lit text {
  fill: #2a9d8f;
}

/* side quests (conference trips): thinner teal arcs with their own flowing dashes */
.journey .arc.side {
  stroke: #2a9d8f;
  stroke-width: 1.5;
}

.journey .flow.side {
  stroke: #2a9d8f;
  stroke-width: 1.7;
  stroke-dasharray: 3 11;
}

.journey svg.flowing .flow.side {
  animation-duration: 0.9s;
}

@keyframes journey-flow-side {
  to { stroke-dashoffset: -14; }
}

.journey svg.flowing .flow.side {
  animation-name: journey-flow-side;
}

.journey .stop .pulse {
  fill: none;
  stroke: #1772d0;
  stroke-width: 1.5;
  opacity: 0;
}

.journey .stop.now.lit .pulse {
  animation: journey-pulse 2.2s ease-out infinite;
}

@keyframes journey-pulse {
  0%   { r: 6;  opacity: 0.9; }
  100% { r: 20; opacity: 0; }
}

.journey-tip {
  position: absolute;
  z-index: 2;
  max-width: 260px;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #d5dde6;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(20, 40, 70, 0.12);
  font-size: 12px;
  line-height: 1.4;
  color: #1d2433;
  pointer-events: none;
}

.journey-tip hr {
  border: 0;
  border-top: 1px solid #e6ebf1;
  margin: 5px 0;
}

.journey-caption {
  margin: 6px 0 0 0;
  text-align: center;
  font-size: 12px;
  color: #5b6673;
}


.fade {
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

span.highlight {
  background: #f0f8f7;
  box-shadow: inset 2px 0 0 #75bfb6;
  padding: 0 4px 0 7px;
  border-radius: 2px;
}

.colored-box {
    color: black;
    padding: 20px;
    display: inline-block;
    border-radius: 10px;
}