.project-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: .8rem;
  background: var(--card-bg, var(--main-bg));
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
  border-color: var(--link-color);
  transform: translateY(-2px);
  box-shadow: 0 .45rem 1.1rem rgba(0, 0, 0, .12);
}

.project-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.project-card-link:hover {
  color: inherit;
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.project-card-media {
  display: block;
}

.project-card-image-stack {
  display: grid;
  grid-template-rows: 63% 37%;
  width: 100%;
  aspect-ratio: 16 / 8.75;
  overflow: hidden;
  background: #fff;
}

.project-card-image-stack .project-card-image {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}

.project-card-image-stack .project-card-image--primary {
  border-bottom: 1px solid rgba(128, 128, 128, .2);
}

.project-card-image-stack .project-card-image--zoom {
  background-size: auto 100%;
}

.project-card-image-stack .project-card-image--secondary {
  background-color: #fff;
  background-size: auto 140%;
}

.project-card-image-stack--secure-semantic-communications-via-steganography {
  grid-template-rows: 1fr 1fr;
}

.project-card-image-stack--secure-semantic-communications-via-steganography .project-card-image--primary {
  background-size: auto 100%;
}

.project-card-image-stack--secure-semantic-communications-via-steganography .project-card-image--secondary {
  background-size: auto 165%;
}

.project-card-image-stack--python-mimo-ofdm-prototyping {
  grid-template-rows: 55% 45%;
}

.project-card-image-stack--python-mimo-ofdm-prototyping .project-card-image--primary {
  background-size: auto 85%;
}

.project-card-image-stack--python-mimo-ofdm-prototyping .project-card-image--secondary {
  background-size: auto 175%;
}

.project-card-image,
.project-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 0;
}

.project-card-image {
  display: block;
  border: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.project-card-image--contain {
  background: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.project-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  color: var(--text-muted);
  background: rgba(128, 128, 128, .08);
  font-size: .78rem;
}

.project-card-placeholder i {
  font-size: 1.4rem;
  opacity: .65;
}

.project-card-body {
  padding: 1rem;
}

.project-card-year {
  display: block;
  margin-bottom: .25rem;
  color: var(--text-muted);
  font-size: .82rem;
  font-weight: 600;
}

.project-card-title {
  display: block;
  margin-bottom: .4rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

.project-card-description {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
}

.project-card-links {
  margin-top: .65rem;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .55rem;
}

.resource-links a,
.resource-links button {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .36rem .76rem;
  border: 1px solid color-mix(in srgb, var(--link-color) 45%, var(--border-color));
  border-radius: .55rem;
  color: var(--link-color);
  background: rgba(128, 128, 128, .08);
  background: color-mix(in srgb, var(--link-color) 9%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  font-size: .75rem;
  font-style: normal;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: filter 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.resource-links a:hover,
.resource-links button:hover,
.resource-links button[aria-expanded="true"] {
  color: var(--link-color);
  background: color-mix(in srgb, var(--link-color) 15%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 3px 7px rgba(0, 0, 0, .12);
}

.resource-links a[target="_blank"]::after {
  margin-left: .28rem;
  font-size: .82em;
  font-weight: 700;
  line-height: 1;
  content: "↗";
}

.projects-more {
  margin: 1rem 0 0;
  text-align: right;
}

.projects-more a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  font-size: .82rem;
  text-decoration: none;
}

.sidebar-site-nav {
  margin: .75rem 0 0;
  padding-top: .5rem;
}

.sidebar-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: space-between;
  width: calc(100% - 3rem);
  margin: 1rem 1.5rem 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

#sidebar .sidebar-social-links .nav-item {
  width: auto;
  padding: 0;
  margin: 0;
}

#sidebar .sidebar-social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
}

#sidebar .sidebar-social-button:hover {
  border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .08);
}

#sidebar .sidebar-social-button i {
  margin: 0 !important;
}

#sidebar .profile-wrapper {
  margin-top: 2rem;
  margin-bottom: .5rem;
}

#sidebar .profile-wrapper .site-title {
  margin-top: 0;
}

#projects {
  margin-top: 1.25rem;
}

.publication-list {
  margin-top: 1rem;
}

.publication-item + .publication-item {
  margin-top: .75rem;
}

.publication-bib-copy {
  width: fit-content;
  min-height: 2rem;
  padding: .36rem .76rem;
  border: 1px solid color-mix(in srgb, var(--link-color) 45%, var(--border-color));
  border-radius: .55rem;
  color: var(--link-color);
  background: color-mix(in srgb, var(--link-color) 9%, transparent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
}

.publication-bib-content {
  position: relative;
  margin-top: .5rem;
}

.publication-bib-content[hidden] {
  display: none;
}

.publication-group-title {
  margin: 1.75rem 0 .75rem;
  color: var(--heading-color);
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: .01em;
}

.publication-group-title + .publication-list {
  margin-top: 0;
}

.mobile-profile-links {
  grid-column: 1 / -1;
  margin-top: -.25rem;
}

.publication-bib-copy {
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 1;
}

.publication-bib-content pre {
  margin: 0;
  padding: 1rem 4.5rem 1rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: .65rem;
  background: rgba(128, 128, 128, .08);
  font-size: .76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#panel-wrapper > .access {
  display: none;
}

.custom-panel-content {
  position: sticky;
  top: 5rem;
  padding-left: .35rem;
}

.custom-panel-content ul {
  margin: .5rem 0 0;
  padding: 0;
  list-style: none;
}

.custom-panel-content li + li {
  margin-top: .5rem;
}

.custom-panel-content a {
  display: block;
  color: var(--text-muted);
  font-size: .8rem;
  line-height: 1.4;
  text-decoration: none;
}

.custom-panel-content a:hover {
  color: var(--link-color);
}

#panel-wrapper:not(:has(.custom-panel-content)) {
  display: none;
}

@media (min-width: 1200px) {
  #main-wrapper .row:has(> #panel-wrapper:not(:has(.custom-panel-content))) > main {
    width: 100%;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {
  #panel-wrapper:has(.custom-panel-content) {
    display: none;
  }

  #main-wrapper .row:has(> #panel-wrapper) > main {
    width: 100%;
  }
}

@media (min-width: 850px) {
  .home-topbar-name {
    display: none;
  }
}

.project-detail {
  max-width: 780px;
}

.project-detail-media {
  overflow: hidden;
  margin-bottom: .5rem;
  border: 1px solid var(--border-color);
  border-radius: .9rem;
}

.project-detail-media img,
.project-detail-media .project-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  object-fit: cover;
}

.project-detail-media .project-detail-image--contain {
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  padding: .15rem;
  background: #fff;
}

.project-detail-year,
.project-detail-coming-soon {
  color: var(--text-muted);
}

.project-detail h1 {
  margin-top: .3rem;
  line-height: 1.25;
}

.project-detail-description {
  margin: .65rem 0 1.6rem;
  padding-left: .75rem;
  border-left: 2px solid var(--link-color);
  color: var(--heading-color);
  font-family: inherit;
  font-size: 1.167rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .005em;
}

.project-detail h2,
.project-detail h3 {
  margin: 2.15rem 0 .8rem;
  padding: .55rem .75rem;
  border-left: 4px solid var(--link-color);
  border-radius: 0 .45rem .45rem 0;
  color: var(--heading-color);
  background: rgba(128, 128, 128, .11);
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: .015em;
}

.project-detail h2 + p,
.project-detail h3 + p {
  margin-top: 0;
}

.project-gallery-image {
  margin: 1.75rem 0;
}

@media (min-width: 769px) {
  .project-gallery-image--compact {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }
}

.project-equation {
  display: grid;
  gap: .35rem;
  margin: .9rem 0;
  padding: .8rem 1rem;
  border-left: 3px solid color-mix(in srgb, var(--link-color) 65%, var(--border-color));
  border-radius: 0 .55rem .55rem 0;
  background: rgba(128, 128, 128, .08);
  font-family: Georgia, "Times New Roman", serif;
  font-size: .96rem;
  line-height: 1.55;
  overflow-x: auto;
}

.project-equation span {
  white-space: nowrap;
}

.project-gallery-image img {
  display: block;
  width: 100%;
  margin: 0;
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  background: #fff;
}

.project-gallery-image figcaption {
  margin-top: .55rem;
  color: var(--text-muted);
  font-size: .82rem;
  text-align: center;
}

.demonstration-detail {
  max-width: 780px;
}

.award-detail {
  max-width: 780px;
}

.award-detail h1 {
  margin: 0;
  line-height: 1.2;
}

.award-meta {
  margin: .65rem 0 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.award-links {
  margin-top: 1rem;
}

.award-photo {
  display: block;
  width: min(100%, 620px);
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
  border-radius: .8rem;
}

.demonstration-detail h1 {
  margin: 0;
  line-height: 1.2;
}

.demonstration-meta {
  margin: .65rem 0 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.demonstration-links {
  margin: 1rem 0 1.25rem;
}

.demonstration-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  align-items: start;
}

.demonstration-photo-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  object-fit: cover;
  border: 1px solid var(--border-color);
  border-radius: .8rem;
}

.demonstration-photo-grid img.demonstration-photo--document {
  object-fit: contain;
  background: #fff;
}

@media (max-width: 768px) {
  .demonstration-photo-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .demonstration-photo-grid img {
    height: auto;
    aspect-ratio: auto;
    object-fit: contain;
  }

  .project-card-image-stack {
    grid-template-rows: 1fr 1fr;
  }

  .project-card-image-stack--multimodal-semantic-communication-for-physical-ai .project-card-image--zoom {
    background-size: auto 100%;
  }

  .project-card-image-stack--multimodal-semantic-communication-for-physical-ai .project-card-image--secondary {
    background-size: 210%;
  }

  .project-card-image-stack--secure-semantic-communications-via-steganography .project-card-image--primary {
    background-size: auto 88%;
  }

  .project-card-image-stack--secure-semantic-communications-via-steganography .project-card-image--secondary {
    background-size: auto 120%;
  }

  .project-card-image-stack--python-mimo-ofdm-prototyping {
    grid-template-rows: 1fr 1fr;
  }

  .project-card-image-stack--python-mimo-ofdm-prototyping .project-card-image--primary {
    background-size: auto 82%;
  }

  .project-card-image-stack--python-mimo-ofdm-prototyping .project-card-image--secondary {
    background-size: auto 140%;
  }

  .project-card-image-stack--semantic-communication-functional-interpretation .project-card-image--primary {
    background-size: auto 78%;
  }

  .project-card-image-stack--semantic-communication-functional-interpretation .project-card-image--secondary {
    background-size: auto 92%;
  }

  .project-card-link[href*="semantic-communication-symbol-distribution-analysis"] .project-card-image {
    background-size: 145%;
  }

  .project-card-link[href*="ekg-meets-ai"] .project-card-image {
    background-size: 155%;
  }

  .project-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: .8rem;
  }

  .project-card {
    min-height: 116px;
  }

  .project-card-link {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .project-card-image,
  .project-card-placeholder,
  .project-card-image-stack {
    height: 100%;
    min-height: 116px;
    aspect-ratio: auto;
  }

  .project-card-image-stack .project-card-image {
    height: auto;
    min-height: 0;
  }

  .project-card-placeholder {
    padding: .5rem;
    text-align: center;
  }

  .project-card-body {
    align-self: center;
    padding: .7rem .8rem;
  }

  .project-card-title {
    font-size: .98rem;
  }

  .project-card-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: .84rem;
    line-height: 1.45;
  }
}
