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

*, *::before, *::after {
  box-sizing: border-box;
}

/**************************************************/

#body{
  font-family: 'Asap', roboto, sans-serif;
  font-size: 1em;
  line-height: 1.5em;
  color: #150c21;
  /* Keep scrollbar space constant to avoid width jumps when toggling filters */
  overflow-y: scroll;
  scrollbar-gutter: stable both-edges;
  /* Prevent font size adjustments on mobile */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#main {
  max-width: 900px;
  width: calc(100% - 2rem);
  margin: 0 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;
}

#intro-text {
  width: 40em;
  float: left;
}

#intro-image {
  margin: 2.7em 0 0 2em;
  width: 12em;
  height: 12em;
  float: left;
  overflow: hidden;
  border-radius: 1em;
  position: relative;
  cursor: pointer;
}

#intro-image img {
  width: 12em;
  height: 12em;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

#intro-image img.active {
  opacity: 1;
}

.image-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5em;
  font-size: 0.75em;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#intro-image:hover .image-hint {
  opacity: 1;
}

/**************************************************/
/* Research highlights section */

#research-highlights {
  margin: 3em 0 2em 0;
  color: #2d446a;
}

#research-highlights h2 {
  font-size: 1.4em;
  margin-bottom: 0.4em;
}

.rh-lead {
  max-width: 48em;
  color: #4a5874;
  line-height: 1.5em;
  margin-bottom: 0.9em;
}

.rh-card {
  border: 1px solid #bfc8d6;
  background: linear-gradient(180deg, #f9fbff 0%, #f2f5fb 100%);
  border-radius: 10px;
  padding: 1em 1.1em;
  box-shadow: 0 4px 12px rgba(42, 66, 112, 0.05);
}

.rh-card h3 {
  font-size: 1.05em;
  color: #2d446a;
  margin-bottom: 0.4em;
}

.rh-card p {
  color: #55627a;
  line-height: 1.5em;
}

.rh-card.primary {
  text-align: center;
  margin-bottom: 0.8em;
}

.rh-card.primary h3 {
  font-size: 1.15em;
}

.rh-card.pill {
  flex: 1 1 200px;
  min-width: 200px;
}

.rh-row {
  display: flex;
  gap: 0.8em;
  flex-wrap: wrap;
  margin-bottom: 1.2em;
}

.rh-toggle {
  display: inline-block;
  margin-top: 0.4em;
  color: #2d6bdc;
  font-weight: 600;
}

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

.selected h2 {
  color: #150c21;
}

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

.button:hover {
  color: #150c21;
}

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

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

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

.list-item::after {
  content: "";
  display: block;
  clear: both;
}

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

.list-item.misc {
  line-height: 1.5em;
}

.list-item.misc p.date {
  display: inline-block;
  width: 3em;
  margin: 0;
  vertical-align: top;
}

.list-item.misc span {
  display: inline-block;
  max-width: calc(100% - 3.5em);
  vertical-align: top;
  line-height: 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;
}

.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: #a0a8b0;
}

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

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: #a0a8b0;
}

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

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

#footer {
  color: #a0a8b0;
  position: absolute;
  bottom: 0;
  line-height: 2.5em;
}

/**************************************************/
/* Mobile responsive styles */

@media screen and (max-width: 768px) {
  #body {
    scrollbar-gutter: auto;
    font-size: 16px; /* Fixed font size for mobile */
  }
  
  #main {
    width: calc(100% - 1rem);
  }
  
  h1 {
    font-size: 2em;
  }
  
  .button {
    font-size: 1.4em;
  }
}
