article h2,
article h3,
article h4,
article h5,
article h6 {
    color: #f3f4f6;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

article h2 {
    font-size: 1.875rem;
}

article h3 {
    font-size: 1.25rem;
}

article p {
    color: #e5e7eb;
    line-height: 1.625;
    margin-bottom: 0.0rem;
}

article strong {
    color: white;
    font-weight: 600;
}

article a {
    color: #93c5fd;
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

article ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    color: #e5e7eb;
}

article ul li {
    margin-bottom: 0.5rem;
}

article code {
    color: #93c5fd;
    background-color: #1f2937;
    padding: 0.25rem;
    border-radius: 0.25rem;
}

article blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    color: #d1d5db;
}

/* MathJax mobile overflow handling */
.MJX-TEX {
    max-width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
}

.gallery-preview {
    position: relative;
    max-width: 700px;
    margin: 3rem auto;
    margin-bottom: 3rem !important;
    cursor: pointer;
}

.gallery-preview img {
    width: 100%;
    display: block;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 3;
}

/* Fake stacked layers */
.gallery-preview::before,
.gallery-preview::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-preview::before {
    z-index: 2;
    transform: translate(10px, 10px);
    opacity: 0.8;
}

.gallery-preview::after {
    z-index: 1;
    transform: translate(20px, 20px);
    opacity: 0.5;
}

@media (max-width: 640px) {
    .gallery-nav {
        display: none;
    }
}
