.home-page {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

.nca-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.home-page .main,
.home-page .footer {
  position: relative;
  z-index: 1;
}

.home-page .footer {
  color: var(--primary);
  background: transparent;
  text-shadow:
    0 0 3px var(--code-bg),
    0 0 6px var(--code-bg),
    0 0 9px var(--code-bg);
}

.home-page .footer a {
  color: inherit;
}

.profile .profile_inner > span {
  max-width: 672px;
}

.profile-role {
  color: var(--secondary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.35;
}

.social-icons a img {
  display: block;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 0;
  filter: grayscale(1);
  object-fit: contain;
  transform: none;
}

.footer span:last-child {
  white-space: normal;
}

.logo img {
  width: 18px;
  height: 18px;
  margin-inline-end: 8px;
  border-radius: 50%;
  object-fit: cover;
}

.header .nav {
  flex-wrap: nowrap;
  justify-content: flex-start;
}

.header .logo {
  flex: 0 0 auto;
}

.header #menu {
  flex: 0 1 auto;
  min-width: 0;
  margin-inline-start: 0;
}

#menu a.active {
  border-bottom: 2px solid var(--darkcolor);
}

.main.publications-main {
  max-width: 1120px;
}

.publication {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  align-items: start;
  gap: 40px;
  margin-top: 30px;
}

.publication + .publication {
  margin-top: 64px;
}

.publication-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--tertiary);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px rgb(0 0 0 / 14%);
}

.publication-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.publication-details h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.3;
}

.publication-authors,
.publication-venue {
  margin: 0 0 6px;
  font-size: 1.08rem;
  line-height: 1.5;
}

.publication-me {
  border-bottom: 1px solid currentColor;
}

.publication-venue cite {
  font-style: italic;
}

.publication-venue a {
  border-bottom: 1px solid currentColor;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.publication-links a {
  min-width: 88px;
  padding: 7px 16px;
  border: 1px solid var(--primary);
  border-radius: 3px;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
}

.publication-links a:hover,
.publication-links a:focus-visible {
  color: var(--theme);
  background: var(--primary);
}

.main.blog-main {
  max-width: 820px;
}

.blog-year {
  margin-top: 32px;
}

.blog-year > h2 {
  margin-bottom: 26px;
  font-size: 1.55rem;
  font-weight: 600;
}

.blog-entry {
  margin-bottom: 46px;
}

.blog-entry h3 {
  margin-bottom: 8px;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.3;
}

.blog-entry h3 a {
  border-bottom: 1px solid currentColor;
}

.blog-entry h3 a:hover,
.blog-entry h3 a:focus-visible {
  border-bottom-width: 2px;
}

.blog-read-time,
.blog-published {
  color: var(--secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

.blog-published {
  margin-top: 4px;
}

.blog-excerpt {
  margin-top: 14px;
  line-height: 1.6;
}

.blog-post-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: -8px;
  color: var(--secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.main.research-post-main {
  max-width: 920px;
}

.research-post-main .post-description {
  max-width: 720px;
  color: var(--secondary);
  font-size: 1.05rem;
  line-height: 1.5;
}

.research-post-main .blog-post-meta {
  margin-top: 14px;
}

.blog-figure {
  margin-top: 36px;
  margin-bottom: 36px !important;
}

.blog-figure a {
  display: block;
  box-shadow: none;
}

.blog-figure img {
  width: 100%;
  height: auto;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.post-content .blog-figure > figcaption {
  margin-top: 10px;
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
}

.post-content .blog-figure figcaption code {
  padding: 2px 4px;
}

.back-to-blog {
  margin-top: 40px;
}

.post-discussion {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--tertiary);
}

.post-discussion h2 {
  margin-bottom: 16px;
  font-size: 1.3rem;
  font-weight: 600;
}

.post-discussion .giscus,
.post-discussion .giscus-frame {
  width: 100%;
}

.main.cv-main {
  max-width: 960px;
}

.cv-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 0 32px;
  border-bottom: 1px solid var(--tertiary);
}

.cv-intro h2 {
  margin-bottom: 5px;
  font-size: 1.75rem;
  font-weight: 600;
}

.cv-intro p {
  color: var(--secondary);
  font-size: 1rem;
}

.cv-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 18px;
  font-size: 0.88rem;
  font-style: normal;
}

.cv-contact a {
  border-bottom: 1px solid currentColor;
}

.cv-section {
  margin-top: 42px;
}

.cv-section > h2 {
  margin-bottom: 18px;
  font-size: 1.5rem;
  font-weight: 600;
}

.cv-list {
  display: grid;
  gap: 18px;
}

.cv-entry {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--tertiary);
  border-radius: 6px;
  background: var(--theme);
}

.cv-company-logo {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  background: #fff;
  object-fit: cover;
}

.cv-company-logo-bronfman {
  object-position: left center;
}

.cv-entry-body {
  min-width: 0;
}

.cv-entry-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 32px;
}

.cv-entry h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
}

.cv-organization {
  font-size: 0.96rem;
  line-height: 1.45;
}

.cv-entry-meta {
  display: flex;
  flex-direction: column;
  color: var(--secondary);
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: right;
}

.cv-entry-description {
  max-width: 780px;
  margin-top: 18px;
  color: var(--content);
  font-size: 0.94rem;
  line-height: 1.62;
}

.cv-education-details {
  margin-top: 16px;
  color: var(--content);
  font-size: 0.94rem;
  line-height: 1.62;
}

.cv-education-details p + p {
  margin-top: 8px;
}

@media screen and (max-width: 700px) {
  .header #menu li + li {
    margin-inline-start: 8px;
  }

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

  .publication-image {
    max-width: 360px;
  }

  .publication-details h2 {
    font-size: 1.3rem;
  }

  .blog-year {
    margin-top: 26px;
  }

  .blog-entry h3 {
    font-size: 1.3rem;
  }

  .research-post-main .post-title {
    font-size: 2rem;
  }

  .blog-figure {
    margin-top: 28px;
    margin-bottom: 30px !important;
  }

  .blog-figure a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .blog-figure img {
    width: 700px;
    max-width: none;
  }

  .cv-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding-top: 24px;
  }

  .cv-contact {
    justify-content: flex-start;
  }

  .cv-section {
    margin-top: 34px;
  }

  .cv-entry {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 20px;
  }

  .cv-company-logo {
    width: 44px;
    height: 44px;
  }

  .cv-entry-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .cv-entry-meta {
    text-align: left;
  }
}
