:root {
  --main-content-width: 62vw;
  --main-content-max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body, h1, h2, p, ul, li {
  margin: 0;
  padding: 0;
  font-size: 1.1em;
  line-height: 1.45em;
}

body {
  font-family: "Roboto", "Arial", sans-serif;
  background-color: #fdfdfd;
}

.container {
  max-width: var(--main-content-max-width);
  width: var(--main-content-width);
  margin: 0 auto;
  padding: 20px;
}

a {
  color: rgb(8,118,4);
}

footer {
  text-align: right;
  padding: 20px calc((100vw - min(var(--main-content-max-width), var(--main-content-width))) / 2);
}

section {
  margin: 1.7em 0;
}

h1 {
  font-size: 1.7em;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.3em;
  margin-bottom: 10px;
}

h3 {
  font-size: 1.08em;
  margin-bottom: 5px;
}

code {
  font-size: 1.1em;
  background-color: rgba(0.1, 0.1, 200, 0.08);
  word-break: break-all;
}

.small {
  font-size: 0.85em;
}
.smaller {
  font-size: 0.7em;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  text-align: center;
  gap: 20px;
  padding: 40px 50px;
}

.gallery-two {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  text-align: center;
  gap: 20px;
  padding: 40px 5px;
}

.gallery-item {
  position: relative;
  border: 1px solid grey;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: 100%;
  display: flex; /* Use Flexbox for centering */
  align-items: center; /* Center items vertically */
  justify-content: center; /* Center items horizontally */
}

.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  font-size: 1.3em;
  font-weight: 500;
  transition: opacity 0.3s;
  pointer-events: none;
}

.overlay:hover {
  cursor: default;
}

.gallery-item:hover .overlay {
  opacity: 1;
}


.toc {
  position: fixed;
  top: 20vh;
  right: 20px;
  width: 12vw;
  padding: 20px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  display: flex;
}

.toc-list {
  margin: 50px 0;
  font-size: 0.97em;
  list-style-type: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.toc-list li {
  margin-bottom: 5px;
}

.toc-list li > ul {
  padding-top: 8px;
  font-size: 0.65em;
  list-style-type: none;
}

.toc-list li > ul li:before {
  display: inline-block;
  content: "—";
  text-indent: 5px;
  margin-right: 5px;
}

.toc-list a {
  text-decoration: none;
  color: #333;
}

.toc-list a:hover {
  color: #007bff;
}

.toc-list a.active {
  font-weight: bold;
}