:root {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2d2d2d;
  --text-primary: #dedede;
  --text-secondary: #b3b3b3;
  --accent:#b3b3b3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: inherit;
  background-color: var(--bg-secondary);
  padding: 0.2em 0.4em;
  border-radius: 3px;
}

pre {
  padding: 1em;
  overflow-x: auto;
}

input, textarea, select {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--text-secondary);
  padding: 0.5em;
  border-radius: 4px;
}

img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

button {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 0.5em 1em;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

button:hover {
  opacity: 0.9;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

.main-container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: 3rem;
  flex: 1 0 auto;

  figure + * {
    margin-top: 3rem;
  }

  figcaption {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
  }
}

.main-content {
  max-width: 45rem;
}

.image--feature {
  display: block;
  margin: 0;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
}

header, footer {
  padding: 2rem 3rem;
  flex-shrink: 0;
}

p + p {
  margin-top: 1.5rem;
}

.is-smaller {
  font-size: 0.8rem;
}

.fade-in {
  opacity: 0;
}

.fade-in.loaded {
  opacity: 1;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
