/* Adapted from Jon Barron's academic website template.
   Source: https://github.com/jonbarron/jonbarron.github.io */
@font-face {
  font-family: 'Lato'; font-style: normal; font-weight: 400;
  font-display: swap; src: url('assets/fonts/lato-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato'; font-style: normal; font-weight: 700;
  font-display: swap; src: url('assets/fonts/lato-bold.woff2') format('woff2');
}
:root {
  --bg: #ffffff;
  --bg-code: #f7f7f5;
  --border: #e4e4e0;
  --text: #000000;
  --text-muted: #555555;
  --accent: #1772d0;
  --accent-hover: #f09228;
  --highlight-bg: #ffffd0;
  --font-sans: 'Lato', Helvetica, Arial, sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:focus,
a:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

h2 {
  margin: 0;
  font-weight: 400;
  font-size: 22px;
}

.page {
  width: 100%;
  max-width: 816px;
  margin: 0 auto;
  padding: 8px;
}

.bio {
  display: flex;
  align-items: center;
}

.bio-text {
  width: 63%;
  padding: 2.5%;
}

.bio-photo {
  width: 37%;
  padding: 2.5%;
}

.bio-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.name {
  padding-top: 20px;
  margin: 0;
  font-weight: 400;
  font-size: 32px;
  text-align: center;
}

.bio-links {
  text-align: center;
  color: var(--text-muted);
}

.section-header {
  padding: 16px;
}

.highlight {
  background-color: var(--highlight-bg);
}

.papers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.paper,
.misc-row {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr);
  align-items: center;
}

.paper.highlighted {
  background-color: var(--highlight-bg);
}

.paper-media,
.misc-badge {
  padding: 16px;
}

.misc-badge {
  text-align: center;
}

.paper-info,
.misc-links {
  padding: 8px;
}

.papertitle {
  font-size: inherit;
  font-weight: 700;
}

.paper-links {
  color: var(--text-muted);
}

.paper-authors {
  text-wrap: balance;
}

.paper-authors a,
.paper-authors strong,
.paper-authors .author {
  white-space: nowrap;
}

.award {
  color: #d40000;
}

.award-highlight {
  color: #c64848;
}

.paper-desc {
  margin: 14px 0 0;
}

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

.one-short,
.one-short .two {
  height: 120px;
}

.two {
  width: 160px;
  height: 160px;
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease-in-out;
}

.one img,
.paper-media > img {
  width: 100%;
  height: auto;
  display: block;
}

.one video {
  width: 100%;
  height: 100%;
  display: block;
}

@media (hover: hover) {
  .paper:hover > .paper-media > .one > .two {
    opacity: 1;
    pointer-events: auto;
  }
}

.paper.hover-active > .paper-media > .one > .two {
  opacity: 1;
  pointer-events: auto;
}

.colored-box {
  color: var(--text);
  padding: 20px;
  display: inline-block;
  border-radius: 10px;
}

.site-footer {
  text-align: right;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
}

@media (max-width: 640px) {
  .page {
    padding: 0;
  }

  .bio {
    flex-direction: column-reverse;
  }

  .bio-text {
    width: 100%;
    padding: 8px 16px;
  }

  .bio-photo {
    width: 100%;
    padding: 20px 16px 0;
    text-align: center;
  }

  .bio-photo img {
    width: 148px;
    margin: 0 auto;
  }

  .name {
    padding-top: 8px;
    font-size: 28px;
  }

  .paper,
  .misc-row {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .paper-media,
  .misc-badge {
    padding: 12px 8px 12px 12px;
  }

  .paper-info,
  .misc-links {
    padding: 10px 12px 10px 6px;
  }

  .one,
  .two {
    width: 104px;
    height: 104px;
  }

  .one-short,
  .one-short .two {
    height: 78px;
  }

  .colored-box {
    padding: 12px 8px;
    width: 104px;
  }

  .colored-box h2 {
    font-size: 15px;
  }

  .site-footer {
    padding: 0 16px;
  }
}

/* Personal site adaptations. Keep the original template's compact structure. */
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { font-size: 16px; line-height: 1.5; }
.page { padding: 18px 8px 24px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.name { font-size: 32px; padding-top: 8px; }
.bio-text { width: 65%; }
.bio-photo { width: 35%; }
.bio-links { margin-top: 22px; }
.bio-links span { padding: 0 9px; }
.section-header { padding: 22px 20px 4px; }
h2 { font-size: 22px; font-weight: 400; }
.paper { grid-template-columns: 192px minmax(0, 1fr); padding: 12px 0; border-radius: 4px; }
.paper.highlighted { background: #ffffe4; }
.paper-info { padding: 8px 20px 8px 8px; }
.paper-heading { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0 0 6px; }
.paper-media img { width: 160px; height: 160px; }
.paper-desc { margin-top: 12px; }
.paper-result { margin: 9px 0 0; }
.paper-venue, .paper-links { font-size: 14px; line-height: 1.6; }
.about-section { margin-top: 6px; }
.site-footer { font-size: 13px; margin-top: 20px; padding: 0 20px; }
.skip-link { position: absolute; top: -100px; left: 16px; padding: 8px 12px; background: white; z-index: 5; }
.skip-link:focus { top: 8px; }
.project-page { padding-left: 24px; padding-right: 24px; }
.project-nav { padding: 10px 0 24px; font-size: 14px; }
.project-nav span { padding: 0 8px; color: var(--text-muted); }
.project-header h1 { font-size: 30px; font-weight: 400; line-height: 1.25; margin: 0 0 16px; }
.project-meta { font-size: 14px; }
.project-lede { font-size: 18px; }
.project-page section { margin-top: 32px; }
.project-page section h2 { margin-bottom: 12px; }
.project-figure { margin: 28px 0 24px; }
.project-figure img { width: 100%; height: auto; display: block; border-radius: 4px; }
.project-figure figcaption { font-size: 14px; margin-top: 10px; }
.table-wrap { overflow-x: auto; }
.results-table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 16px; }
.results-table caption { text-align: left; font-size: 14px; margin-bottom: 12px; }
.results-table th, .results-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.results-table th { font-weight: 700; }
.results-table tbody th { font-weight: 400; }
.results-table thead { border-top: 1px solid #aeb8c2; border-bottom: 1px solid #aeb8c2; }
.result-note { font-size: 14px; }
.contribution-list { padding-left: 22px; }
.contribution-list li { padding-left: 3px; margin: 8px 0; }
.project-page .site-footer { margin-top: 38px; padding: 0; }
@media (max-width: 640px) {
  .page { padding: 0 0 24px; }
  .bio-text { width: 100%; padding: 8px 20px; }
  .bio-photo { width: 100%; padding: 24px 20px 0; }
  .bio-photo img { width: 140px; }
  .name { font-size: 30px; }
  .bio-links { margin: 20px 0 10px; }
  .section-header { padding: 20px 20px 2px; }
  .paper { grid-template-columns: 124px minmax(0, 1fr); align-items: start; }
  .paper-media { padding: 12px 8px 12px 12px; }
  .paper-media img { width: 104px; height: 104px; }
  .paper-info { padding: 10px 16px 10px 6px; }
  .paper-heading { font-size: 16px; }
  .site-footer { text-align: left; }
  .project-page { padding: 0 20px 24px; }
  .project-header h1 { font-size: 28px; }
  .project-nav { padding-top: 22px; }
  .project-figure { overflow-x: auto; }
  .project-figure img { min-width: 520px; }
  .results-table th, .results-table td { padding: 9px 8px; }
}
@media (max-width: 360px) {
  .paper { grid-template-columns: 1fr; }
  .paper-media { padding: 16px 20px 0; }
  .paper-media img { width: 116px; height: 116px; }
  .paper-info { padding: 12px 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.bio-photo a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 50%; }
.bio-photo img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; object-position: 58% 66%; border-radius: 0; transform: scale(1.55); transform-origin: 58% 60%; }
.bio-links { font-size: 14px; }
.bio-links span { padding: 0 6px; }
.paper-authors { font-size: 14px; margin-bottom: 3px; }
.publication-list { padding: 0 20px; }
.publication { padding: 17px 0; }
.publication + .publication { border-top: 1px solid var(--border); }
.publication .paper-info { padding: 0; }
.publication p { margin: 5px 0; }
.publication-authors { font-size: 14px; }
.publication-desc { margin-top: 9px !important; }
.compact-list { padding-left: 22px; }
.compact-list li { margin: 6px 0; }
@media (max-width: 640px) {
  .bio-photo a { width: 140px; margin: 0 auto; }
  .bio-photo img { width: 100%; height: 100%; margin: 0; }
}

/* Paper figures retain their complete aspect ratio inside the thumbnail area. */
.paper-media img { object-fit: contain; }
