html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px 20px 40px;
  background-color: #3c3f41;
  color: #e0e0e0;
  font-family: 'Inter';
}

#sidebar {
  position: fixed;
  top: 0;
  left: 5px;
  width: 220px;
  height: 100vh;
  overflow-y: auto;
  padding: 12px 6px;
  font-size: 0.85em;
  text-align: left;
  scrollbar-width: auto;
  scrollbar-color: #a0a0a0 transparent;
}

#sidebar.loaded {
  border-right: 1px solid #808080;
}

@media (max-width: 1400px) {
  #sidebar {
    display: none;
  }
}

#main-content {
  text-align: center;
}

h1 {
  margin-bottom: 5px;
  font-family: 'Mojangles';
  font-size: 2.5em;
}

#subtitle {
  color: #d6d6d6;
  margin-top: 0;
  margin-bottom: 30px;
}

.links {
  color: #d6d6d6;
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 0.95em;
}

.links:last-of-type {
  margin-bottom: 40px;
}

.links a {
  color: #7ec8ff;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}

.category-heading {
  width: 100%;
  max-width: 900px;
  margin: 40px auto 0;
  text-align: left;
  font-family: 'Mojangles';
  font-size: 1.4em;
  color: #e0e0e0;
  padding-bottom: 12px;
  border-bottom: 1px solid #808080;
  position: relative;
  scroll-margin-top: 20px;
}

.category-heading::before {
  content: "";
  position: absolute;
  left: -0.80em;
  top: 0;
  width: 0.80em;
  height: 100%;
}

.category-heading:hover .hash-link,
.category-heading .hash-link:hover {
  opacity: 1;
}

.category-heading + .resource {
  margin-top: 20px;
}

.category-heading:first-of-type {
  margin-top: 0;
}

#resource-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.resource {
  width: 100%;
  border: 1px solid #808080;
  padding: 20px 24px;
  margin-top: -1px; /* overlap border */
  text-align: left;
}

.resource-title-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.resource-name {
  font-size: 1.3em;
  font-weight: bold;
  display: flex;
  align-items: baseline;
  position: relative;
  padding-left: 0.80em;
  margin-left: -0.80em;
}

.hash-link {
  position: absolute;
  left: 0;
  color: #6e9bc7;
  text-decoration: none;
  opacity: 0;
}

.category-heading .hash-link {
  left: -0.80em;
}

.resource-name:hover .hash-link {
  opacity: 1;
}

.hash-link:active {
  color: #446e9e;
}

.resource-author {
  font-size: 1em;
}

.resource-description {
  font-size: 1em;
  margin-top: 3px;
}

.resource-description a {
  color: #7ec8ff;
  text-decoration: none;
}

.resource-description a:hover {
  text-decoration: underline;
}

.resource-buttons {
  margin-top: 8px;
}

.resource-buttons a {
  display: inline-block;
  background-color: #4e5052;
  color: #e0e0e0;
  border: 1px solid #808080;
  border-radius: 3px;
  text-decoration: none;
  padding: 3px 15px;
  margin-right: 3px;
  font-size: 0.85em;
}

.resource-buttons a:hover {
  border-color: #446e9e;
}

.snippet-code-container {
  margin-top: 12px;
}

.snippet-code {
  border: 1px solid #808080;
  overflow-x: auto;
  margin: 0 !important;
  text-align: left;
}

.snippet-code code {
  white-space: pre;
}

#sidebar a {
  color: #d6d6d6;
  text-decoration: none;
  display: block;
  padding: 3px 0;
}

#sidebar a:hover {
  color: #7ec8ff;
  text-decoration: underline;
}

.sidebar-category {
  font-weight: bold;
  margin-top: 12px;
  color: #e0e0e0;
}

.sidebar-category:first-child {
  margin-top: 0;
}

.sidebar-resource {
  padding-left: 12px !important;
  font-size: 0.95em;
  color: #b0b0b0;
}

.sidebar-title {
  display: block;
  font-size: 1.2em;
  text-decoration: none;
}

.sidebar-title:hover {
  color: #7ec8ff;
  text-decoration: underline;
}
