@media (max-width: 1400px) {
  .projects-overview {
    grid-template-columns: minmax(260px, 0.7fr) minmax(560px, 1.3fr);
    gap: 32px;
  }

  .project-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-toolbar {
    flex-wrap: wrap;
  }

  .projects-toolbar-spacer {
    display: none;
  }

  .works-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .projects-overview {
    grid-template-columns: 1fr;
  }

  .projects-toolbar {
    align-items: stretch;
  }

  .projects-search {
    flex: 1 1 320px;
  }

  .projects-filter-tabs {
    order: 3;
    width: 100%;
  }

  .projects-filter-tab {
    flex: 1 1 auto;
  }
}

@media (max-width: 980px) {
  .works-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .works-shell {
    padding-top: 18px;
  }

  .works-page-card {
    position: relative;
    min-height: auto;
  }

  .projects-overview {
    display: block;
  }

  .projects-heading .page-title {
    padding-right: 104px;
    font-size: 31px;
  }

  .projects-heading .page-note,
  .project-stats {
    display: none;
  }

  .projects-search {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex-basis: auto;
  }

  .projects-toolbar {
    width: 100%;
    min-width: 0;
    margin-top: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 10px;
  }

  .projects-toolbar > * {
    min-width: 0;
    max-width: 100%;
  }

  .projects-search input {
    width: 0;
  }

  .projects-search {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .projects-filter-tabs {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }

  .projects-sort {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    width: 48px;
    padding: 0;
    display: grid;
    place-items: center;
  }

  .projects-sort > span:first-child,
  .projects-sort-direction,
  .projects-sort-field > svg {
    display: none;
  }

  .projects-sort .projects-sort-field {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    flex: none;
  }

  .projects-sort .projects-sort-field::before {
    content: "\21C5";
    color: var(--theme-text-muted);
    font-size: 21px;
    line-height: 1;
  }

  .projects-sort select {
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    opacity: 0;
  }

  .projects-new {
    position: absolute;
    top: 0;
    right: 0;
    width: 92px;
    min-width: 0;
    height: 40px;
    padding-inline: 12px;
    gap: 6px;
  }

  .projects-new span:last-child {
    font-size: 0;
  }

  .projects-new span:last-child::after {
    content: "New";
    font-size: 13px;
  }

  .projects-filter-tab {
    width: auto;
    min-width: 0;
    justify-content: center;
    padding-inline: 4px;
    font-size: 11px;
  }

  .works-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .work-card {
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }

  .work-card-main {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 0;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 13px;
    padding: 13px;
  }

  .work-card-thumbnail {
    width: 96px;
    min-height: 112px;
  }

  .work-card-title {
    -webkit-line-clamp: 2;
    margin-top: 0;
  }

  .work-card-dates {
    margin-top: 8px;
  }

  .work-card-dates p:first-child {
    display: none;
  }

  .work-card-dates p:last-child {
    font-size: 12px;
  }

  .work-card-footer {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 52px;
    padding: 8px 10px 8px 13px;
  }

  .work-card-footer-meta {
    flex: 1 1 auto;
    overflow: hidden;
  }

  .work-card-footer-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .work-card-actions {
    flex: 0 0 auto;
    gap: 5px;
  }

  .work-open-button {
    padding-inline: 11px;
  }

  .work-card-more,
  .work-open-button {
    min-height: 44px;
  }

  .projects-pagination {
    padding-bottom: 38px;
  }

  .projects-pagination p {
    left: 0;
    right: 0;
    bottom: 4px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .projects-filter-tab {
    padding-inline: 3px;
  }
}

@media (max-width: 420px) {
  .projects-filter-tab {
    padding-inline: 2px;
  }

  .work-card-footer-meta {
    gap: 8px;
  }
}
