.container {
  margin: 2rem 0;
  padding-top: 0.25rem;
}

.filters {
  position: sticky;
  top: calc(var(--ifm-navbar-height, 3.5rem) + 0.5rem);
  z-index: 10;
  margin-bottom: 2rem;
  padding: 0.9rem 1.1rem;
  border-radius: 0.75rem;
  background: var(--ifm-background-surface-color);
  border: 1px solid var(--ifm-color-emphasis-200);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.filterHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.filterTitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ifm-color-emphasis-800);
}

.filterReset {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: var(--ifm-color-emphasis-500);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.filterReset:hover {
  background: var(--ifm-color-emphasis-200);
  color: var(--ifm-color-emphasis-900);
}

.filterGroup {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.filterLabel {
  flex: 0 0 70px;
  font-size: 0.8rem;
  color: var(--ifm-color-emphasis-600);
  padding-top: 0.35rem;
}

.filterTags {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filterTag {
  border-radius: 999px;
  border: 1px solid var(--ifm-color-emphasis-300);
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  background: rgba(148, 163, 184, 0.08);
  color: var(--ifm-font-color-base);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}

.filterTag:hover {
  border-color: var(--ifm-color-primary);
  color: var(--ifm-color-primary);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-0.5px);
}

.filterTagActive {
  border-color: var(--ifm-color-primary);
  background: rgba(37, 99, 235, 0.16);
  color: var(--ifm-color-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.18);
}

html[data-theme='dark'] .filters {
  background: var(--ifm-background-surface-color);
  border-color: var(--ifm-color-emphasis-300);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme='dark'] .filterTitle {
  color: #e5e7eb;
}

html[data-theme='dark'] .filterLabel {
  color: #9ca3af;
}

html[data-theme='dark'] .filterReset {
  color: #9ca3af;
}

html[data-theme='dark'] .filterReset:hover {
  background: rgba(55, 65, 81, 0.85);
  color: #f9fafb;
}

html[data-theme='dark'] .filterTag {
  border-color: var(--ifm-color-emphasis-300);
  background: var(--ifm-color-emphasis-200);
  color: #e5e7eb;
}

html[data-theme='dark'] .filterTag:hover {
  border-color: var(--ifm-color-primary);
  color: var(--ifm-color-primary);
  background: rgba(37, 99, 235, 0.2);
}

html[data-theme='dark'] .filterTagActive {
  border-color: var(--ifm-color-primary);
  background: rgba(37, 99, 235, 0.35);
  color: #e5e7eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.4);
}

.category {
  margin-bottom: 2.5rem;
}

.category:first-of-type {
  margin-top: 1.25rem;
}

.category:last-child {
  margin-bottom: 0;
}

.categoryTitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ifm-heading-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ifm-color-emphasis-200);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.videoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.videoCard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: var(--ifm-background-surface-color);
  overflow: hidden;
}

.videoCard:hover {
  border-color: var(--ifm-color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  transform: translateY(-2px);
}

.thumbnailWrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: var(--ifm-color-emphasis-100);
  overflow: hidden;
}

.thumbnail {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.videoCard:hover .thumbnail {
  transform: scale(1.05);
}

.playIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  transition: all 0.3s ease;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding-left: 3px; /* Adjust play icon position */
}

.videoCard:hover .playIcon {
  background: rgba(0, 0, 0, 0.85);
  transform: translate(-50%, -50%) scale(1.15);
  border-color: rgba(255, 255, 255, 0.5);
}

.videoContent {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.videoTitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ifm-font-color-base);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.videoDescription {
  font-size: 0.9rem;
  color: var(--ifm-color-emphasis-600);
  line-height: 1.6;
}

.videoListItem {
  display: block;
  padding: 0.75rem 0;
  text-decoration: none;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.videoListItem:last-child {
  border-bottom: none;
}

.videoListTitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ifm-font-color-base);
  line-height: 1.6;
}

.videoListDescription {
  margin-top: 0.15rem;
  font-size: 0.9rem;
  color: var(--ifm-color-emphasis-600);
  line-height: 1.6;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: var(--ifm-background-surface-color);
}

.card:hover {
  border-color: var(--ifm-color-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  transform: translateY(-2px);
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.icon {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ifm-font-color-base);
  line-height: 1.6;
  flex: 1;
}

.description {
  font-size: 0.9rem;
  color: var(--ifm-color-emphasis-600);
  line-height: 1.6;
  flex: 1;
}

.articleList {
  display: block;
}

.articleItem {
  padding: 0.85rem 0;
}

.articleLink {
  text-decoration: none;
}

.articleLink:hover {
  text-decoration: none;
}

.articleTitle {
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--ifm-color-emphasis-900);
  line-height: 1.6;
}

.articleDescription {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  color: var(--ifm-color-emphasis-600);
  line-height: 1.6;
}

.articleDivider {
  margin-top: 0.85rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.projectList {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.projectCard {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--ifm-color-emphasis-200);
  background: var(--ifm-background-surface-color);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    transform 0.1s ease;
}

.projectCard:hover {
  text-decoration: none;
}

.projectCard:hover {
  border-color: var(--ifm-color-primary);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.18);
  transform: translateY(-1px);
}

.projectHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.projectName {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ifm-color-primary);
}

.projectDescription {
  font-size: 0.9rem;
  color: var(--ifm-color-emphasis-700);
  line-height: 1.5;
}

.projectMeta {
  margin-top: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.projectMetaItem {
  font-size: 0.78rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--ifm-color-emphasis-300);
  color: var(--ifm-color-emphasis-700);
  background: rgba(148, 163, 184, 0.12);
}

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

  .videoGrid {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 0.875rem;
  }

  .videoContent {
    padding: 0.875rem;
  }
  
  .title {
    font-size: 0.875rem;
  }

  .videoTitle {
    font-size: 0.875rem;
  }
  
  .description {
    font-size: 0.75rem;
  }

  .videoDescription {
    font-size: 0.75rem;
  }
}

