:root {
  --featured-light: #fff068; 
  --featured-dark: #190066; 
  --featured-accent: #61dfff; 
  --black-light: #f8f9fa;
  --black-mid: #2b2b2b;
  --gray-dark: #212529;
}

[data-theme="dark"] {
  --card-text: #fff;
  --category-hover: var(--black-light);
  --category-card-background: var(--black-mid);
  
  /* normal cards */
  --card-shadow: 0 6px 20px rgb(255 255 255 / 8%), 0 3px 6px rgb(255 255 255 / 4%);
  
  /* featured */
  --featured-card-bg: var(--featured-dark);
  --featured-card-content: #fff;
  --featured-card-content-hover: #fff;
  --featured-card-border: var(--featured-accent);
  --featured-card-hover: #2a0a66;
  --featured-card-shadow: 0 8px 24px rgb(255 255 255 / 10%), 0 4px 8px rgb(255 255 255 / 5%), 0 2px 4px rgb(97 223 255 / 20%);
}

[data-theme="light"] {
  --card-text: #0a0a0a;
  --category-hover: var(--gray-dark);
  --category-card-background: var(--black-light);

  /* normal cards */
  --card-shadow: 0 6px 20px rgb(0 0 0 / 10%), 0 3px 6px rgb(0 0 0 / 6%);

  /* featured */
  --featured-card-bg: var(--featured-light);
  --featured-card-content: var(--featured-dark);
  --featured-card-content-hover: var(--featured-dark);
  --featured-card-border: var(--featured-accent);
  --featured-card-hover: #fff5a0;
  --featured-card-shadow: 0 8px 24px rgb(0 0 0 / 12%), 0 4px 8px rgb(0 0 0 / 8%);
}

.cardContainer {
  --ifm-link-color: var(--ifm-color-emphasis-800);
  --ifm-link-hover-color: var(--ifm-color-emphasis-700);
  --ifm-link-hover-decoration: none;

  border-radius: calc(var(--ifm-global-radius) * 2);
  transition: all 0.2s ease-in-out;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  min-height: auto;
  position: relative;
}

.cardContainer:hover {
  box-shadow: var(--card-shadow);
  transform: translateY(-2px);
}

.cardContainer *:last-child {
  margin-bottom: 0;
}

.cardTitle {
  color: var(--ifm-color-emphasis-800);
  font-size: 1.2rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.cardDescription {
  color: var(--ifm-color-emphasis-600);
  font-size: 0.9rem;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  max-height: 3em;
}

.categoryCard {
  background-color: var(--category-card-background);
  color: #fff;
  gap: 16px;
  transition:
    background-color 0.2s ease-in-out,
    color 0.2s ease-in-out;
}

.categoryCard:hover {
  text-decoration: none !important;
  background-color: var(--category-hover);
}

.categoryCard .cardTitle {
  color: #fff;
}

.linkCard {
  background-color: var(--category-card-background);
  color: var(--title-text);
  transition:
    box-shadow 0.2s ease-in-out,
    color 0.2s ease-in-out;
}

.linkCard:hover {
  background-color: var(--category-card-background-hover);
  color: var(--category-title-text);
  border: 1px solid var(--category-title-text);
  box-shadow: 0 0 6px 5px rgb(0 0 0 / 2%);
}

.sectionTitle {
  width: 100%;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  clear: both;
}

.featuredCard {
  background-color: var(--featured-card-bg);
  color: var(--card-text);
  border: 2px solid transparent;
  min-height: auto;
  gap: 16px;
  transition:
    background-color 0.2s ease-in-out,
    color 0.2s ease-in-out,
    border 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out,
    transform 0.2s ease-in-out;
}

.featuredCard:hover {
  background-color: var(--featured-card-hover);
  color: var(--featured-card-content-hover);
  text-decoration: none !important;
  box-shadow: var(--featured-card-shadow);
  transform: translateY(-2px);
  border: 2px solid var(--featured-card-border);
}

.featuredCardArticle {
  order: -1;
}

.featuredCardTitle {
  color: var(--featured-card-content);
  font-size: 1.2rem;
  font-weight: 600;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.featuredCard:hover .featuredCardTitle {
  color: var(--featured-card-content-hover) !important;
}

.featuredCardDescription {
  color: var(--featured-card-content);
  font-size: 0.9rem;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  max-height: 3em;
}

