body {
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  max-width: 900px;
  font-family: 'Lato', sans-serif;
  color: #1e1e1e;
  background-color: #fdfdfd;
}

.site-header {
  display: flex;
  justify-content: flex-end;
  padding: 2rem 0 1rem;
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.site-nav__link {
  color: #345269;
  text-decoration: none;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
  transition: border-color 120ms ease, color 120ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus {
  border-color: #7c6d27;
  color: #7c6d27;
  text-decoration: none;
}

.site-main {
  display: block;
}

.note-title {
  font-size: 2rem;
  color: #27617c;
  margin-bottom: 0.5rem;
}

.note-meta {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.note-meta a {
  color: inherit;
}

.note-content {
  font-size: 1rem;
  line-height: 1.7;
}

.note-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
  font-size: 0.95rem;
}

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

.note-nav__group {
  flex: 1;
  display: flex;
  align-items: center;
}

.note-nav__group--left {
  justify-content: flex-start;
}

.note-nav__group--center {
  justify-content: center;
}

.note-nav__group--right {
  justify-content: flex-end;
}

.note-nav__link {
  color: #345269;
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.35rem;
  transition: background-color 120ms ease, color 120ms ease;
}

.note-nav__link:hover,
.note-nav__link:focus {
  color: #7c6d27;
  background: rgba(124, 109, 39, 0.12);
}

.note-nav__link--back {
  font-weight: 600;
}

.note-content pre {
  padding: 1rem;
  overflow-x: auto;
  background: #f4f4f4;
  border-radius: 0.4rem;
}

.note-content code,
code {
  font-family: "Source Code Pro", SFMono-Regular, Consolas, monospace;
  background: rgba(135, 146, 163, 0.1);
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.note-tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  background-color: rgba(39, 97, 124, 0.12);
  border-radius: 999px;
  color: #27617c;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.note-tag:hover,
.note-tag:focus {
  background-color: rgba(124, 109, 39, 0.18);
}

.notes-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.notes-card {
  border-left: 3px solid #d2dee6;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 120ms ease, background-color 120ms ease;
}

.notes-card:hover,
.notes-card:focus-within {
  border-color: #7c6d27;
  background-color: rgba(243, 240, 231, 0.7);
}

.notes-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.notes-card__meta {
  font-size: 0.8rem;
  color: #888;
}

.notes-card__tags {
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.notes-card__tag {
  padding: 0.15rem 0.45rem;
  background: rgba(124, 109, 39, 0.18);
  border-radius: 999px;
  font-size: 0.75rem;
}

.notes-search {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 1rem;
}

.notes-search input,
.notes-search select {
  padding: 0.65rem 0.75rem;
  border: 1px solid #d2dee6;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  background: #fff;
}

.notes-search__tags {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.notes-search__tag {
  font-size: 0.8rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #d2dee6;
  cursor: pointer;
  background: transparent;
  color: #345269;
}

.notes-search__tag--active {
  background: #fff;
  border-color: #7c6d27;
  color: #7c6d27;
}

.notes-search__tag--active:hover {
  background: #fff;
  color: #7c6d27;
}

@media (max-width: 600px) {
  body {
    padding: 0 1.25rem 3rem;
  }

  .site-nav {
    gap: 1rem;
  }

  .note-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .note-nav__group {
    justify-content: center;
  }
}

.highlight pre {
  margin: 0;
  padding: 1rem;
  background: #1f2933;
  color: #f5f7fa;
  border-radius: 0.4rem;
}

.highlight code {
  background: transparent;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notes-search__tag:not(.notes-search__tag--active):hover {
  border-color: #345269;
  color: #345269;
}


button.notes-search__tag {
  font-family: inherit;
  line-height: 1.2;
}

.katex,
.katex * {
  font-family: KaTeX_Main, KaTeX_AMS, serif;
}
