:root {
  --themeColor: 186, 46, 56;
  --bgColor: #181818;
  --midGrey: #7f7f7f;
  --headerColor: #d2d2d2;
  --txtColor: #d2d2d2;
  --txtHighlight: #fff;
  --lightOverlay: #313135;
}

:root.light {
  --bgColor: #fff;
  --midGrey: #222;
  --lightOverlay: #f1f1f1;
  --headerColor: #000;
  --txtColor: #000;
  --txtHighlight: #000;
}
:root.dark {
  --bgColor: #080808;
  --midGrey: #7f7f7f;
  --headerColor: #d2d2d2;
  --txtColor: #d2d2d2;
}

html {
  background-color: var(--bgColor);
  color: var(--txtColor);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6em;
  letter-spacing: 0.5px;
}

::selection {
  background: rgba(var(--themeColor), 0.5);
  color: var(--txtHighlight);
}

p,
ul,
.description {
  letter-spacing: 0.9px;
}

hr {
  border: 0;
  border-top: 3px solid var(--midGrey);
  margin: 1em 0;
}

blockquote {
  border-left: 3px solid var(--midGrey);
  color: var(--midGrey);
  margin: 0;
  padding-left: 1em;
  &:hover {
    border-left: 3px solid rgba(var(--themeColor), 0.75);
  }
}

a {
  font-weight: bold;
  border-bottom: 3px solid var(--midGrey);
  color: inherit;
  text-decoration: none;
}
a:hover {
  border-bottom: 3px solid rgba(var(--themeColor), 0.75);
}

/* Images */
img {
  max-width: 100%;
}

figure {
  box-sizing: border-box;
  display: inline-block;
  margin: 0;
  max-width: 100%;
}

figure img {
  max-height: 500px;
}

@media screen and (min-width: 600px) {
  figure {
    padding: 0 40px;
  }
}

figure h4 {
  font-size: 1rem;
  margin: 0;
  margin-bottom: 1em;
}

/* Code blocks */
code {
  font-family: "Berkeley Mono";
  padding: 0.15rem 0.3rem;
  background-color: var(--lightOverlay);
  border-radius: 3px;
  letter-spacing: 0px;
}

.red {
  background-color: rgba(255, 0, 0, 0.8);
  font-weight: bold;
  color: #f0f0f0;
}

.blue {
  background-color: rgba(0, 0, 255, 0.8);
  font-weight: bold;
  color: #f0f0f0;
}

.green {
  background-color: rgba(0, 127, 0, 0.8);
  font-weight: bold;
  color: #f0f0f0;
}

pre code {
  font-family: monospace;
}

/* Containers */
.content {
  margin-bottom: 4em;
  margin-left: auto;
  margin-right: auto;
  max-width: 800px;
  padding: 0 1ch;
  word-wrap: break-word;
}

@media screen and (min-width: 978px) {
  .content {
    margin-left: 4rem;
  }
}

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 1em 0;
}

header .main {
  font-size: 1.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--headerColor);
  font-weight: bold;
  margin-top: 2em;
}

h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.4rem;
}
h3 {
  font-size: 1.2rem;
}
h4 {
  font-size: 1.1rem;
}
h5 {
  font-size: 1rem;
}
h6 {
  font-size: 1rem;
}

.list-item .title {
  font-size: 1.6rem;
}

.list-item a,
.pagination {
  font-weight: bold;
  line-height: 1.3em;
}

nav a {
  margin-right: 0.5rem;
}

.readmore {
  display: flex;
  justify-content: right;
  margin-right: 0.5rem;
}

footer {
  margin-top: 1em;
}

.title h1 {
  margin-bottom: 0;
  line-height: 1.1em;
}

time {
  color: var(--midGrey);
  font-weight: bold;
}

article .title {
  margin-bottom: 1em;
}

article .meta {
  font-weight: bold;
}

.tags a {
  border-bottom: 3px solid rgba(var(--themeColor), 0.75);
}
.tags a:hover {
  color: white;
  background-color: rgba(var(--themeColor), 0.75);
}
.soc svg {
  max-height: 15px;
}
.soc:hover {
  color: white;
}

.theme-btn.dark {
  display: none;
}
.dark .theme-btn.dark {
  display: none;
}
.light .theme-btn.dark {
  display: inline;
}

.light .theme-btn.light {
  display: none;
}
.dark .theme-btn.light {
  display: inline;
}

.sidenote-checkbox {
  display: none;
}

.sidenote-content {
  float: right;
  clear: right;
  position: relative;
  margin-right: -60%;
  width: 50%;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-style: italic;
  font-size: 0.9rem;
  border: 3px solid var(--midGrey);
  border-radius: 3px;
  padding: 10px;
}

.sidenote {
  &:hover {
    .sidenote-label {
      border-bottom: 3px solid rgba(var(--themeColor), 0.75);
    }
    .sidenote-content {
      border: 3px solid rgba(var(--themeColor), 0.75);
    }
  }
}

/* Links list styles */
.link-item {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding: 15px;
  background-color: var(--themeColor);
  border-radius: 5px;
  border-bottom: 0px solid var(--midGrey);
}

.link-avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.link-info {
  flex: 1;
}

.link-title {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  color: var(--headerColor);
}

.link-desc {
  margin: 0;
  color: var(--txtColor);
  line-height: 1.5;
}

.link-item:hover {
  background-color: rgba(var(--themeColor), 0.1);
  border-bottom: 0px solid var(--midGrey);
}

.link-item:hover .link-avatar {
  border-color: rgba(var(--themeColor), 0.8);
}

.link-item:hover .link-title {
  color: rgba(var(--themeColor), 0.8);
}

/* Comments section */
.comments {
  margin: 2em 0;
  padding-top: 2em;
  border-top: 3px solid var(--midGrey);
}

.comments h2 {
  font-size: 1.4rem;
  margin-bottom: 1em;
}

#comments-list {
  margin-bottom: 1.5em;
}

.comment {
  margin-bottom: 1em;
  padding: 1em;
  background-color: var(--lightOverlay);
  border-radius: 3px;
}

.comment-author {
  font-weight: bold;
  color: var(--headerColor);
}

.comment-date {
  color: var(--midGrey);
  font-size: 0.9rem;
  margin-left: 0.5em;
}

.comment-content {
  margin-top: 0.5em;
}

#comment-form {
  margin-top: 1.5em;
}

#comment-form textarea {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 0.5em;
  background-color: var(--lightOverlay);
  color: var(--txtColor);
  border: 1px solid var(--midGrey);
  border-radius: 3px;
  min-height: 100px;
  box-sizing: border-box;
}

#comment-form button {
  padding: 0.5em 1em;
  background-color: rgba(var(--themeColor), 0.75);
  color: var(--txtHighlight);
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#comment-form button:hover {
  background-color: rgba(var(--themeColor), 1);
}

.form-row {
  display: flex;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

#comment-author {
  flex: 1;
  padding: 0.5em;
  background-color: var(--lightOverlay);
  color: var(--txtColor);
  border: 1px solid var(--midGrey);
  border-radius: 3px;
}