/* ===== Base Style ===== */
body {
    font-family: "Times New Roman", Georgia, serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fafafa;
    color: #1a1a1a;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.intro {
    display: flex;
    align-items: center;
    gap: 28px; /* slightly more spacing */
    margin-bottom: 25px;
}

/* 🔹 Larger profile image */
.profile-img {
    width: 250px;            /* was 130px */
    height: auto;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.profile-img:hover {
    transform: scale(1.03);
}

.email {
    font-size: 0.9em;
    color: #666;
    margin: 0;
}

.bio-short {
    margin-top: 8px;
}

h1, h2, h3 {
    color: #111;
    font-weight: 600;
    margin-bottom: 0.4em;
}

h1 {
    font-size: 2.1em;
}

h2 {
    border-bottom: 2px solid #ddd;
    padding-bottom: 4px;
    margin-top: 40px;
}

a {
    color: #0056cc;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: #003b8c;
    text-decoration: underline;
}

.project {
    margin-bottom: 30px;
}

.project-img {
    width: 100%;
    max-width: 420px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.pub-list {
    list-style-type: none;
    padding-left: 0;
}

.pub-list li {
    margin-bottom: 18px;
}

footer {
    margin-top: 50px;
    text-align: center;
    font-size: 0.9em;
    color: #777;
}

/* Center the name & email (and the intro paragraph) */
.intro-text {
    text-align: justify;
    margin: 0 0 0px;
}

/* Optional: tighten spacing for a nicer centered look */
.intro-text h1 {
    margin: 0 0 6px;
    text-align: center;
}

.intro-text .email {
    margin: 0 0 10px;
    text-align: center;
}


/* ====== Dark Mode ====== */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111;
        color: #eaeaea;
    }

    .container {
        background-color: #1c1c1c;
        box-shadow: 0 4px 14px rgba(255,255,255,0.05);
    }

    h1, h2, h3 {
        color: #ffffff;
    }

    h2 {
        border-bottom: 2px solid #333;
    }

    a {
        color: #6ca8ff;
    }

    a:hover {
        color: #98c1ff;
    }

    .email {
        color: #aaa;
    }

    footer {
        color: #aaa;
    }
}

/* ===== Responsive tweaks ===== */
@media (max-width: 600px) {
    .intro {
        flex-direction: column;
        text-align: center;
    }

    .profile-img {
        width: 150px; /* slightly smaller for mobile */
    }
}

/* ===== Publications Section ===== */
.pub-entry {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 22px;
}

.pub-img {
    width: 220px;
    height: auto;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.pub-img:hover {
    transform: scale(1.03);
}

.pub-details {
    flex: 1;
    line-height: 1.45;
}

/* Make images stack above details on mobile */
@media (max-width: 600px) {
    .pub-entry {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pub-img {
        width: 100%;
        max-width: 280px;
        margin-bottom: 10px;
    }

    .pub-details {
        text-align: left;
        width: 100%;
    }
}
