/* Base styles */
body {
  background-image: linear-gradient(to right top, #2f4858, #2e4e6c, #3a517f, #54528e, #744e95);
  font-family: sans-serif;
  margin: 0;
}

/* logo image */
img#baby-logo {
  filter: drop-shadow(0px 0.1em 0.2em rgba(0, 0, 0, 0.2));
  max-height: 10%;
  max-width: 20%;
  display: block;
  margin-left: 1em;
  margin-top: 1em;
}

/* Text colors */
* { color: white; }

h1, h2, h3 { color: #c5d8ff; }

.toc a { color: #c5d8ff; }

/* Layout */
.container {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 1rem;
  width: 95%;
}

/* Typography and Links */
h2 .header-link,
h3 .header-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.back-to-top a {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1em;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  padding: 0.4em 0.8em;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-to-top a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
}

/* Code and Pre blocks */
p > code {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 1em;
  padding: 0.2em;
}

pre {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 1em;
  max-width: 100%;
  padding: 1em;
  white-space: pre-wrap;
  margin: 1em;
}

.variant pre {
  margin: 0.5em;
  background-color: #2b303b;
  color: #b48ead;
}

code {
  word-break: break-all;
  word-wrap: break-word;
}

/* Components */
.toc {
  background-image: linear-gradient(to right top, #2f4858, #2e4e6c, #3a517f, #54528e, #744e95);
  border-radius: 1rem;
  box-sizing: border-box;
  filter: drop-shadow(0px 0px 1em rgba(0, 0, 0, 0.25));
  margin: 1.5rem 0;
  max-width: 1200px;
  overflow-x: auto;
  padding: 1.5rem;
}

.item {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  transition: background 0.2s ease;
}

section {
  background-image: linear-gradient(to right top, #2f4858, #2e4e6c, #3a517f, #54528e, #744e95);
  border-radius: 1rem;
  filter: drop-shadow(0px 0px 1em rgba(0, 0, 0, 0.25));
  margin: 2em 0;
  max-width: 100%;
  padding: 2em;
}

/* Anchors */
h2, h3, .variant {
  position: relative;
}

.variant a {
  text-decoration: none;
}

h2 .anchor,
h3 .anchor,
.variant .anchor {
  color: #ac66e6;
  left: -1em;
  opacity: 0;
  position: absolute;
  text-decoration: none;
  transition: opacity 0.2s ease-in-out;
}

h2:hover .anchor,
h3:hover .anchor,
.variant:hover .anchor {
  opacity: 1;
}

/* Media Queries */
@media (max-width: 768px) {
  .container {
    padding: 0 0.5rem;
    width: 100%;
  }
  .variant {
    margin-left: 1rem;
  }
}

.feature-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: #744e95;
  border-left: 5px solid #3b82f6;
  border-right: 1px solid #3b82f6;
  border-top: 1px solid #3b82f6;
  border-bottom: 1px solid #3b82f6;
  border-radius: 0.5em;
}

a:has(code) {
  text-decoration: none;
}
a:has(code):hover {
  text-decoration: #ac66e6 overline underline;
  text-decoration-thickness: 2px;
}

a code {
  color:  #c5d8ff;
}
