@import url(font.css);
@import url(utils.css);
@import url(dark.css);
@import url(animations.css);

:root {
  --highlight-bg: #fffbe5;
  --highlight-text: #5d4c0c;
  --code-bg: #f8f9fa;
  --code-border: #e9ecef;
  --code-text: #212529;
}

*,
html {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: "Ubuntu", sans-serif !important;
  font-size: 17px;
  line-height: 1.75;
  color: #1a1a1a;
  background: #fff;
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

/* progress bar */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 6px;
  width: 0%;
  background: #4f7fff;
  z-index: 999;
  transition: width 0.1s linear;
}

header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.meta {
  font-size: 0.8rem;
  color: #999;
  margin-bottom: 0.4rem;
}

h1 {
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #111;
}

.subtitle {
  font-size: 1rem;
  color: #555;
}

.toc {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: #f9f9f9;
  border-left: 3px solid #4f7fff;
}

.toc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #999;
  margin-bottom: 0.75rem;
}

.toc ol {
  padding-left: 1.2rem;
}

.toc li {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.toc a {
  color: #4f7fff;
  text-decoration: none;
}
.toc a:hover {
  text-decoration: underline;
}

/* scroll reveal */
section {
  margin-bottom: 3.5rem;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

section.visible {
  opacity: 1;
  transform: none;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: #111;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  margin: 1.5rem 0 0.4rem;
}

p {
  color: #333;
  margin-bottom: 1rem;
}

ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #333;
}

li {
  margin-bottom: 0.25rem;
}

blockquote {
  border-left: 3px solid #4f7fff;
  padding: 0.5rem 1rem;
  margin: 1.25rem 0;
  color: #555;
  font-style: italic;
  font-size: 0.95rem;
  background: #f5f8ff;
}

code {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  color: var(--code-text);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Fira Code", monospace;
  font-size: 0.9em;
  white-space: nowrap;
}

.highlight {
  background-color: var(--highlight-bg);
  color: var(--highlight-text);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 500;
}

hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 3rem 0;
}

section.active h2 {
  color: #4f7fff;
}

#conclusao a {
  color: #4f7fff;
  text-decoration: none;
}

.topic-refs {
  margin-top: 0.25rem;
  margin-bottom: 1.2rem;
}

.topic-refs li {
  margin-bottom: 0.2rem;
}

.topic-refs a {
  color: #305fcb;
  text-decoration: none;
  font-size: 0.95em;
}

.topic-refs a:hover {
  text-decoration: underline;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.8rem;
  color: #aaa;
}

.footer-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-info span {
  margin: 0;
}

.footer-info a {
  color: #4f7fff;
  text-decoration: none;
}

.footer-signature {
  color: #777;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #d2d8e5;
  background: #f7f9ff;
  color: #2b3a5c;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
#theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 20px;
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

#theme-toggle:hover {
  opacity: 0.7;
}

#theme-icon {
  display: block;
}

.footer-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.footer-actions a:hover {
  background: #eaf0ff;
  border-color: #b9c7ea;
}

@media (max-width: 640px) {
  footer {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-actions {
    justify-content: flex-end;
  }
}
