/* =============================================
   1. Reset & Base
   ============================================= */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =============================================
   2. Layout
   ============================================= */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
    margin-bottom: 3rem;
}

/* =============================================
   3. Header
   ============================================= */
header {
    background: #1a365d;
    color: #fff;
    padding: 2rem 0 1rem;
    margin-bottom: 2rem;
    min-width: 100vw;    /* full width even when zoomed out */
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
}

header .subtitle {
    font-weight: 300;
    font-size: 1.1rem;
    color: #cbd5e0;
}

/* =============================================
   4. Navigation
   ============================================= */
nav {
    margin-top: 1.2rem;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: #bee3f8;
    text-decoration: none;
    font-weight: 500;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid transparent;
}

nav a:hover,
nav a.active {
    border-bottom-color: #63b3ed;
    color: #fff;
}

/* =============================================
   5. General Typography & Headings
   ============================================= */
h2 {
    margin: 1.5rem 0 0.8rem;
    color: #1a365d;
}

/* =============================================
   6. Home Page
   ============================================= */
.intro p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Post list */
.post-list {
    list-style: none;
    padding: 0;
}

.post-list li {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.8rem 0;
}

.post-date {
    font-size: 0.85rem;
    color: #718096;
    display: block;
    margin-bottom: 0.2rem;
}

.post-list a {
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    color: #2b6cb0;
}

.post-list a:hover {
    text-decoration: underline;
}

.post-excerpt {
    margin-top: 0.3rem;
    color: #4a5568;
}

/* Intro image */
.intro-image {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
    margin: 1.5rem auto 0 auto;
    border-radius: 8px;
}

/* =============================================
   7. About Page
   ============================================= */
.about-content {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.profile-pic {
    border-radius: 8px;
    width: 250px;          /* increased size */
    height: 250px;
    object-fit: cover;
    max-width: 100%;
    display: block;
}

.about-content div {
    flex: 1;
    min-width: 250px;
}

.about-content p {
    margin-bottom: 1.5rem;   /* more space between paragraphs */
}

.about-content h3 {
    margin-top: 2rem;        /* space before Contact */
    margin-bottom: 0.5rem;
}

.about-content ul {
    list-style: none;
    padding: 0;
}

.about-content li {
    margin-bottom: 0.3rem;
}

/* =============================================
   8. Blog Post
   ============================================= */
.blog-post h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1a365d;
}

.post-meta {
    color: #718096;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.blog-post h2 {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.3rem;
    margin-top: 2rem;
}

.blog-post p {
    margin-bottom: 1rem;
}

/* Code blocks */
pre {
    background: #edf2f7;
    padding: 1rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    -webkit-overflow-scrolling: touch;
}

code {
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
}

/* =============================================
   9. Publications Page
   ============================================= */
.publication-list {
    padding-left: 1.5rem;
}

.publication-list li {
    margin-bottom: 1.8rem;
}

.publication-list a {
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    color: #2b6cb0;
}

.publication-list a:hover {
    text-decoration: underline;
}

.authors {
    color: #4a5568;
}

.journal {
    color: #718096;
    font-size: 0.95rem;
}

/* =============================================
   10. Under Construction Page
   ============================================= */
.under-construction {
    text-align: center;
    padding: 4rem 1rem;
    color: #4a5568;
}

.under-construction .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.under-construction h2 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.under-construction p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #718096;
}

.under-construction .back-link {
    display: inline-block;
    margin-top: 1rem;
    color: #2b6cb0;
    text-decoration: none;
    font-weight: 600;
}

.under-construction .back-link:hover {
    text-decoration: underline;
}

/* =============================================
   11. Footer
   ============================================= */
footer {
    background: #1a365d;
    color: #cbd5e0;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
    min-width: 100vw;    /* full width even when zoomed out */
}

footer a {
    color: #bee3f8;
    text-decoration: none;
}

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

/* =============================================
   12. Responsive Tweaks (Mobile)
   ============================================= */
@media (max-width: 600px) {
    /* General container */
    .container {
        max-width: 100%;
        padding: 0 15px;
        overflow-wrap: break-word;
    }

    /* Header */
    header h1 {
        font-size: 1.6rem;
    }
    header .subtitle {
        font-size: 0.9rem;
    }

    /* Navigation */
    nav {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    /* About page */
    .about-content {
        flex-direction: column;
    }

    /* Blog post typography */
    .blog-post h1 {
        font-size: 1.5rem;
    }
    .blog-post h2 {
        font-size: 1.2rem;
    }
    .blog-post p,
    .blog-post li {
        font-size: 1rem;
    }

    /* Prevent overflow on any element */
    img, pre, code, table {
        max-width: 100%;
        height: auto;
    }
}
