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

/* ---- Design tokens ----------------------------------------------------- */
/* Every colour on the page comes from this block, so light and dark mode are
   the same rules with a different set of values. */

:root {
  --font: 'Lato', Verdana, Helvetica, sans-serif;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --ink: #16181d;
  --ink-2: #4b515a;
  --ink-3: #6a6f78;
  --rule: #e2e6eb;
  --accent: #1772d0;
  --accent-ink: #ffffff;
  --accent-hover: #f09228;

  --feature-bg: #fffaeb;
  --feature-rule: #f0e2bd;
  --feature-edge: #e0a92b;
  --feature-ink: #8a6414;
  --marker: #ffef9e;

  --shadow: 0 6px 20px rgba(16, 24, 40, .09);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1b1e24;
    --surface-2: #232830;
    --ink: #e8eaef;
    --ink-2: #b2b8c2;
    --ink-3: #868d98;
    --rule: #2d323b;
    --accent: #6cabee;
    --accent-ink: #10141a;
    --accent-hover: #f2ad63;

    --feature-bg: #221f16;
    --feature-rule: #403824;
    --feature-edge: #c9942c;
    --feature-ink: #e3c078;
    --marker: #5a4a12;

    --shadow: 0 6px 20px rgba(0, 0, 0, .45);
  }
}

/* ---- Base -------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0 0 40px;
  background: var(--bg);
  color: var(--ink);
}

body,
td,
th,
tr,
p,
a,
li {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

/* Body prose is justified so both edges line up. This deliberately targets only
   unclassed <p> and the misc-body cells: publication metadata, the name,
   tagline and contact chips keep their own alignment.

   hyphens: auto stops justification from opening large word gaps in the narrow
   bio column beside the photo. It relies on <html lang="en">, which is set.
   Bullet lines inside misc-body end with <br>, and CSS never stretches a line
   that ends in a forced break, so they stay unaffected. */
p:not([class]),
.misc-body {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

strong {
  font-family: var(--font);
  font-weight: 700;
}

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

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

h2 {
  margin: 0;
  font-family: var(--font);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}

::selection {
  background: var(--marker);
  color: var(--ink);
}

span.highlight {
  background-color: var(--marker);
  padding: 0 3px;
  border-radius: 2px;
}

/* ---- Layout ------------------------------------------------------------ */

.page {
  width: 100%;
  max-width: 980px;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
}

.block {
  width: 100%;
  border: 0;
  border-spacing: 0;
  border-collapse: separate;
  margin-right: auto;
  margin-left: auto;
}

/* ---- Header ------------------------------------------------------------ */

.header-bio {
  /* Left padding is 16px, not 2.5%, so the bio's left edge lines up exactly
     with the section headings and their body text below (.section-head uses
     26px 16px 10px). A percentage here drifted ~11px to the right. */
  padding: 2.5% 2.5% 2.5% 16px;
  width: 63%;
  vertical-align: middle;
}

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

.header-photo img {
  width: 100%;
  max-width: 280px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

.name {
  padding-top: 20px;
  margin: 0;
  font-family: var(--font);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.015em;
}

.tagline {
  margin: 10px 0 18px;
  text-align: center;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
}

.contact a,
.contact .email {
  display: inline-block;
  padding: 4px 14px;
  font-size: 15px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.contact a:hover,
.contact a:focus {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---- Section headings -------------------------------------------------- */

.section-head {
  padding: 26px 16px 10px;
  width: 100%;
  vertical-align: middle;
}

.section-head h2 {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--rule);
}

.section-head p {
  margin: 14px 0 0;
  color: var(--ink-2);
}

/* ---- Publication list -------------------------------------------------- */
/* Replaces the thumbnail-and-caption table the original template used. The
   180px image column is now a year/kind gutter, which keeps the two-column
   rhythm and makes the list scannable by date without any artwork. */

.pub-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0 16px;
}

.pub-item {
  display: flex;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid transparent;
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.pub-item:hover {
  border-left-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.pub-item.is-highlight {
  background: var(--feature-bg);
  border-color: var(--feature-rule);
  border-left-color: var(--feature-edge);
}

.pub-meta {
  flex: 0 0 68px;
  padding-right: 20px;
  border-right: 1px solid var(--rule);
  text-align: right;
}

.pub-item.is-highlight .pub-meta {
  border-right-color: var(--feature-rule);
}

.pub-year {
  display: block;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
}

.pub-kind {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-3);
}

.pub-info {
  flex: 1 1 auto;
  min-width: 0;
}

.pub-title {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
}

.pub-title a {
  color: var(--ink);
}

.pub-title a:hover,
.pub-title a:focus {
  color: var(--accent);
}

.pub-authors {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.pub-authors strong {
  color: var(--ink);
}

.pub-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 15px;
}

.pub-venue {
  font-style: italic;
  color: var(--ink-2);
}

.pub-link {
  padding: 1px 10px;
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-2);
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.pub-link:hover,
.pub-link:focus {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.pub-award {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--feature-ink);
}

.pub-award::before {
  content: "\2605";
  margin-right: 7px;
}

.pub-note {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---- Two-column blocks (Open to, Reviewing) ---------------------------- */

.misc-label {
  padding: 16px;
  width: 20%;
  vertical-align: top;
  text-align: center;
}

.misc-body {
  padding: 16px 20px;
  width: 80%;
  vertical-align: top;
  color: var(--ink-2);
}

.colored-box {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-2);
}

.colored-box h2 {
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* ---- Footer ------------------------------------------------------------ */

.footer-note {
  padding: 0 16px;
  text-align: right;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---- Scraper-resistant email address ----------------------------------- */
/* The markup contains only "mojsafariuchicagoedu", with no "@", no dots, no
   mailto:. The separators are injected here as CSS generated content, so a
   regex harvester reading the HTML source finds nothing that looks like an
   address, while a human sees moj.safari@uchicago.edu rendered normally. */

.email .at::before {
  content: "@";
}

.email .dot::before {
  content: ".";
}

/* ---- Overflow backstops ------------------------------------------------ */

img,
video {
  max-width: 100%;
}

table {
  max-width: 100%;
}

/* ---- Narrow screens ---------------------------------------------------- */

@media (max-width: 700px) {
  .header-row,
  .header-bio,
  .header-photo {
    display: block;
    width: auto;
    max-width: none;
  }

  .header-photo {
    padding: 0 2.5% 2.5%;
    margin: 0 auto;
    max-width: 180px;
  }

  .name {
    font-size: 34px;
  }

  .misc-row,
  .misc-label,
  .misc-body {
    display: block;
    width: auto;
  }

  .misc-label {
    padding: 16px 16px 0;
    text-align: left;
  }

  /* The year gutter costs more than it gives on a phone, so it folds into a
     single line above the title. */
  .pub-item {
    display: block;
    padding: 14px 16px;
  }

  .pub-meta {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 0 0 8px;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 10px;
    text-align: left;
  }

  .pub-item.is-highlight .pub-meta {
    border-bottom-color: var(--feature-rule);
  }

  .pub-year {
    font-size: 18px;
  }
}

/* ---- Motion preferences ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }

  .pub-item:hover {
    transform: none;
  }
}
