/* 站点字体：Selawik 是微软开源的 Segoe UI 度量兼容字体，SIL OFL 1.1 */
@font-face {
  font-family: "Selawik";
  src: url("/fonts/selawik-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* 侧边栏导航 */
.sidebar-about h1 {
  font-family: "Selawik", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
}

.sidebar-nav {
  margin-top: 1.5rem;
}

.sidebar-nav-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-nav-home {
  grid-column: 1 / -1;
}

.sidebar-nav a.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  padding: .5rem .6rem;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: .85rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .15s ease;
}

.sidebar-nav a.sidebar-nav-item:hover,
.sidebar-nav a.sidebar-nav-item:focus {
  background-color: rgba(255, 255, 255, .2);
  text-decoration: none;
}

.sidebar-nav a.sidebar-nav-item.active {
  background-color: rgba(255, 255, 255, .28);
  font-weight: bold;
}

.sidebar-nav .nav-icon {
  display: flex;
  flex: 0 0 auto;
}

.sidebar-nav .nav-icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.sidebar-nav .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav-external {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(255, 255, 255, .25);
}

.sidebar-nav + p {
  margin-top: 1.25rem;
}

.sidebar-counter {
  margin: 1rem 0;
}

.sidebar-counter img {
  display: block;
  width: 100%;
  max-width: 315px;
  height: auto;
  margin: 0 auto;
}

/* 友链页面 */
.links-page .link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: .75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.links-page a.link-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 100%;
  padding: .75rem;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease;
}

.links-page a.link-card:hover,
.links-page a.link-card:focus {
  border-color: #d28445;
  background-color: rgba(210, 132, 69, .06);
  text-decoration: none;
}

.links-page .link-avatar {
  display: flex;
  flex: 0 0 2.5rem;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 50%;
  background-color: rgba(210, 132, 69, .12);
}

.links-page .link-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.links-page .link-avatar-fallback {
  color: #d28445;
  font-size: .9rem;
}

.links-page .link-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.links-page .link-name {
  overflow: hidden;
  color: #313131;
  font-weight: bold;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.links-page a.link-card:hover .link-name,
.links-page a.link-card:focus .link-name {
  color: #d28445;
}

.links-page .link-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #757575;
  font-size: .8rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.links-page .link-empty {
  margin-top: 1.5rem;
  color: #757575;
}
