/* =====================================
   ROOT & RESPONSIVE TYPOGRAPHY
   ===================================== */

html {
    font-size: clamp(15px, 4vw, 20px);
}

/* =====================================
   BASE LAYOUT
   ===================================== */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont;
    max-width: 900px;
    margin: auto;
    padding: clamp(1rem, 4vw, 2rem);
    line-height: 1.7;
    color: #222;
    font-size: 1rem;
    background: #ffffff;
}

/* =====================================
   IMAGES
   ===================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

.post-image {
    max-width: 100%;
    border-radius: 8px;
}


.profile-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.profile-header h1 {
    margin-bottom: 0.3rem;
}

.profile-header p {
    margin: 0.4rem 0;
}


@media (max-width: 480px) {
    .profile-header p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}


/* =====================================
   HEADINGS
   ===================================== */

h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    margin-top: 2rem;
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.3rem, 3.5vw, 1.8rem);
    margin-top: 2rem;
}

h3 {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-top: 1.5rem;
}

/* Blog Page Specific */

/* ===========================
   ARTICLES PAGE
   =========================== */

.articles-header {
    text-align: center;
    margin-bottom: 3rem;
}

.articles-header h1 {
    margin-bottom: 0.5rem;
}

.articles-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Article list container */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Individual article card */
.article-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.article-item h2 {
    margin: 0;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
}

.article-item h2 a {
    color: #111;
    text-decoration: none;
}

.article-item h2 a:hover {
    text-decoration: underline;
}

/* Meta text */
.article-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.4rem 0;
}

/* Short description */
.article-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
}



/* =====================================
   LINKS & NAVIGATION
   ===================================== */

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}


nav a {
    margin-right: 1rem;
    font-weight: 500;
}

/* =====================================
   TEXT ELEMENTS
   ===================================== */

p {
    margin-bottom: 1rem;
}

code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.95em;
}

/* =====================================
   CODE BLOCKS
   ===================================== */

pre {
    background: #111827;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =====================================
   IMAGE CREDIT
   ===================================== */

.image-credit {
    font-size: 0.85em;
    color: #6b7280;
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* =====================================
   POST FOOTER
   ===================================== */

.post-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    font-size: 0.95rem;
    color: #f50101;
    text-align: center;
    font-style: italic;
    line-height: 1.6;
}

.post-footer strong {
    color: #222;
}

/* =====================================
   REFERENCES SECTION
   ===================================== */

h2 + ol {
    margin-top: 1rem;
}

ol {
    padding-left: 1.5rem;
    line-height: 1.7;
    font-size: 0.95rem;
    color: #333;
}

ol li {
    margin-bottom: 0.75rem;
}

ol li em {
    font-style: italic;
    color: #111;
}

ol li::marker {
    font-weight: bold;
    color: #555;
}

/* =====================================
   MATHJAX MOBILE FIX
   ===================================== */

mjx-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0;
}

/* =====================================
   SMALL SCREEN TWEAKS
   ===================================== */

@media (max-width: 480px) {
    nav a {
        margin-right: 0.75rem;
    }

    pre {
        font-size: 0.85rem;
    }
}


ul {
    list-style: none;
    padding: 0;
}

ul li {
    margin-bottom: 0.8rem;
}

ul li a {
    font-size: 1.0rem;
    font-weight: 500;
}
