:root {
  --paper: #fbfaf6;
  --ink: #222622;
  --soft-ink: #555f59;
  --line: #d8d1bf;
  --blue: #315f79;
  --green: #5f7d64;
  --coral: #c97862;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.68;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--coral);
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: 3.4rem;
}

h2 {
  margin: 0 0 16px;
  font-size: 1.55rem;
}

p {
  margin-bottom: 18px;
}

.page {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 64px;
}

.masthead {
  padding: 10px 0 34px;
  border-bottom: 1px solid var(--line);
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: flex-end;
  margin-bottom: 72px;
  color: var(--soft-ink);
  font-size: 0.95rem;
}

.topnav a {
  color: inherit;
  text-decoration: none;
}

.topnav a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.intro {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: start;
}

.portrait {
  width: 280px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 34%;
}

.hello {
  margin-bottom: 0;
  color: var(--green);
  font-size: 0.95rem;
}

.lead {
  color: #313833;
  font-size: 1.08rem;
  line-height: 1.65;
}

section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

footer {
  padding-top: 36px;
}

footer p {
  margin-bottom: 0;
}

.availability-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  color: #30372f;
  background: #f6f1e6;
  border: 1px solid var(--line);
  border-left: 3px solid var(--coral);
  border-radius: 6px;
}

.paper-list {
  margin: 18px 0 0;
  padding-left: 1.15rem;
  list-style: disc;
}

.paper-list li {
  margin: 0 0 18px;
}

.paper-list li:last-child {
  margin-bottom: 0;
}

.paper-list span {
  display: inline;
  width: auto;
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: top;
}

.list-label {
  margin: 30px 0 -4px;
  color: var(--soft-ink);
  font-weight: 700;
}

.speaking-list > li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.75rem;
}

.speaking-list .item-year {
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.speaking-list .item-detail {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  white-space: normal;
}

#experience .item-year {
  color: var(--ink);
  font-weight: 700;
}

.experience-achievements {
  margin: 8px 0 0;
  padding-left: 1.1rem;
  color: var(--soft-ink);
  font-size: 0.88rem;
  line-height: 1.55;
}

.experience-achievements li {
  margin-bottom: 0;
}

.talks-details {
  margin-top: 26px;
}

.talks-details summary {
  color: var(--soft-ink);
  cursor: pointer;
  font-weight: 700;
}

.talks-details summary:hover {
  color: var(--blue);
}

.talks-details .paper-list {
  margin-top: 18px;
}

.community-sublist {
  margin: 8px 0 0;
  padding-left: 1.1rem;
}

.community-sublist li {
  margin-bottom: 6px;
}

.community-sublist li:last-child {
  margin-bottom: 0;
}

.repo-link,
.video-link,
.huggingface-link,
.slides-link,
.poster-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.24em;
}

.repo-link svg,
.video-link svg,
.huggingface-link svg {
  width: 0.92em;
  height: 0.92em;
  flex: 0 0 auto;
  fill: currentColor;
  transform: translateY(0.1em);
}

.video-link svg {
  width: 1.04em;
}

.huggingface-link svg {
  width: 1.08em;
  height: 1.08em;
}

.slides-link .link-emoji,
.poster-link .link-emoji {
  color: currentColor;
  display: inline-block;
  font-size: 0.95em;
  font-weight: 400;
  transform: translateY(0.02em);
  vertical-align: baseline;
  white-space: normal;
}

h3 {
  margin: 0 0 10px;
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.3;
}

.system {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 30px;
}

.system:first-of-type {
  margin-top: 22px;
}

.system-copy h3 {
  margin-top: 0;
}

.system-copy p:last-child,
.system-media .tags {
  margin-bottom: 0;
}

.system-figure {
  margin: 0;
}

#systems .system-figure,
#systems .figure-compact,
#systems .figure-medium {
  max-width: 280px;
}

.system-figure img,
.figure-row img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.system-figure a:hover img,
.figure-row a:hover img {
  border-color: var(--blue);
}

.figure-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 280px));
  gap: 18px;
  justify-content: start;
  margin-top: 6px;
}

.figure-pair .system-figure {
  margin: 0;
}

figcaption {
  margin-top: 7px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  line-height: 1.45;
}

.tags {
  margin: -8px 0 14px;
  color: var(--soft-ink);
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

#systems .tags {
  margin: 10px 0 0;
  line-height: 1.55;
}

.research-item-tags {
  margin: 6px 0 0;
}

.figure-compact {
  max-width: 440px;
}

.figure-medium {
  max-width: 580px;
}

.figure-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 26px 0 0;
}

.figure-row figure {
  margin: 0;
}

.figure-row img {
  height: 156px;
  padding: 8px;
  object-fit: contain;
}

.home-blog-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.home-blog-card {
  min-width: 0;
}

.home-blog-image {
  display: block;
  margin-bottom: 10px;
}

.home-blog-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.home-blog-image:hover img {
  border-color: var(--blue);
}

.home-blog-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: #f4f3ef;
  color: var(--soft-ink);
  font-size: 0.82rem;
}

.home-blog-card h3 {
  margin-bottom: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.45;
}

.home-blog-card-placeholder p {
  margin: 5px 0 0;
  color: var(--soft-ink);
  font-size: 0.82rem;
}

.blog-more {
  margin: 18px 0 0;
  color: var(--soft-ink);
  font-size: 0.95rem;
}

.media-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 280px));
  gap: 18px;
  justify-content: start;
  margin-top: 22px;
}

.media-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.media-card a:hover img {
  border-color: var(--blue);
}

.media-card-title {
  display: block;
  margin-top: 9px;
  font-weight: 600;
  font-size: 0.95rem;
}

.media-card-tag {
  margin-left: 4px;
  color: var(--soft-ink);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.media-card-desc {
  display: block;
  margin-top: 4px;
  color: var(--soft-ink);
  font-size: 0.88rem;
  line-height: 1.5;
}

.topnav a[aria-current="page"] {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.blog-masthead .topnav {
  margin-bottom: 58px;
}

.blog-lead {
  max-width: 720px;
}

.blog-index {
  border-bottom: 0;
}

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

.blog-list li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.blog-list li:first-child {
  padding-top: 0;
}

.blog-list p {
  grid-column: 2;
  margin: -4px 0 0;
  color: var(--soft-ink);
}

.blog-date {
  color: var(--soft-ink);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.blog-title {
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.blog-back {
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.blog-post-header {
  max-width: 760px;
}

.blog-source {
  color: var(--soft-ink);
  font-size: 0.95rem;
}

.blog-post {
  max-width: 760px;
  margin: 0 auto;
  padding: 42px 0 0;
}

.blog-post p,
.blog-post li {
  font-size: 1.02rem;
  line-height: 1.72;
}

.blog-post h2 {
  margin: 44px 0 14px;
  font-size: 1.55rem;
}

.blog-post h3,
.blog-post h4 {
  margin: 32px 0 12px;
  color: #30372f;
  font-size: 1.15rem;
}

.blog-post ul,
.blog-post ol {
  margin: 0 0 20px;
  padding-left: 1.3rem;
}

.blog-post li {
  margin-bottom: 8px;
}

.blog-post li p {
  margin-bottom: 0;
}

.blog-post figure {
  margin: 30px 0;
}

.blog-post figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.blog-post figure a:hover img {
  border-color: var(--blue);
}

.blog-post figcaption {
  max-width: 92%;
  margin-top: 9px;
}

.blog-callout {
  margin: 26px 0;
  padding: 16px 18px;
  background: #f6f1e6;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
}

.blog-callout p:last-child {
  margin-bottom: 0;
}

.blog-post hr {
  margin: 42px 0 28px;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 680px) {
  .page {
    width: min(100% - 28px, 900px);
    padding-top: 24px;
  }

  .topnav {
    justify-content: flex-start;
    margin-bottom: 44px;
  }

  .intro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .system {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #systems .system-figure,
  #systems .figure-compact,
  #systems .figure-medium {
    max-width: none;
  }

  .portrait {
    width: 200px;
  }

  h1 {
    font-size: 2.9rem;
  }

  section {
    padding: 34px 0;
  }

  .speaking-list > li {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .paper-list span {
    white-space: normal;
  }

  .figure-row,
  .figure-pair,
  .home-blog-list,
  .media-cards {
    grid-template-columns: 1fr;
  }

  .figure-row img {
    height: auto;
    padding: 0;
  }

  .blog-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .blog-list p {
    grid-column: 1;
  }

  .blog-post {
    padding-top: 34px;
  }
}
