.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 180px;
  height: 100vh;
  overflow: hidden;
  background: #f7f7f2;
  border-right: 1px solid #e8e8e8;
  box-sizing: border-box;
}

.sidebar-inner {
  padding: 1.5rem 1rem 0;
  height: 100%;
  position: relative;
}

.site-body {
  margin-left: 180px;
}

.sidebar-title {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.5rem;
}

.sidebar-title:hover {
  text-decoration: none;
  color: inherit;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-link {
  display: block;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  font-size: 0.95rem;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: #efefea;
  color: #333;
  text-decoration: none;
}

.sidebar-footer {
  position: absolute;
  bottom: 2rem;
  left: 1rem;
  right: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0d8;
  font-size: 0.75rem;
  color: #888;
  line-height: 1.5;
}

.sidebar-footer-author {
  margin: 0 0 0.2rem;
}

.sidebar-footer-email {
  display: block;
  color: #aaa;
  text-decoration: none;
  font-size: 0.7rem;
  word-break: break-all;
}

.sidebar-footer-email:hover {
  color: #666;
}

.sidebar-footer-commit {
  margin: 0.4rem 0 0;
  font-size: 0.68rem;
  color: #bbb;
  word-break: break-all;
}

.sidebar-footer-commit a {
  color: #bbb;
  text-decoration: none;
}

.sidebar-footer-commit a:hover {
  color: #888;
}

@media (max-width: 600px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
  }

  .sidebar-inner {
    padding: 0.75rem 1rem;
    height: auto;
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
  }

  .sidebar-title {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
  }

  .sidebar-footer {
    display: none;
  }

  .site-body {
    margin-left: 0;
  }
}
