: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.15em;
  margin-bottom: 5px;
}

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

math {
  margin: 20px 0;
}

.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(1, minmax(200px, 1fr));
  text-align: center;
  gap: 20px;
  padding: 40px 20px;
}

.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;
}

#gif-container {
  position: relative;
  width: 50%;
  margin: 20px auto;
  padding-bottom: 50%; /* 4:3 aspect ratio (300px / 400px = 0.75) */
  overflow: hidden;
}

#gif-cycle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 100% 100%;
  animation: cycleImages 1.5s infinite;
}

@keyframes cycleImages {
  0%, 100% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-036200.png'); }
  16.66% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-036400.png'); }
  33.33% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-036600.png'); }
  50% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-037000.png'); }
  66.66% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-037200.png'); }
  83.33% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-037400.png'); }
  0%, 100% { background-image: url('./images/vanilla/monet_deluxe_diffaug/sample-036200.png'); }
}

.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.93em;
  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.68em;
  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;
}