/* justinesherry.com — single theme by design: black on white.
   Do not add prefers-color-scheme handling. All type in rem. */

/* Newsreader — news serif, stands in for NYT Cheltenham/Imperial. Variable opsz + wght. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 700;
  font-display: swap; src: url("/assets/fonts/newsreader-latin.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; }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 300 700;
  font-display: swap; src: url("/assets/fonts/newsreader-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 700;
  font-display: swap; src: url("/assets/fonts/newsreader-italic-latin.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; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 300 700;
  font-display: swap; src: url("/assets/fonts/newsreader-italic-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Libre Franklin — open revival of Franklin Gothic, NYT's working sans. */
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("/assets/fonts/libre-franklin-latin.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; }
@font-face { font-family: "Libre Franklin"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("/assets/fonts/libre-franklin-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Source Serif 4 — kept only as the serif fallback while Newsreader loads. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("/assets/fonts/source-serif-4-latin.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; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 400 700;
  font-display: swap; src: url("/assets/fonts/source-serif-4-latin-ext.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper:       #FFFFFF;
  --ink:         #191419;
  --soft:        #544954;
  --faint:       #6F6470;
  --rule:        #E8E2E7;
  --rail-bg:     #FAF7FA;
  --accent:      #6B4A6B;
  --accent-pale: #E0D2E2;
  --accent-wash: #F6F0F6;
  --serif:   "Newsreader", "Source Serif 4", Georgia, "Times New Roman", serif;
  --display: "Newsreader", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:    "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --code:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.125rem; line-height: 1.6;
  font-optical-sizing: auto; -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
img { max-width: 100%; height: auto; }

.shell { display: grid; grid-template-columns: 224px 1fr; max-width: 1180px; margin-inline: auto; }

.rail {
  border-right: 1px solid var(--rule); background: var(--rail-bg);
  padding: 22px 0 40px; position: sticky; top: 0; align-self: start;
  font-family: var(--sans); height: 100vh; overflow-y: auto;
}
.wordmark {
  display: block; font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  letter-spacing: -.018em; color: var(--ink); text-decoration: none;
  padding: 0 22px 18px; margin-bottom: 10px; border-bottom: 1px solid var(--rule);
  line-height: 1.25;
}
.rail a:not(.wordmark) {
  display: block; padding: 8px 22px; font-size: .875rem; font-weight: 500;
  letter-spacing: 0; color: var(--soft); text-decoration: none; line-height: 1.4;
}
.rail a:not(.wordmark):hover { color: var(--accent); }
.rail-pages { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.rail-pages a { color: var(--accent); }

.main { padding: 44px 48px 56px; min-width: 0; }

.sect {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 50px 0 20px; padding-top: 20px; border-top: 1px solid var(--rule);
}
.sect h2 {
  font-family: var(--sans); font-size: 1rem; letter-spacing: -.005em;
  color: var(--ink); font-weight: 700; margin: 0;
}
.sect a {
  font-family: var(--sans); font-size: .875rem; font-weight: 500; letter-spacing: 0;
  color: var(--accent); text-decoration: none;
}

.prose { font-size: 1.125rem; line-height: 1.72; margin: 0; max-width: 68ch; }
.prose + .prose { margin-top: 16px; }
.prose a { text-decoration: none; border-bottom: 1px solid var(--accent-pale); }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: static; height: auto; overflow: visible;
    border-right: 0; border-bottom: 1px solid var(--rule);
    padding: 0 0 12px; display: flex; flex-wrap: wrap; gap: 2px; align-items: center;
  }
  .wordmark { flex: 0 0 100%; padding: 16px 20px 14px; margin-bottom: 10px; }
  .rail a:not(.wordmark) { padding: 6px 13px; }
  .rail-pages { margin: 0 0 0 4px; padding: 0 0 0 13px; border-top: 0; border-left: 1px solid var(--rule); }
  .main { padding: 32px 24px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.skip {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  font-family: var(--sans); font-size: .875rem;
}
.skip:focus {
  position: absolute; left: 12px; top: 12px;
  width: auto; height: auto; overflow: visible;
  z-index: 1000; padding: 10px 16px;
  background: var(--paper); color: var(--ink);
  outline: 2px solid var(--accent); outline-offset: 2px;
  text-decoration: none;
}

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 180px 1fr; gap: 34px; align-items: start; }
.portrait { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; display: block; }
.name {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.6rem, 5.6vw, 3.6rem); line-height: 1.04;
  letter-spacing: -.021em; margin: 0 0 12px; text-wrap: balance;
}
.role { font-size: 1.25rem; line-height: 1.45; margin: 0 0 5px; }
.affil {
  font-family: var(--sans); font-size: .8125rem; letter-spacing: 0; color: var(--soft);
  margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 5px 14px;
}
.affil a { text-decoration: none; }
.bio { font-size: 1.3125rem; line-height: 1.62; margin: 24px 0 0; max-width: 56ch; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 22px; } }

/* ---- news (homepage + news page) ---- */
.news { display: grid; gap: 26px; }
.news-item { display: grid; grid-template-columns: 92px 1fr; gap: 22px; align-items: start; }
.news-item img { width: 92px; height: 92px; object-fit: cover; display: block; border: 1px solid var(--rule); }
.news-item time {
  font-family: var(--sans); font-size: .8125rem; font-weight: 500; letter-spacing: 0;
  color: var(--faint); display: block; margin-bottom: 5px;
}
.news-item h3 {
  font-family: var(--display); font-size: 1.5rem; font-weight: 700;
  margin: 0 0 6px; line-height: 1.2; letter-spacing: -.014em;
}
.news-item p { font-size: 1.125rem; line-height: 1.58; margin: 0; max-width: 68ch; color: var(--soft); }
.news-item a { text-decoration: none; border-bottom: 1px solid var(--accent-pale); }
@media (max-width: 900px) { .news-item { grid-template-columns: 64px 1fr; gap: 14px; } .news-item img { width: 64px; height: 64px; } }

/* ---- page title (standalone pages, e.g. news.html) ---- */
.page-title {
  font-family: var(--display); font-size: 2rem; font-weight: 700; letter-spacing: -.02em;
  margin: 0 0 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

/* ---- research lab ---- */
.lab { display: flex; flex-wrap: wrap; gap: 26px 20px; margin: 0; padding: 0; list-style: none; }
.lab li { width: 96px; text-align: center; }
.lab img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin: 0 0 10px; }
.lab strong { font-size: 1rem; font-weight: 600; display: block; line-height: 1.3; letter-spacing: -.005em; }
.lab a { text-decoration: none; color: var(--ink); }
.lab a:hover strong { color: var(--accent); }

/* ---- alumni ---- */
.alumni { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.alumni-item { display: flex; align-items: center; gap: 18px; }
.alumni-item img { width: 80px; height: 80px; min-width: 80px; border-radius: 50%; object-fit: cover; }
.alumni-item a { text-decoration: none; border-bottom: 1px solid var(--accent-pale); }
.alumni-item .meta { font-family: var(--sans); font-size: .8125rem; color: var(--soft); line-height: 1.6; }

/* ---- common requests ---- */
.asks { display: grid; gap: 20px; margin: 0; }
.asks > div { display: grid; gap: 5px; }
.asks dt { font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.asks dd { margin: 0; font-size: 1.125rem; line-height: 1.55; max-width: 68ch; }
.asks a { text-decoration: none; border-bottom: 1px solid var(--accent-pale); }

/* ---- contact ---- */
.contact { display: grid; gap: 16px; margin: 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact > div { display: grid; gap: 4px; }
.contact dt { font-family: var(--sans); font-size: .875rem; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.contact dd { margin: 0; font-size: 1.125rem; display: block; }
.contact dd svg { width: 1em; height: 1em; vertical-align: -0.125em; margin-right: 6px; fill: var(--soft); }
.contact a { text-decoration: none; border-bottom: 1px solid var(--accent-pale); }

/* ---- teaching ---- */
.teaching { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 28px; }

/* ---- teaching course badges (images restored alongside text links) ---- */
.teaching li { display: flex; flex: 1 1 200px; max-width: 260px; }
.teaching a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; text-decoration: none; border-bottom: none; }
.teaching a span { border-bottom: 1px solid var(--accent-pale); }
.teaching img { max-height: 110px; width: auto; object-fit: contain; }

/* ---- research highlights ---- */
.talks { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.talk-wrap { display: grid; gap: 8px; }
.talk-label { font-family: var(--sans); font-size: .8125rem; color: var(--soft); letter-spacing: .03em; }
.talk {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0;
  border: 1px solid var(--rule); background: #000; cursor: pointer; overflow: hidden;
}
.talk img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .82; }
.talk:hover img { opacity: 1; }
.talk-play {
  position: absolute; inset: 0; margin: auto; width: 62px; height: 62px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
}
.talk-play::after { content: ""; border-left: 18px solid #fff; border-block: 11px solid transparent; margin-left: 5px; }
.talk-wrap iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* ---- publications ---- */
h2.bibliography {
  font-family: var(--sans); font-size: 1.375rem; font-weight: 700; color: var(--ink);
  letter-spacing: -.01em; margin: 44px 0 18px; padding-top: 18px;
  border-top: 1px solid var(--rule); font-variant-numeric: tabular-nums;
}
ul.bibliography { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
ul.bibliography > li { font-size: 1.125rem; line-height: 1.55; max-width: 72ch; }
ul.bibliography > li > span { display: block; margin-bottom: 7px; }
.bib-actions { font-family: var(--sans); font-size: .8125rem; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.bib-actions a, .bib-actions summary { color: var(--accent); text-decoration: none; cursor: pointer; }
.bib-actions summary { list-style: none; }
.bib-actions summary::-webkit-details-marker { display: none; }
.bib-award {
  font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .01em;
  color: var(--accent); border: 1px solid var(--accent-pale); border-radius: 3px; padding: 2px 7px;
}
.bib-detail {
  background: var(--accent-wash); border-left: 3px solid var(--accent-pale);
  padding: 14px 18px; margin-top: 10px; font-size: 1rem; line-height: 1.6;
  font-family: var(--serif);
}
.bib-detail pre {
  font-family: var(--code); font-size: .8125rem; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; margin: 0;
}
.bib-press { font-family: var(--sans); font-size: .8125rem; color: var(--soft); margin-top: 6px; }
.bib-press svg { width: 1em; height: 1em; vertical-align: -0.125em; margin-right: 6px; fill: var(--soft); }

/* A .sect that opens a page has nothing above it to separate from. */
.main > .sect:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* Bullet lists inside a news entry — match the entry's body text. */
.news-item ul {
  margin: 9px 0 0; padding-left: 20px; max-width: 68ch;
  font-size: 1.125rem; line-height: 1.58; color: var(--soft);
}
.news-item li { margin-bottom: 5px; }
.news-item li::marker { color: var(--accent); }

/* A page title already carries its own rule; the first year heading under it
   must not stack a second one. */
.page-title + h2.bibliography { border-top: 0; padding-top: 0; margin-top: 30px; }
