* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #20242a;
  background: #f7f9fc;
  line-height: 1.55;
  font-size: 16px;
}

a {
  color: #1e5bc3;
  text-decoration: none;
  text-underline-offset: 0.16em;
}

a:hover,
a:focus {
  color: #17458f;
  text-decoration: underline;
}

.page-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.75rem 2rem 2rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.identity h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.5vw, 2.2rem);
  line-height: 1.1;
  color: #20242a;
  font-weight: 700;
}

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

.identity h1 a:hover,
.identity h1 a:focus {
  color: #1e5bc3;
  text-decoration: none;
}

.identity p {
  margin: 0.4rem 0 0;
  font-size: clamp(0.95rem, 1.4vw, 1.35rem);
  line-height: 1.2;
  color: #444;
}

.identity-title {
  white-space: nowrap;
}

.title-break {
  white-space: nowrap;
}

.top-nav {
  margin-left: auto;
  padding-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 0.25rem;
}

.top-nav a {
  text-decoration: none;
  margin-left: 1.25rem;
  padding-bottom: 0.16rem;
  border-bottom: 2px solid transparent;
  font-size: clamp(1.05rem, 1.1vw, 1.35rem);
  color: #333;
  text-transform: capitalize;
}

.top-nav a:hover,
.top-nav a:focus {
  border-bottom-color: #9db4d8;
  color: #1e5bc3;
  text-decoration: none;
}

.top-nav a.current {
  text-decoration: none;
  font-weight: 600;
  border-bottom-color: #1e5bc3;
}

.header-rule {
  margin-top: 1.8rem;
  border-bottom: 1px solid #cfd3d7;
}

.main-content {
  max-width: 940px;
  margin: 0 auto;
  padding-top: 1.6rem;
}

.main-content.centered-content {
  margin: 0 auto;
}

.home-intro {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.home-intro img {
  width: 290px;
  height: auto;
  object-fit: cover;
  display: block;
  border: 1px solid #d8e1ef;
  box-shadow: 0 10px 24px rgba(32, 36, 42, 0.08);
}

.contact-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  align-items: center;
}

.contact-list li {
  margin: 0;
}

.contact-list li:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-left: 0.75rem;
  border-radius: 50%;
  background: #9aa3ad;
  vertical-align: middle;
}

.home-copy {
  max-width: 34rem;
  padding-top: 0.1rem;
}

main h2,
main h3,
main h4 {
  margin: 0 0 0.45rem;
  line-height: 1.3;
  color: #20242a;
}

main h3,
main h4 {
  margin-top: 1rem;
}

main p,
main ul,
main ol {
  margin: 0 0 0.7rem;
}

main ul,
main ol {
  padding-left: 1.25rem;
}

footer {
  max-width: 940px;
  margin: 1.4rem auto 0;
  color: #666;
  font-size: 0.9rem;
}

.paper-list {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
}

.paper-list > .paper-item {
  list-style: none;
  padding: 0.95rem 0;
  border-top: 1px solid #dfe5ee;
}

.paper-list .paper-item:last-child {
  border-bottom: 1px solid #dfe5ee;
}

.compact-section-heading {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #dfe5ee;
}

.compact-paper-list {
  margin-top: 0.15rem;
}

.compact-paper-list > .paper-item {
  padding: 0.25rem 0 0.45rem;
  border-top: 0;
}

.compact-paper-list > .paper-item:last-child {
  border-bottom: 0;
}

.paper-title,
.paper-meta {
  margin: 0;
}

.paper-title {
  line-height: 1.4;
}

.paper-meta {
  margin-top: 0.2rem;
  color: #59616c;
  font-size: 0.94rem;
}

.paper-presentation,
.paper-press {
  margin-top: 0.25rem;
}

/* Keep conference names small, with italics limited to the metadata labels. */
.paper-presentation,
.media-label {
  font-size: 0.88rem;
}

.presentation-label,
.media-label {
  font-style: italic;
}

.coauthor-link {
  text-decoration: none;
}

.media-link {
  text-decoration: none;
}

.paper-links {
  display: inline;
  margin-left: 0.22rem;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 400;
}

.paper-links a {
  text-decoration: none;
}

.abstract-toggle {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e5bc3;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
}

.abstract-toggle:hover,
.abstract-toggle:focus {
  color: #17458f;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.abstract-toggle:focus {
  outline: 2px solid #9db4d8;
  outline-offset: 3px;
}

.bracketed-link:hover,
.bracketed-link:focus {
  text-decoration: none;
}

.bracketed-link:hover .bracketed-link-label,
.bracketed-link:focus .bracketed-link-label {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.paper-abstract {
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d8e1ef;
  border-left: 3px solid #9db4d8;
  border-radius: 4px;
  background: #f6f8fb;
  font-size: 0.92rem;
  color: #555;
}

.teaching-section {
  margin-top: 1.15rem;
}

.course-list {
  margin: 0.2rem 0 1.25rem;
}

.course-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid #e3e8ef;
}

.course-item:last-child {
  border-bottom: 0;
}

.course-title,
.course-meta {
  margin: 0;
}

.course-title {
  line-height: 1.4;
}

.course-meta {
  margin-top: 0.18rem;
  color: #59616c;
  font-size: 0.94rem;
}

.comment-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.student-comment {
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid #9db4d8;
  background: #f6f8fb;
  color: #4f5863;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .page-wrap {
    padding: 1.25rem 1rem 1.5rem;
  }

  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
  }

  .identity {
    text-align: center;
  }

  .top-nav {
    padding-top: 0;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .top-nav a {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    font-size: 1.15rem;
  }

  .header-rule {
    margin-top: 1rem;
  }

  .home-intro {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-media {
    text-align: center;
  }

  .home-intro img {
    margin: 0 auto;
  }

  .contact-list {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .identity-title {
    white-space: normal;
  }

  .title-break {
    display: block;
  }

  .home-intro img {
    width: 240px;
    height: auto;
  }
}
