html
{
    font-size: 16px;
    height: 100%;
}

body
{
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    color: #1f2937;
    background-color: #ffffff;
}

.page-shell
{
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content
{
    flex: 1 0 auto;
    padding-top: 32px;
    padding-bottom: 48px;
}

.footer
{
    flex-shrink: 0;
    font-size: 0.95rem;
    background-color: #ffffff;
    padding: 16px 0;
    margin-top: 32px;
}

.container
{
    max-width: 960px;
}

h1, h2, h3
{
    color: #111827;
    font-weight: 600;
    line-height: 1.25;
}

h1
{
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

h2
{
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e5e7eb;
}

h3
{
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

    h3 strong
    {
        font-weight: 700;
    }

p
{
    margin-bottom: 1rem;
}

ul
{
    margin-bottom: 1.25rem;
    padding-left: 1.4rem;
}

li
{
    margin-bottom: 0.45rem;
}

section
{
    margin-bottom: 2.5rem;
}

a
{
    color: #0f4c81;
    text-decoration: none;
}

    a:hover
    {
        text-decoration: underline;
    }

.navbar
{
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.navbar-brand
{
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.nav-link
{
    font-weight: 500;
}

.border-bottom
{
    border-bottom: 1px solid #e5e7eb !important;
}

.border-top
{
    border-top: 1px solid #e5e7eb !important;
}

.box-shadow
{
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.nav-link.active
{
    font-weight: 600;
    color: #000 !important;
}

.intro,
.card-section
{
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.intro
{
    margin-bottom: 3rem;
}

.card-section + .card-section
{
    margin-top: 2rem;
}

    .intro p
    {
        font-size: 1.1rem;
    }

.lead
{
    font-size: 1.2rem;
    font-weight: 500;
    color: #111827;
}

.home-grid 
{
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 992px) 
{
    .home-grid 
	{
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.brand-link 
{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo 
{
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
}

.brand-block 
{
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name 
{
    font-weight: 700;
    font-size: 1.05rem;
    color: #111827;
}

.brand-tagline 
{
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

.form-control 
{
    max-width: 100%;
}

textarea.form-control 
{
    resize: vertical;
}

.honeypot-field 
{
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cv-link 
{
    margin-top: 1.5rem;
}

.cv-link a 
{
    font-weight: 500;
}

.update-preview + .update-preview
{
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.update-preview h3
{
    margin-top: 0;
}

.update-preview + .update-preview
{
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.update-preview h3,
.update-preview h4
{
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.project-image
{
    margin: 1.5rem 0;
    text-align: center;
}

    .project-image img
    {
        max-width: 100%;
        border-radius: 6px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.image-caption
{
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.center-cell
{
    text-align: center;
    vertical-align: middle;
}

.latest-update-highlight
{
    background-color: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 1.5rem 0 2rem 0;
}

    .latest-update-highlight h3
    {
        margin-top: 0;
        margin-bottom: 0.75rem;
    }

    .latest-update-highlight h4
    {
        margin-top: 0;
        margin-bottom: 0.5rem;
    }

/* Articles */

.article-list
{
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.article-list-item
{
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

    .article-list-item:last-child
    {
        border-bottom: none;
    }

    .article-list-item h2
    {
        margin: 0 0 0.5rem 0;
        font-size: 1.6rem;
        line-height: 1.25;
    }

        .article-list-item h2 a
        {
            color: inherit;
            text-decoration: none;
        }

            .article-list-item h2 a:hover
            {
                text-decoration: underline;
            }

.text-muted
{
    margin: 0 0 0.75rem 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.article-detail
{
    max-width: 760px;
    margin: 0 auto;
    padding-top: 1.5rem;
}

    .article-detail > header
    {
        margin-bottom: 2rem;
    }

        .article-detail > header h1
        {
            margin: 0 0 0.75rem 0;
            font-size: 2.5rem;
            line-height: 1.15;
        }

.article-summary
{
    margin-top: 1rem;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #374151;
}

.article-body
{
    font-size: 1.05rem;
    line-height: 1.8;
    color: #111827;
}

    .article-body > *:first-child
    {
        margin-top: 0;
    }

    .article-body h1,
    .article-body h2,
    .article-body h3,
    .article-body h4,
    .article-body h5,
    .article-body h6
    {
        margin-top: 2rem;
        margin-bottom: 0.75rem;
        line-height: 1.25;
        color: #111827;
    }

    .article-body h1
    {
        font-size: 2rem;
    }

    .article-body h2
    {
        font-size: 1.65rem;
    }

    .article-body h3
    {
        font-size: 1.35rem;
    }

    .article-body p,
    .article-body ul,
    .article-body ol,
    .article-body blockquote,
    .article-body pre,
    .article-body table
    {
        margin-top: 0;
        margin-bottom: 1.25rem;
    }

    .article-body ul,
    .article-body ol
    {
        padding-left: 1.5rem;
    }

    .article-body li + li
    {
        margin-top: 0.35rem;
    }

    .article-body a
    {
        text-decoration: underline;
    }

    .article-body blockquote
    {
        margin-left: 0;
        padding: 0.75rem 1rem;
        border-left: 4px solid #d1d5db;
        background: #f9fafb;
        color: #374151;
    }

    .article-body code
    {
        padding: 0.15rem 0.35rem;
        border-radius: 4px;
        background: #f3f4f6;
        font-family: Consolas, "Courier New", monospace;
        font-size: 0.95em;
    }

    .article-body pre
    {
        overflow-x: auto;
        padding: 1rem;
        border-radius: 8px;
        background: #111827;
        color: #f9fafb;
    }

        .article-body pre code
        {
            padding: 0;
            background: transparent;
            color: inherit;
            font-size: 0.95rem;
        }

    .article-body img
    {
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .article-body hr
    {
        margin: 2rem 0;
        border: 0;
        border-top: 1px solid #e5e7eb;
    }

.article-links
{
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

    .article-links h2
    {
        margin-top: 0;
        margin-bottom: 0.75rem;
        font-size: 1.25rem;
    }

    .article-links ul
    {
        margin: 0;
        padding-left: 1.25rem;
    }

    .article-links li + li
    {
        margin-top: 0.4rem;
    }

@media (max-width: 768px)
{
    .article-detail > header h1
    {
        font-size: 2rem;
    }

    .article-body
    {
        font-size: 1rem;
        line-height: 1.75;
    }

    .article-list-item h2
    {
        font-size: 1.35rem;
    }
}

.EasyMDEContainer .editor-toolbar
{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

    .EasyMDEContainer .editor-toolbar a
    {
        flex: 0 0 auto;
    }

    .EasyMDEContainer .editor-toolbar::-webkit-scrollbar
    {
        height: 8px;
    }

.EasyMDEContainer .editor-toolbar
{
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
}

    .EasyMDEContainer .editor-toolbar a
    {
        flex: 0 0 auto;
    }

.footer-contact
{
    margin-top: 1rem;
    font-size: 0.95rem;
    color: #6b7280;
}

    .footer-contact a
    {
        color: #2563eb;
        text-decoration: none;
    }

        .footer-contact a:hover
        {
            text-decoration: underline;
        }

.article-cta
{
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    font-size: 1rem;
    color: #374151;
}

    .article-cta a
    {
        color: #2563eb;
        text-decoration: none;
    }

        .article-cta a:hover
        {
            text-decoration: underline;
        }

.admin-session
{
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    white-space: nowrap;
}

.admin-logout-form
{
    margin: 0;
}

    .admin-logout-form .btn-link
    {
        color: #2563eb;
        text-decoration: none;
        font-size: 0.9rem;
    }

        .admin-logout-form .btn-link:hover
        {
            text-decoration: underline;
        }

.admin-label
{
    font-weight: 500;
}

.admin-session-badge
{
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background-color: #eef2ff; /* soft blue */
    border: 1px solid #c7d2fe;
    font-size: 0.85rem;
    white-space: nowrap;
}

.admin-badge-label
{
    font-weight: 600;
    color: #3730a3; /* deeper blue */
}

.admin-logout-button
{
    background: none;
    border: none;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.85rem;
}

    .admin-logout-button:hover
    {
        text-decoration: underline;
    }