:root {
  /* Light mode variables (default) */
  --BackgroundColor: #ffffff;
  --2ndBackgroundColor: #ececec;
  --FontColor: #303030;
  --AtagColor: #4b4b4b;
  --HeaderBgColor: #151516;
  --TheamColor: #757575;
  --BorderColor: #c5c5c5;
}

/* Dark mode overrides */
@media (prefers-color-scheme: dark) {
  :root {
    --BorderColor: #555555;
    --TheamColor: #aec9db;
    --BackgroundColor: #151516;
    --2ndBackgroundColor: #252525;
    --FontColor: #ddd;
    --AtagColor: #c9c9c9;
    --HeaderBgColor: #cfcfcf;
  }


}

body {
  font-family: system-ui;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--FontColor);
  background: var(--BackgroundColor);
}

/* header style  */
.site-header {
  padding: 0.5em 0;
  margin: 1em auto;
  max-width: 920px;
  padding: 0 1em;
  text-wrap-style: balance;
  border-bottom: 2px solid var(--BorderColor);
  margin-bottom: 4em;
}

.site-header ul {
  display: flex;
  gap: 0.2em;
  padding: 0;
  margin: 0;
}

.site-header li {
  list-style: none;
}

.site-header a {
  padding: 2px 14px;
  margin: 2px;
  font-weight: bold;
  border-radius: 25px;
  margin-bottom: 6px;
  display: inline-block;
  color: var(--FontColor);
}

.site-header a.active {
  filter: brightness(1);
  text-decoration: none;
  color: var(--BackgroundColor);
  background: var(--HeaderBgColor);
}

@media (max-width: 768px) {
  .site-header ul {
    justify-content: center;
  }
}

@media (max-width: 400px) {
    .site-header ul {
    display: block;
  }

  .site-header a {
    width: 85%;
  }
}
/* footer  */
.site-footer {
  margin-top: 6em;
  padding: 1em 0;
  text-align: center;
  font-size: 0.9em;
}

/* Markdown content styles */
h1,
h2,
h3,
h4 {
  margin-top: 1.4em;
}

pre {
  padding: 1em;
  overflow-x: auto;
  border-radius: var(--BrRadius);
}

code {
  background: var(--2ndBackgroundColor);
  color: var(--FontColor);
  padding: 0.1em 0.6em;
  margin: 1px;
  display: inline-block;
  border-radius: var(--BrRadius);
}

pre,
pre.chroma {
  background-color: var(--2ndBackgroundColor) !important;
  border-radius: var(--BrRadius);
}


a {
  color: var(--AtagColor);
  filter: brightness(0.8);
  text-decoration: none;
}

a:hover {
  filter: brightness(1);
  text-decoration: underline;
}

picture,
svg,
img {
  width: 100%;
  border-radius: var(--BrRadius);
}

input {
  background-color: var(--2ndBackgroundColor);
  color: var(--FontColor);
  border: 1px solid var(--BorderColor);
  border-radius: var(--BrRadius);
}

blockquote {
  border-left: 4px solid var(--BorderColor);
  padding: 2px 10px 2px 20px;
  background-color: var(--2ndBackgroundColor);
  border-radius: 0 var(--BrRadius) var(--BrRadius) 0;
  font-style: italic;
}

hr {
  margin-bottom: 2vh;
  margin-top: 2vh;
}

/* table styling  */
table {
  border-collapse: collapse;
}

table th,
table td {
  border: 1px solid var(--BorderColor);
  padding: 4px 8px;
  text-align: left;
}

table th {
  background: var(--2ndBackgroundColor);
}

iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border: none;
  border-radius: var(--BrRadius);
}