:root {
  --hp-card-border: rgba(255, 255, 255, 0.3);
  --hp-card-border-strong: rgba(255, 255, 255, 0.52);
  --hp-card-shadow:
    0 18px 38px rgba(137, 153, 177, 0.075),
    0 6px 14px rgba(137, 153, 177, 0.05);
  --hp-card-shadow-hover:
    0 22px 46px rgba(137, 153, 177, 0.1),
    0 8px 18px rgba(137, 153, 177, 0.065);
  --hp-card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.018) 42%, rgba(255, 255, 255, 0.05) 100%);
  --hp-card-surface: rgba(255, 255, 255, 0.008);
  --hp-card-title: #30415c;
  --hp-card-text: #6a7a92;
  --hp-card-meta: #7a8ba2;
  --hp-card-overlay-opacity: 0.34;
  --hp-card-frame-opacity: 0.5;
}

[data-theme="dark"] {
  --hp-card-border: rgba(255, 255, 255, 0.2);
  --hp-card-border-strong: rgba(255, 255, 255, 0.34);
  --hp-card-shadow:
    0 18px 42px rgba(2, 6, 23, 0.3),
    0 6px 14px rgba(2, 6, 23, 0.22);
  --hp-card-shadow-hover:
    0 24px 52px rgba(2, 6, 23, 0.36),
    0 10px 18px rgba(2, 6, 23, 0.28);
  --hp-card-bg:
    linear-gradient(180deg, rgba(40, 48, 62, 0.12) 0%, rgba(26, 34, 48, 0.04) 42%, rgba(19, 26, 40, 0.08) 100%);
  --hp-card-surface: rgba(17, 24, 39, 0.015);
  --hp-card-title: #e7eefb;
  --hp-card-text: #afbdd4;
  --hp-card-meta: #94a7c3;
  --hp-card-overlay-opacity: 0.18;
  --hp-card-frame-opacity: 0.28;
}

#recent-posts {
  position: relative;
  isolation: isolate;
}

#recent-posts::before {
  display: none;
}

#recent-posts .recent-post-items {
  position: relative;
  isolation: isolate;
  z-index: 1;
}

#recent-posts .recent-post-items::before {
  display: none;
}

#recent-posts .recent-post-items::after {
  display: none;
}

#recent-posts .recent-post-item {
  display: block !important;
  position: relative;
  z-index: 1;
  overflow: hidden;
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 16px !important;
  border: 1px solid var(--hp-card-border) !important;
  border-radius: 28px !important;
  background: var(--hp-card-bg) !important;
  background-color: var(--hp-card-surface) !important;
  box-shadow:
    var(--hp-card-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    inset 10px 0 18px rgba(255, 255, 255, 0.03),
    inset -8px 0 14px rgba(255, 255, 255, 0.015) !important;
  -webkit-backdrop-filter: blur(42px) saturate(150%) brightness(1.03) !important;
  backdrop-filter: blur(42px) saturate(150%) brightness(1.03) !important;
  transform: translateY(0);
  will-change: transform;
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.24s ease,
    border-color 0.24s ease;
}

#recent-posts .recent-post-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.7), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.05) 18%, rgba(255, 255, 255, 0.01) 44%, rgba(255, 255, 255, 0) 100%),
    linear-gradient(112deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 24%, rgba(255, 255, 255, 0) 56%),
    radial-gradient(circle at 88% 100%, rgba(255, 255, 255, 0.06), transparent 26%);
  opacity: var(--hp-card-overlay-opacity);
  transition: opacity 0.24s ease;
}

#recent-posts .recent-post-item::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.28) 18%, rgba(255, 255, 255, 0.04) 66%, rgba(255, 255, 255, 0.18) 100%);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: var(--hp-card-frame-opacity);
  pointer-events: none;
  transition: opacity 0.24s ease;
}

#recent-posts .recent-post-item:hover {
  transform: translateY(-3px) !important;
  box-shadow:
    var(--hp-card-shadow-hover),
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px 0 rgba(255, 255, 255, 0.14),
    inset 10px 0 18px rgba(255, 255, 255, 0.05),
    inset -8px 0 14px rgba(255, 255, 255, 0.02) !important;
  border-color: var(--hp-card-border-strong) !important;
}

#recent-posts .recent-post-item:hover::before,
#recent-posts .recent-post-item:hover::after {
  opacity: 1;
}

#recent-posts .recent-post-item .post_cover,
#recent-posts .recent-post-item .post-bg,
#recent-posts .recent-post-item .post-bg::before,
#recent-posts .recent-post-item .post-bg::after {
  display: none !important;
}

#recent-posts .recent-post-item > .recent-post-info,
#recent-posts .recent-post-item > .recent-post-info.no-cover,
#recent-posts .recent-post-item.no-cover > .recent-post-info {
  position: relative;
  z-index: 1;
  width: 100% !important;
  padding: 18px 22px 16px !important;
}

#recent-posts .recent-post-item > .recent-post-info > .article-title {
  display: block;
  margin: 0 !important;
  padding-right: 0 !important;
  color: var(--hp-card-title) !important;
  font-size: clamp(1.28rem, 1.72vw, 1.66rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  line-height: 1.34 !important;
}

#recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin: 0.46rem 0 0.48rem !important;
  color: var(--hp-card-meta);
}

#recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap > span {
  display: inline-flex;
  align-items: center;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--hp-card-meta);
  font-size: 0.82rem !important;
  line-height: 1.4;
}

#recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap .article-meta-separator {
  display: none;
}

#recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap i {
  margin-right: 6px;
}

#recent-posts .recent-post-item .article-meta-link,
#recent-posts .recent-post-item .article-meta__categories,
#recent-posts .recent-post-item .article-meta__tags {
  color: var(--hp-card-meta);
}

#recent-posts .recent-post-item > .recent-post-info > .content {
  margin: 0 !important;
  color: var(--hp-card-text) !important;
  font-size: 0.94rem !important;
  line-height: 1.62 !important;
  -webkit-line-clamp: 2 !important;
}

@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  #recent-posts .recent-post-item {
    background: rgba(255, 255, 255, 0.08) !important;
  }

  [data-theme="dark"] #recent-posts .recent-post-item {
    background: rgba(24, 32, 46, 0.08) !important;
  }
}

@media (max-width: 768px) {
  #recent-posts .recent-post-item {
    border-radius: 22px !important;
    box-shadow:
      0 12px 26px rgba(15, 23, 42, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    will-change: auto;
  }

  #recent-posts .recent-post-item > .recent-post-info,
  #recent-posts .recent-post-item > .recent-post-info.no-cover,
  #recent-posts .recent-post-item.no-cover > .recent-post-info {
    padding: 16px 16px 14px !important;
  }

  #recent-posts .recent-post-item > .recent-post-info > .article-title {
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    line-height: 1.34 !important;
  }

  #recent-posts .recent-post-item > .recent-post-info > .article-meta-wrap > span {
    font-size: 0.76rem !important;
  }

  #recent-posts .recent-post-item > .recent-post-info > .content {
    font-size: 0.89rem !important;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  #recent-posts .recent-post-item {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow:
      0 12px 24px rgba(15, 23, 42, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.68) !important;
    will-change: auto;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
  }

  #recent-posts .recent-post-item::before,
  #recent-posts .recent-post-item::after {
    opacity: 0.7;
  }

  #recent-posts .recent-post-item:hover {
    transform: none !important;
  }
}
