/* Site-specific typography and layout on the original al-folio template. */
:root,
:root[data-theme="light"] {
  --site-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --global-bg-color: #f9fafb;
  --global-text-color: #1f2937;
  --global-text-color-light: #6b7280;
  --global-theme-color: #8a1538;
  --global-hover-color: #67102a;
  --global-divider-color: #e1e5eb;
  --site-surface: #f3f4f6;
  --site-card: #ffffff;
  --site-on-accent: #ffffff;
  --paper-venue-color: var(--global-theme-color);
}
:root[data-theme="dark"] {
  --global-bg-color: #111827;
  --global-text-color: #e5e7eb;
  --global-text-color-light: #a3adbd;
  --global-theme-color: #eda5b8;
  --global-hover-color: #f7c8d5;
  --global-divider-color: #334155;
  --site-surface: #182233;
  --site-card: #1c283a;
  --site-on-accent: #24121b;
}
body {
  font-family: var(--site-font);
  -webkit-font-smoothing: antialiased;
}
body > .container[role="main"],
body > main.container {
  margin-top: 3.1rem !important;
}
.navbar {
  box-shadow: none;
  border-bottom: 1px solid var(--global-divider-color);
}
.navbar .nav-link {
  font-size: 0.9rem;
  padding-inline: 0.7rem;
}
.post-title {
  font-family: var(--site-font);
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.085rem;
}
.post-header {
  margin-bottom: 1.8rem;
}
.post-header .desc {
  font-size: 0.9rem;
  color: var(--global-text-color-light);
  margin-top: 0.65rem;
}
.post article,
.intro-copy,
.paper-description,
.paper-authors {
  font-family: var(--site-font);
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 400;
}
.post p {
  margin-bottom: 1.1rem;
}
.post h2,
.post h3 {
  font-family: var(--site-font);
}
.post h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.4rem;
  margin-bottom: 1.1rem;
}
.post a {
  text-underline-offset: 0.18em;
}
.intro-copy a,
.post > article a:not(.btn) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--global-theme-color) 35%, transparent);
}
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  grid-template-areas: "heading portrait" "intro portrait";
  grid-template-rows: max-content 1fr;
  gap: 1.8rem 3.25rem;
  align-items: start;
}
.intro-grid > .post-header {
  grid-area: heading;
  margin-bottom: 0;
}
.intro-copy {
  grid-area: intro;
}
.intro-copy strong {
  font-weight: 700;
}
.intro-copy ul {
  padding-left: 1.2rem;
  margin: 1.1rem 0 1.4rem;
}
.intro-copy li {
  padding-left: 0.15rem;
  margin-bottom: 0.85rem;
}
.intro-copy > :last-child {
  margin-bottom: 0;
}
.portrait-column {
  grid-area: portrait;
  text-align: center;
}
.portrait {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: none;
}
.portrait-column .portrait-credit {
  margin: 0.5rem 0 0.8rem;
  font-size: 0.66rem;
  color: var(--global-text-color-light);
}
.portrait-email {
  font-size: 0.9rem;
  text-decoration: none;
}
.profile-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}
.profile-social a {
  color: var(--global-text-color);
  font-size: 1.7rem;
  line-height: 1.3;
  text-decoration: none;
}
.profile-social a:hover {
  color: var(--global-theme-color);
}
.selected-work {
  margin-top: 3.25rem;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}
.section-heading h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}
.section-heading > a {
  font-size: 0.83rem;
}
.publication-note {
  font-size: 0.73rem;
  color: var(--global-text-color-light);
  margin: 0.7rem 0 1.8rem !important;
}
.paper-list {
  display: grid;
  gap: 3rem;
}
.paper-row {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.9rem;
  align-items: center;
}
.paper-figure {
  position: relative;
  width: 100%;
  border: 1px solid var(--global-divider-color);
  padding: 0;
  overflow: hidden;
  background: var(--site-card);
  border-radius: 8px;
  cursor: zoom-in;
  box-shadow: 0 2px 8px #17212b06;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}
.figure-viewport {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 8 / 5;
  padding: 10px;
}
.paper-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.figure-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-top: 1px solid var(--global-divider-color);
  background: var(--site-surface);
  padding: 0.6rem 0.8rem;
  color: var(--global-text-color-light);
  font: 500 0.7rem/1.5 var(--site-font);
  text-align: left;
}
.figure-hint {
  flex: none;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--global-theme-color);
}
.paper-figure:hover {
  border-color: var(--global-theme-color);
  box-shadow: 0 4px 14px #17212b0d;
}
.paper-text h5 {
  font-family: var(--site-font);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 0.45rem;
  letter-spacing: -0.015rem;
}
.paper-text h5 a {
  color: var(--global-text-color);
  text-decoration: none;
}
.paper-text h5 a:hover {
  color: var(--global-theme-color);
  text-decoration: underline;
}
.paper-authors {
  color: var(--global-text-color-light);
  font-size: 0.82rem;
  line-height: 1.75;
  margin-bottom: 0.45rem;
}
.paper-authors strong {
  font-weight: 700;
  color: var(--global-text-color);
}
.remaining-authors {
  display: inline;
}
.remaining-authors summary {
  display: inline;
  cursor: pointer;
  color: var(--global-theme-color);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.2em;
}
.remaining-authors summary::marker {
  content: "";
}
.remaining-authors summary::-webkit-details-marker {
  display: none;
}
.remaining-authors[open] > span {
  display: block;
  margin-top: 0.3rem;
}
.paper-text .paper-venue {
  font-family: var(--site-font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper-venue-color);
  line-height: 1.6;
  margin: 0 0 0.45rem;
}
.paper-text .paper-award {
  font-family: var(--site-font);
  font-size: 0.74rem;
  color: var(--global-theme-color);
  line-height: 1.65;
  margin: -0.15rem 0 0.4rem;
}
.paper-text .paper-description {
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0 0 0.65rem;
}
.paper-links {
  display: flex;
  gap: 1rem;
  font: 600 0.78rem var(--site-font);
}
.paper-links a {
  color: var(--global-text-color-light);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.paper-links a:hover {
  color: var(--global-theme-color);
}
.publications {
  margin-top: 1.8rem;
}
.publications .title {
  font-family: var(--site-font);
  font-weight: 700;
  line-height: 1.6;
}
.publications .author {
  font-size: 0.82rem;
  line-height: 1.9;
}
.publications .periodical {
  font-size: 0.82rem;
  color: var(--paper-venue-color);
}
.publications .links .btn {
  border: 0;
  padding: 0.2rem 0;
  margin-right: 1rem;
  border-radius: 0;
  text-transform: lowercase;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: var(--global-text-color-light);
}
.publications .links .btn:hover {
  background: none;
  color: var(--global-theme-color);
}
.post > article > ul,
.post > article > ol {
  padding-left: 1.4rem;
}
.post > article li {
  margin-bottom: 0.5rem;
}
footer.sticky-bottom {
  margin-top: 4rem !important;
}
footer .container {
  font-size: 0.7rem;
  color: var(--global-text-color-light);
}
.figure-dialog {
  width: min(1100px, 94vw);
  max-height: 90vh;
  padding: 2.5rem 1.4rem 1rem;
  border: 0;
  border-radius: 6px;
  background: var(--site-card);
  color: var(--global-text-color);
  box-shadow: 0 12px 80px #0005;
}
.figure-dialog::backdrop {
  background: #0009;
}
.figure-dialog > img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}
.figure-close {
  position: absolute;
  right: 0.65rem;
  top: 0.25rem;
  background: none;
  border: 0;
  color: var(--global-text-color);
  font-size: 1.9rem;
  cursor: pointer;
  padding: 0.1rem 0.5rem;
}
.figure-dialog .figure-caption {
  font: 0.85rem/1.65 var(--site-font);
  margin: 1rem 0 0;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 4px;
}
@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 2rem;
  }
  .paper-row {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.4rem;
  }
}
@media (max-width: 640px) {
  body > .container[role="main"],
  body > main.container {
    margin-top: 2rem !important;
    padding-inline: 1.25rem;
  }
  .post-title {
    font-size: 1.9rem;
  }
  .post-header {
    margin-bottom: 1.5rem;
  }
  .intro-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "portrait" "intro";
    grid-template-rows: auto;
    gap: 1.8rem;
  }
  .portrait-column {
    width: 205px;
    justify-self: center;
  }
  .intro-copy {
    font-size: 0.95rem;
  }
  .paper-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .paper-figure {
    max-width: 400px;
    justify-self: center;
  }
  .paper-text h5 {
    font-size: 1.02rem;
  }
  .section-heading h2 {
    font-size: 1.3rem;
  }
  .selected-work {
    margin-top: 2.4rem;
  }
  .paper-list {
    gap: 2.6rem;
  }
  .paper-authors {
    font-size: 0.82rem;
  }
}

.paper-category + .paper-category {
  margin-top: 2.8rem;
}
.paper-category-title {
  font-size: 1.25rem;
  font-weight: 600;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--global-divider-color);
  margin-bottom: 1.7rem;
}
.post h2[id],
.paper-category-title {
  scroll-margin-top: 5rem;
}
.working-papers {
  padding-left: 1.4rem;
  font-size: 0.85rem;
  line-height: 1.9;
}
.working-papers li {
  margin-bottom: 1.1rem !important;
}
.post > article > h3 {
  font-size: 1.05rem;
  margin-top: 1.8rem;
  margin-bottom: 1rem;
}
.research-story {
  margin-top: 1.2rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--global-divider-color);
  border-radius: 5px;
  font: 400 0.85rem/1.7 var(--site-font);
}
.research-story > :last-child {
  margin-bottom: 0;
}
#research,
.paper-row[id] {
  scroll-margin-top: 5rem;
}
.research-controls {
  margin: 1.7rem 0 2.2rem;
  font-family: var(--site-font);
}
.research-controls[hidden],
.paper-category[hidden] {
  display: none !important;
}
.research-filter-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--global-text-color-light);
  margin-bottom: 0.8rem;
}
.research-all {
  border: 0;
  background: none;
  color: var(--global-theme-color);
  font: inherit;
  cursor: pointer;
  padding: 0.25rem 0;
}
.research-all[aria-pressed="true"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
.research-directions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}
.research-direction {
  text-align: left;
  border: 1px solid var(--global-divider-color);
  border-radius: 5px;
  background: var(--global-bg-color);
  color: var(--global-text-color);
  padding: 1rem;
  font: inherit;
  cursor: pointer;
}
.research-direction:hover,
.research-direction[aria-pressed="true"] {
  border-color: var(--global-theme-color);
  background: color-mix(in srgb, var(--global-theme-color) 7%, var(--global-bg-color));
}
.direction-title,
.direction-subtitle {
  display: block;
}
.direction-title {
  font-size: 0.9rem;
  font-weight: 600;
}
.direction-subtitle {
  font-size: 0.72rem;
  color: var(--global-text-color-light);
  margin-top: 0.35rem;
}

.category-subtitle {
  font-size: 0.9em;
  font-weight: 400;
}
.paper-row-text {
  grid-template-columns: 1fr;
  border-left: 2px solid var(--global-divider-color);
  padding-left: 1.2rem;
}
@media (min-width: 641px) and (max-width: 1000px) {
  .research-directions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .research-directions {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .research-direction {
    position: relative;
    padding: 0.8rem 0.85rem;
  }
}

.paper-group + .paper-group {
  margin-top: 2.4rem;
}
.paper-group-title {
  font: 600 1rem var(--site-font);
  color: var(--global-text-color-light);
  margin: 0 0 1.6rem;
}
.paper-text .paper-focus {
  font: 500 0.73rem var(--site-font);
  color: var(--global-theme-color);
  margin: 0 0 0.5rem;
}

/* Bio uses open sections and aligned entries. */
.bio-page .post-header {
  margin-bottom: 2.6rem;
}
.bio-page .bio-content {
  max-width: 900px;
  font-size: 0.95rem;
  line-height: 1.85;
  min-width: 0;
}
.bio-section {
  scroll-margin-top: 5.5rem;
}
.bio-section + .bio-section {
  margin-top: 2.8rem;
}
.bio-page .bio-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--global-divider-color);
  scroll-margin-top: 5.5rem;
}
.bio-page h3 {
  font: 600 1rem/1.6 var(--site-font);
  margin: 0 0 0.4rem;
}
.bio-page .bio-detail {
  font-size: 0.86rem;
  color: var(--global-text-color-light);
  margin: 0.35rem 0 0;
  overflow-wrap: anywhere;
}
.bio-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--global-theme-color) 45%, transparent);
}
.education-entry {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 1.2rem;
}
.education-entry + .education-entry {
  margin-top: 2rem;
}
.education-degree {
  font: 600 0.82rem/1.85 var(--site-font);
  color: var(--global-theme-color);
  padding-top: 0.12rem;
}
.bio-page .education-program {
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
}
.bio-awards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 2rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.bio-awards li {
  padding-left: 0.9rem;
  position: relative;
}
.bio-awards li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--global-theme-color);
}
.bio-page .bio-section-note {
  font: 600 0.8rem var(--site-font);
  color: var(--global-text-color-light);
  margin: -0.35rem 0 1rem;
}
.bio-service {
  margin: 0;
}
.bio-service > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 1rem;
}
.bio-service > div + div {
  margin-top: 0.85rem;
}
.bio-service dt {
  font: 600 0.8rem/1.85 var(--site-font);
}
.bio-service dd {
  margin: 0;
}
.bio-talk + .bio-talk {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--global-divider-color);
}
.bio-talk-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.bio-resource {
  font: 500 0.73rem var(--site-font);
  white-space: nowrap;
}
.bio-row {
  padding: 0.9rem 0;
}
.bio-row:first-child {
  padding-top: 0;
}
.bio-row + .bio-row {
  border-top: 1px solid var(--global-divider-color);
}
.bio-page .bio-date {
  font: 400 0.77rem/1.8 var(--site-font);
  color: var(--global-text-color-light);
  margin: 0.2rem 0 0;
}
@media (max-width: 800px) {
  .bio-page .post-header {
    margin-bottom: 1.5rem;
  }
}
@media (max-width: 480px) {
  .bio-awards {
    grid-template-columns: 1fr;
  }
  .education-entry {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .bio-service > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .bio-talk-heading {
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-bottom: 0.4rem;
  }
}

/* Compact news timeline; older updates remain available without JavaScript. */
.home-news {
  margin-top: 2.8rem;
  scroll-margin-top: 6rem;
}
.home-news-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.home-news-list li {
  display: grid;
  grid-template-columns: 5.7rem 1.4rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.5rem 0;
  font-size: 0.88rem;
  line-height: 1.75;
}
.home-news-list time {
  color: var(--global-text-color-light);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 0.81rem;
  padding-top: 0.08rem;
}
.home-news-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--site-surface);
  color: var(--global-text-color-light);
}
.home-news-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}
.home-news-icon.news-award,
.home-news-icon.news-education {
  color: var(--global-theme-color);
}
.post .home-news-copy p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}
.home-news-copy strong {
  font-weight: 600;
}
.home-news-copy a {
  text-decoration: underline;
  text-decoration-color: var(--global-divider-color);
  text-underline-offset: 0.18em;
}
.news-archive {
  margin-top: 0.65rem;
}
.news-archive summary {
  width: fit-content;
  cursor: pointer;
  font-size: 0.81rem;
  color: var(--global-text-color-light);
}
.news-archive summary:hover {
  color: var(--global-theme-color);
}
.news-archive summary:focus-visible {
  outline: 2px solid var(--global-theme-color);
  outline-offset: 4px;
}
.news-archive .news-hide,
.news-archive[open] .news-show {
  display: none;
}
.news-archive[open] .news-hide {
  display: inline;
}
.news-archive .home-news-list {
  margin-top: 0.5rem;
}
@media (max-width: 600px) {
  .home-news {
    margin-top: 2.2rem;
  }
  .home-news-list li {
    grid-template-columns: 1.4rem minmax(0, 1fr);
    grid-template-areas: "icon date" "icon copy";
    gap: 0 0.65rem;
    padding: 0.65rem 0;
  }
  .home-news-list time {
    grid-area: date;
    font-size: 0.74rem;
  }
  .home-news-icon {
    grid-area: icon;
  }
  .home-news-copy {
    grid-area: copy;
  }
}
@media print {
  .news-archive > .home-news-list {
    display: block;
  }
}
