/* ==========================================================================
   Site-wide fonts & design policy (single source of truth)
   --------------------------------------------------------------------------
   Fonts:
     --font-sans  Lato (400/700 normal & italic, v25 woff2)
     --font-mono  Source Code Pro (400–700 variable, v32 woff2)

   Colors:
     --bg            #ffffff  Page background.
     --border        #e6e6e3  Hairline dividers under section headings.
     --text          #1a1a1a  All primary content (prose, headings, titles).
     --text-muted    #666666  Secondary info: venues, dates, captions,
                              separators.
     --accent        #1772d0  Clickable links ONLY.

   Typography:
     32px name (h1), 20px section headings (h2), 16px body at 1.6 line-height,
     14px secondary text (meta, captions, dates).
   ========================================================================== */

/* Lato — latin-ext italic 400 */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.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;
}
/* Lato — latin italic 400 */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Lato — latin-ext italic 700 */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.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;
}
/* Lato — latin italic 700 */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Lato — latin-ext normal 400 */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjxAwXiWtFCfQ7A.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;
}
/* Lato — latin normal 400 */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6uyw4BMUTPHjx4wXiWtFCc.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;
}
/* Lato — latin-ext normal 700 */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.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;
}
/* Lato — latin normal 700 */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/lato/v25/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.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;
}

/* Source Code Pro — greek 400–700 (variable) */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/sourcecodepro/v32/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPuvWnsUnxlC9.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Source Code Pro — latin-ext 400–700 (variable) */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/sourcecodepro/v32/HI_SiYsKILxRpg3hIP6sJ7fM7PqlM-vWnsUnxlC9.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;
}
/* Source Code Pro — latin 400–700 (variable) */
@font-face {
  font-family: 'Source Code Pro';
  font-style: normal;
  font-weight: 400 700;
  font-display: block;
  src: url(https://fonts.gstatic.com/s/sourcecodepro/v32/HI_SiYsKILxRpg3hIP6sJ7fM7PqlPevWnsUnxg.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;
}


:root {
  --bg: #ffffff;
  --border: #e6e6e3;
  --text: #1a1a1a;
  --text-muted: #666666;
  --accent: #1772d0;
  --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: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

p {
  margin: 0 0 1em;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

/* ---- Site header (name + page tabs, same on every page) --------------- */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
}

.site-title {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.site-title:hover,
.site-title:focus-visible {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--text-muted);
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-thickness: 2px;
}

/* ---- Home bio ---------------------------------------------------------- */

.bio {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.bio-text {
  flex: 1;
  min-width: 0;
}

.bio-photo {
  flex: 0 0 200px;
}

.bio-photo img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}


.bio-links {
  margin-bottom: 0;
}

.sep {
  color: var(--text-muted);
  padding: 0 0.5em;
}

/* ---- Sections ---------------------------------------------------------- */

section {
  margin-top: 48px;
}

section.bio,
section.first {
  margin-top: 0;
}

h2 {
  margin: 0 0 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.section-intro {
  margin-bottom: 24px;
}

/* Dated lists (News, Background) */
.dated {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dated li {
  display: flex;
  gap: 16px;
  margin-bottom: 6px;
}

.dated .date {
  flex: 0 0 88px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6rem;
  font-variant-numeric: tabular-nums;
}

/* Home page research list: title, then venue on its own line */
.title-list li {
  margin-bottom: 12px;
}

.item-meta {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- Research entries -------------------------------------------------- */

.paper {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.paper.no-media {
  grid-template-columns: minmax(0, 1fr);
}

.paper-media img,
.paper-media video {
  width: 200px;
  height: 150px;
  object-fit: contain;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Photos fill the 4:3 frame; figures (default) are letterboxed */
.paper-media img.cover {
  object-fit: cover;
}

/* Static image that swaps to a looping video on hover */
.swap {
  position: relative;
  width: 200px;
  height: 150px;
}

.swap .swap-top {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.swap img {
  object-fit: cover;
}

@media (hover: hover) {
  .paper:hover .swap-top {
    opacity: 1;
  }
}

.papertitle {
  font-weight: 700;
}

.paper-meta,
.paper-links {
  font-size: 14px;
  color: var(--text-muted);
}

.paper-meta strong {
  color: var(--text);
}

.paper-links .sep {
  padding: 0 0.4em;
}

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

/* ---- Rollout clips ----------------------------------------------------- */

.clips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
}

.clips figure {
  margin: 0;
}

.clips video {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #eeeeee;
}

.clips figcaption {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ---- Plain lists (Earlier projects) ------------------------------------ */

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li {
  margin-bottom: 16px;
}

.item-title {
  font-weight: 700;
}

/* ---- Small screens ----------------------------------------------------- */

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

  .site-header-inner {
    padding: 14px 18px;
  }

  .site-nav {
    gap: 18px;
  }

  .bio {
    flex-direction: column-reverse;
    gap: 16px;
  }

  .bio-photo {
    flex: none;
  }

  .bio-photo img {
    width: 140px;
    height: 140px;
  }


  .paper {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .paper-media img,
  .paper-media video,
  .swap {
    width: 100%;
    max-width: 320px;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .clips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .dated .date {
    flex-basis: 72px;
  }
}
