/* Professional code styling for technical articles */
.nested-copy-line-height .highlight,
.nested-copy-line-height pre {
  border-radius: 12px;
}

/* Blog post width override (ananke uses .mw7/.mw8 in main.min.css) */
@media (min-width: 60em) {
  .mw7 {
    max-width: 56rem;
  }

  .mw8 {
    max-width: 68rem;
  }
}

.nested-copy-line-height .highlight {
  border: 1px solid #1f2937;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  margin: 1.2rem 0;
  overflow: hidden;
}

.nested-copy-line-height .highlight pre {
  background: #0f172a !important;
  color: #e5e7eb;
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
  overflow-x: auto;
  padding: 1rem 1.1rem;
}

.nested-copy-line-height :not(pre) > code {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  color: #1e1b4b;
  font-family: "JetBrains Mono", "Fira Code", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  padding: 0.12rem 0.4rem;
}

/* Ensure MathJax display equations don't break narrow layouts */
.MathJax,
.MathJax_Display,
mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Tech blog card reveal animation: subtle fade + rise on page entry. */
.tech-fade-card {
  opacity: 0;
  transform: translateY(10px);
}

.tech-fade-card.is-fade-visible {
  animation: tech-card-fade-in 760ms ease forwards;
}

.cover .tl {
  background: rgba(0, 0, 0, 0);
  border-radius: 2px;
  padding: 2rem;
  width: fit-content;
  transform: translateY(-12px);
}

.section-fade-card {
  opacity: 0;
  transform: translateY(10px);
}

.section-fade-card.is-fade-visible {
  animation: tech-card-fade-in 760ms ease forwards;
}

.section-hover-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.section-hover-card:hover,
.section-hover-card:focus-within {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 10px 28px rgba(30, 64, 175, 0.22);
}

.cv-fade-target.cv-fade-enabled > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 900ms ease, transform 900ms ease;
}

.cv-fade-target.cv-fade-enabled > *.cv-fade-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes tech-card-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cover .tl {
  background: rgba(0, 0, 0, 0);
  border-radius: 2px;
  padding: 2rem;
  width: fit-content;
  transform: translateY(-40px);
}

@media (prefers-reduced-motion: reduce) {
  .tech-fade-card,
  .tech-fade-card.is-fade-visible,
  .section-fade-card,
  .section-fade-card.is-fade-visible,
  .cv-fade-target.cv-fade-enabled > *,
  .cv-fade-target.cv-fade-enabled > *.cv-fade-visible {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}
