.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: var(--small);
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-link.active,
.nav-link:hover {
  color: var(--text-main);
  border-color: #dfcdee;
  background: linear-gradient(120deg, #fff, #fff4fb);
  box-shadow: 0 8px 18px rgba(144, 103, 199, 0.12);
}

.search-container {
  position: relative;
  width: min(290px, 100%);
}

.search-container .search {
  width: 100%;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0 var(--space-4);
  background: var(--surface-strong);
  color: var(--text-main);
  outline: none;
}

.search-container .search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(138, 92, 246, 0.16);
}

#searchResultScontainer {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-md);
  max-height: 300px;
  overflow: auto;
  z-index: 90;
}

#searchResultScontainer li {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid #f3e9f4;
}

#searchResultScontainer li:last-child {
  border-bottom: 0;
}

.page-hero {
  margin-bottom: var(--space-8);
  text-align: center;
  padding: var(--space-8) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 220px at 10% 0%, #ffe8f5 0%, transparent 65%),
    radial-gradient(560px 260px at 100% 0%, #ede7ff 0%, transparent 68%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-hero-title {
  margin-bottom: var(--space-3);
}

.page-hero-subtitle {
  max-width: 740px;
  margin: 0 auto;
  color: var(--text-muted);
}

.page-hero-title + .page-hero-subtitle {
  margin-top: var(--space-3);
}

.glass-card,
.el-card,
.article-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.article-card {
  padding: var(--space-5);
  height: 100%;
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.article-title {
  margin-bottom: var(--space-3);
  font-size: 1.1rem;
  font-weight: 600;
}

.post-excerpt {
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  overflow: hidden;
  line-height: 1.75;
}

.tag-list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.categori-tag,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 var(--space-3);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-soft), var(--accent-soft));
  color: #5f4593;
  font-size: 12px;
  border: 1px solid #e4d5f2;
  transition: all var(--motion-fast);
}

.categori-tag:hover,
.tag-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(137, 98, 190, 0.16);
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--small);
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 var(--space-4);
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
}

.action-link.primary {
  border: none;
  color: #fff;
  background: var(--brand-gradient);
}

.action-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.timeline-shell .el-timeline-item__timestamp,
.time-date {
  color: var(--text-muted);
  font-size: 12px;
}

.timeline-shell .el-timeline-item__tail {
  border-left: 2px dashed #e8d5ef;
}

.timeline-card {
  padding: var(--space-4);
  transition: transform var(--motion-fast), box-shadow var(--motion-fast);
}

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

.timeline-box {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.timeline-box .timeline-img {
  width: 40px;
  height: 40px;
  padding: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #fff1fa);
  border: 1px solid var(--line);
}

.blog_content_container {
  display: flex;
  justify-content: center;
}

.blog_content_container #gitalk-container {
  width: min(900px, 100%);
}

.foot-item {
  color: var(--text-muted);
}

.site-footer .foot-item:hover {
  color: var(--brand);
}

.taxonomy-page .el-tabs {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4);
}

.taxonomy-page .el-tabs__content {
  padding: var(--space-3);
}

.taxonomy-page .el-tabs__item {
  border-radius: 999px;
  transition: all var(--motion-fast);
}

.taxonomy-page .el-tabs__item.is-active {
  color: var(--brand);
  background: #fff;
}

.boundary {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-8) 0 var(--space-5);
}

.el-backtop {
  z-index: 120;
}

@media (max-width: 1024px) {
  .search-container {
    width: 100%;
  }

  .timeline-box {
    grid-template-columns: 1fr;
  }

  .timeline-box .timeline-img {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .search-container {
    grid-area: search;
    justify-self: end;
    width: auto;
    max-width: 148px;
  }

  .search-container .search {
    height: 34px;
    font-size: 12px;
    width: 120px;
    transition: width var(--motion-medium), box-shadow var(--motion-fast);
  }

  .search-container .search:focus {
    width: 170px;
  }

  .el-backtop {
    right: 10px !important;
    bottom: 76px !important;
  }
}

@media (max-width: 640px) {
  .page-hero {
    margin-bottom: var(--space-6);
  }

  .article-card {
    padding: var(--space-4);
  }
}
