/* Syntax highlighting */
:root > * {
  --md-code-hl-string-color: #2f6f3e;
  --md-code-hl-comment-color: #6f7f6c;
  --md-code-hl-number-color: #7a4d1a;
  --md-code-hl-function-color: #355f7c;
  --md-code-hl-keyword-color: #3f4f6a;
  --md-code-hl-variable-color: #111111;
}
[data-md-color-scheme="slate"] {
  --md-code-hl-string-color: #9ad38f;
  --md-code-hl-comment-color: #7f8c84;
  --md-code-hl-number-color: #f0b87a;
  --md-code-hl-function-color: #9ec3e6;
  --md-code-hl-keyword-color: #b7c6ff;
  --md-code-hl-variable-color: #f2f2f2;
}

.md-content__inner h1 {
  opacity: 0;
  transform: translateY(12px);
  animation: titleIn 600ms ease-out forwards, titleFloat 6s ease-in-out 800ms infinite;
}

@keyframes titleIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes titleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}



/* Light mode palette overrides */
[data-md-color-scheme="default"] {
  --md-primary-fg-color: #404E3B;
  --md-accent-fg-color: #a85f1a;
  --md-default-bg-color: #e2e0e0;
  --md-default-fg-color: #141414;
  --md-typeset-a-color: #6C8480;

  --md-code-bg-color: rgba(64, 78, 59, 0.08);
}

/* Dark mode palette overrides */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #a5b0a1;
  --md-accent-fg-color: #ecb271;
  --md-default-bg-color: #2f2d2d;
  --md-default-fg-color: #E6E6E6;
  --md-typeset-a-color: #c6d1bf;
  --md-nav-link-color--hover: #ecb271;  
}
[data-md-color-scheme="slate"] .md-nav__link--active {
  color: var(--md-nav-link-color--active) !important;
  font-weight: 700;
}


footer.md-footer .md-footer__inner {
  padding: 0.25rem 0 !important;
}
footer.md-footer .md-footer__direction {
  margin: 0 0 0.1rem 0 !important;
  font-size: 0.7rem !important;
  line-height: 1.1 !important;
}
footer.md-footer .md-footer__title {
  margin: 0 !important;
  font-size: 0.9rem !important;
  line-height: 1.1 !important;
}
.md-footer-meta { 
  background: #000000 !important; 
} 


/* Light mode footer colors */
[data-md-color-scheme="default"] footer.md-footer {
  background: #30382c !important;       
}
[data-md-color-scheme="default"] .md-footer__inner {
  background: #30382c !important;        
}
[data-md-color-scheme="default"] .md-footer-meta {
  background: #1f241c !important;        
}

/* Dark mode footer colors */
[data-md-color-scheme="slate"] footer.md-footer {
  background: #41443f !important;
}
[data-md-color-scheme="slate"] .md-footer__inner {
  background: #41443f !important;
}
[data-md-color-scheme="slate"] .md-footer-meta {
  background: #2c2e2b !important;
}


a:hover,
.md-typeset a:hover {
  font-weight: bold;
}
.bold-on-hover:hover {
  font-weight: bold;
}

.md-typeset table th:nth-child(1),
.md-typeset table td:nth-child(1) {
  width: 8%;
  white-space: normal;
}

.md-typeset table th:nth-child(2),
.md-typeset table td:nth-child(2) {
  width: 22%;
}

.md-typeset table th:nth-child(3),
.md-typeset table td:nth-child(3) {
  width: 40%;
}

.md-typeset table th:nth-child(4),
.md-typeset table td:nth-child(4) {
  width: 40%;
}

.md-typeset {
  font-size: 0.75rem;
  line-height: 1.5;
}


.md-typeset ul li {
  font-size: 1em;
  line-height: 1.5;
}

.diagram-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.md-typeset .admonition {
  border-radius: 8px;
  border: 1px solid rgba(64, 78, 59, 0.25);
  box-shadow: none;
}

.md-typeset .admonition.summary,
.md-typeset .admonition.abstract {
  background-color: #d1d1d1;  
  border-left: 5px solid #404E3B; 
}

.md-typeset .admonition.summary > .admonition-title,
.md-typeset .admonition.abstract > .admonition-title {
  background: transparent;
  color: #404E3B;
  font-weight: 600;
  
}

.md-typeset .admonition .admonition-title::before {
  background-color: #404E3B;
}
.md-typeset .admonition {
  font-size: 0.65rem;   
  line-height: 1.6;
}


.embed-wrapper {
  max-width: 900px;
  margin: 1rem auto;
  border: 1px solid rgba(64,78,59,.25);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}

.embed-toolbar {
  text-align: right;
  padding: 0.3rem 0.3rem;
  background: #9db3a0;
}

.embed-toolbar button {
  font-size: 0.65rem;
  background: none;
  border: 1px solid #404E3B;
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
}

.embed-wrapper iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}


.embed-wrapper.embed-small {
  max-width: 520px;
}

.embed-wrapper.embed-small iframe {
  height: 520px;
}

.embed-with-text {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin: 2rem 0.8rem, 1rem 1rem;
}

.embed-with-text .embed-wrapper {
  flex: 0 0 520px;   
}

.embed-text {
  flex: 1;
  max-width: 60ch;  
  margin-top: 1.5rem; 
}

.image-row {
  display: flex;
  gap: 0.6rem;
}

.image-row a {
  flex: 1;
}

.image-row img {
  width: 100%;
  height: 310px;
  object-fit: cover;
}

/* ⭐ mobile */
@media (max-width: 768px) {
  .image-row {
    flex-direction: column;
  }

  .image-row img {
    height: auto;   
  }
}


@media (max-width: 900px) {
  .embed-with-text {
    flex-direction: column;
  }

  .embed-wrapper {
    max-width: 100%;
  }
}