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

/* Prevent horizontal scroll due to overflow */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Make box sizing predictable and avoid overflow from padding/borders */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margins and avoid accidental horizontal scroll */
body {
  margin: 0;
  overflow-wrap: anywhere;
}

/* Keep media and tables within viewport */
img, table {
  max-width: 100%;
}

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

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

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

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

/* Subtle styling for blog dates */
.blog-date {
  color: #555;
}

/* Force paper/preprint/project thumbnails to square with white letterboxing */
img[alt="paper"][width="160"],
img[alt="preprint"][width="160"],
img[alt="project"][width="160"] {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background-color: #ffffff;
}

/* Profile image container styles */
.profile-image-container {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background-image: url('images/profilepic.jpg');
  background-size: 125%;
  background-position: 70% 75%;
  background-repeat: no-repeat;
}

/* Responsive layout tweaks */
@media (max-width: 768px) {
  /* Stack bio text and profile image */
  .header-row td[style*="width: 63%"] {
    display: block;
    width: 100% !important;
    padding-left: calc(2.5% + 32px) !important;
  }
  .header-row td[style*="width: 37%"] {
    display: block;
    text-align: center;
  }
  .header-row td[style*="width: 37%"] > div {
    margin: 0 auto 12px;
  }
  
  /* Adjust profile image for mobile - keep same dimensions as desktop */
  .header-row .profile-image-container {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    aspect-ratio: 1 !important;
    flex-shrink: 0 !important;
    background-size: 125% !important;
    background-position: 70% 75% !important;
  }

  /* Reorder: show image above the name/intro */
  .header-row {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .header-row td[style*="width: 37%"] { 
    order: -1; 
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  /* Stack thumbnail above text for papers, preprints, and projects */
  td[style*="width: 20%"] {
    display: block;
    width: 100% !important;
    text-align: center;
    padding-bottom: 0 !important;
  }
  td[style*="width: 80%"] {
    display: block;
    width: 100% !important;
    padding-top: 8px !important;
  }
  /* Center thumbnails; keep them from taking full width */
  td[style*="width: 20%"] img[alt="paper"],
  td[style*="width: 20%"] img[alt="preprint"],
  td[style*="width: 20%"] img[alt="project"] {
    display: block;
    margin: 0 auto;
  }

  /* Remove top padding from name on mobile */
  .name {
    padding-top: 0;
  }
}

