/* 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;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:focus,
a:hover {
  color: #f09228;
  text-decoration: none;
}

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;
}

heading {
  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 {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 32px;
}

.one {
  width: 160px;
  height: 160px;
  position: relative;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -webkit-transition: opacity .2s ease-in-out;
}

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

span.highlight {
  background-color: #ffffd0;
}

/* Paper teasers grow on hover (pointer devices only). Every teaser is 300px
   wide at rest but their heights differ by a factor of five, so the zoom is
   capped by height (--target) as well as by width (--zoom-max): each figure
   grows until it is --target tall or as wide as the window allows. Each paper
   row carries --fig-h, the height of its teaser at the resting 300px width.

   The figure grows leftwards into the page margin. Once that margin is used
   up, the figure and the paper text both move right by the same amount, so
   the gap between them stays put and nothing reflows. */
@media (hover: hover) {
  tr {
    --target: 460;
    --zoom-max: 1.4;
    --zoom: min(var(--zoom-max), calc(var(--target) / var(--fig-h)));
    /* Free space next to the 960px page, keeping a 20px gap to the window. */
    --room: max(0px, (100vw - 1000px) / 2);
    /* How far the figure reaches past the left edge of the page. */
    --reach: max(0px, 300px * var(--zoom) - 320px);
    /* Growth the left margin cannot absorb: the figure moves right by this. */
    --spill: max(0px, var(--reach) - var(--room));
    /* The text follows, but never far enough to overflow the window. */
    --slide: min(var(--spill), var(--room));
  }

  td.teaser img {
    transform-origin: right center;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  }

  td.teaser:hover img {
    position: relative;
    z-index: 10;
    transform: translateX(var(--spill)) scale(var(--zoom));
    background: #fff;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3);
  }

  td.paper {
    transition: transform 0.2s ease-in-out;
  }

  td.teaser:hover + td.paper {
    transform: translateX(var(--slide));
  }
}

/* Wider windows have more room on both sides, so zoom further. */
@media (hover: hover) and (min-width: 1200px) {
  tr {
    --zoom-max: 1.7;
  }
}

@media (hover: hover) and (min-width: 1400px) {
  tr {
    --zoom-max: 2.3;
  }
}

@media (hover: hover) and (min-width: 1600px) {
  tr {
    --zoom-max: 2.9;
  }
}

@media (hover: hover) and (min-width: 1800px) {
  tr {
    --zoom-max: 3.3;
  }
}

/* Taller windows can fit a taller figure. */
@media (hover: hover) and (min-height: 900px) {
  tr {
    --target: 560;
  }
}

@media (hover: hover) and (min-height: 1200px) {
  tr {
    --target: 680;
  }
}

/* Misaligned robots in the page margins (robots.js). The layer itself lets
   clicks through; only the robots catch them. It sits below hovered teasers. */
#robots {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 5;
}

.robot {
  position: absolute;
  width: 64px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transform-origin: 50% 100%;
  animation: robot-arrive 0.35s ease-out both, robot-bob 2.6s ease-in-out infinite;
  transition: filter 0.25s ease-in-out, opacity 0.45s ease-in-out, transform 0.45s ease-in-out;
}

.robot img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.robot:hover {
  animation-play-state: paused;
}

.robot.aligned {
  animation: none;
  filter: sepia(1) saturate(4) hue-rotate(70deg);
}

.robot.gone {
  opacity: 0;
  transform: scale(0.6) translateY(12px);
}

.robot.escaped {
  animation: none;
  opacity: 0;
  transform: translateY(-40px) rotate(8deg);
}

/* Nudge shown under a robot that has gone unclicked for a few seconds. It is
   96px wide, so it stays inside the narrowest margin the game runs in. */
.robot-hint {
  position: absolute;
  top: 100%;
  left: -16px;
  width: 96px;
  margin-top: 2px;
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 12px;
  line-height: 1.2;
  color: #333;
  text-align: center;
  animation: robot-hint-in 0.3s ease-out both;
}

.robot-hint-arrow {
  display: block;
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
  color: #1772d0;
  animation: robot-hint-point 0.8s ease-in-out infinite;
}

.robot.aligned .robot-hint,
.robot.escaped .robot-hint {
  display: none;
}

@keyframes robot-hint-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes robot-hint-point {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

/* Brief flash when a robot scroll lands on its paper. */
tr.paper-flash td {
  animation: paper-flash 1.4s ease-out;
}

@keyframes paper-flash {
  0%   { background-color: #ffffd0; }
  100% { background-color: transparent; }
}

@keyframes robot-arrive {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: none; }
}

@keyframes robot-bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-6px) rotate(3deg); }
}

#robots-score {
  position: fixed;
  right: 12px;
  bottom: 10px;
  font-size: 12px;
  color: #999;
  z-index: 6;
}

#robots-score a {
  font-size: 12px;
  color: #999;
  text-decoration: underline;
}

/* Small screens: stack table cells vertically instead of side by side. */
@media (max-width: 640px) {
  body {
    margin: 6px;
  }

  table, tbody, tr, td {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  td.bio, td.section, td.paper {
    padding: 12px 10px !important;
  }

  td.photo {
    padding: 0 10px 12px 10px !important;
    text-align: center;
  }

  td.photo img {
    width: 55% !important;
    max-width: 240px !important;
  }

  td.teaser {
    padding: 16px 10px 0 10px !important;
    text-align: center;
  }

  td.teaser img {
    width: 100%;
    max-width: 360px;
    height: auto;
  }

  td.section ul {
    padding-left: 20px;
  }

  name {
    font-size: 26px;
  }

  heading {
    font-size: 20px;
  }
}