/* ---------------------------------------------------------------------------
   .article-body  —  global rich-text content styles
   Applies to article/portfolio/project/knowledge/researches body content.
   Design tokens mirror the site's visual system (Inter, #2e5aac accent,
   muted ~8:1-contrast text instead of pure black, proper list indentation).
   Scoped to .article-body so it never affects other page elements.
--------------------------------------------------------------------------- */

.article-body {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(0, 0, 0, 0.66);
    font-family: 'Inter', sans-serif;
}

/* ---- paragraphs ---- */
.article-body p {
    font-size: 16px;
    line-height: 1.75;
    color: rgba(0, 0, 0, 0.66);
    margin: 0 0 18px;
}

.article-body p:last-child {
    margin-bottom: 0;
}

/* ---- headings ---- */
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5 {
    color: #2e5aac;
    text-transform: none;
    line-height: 1.3;
    margin: 34px 0 12px;
    font-weight: 800;
}

.article-body h2 { font-size: 26px; }
.article-body h3 { font-size: 20px; font-weight: 700; }
.article-body h4 { font-size: 18px; font-weight: 700; }
.article-body h5 { font-size: 16px; font-weight: 700; }

.article-body h2:first-child,
.article-body h3:first-child {
    margin-top: 0;
}

/* ---- links ---- */
.article-body a {
    color: #007AFF;
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(0, 122, 255, 0.35);
    text-underline-offset: 3px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.article-body a:hover {
    color: #0056b3;
    text-decoration-color: #0056b3;
}

/* ---- emphasized text ---- */
.article-body strong,
.article-body b {
    color: rgba(0, 0, 0, 0.84);
    font-weight: 700;
}

.article-body em,
.article-body i {
    font-style: italic;
}

/* ---- unordered & ordered lists (the "dots" Alexey wants styled) ---- */
.article-body ul,
.article-body ol {
    margin: 10px 0 20px;
    padding-left: 22px;
    color: rgba(0, 0, 0, 0.66);
}

.article-body ul {
    list-style: disc;
}

.article-body ol {
    list-style: decimal;
}

.article-body li {
    font-size: 16px;
    line-height: 1.65;
    color: rgba(0, 0, 0, 0.66);
    margin-bottom: 8px;
    padding-left: 4px;
}

.article-body li::marker {
    color: #2e5aac;
    font-weight: 700;
}

.article-body li > ul,
.article-body li > ol {
    margin: 8px 0 4px;
}

.article-body li:last-child {
    margin-bottom: 0;
}

/* list paragraphs shouldn't add extra blank spacing between items */
.article-body li p {
    margin: 0 0 6px;
}

/* ---- blockquote ---- */
.article-body blockquote {
    margin: 26px 0;
    padding: 22px 28px;
    border-left: 4px solid #2e5aac;
    background: linear-gradient(145deg, #f8fbff, #f0f6ff);
    border-radius: 0 16px 16px 0;
    color: rgba(0, 0, 0, 0.72);
    font-style: italic;
    line-height: 1.7;
}

.article-body blockquote p {
    margin: 0 0 10px;
    color: rgba(0, 0, 0, 0.72);
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* ---- tables ---- */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0 26px;
    font-size: 15px;
    line-height: 1.55;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.article-body th,
.article-body td {
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.article-body thead th {
    background: linear-gradient(145deg, #f8fbff, #eaf1fb);
    color: #2e5aac;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.article-body tbody tr:nth-child(even) {
    background: #f8fafd;
}

.article-body tbody tr:hover {
    background: #f0f6ff;
}

/* ---- images & figures ---- */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.article-body figure {
    margin: 26px 0;
}

.article-body figure img {
    display: block;
}

.article-body figcaption {
    margin-top: 10px;
    font-size: 14px;
    font-style: italic;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1.55;
    text-align: center;
}

/* ---- horizontal rule ---- */
.article-body hr {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 28px 0;
}

/* ---- code ---- */
.article-body code {
    background: #f0f6ff;
    color: #2e5aac;
    border-radius: 6px;
    padding: 2px 6px;
    font-family: Consolas, Menlo, monospace;
    font-size: 0.9em;
}

.article-body pre {
    background: #0f1b2d;
    color: #e6edf7;
    border-radius: 14px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 22px 0;
    line-height: 1.6;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}
