/* Basic reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.main {
    font-family: 'Source Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    padding: 1%;
    width: 50%;
    margin-left: auto;
    /* Keep it centered */
    margin-right: auto;
    margin-bottom: 5%;
    /* background-color: #e5f6fc; */
    min-width: 50%;
    font-size: medium;
    text-align: justify;
}

.hbar {
    clear: both;
    margin-left: auto;
    margin-right: auto;
    margin-top: -10px;
    border-top: solid;
    border-top-width: 2px;
    padding-top: 0em;
    /* color: #65b7ff; */
    width: 90%;
}


header,
nav,
footer {
    text-align: center;
    margin-bottom: 40px;
}

section {
    text-align: justify;
    margin-bottom: 40px;
}

section ul {
    list-style-position: inside;
    list-style-type: circle;
}

section h2 {
    width: 100%;
    margin-left: 0;
    margin-right: auto;
    margin-bottom: 15px;
    /* border-bottom: 2px solid rgba(0, 72, 139, 0.175); */
}

nav {
    margin-top: 20px;
    border-bottom: 2px solid #65b7ff;
    border-top: 2px solid #65b7ff;
}

header h1 {
    font-size: 2em;
}

#toptitle {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Add padding, margin, or other styling as needed */
}

.profile-photo img {
    width: 200px;
    /* Adjust as needed */
    height: auto;
    /* Maintain aspect ratio */
    margin-right: 20px;
    /* Space between image and text */
}

.profile-info {
    text-align: left;
    /* Add padding, margin, or other styling as needed */
}

.profile-info h1 {
    font-family: 'Calibri', sans-serif;
    font-size: 2.2em;
}

.profile-info p {
    margin: 0;
    /* Remove default margin */
    /* Add more styling as needed */
}

.profile-info a {
    text-decoration: none;
    color: #1592ff;
}

/* .profile-info a:hover {
    text-decoration: underline;
} */

nav ul {
    list-style: none;
    /* background-color: #e5f6fc; */
    /* text-align: center; */
    padding: 0;
    margin: 0;
    display: flex;
    /* Make the list horizontal */
    justify-content: center;
    /* Center the list */
    flex-wrap: wrap;
    /* Allow items to wrap in smaller screens */
}

nav ul li {
    /* display: inline; */
    padding: 6px;
}

nav ul li a {
    color: rgb(61, 61, 61);
    padding: 8px 15px;
    /* display: inline-block; */
    text-decoration: none;
    font-weight: 550;
}

/* nav ul li a:hover {
    color: #4698b6;
    background-color: #d4ecffd1;
} */

section {
    /* background: rgb(242, 252, 255); */
    padding: 20px;
    border-radius: 8px;
}

section a {
    text-decoration: none;
    color: #1592ff;
}

/* section a:hover {
    text-decoration: underline;
} */

footer {
    text-align: center;
    padding: 10px;
    background-color: white;
    color: rgb(155, 155, 155);
}

ul.time-list {
    list-style-type: none;
    /* Remove default list styling */
    padding: 0;
    /* Remove default padding */
}

ul.time-list li {
    display: flex;
    justify-content: space-between;
    /* A line between items */
    padding: 8px 0;
}

.event {
    /* Styles for the event text, if needed */
    text-align: left;
}

.date {
    margin-left: auto;
    /* Push the date to the right */
    /* Additional styles for the date text, if needed */
}

/* @media (max-width: 600px) {
    nav ul {
        text-align: center;
        padding: 0;
    }

    nav ul li {
        display: block;
    }
} */

@media (max-width: 768px) {

    body,
    .main,
    section,
    header,
    footer,
    nav {
        font-size: 0.9em;
    }

    .main {
        width: 90%;
        min-width: auto;
        /* Remove min-width */
        padding: 5%;
    }

    #toptitle {
        flex-direction: column;
        /* Stack items vertically on smaller screens */
        align-items: center;
    }

    .profile-photo img {
        margin-bottom: 20px;
        /* Add space between image and text on smaller screens */
    }

    nav ul {
        flex-direction: row;
        /* Ensure nav remains horizontal */
        padding-left: 0;
    }

    section h2 {
        width: auto;
        /* Allow title to adjust based on content */
    }
}

@media (max-width: 600px) {

    body,
    .main,
    section,
    header,
    footer,
    nav {
        font-size: 0.85em;
    }

    .main {
        width: 90%;
        /* Use more of the screen width */
        margin-left: auto;
        /* Keep it centered */
        margin-right: auto;
        /* Keep it centered */
        min-width: 0;
        /* Remove the minimum width restriction */
    }

    /* nav ul li a { */
    /* padding: 0.5px; */
    /* Reduce padding on smaller screens */
    /* } */
}

#publications ul {
    list-style-type: none;
    padding: 0;
}

#publications li {
    /* background-color: #f2fcff; */
    /* Light blue background for each item */
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    /* Rounded corners for the boxes */
    border: 1px solid #b6dfff;
    /* Light border for the box */
}

.publication-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* position: relative; */
    padding-bottom: 3px;
    /* Space for PDF and Code buttons */
}

.publication-text {
    flex: 1;
    padding-right: 10px;
    /* Adjust spacing as needed */
}

.publication-title {
    font-weight: bold;
    color: #1351c3;
}

.publication-thumbnail img {
    max-width: 220px;
    /* Adjust max width based on desired thumbnail size */
    height: 200px;
    /* Maintain aspect ratio */
    width: auto;
    /* Adjust width automatically */
    height: auto;
    /* Adjust height automatically */
    border-radius: 5px;
    /* Optional: Rounded corners */
    margin-left: 5px;
    /* Space between text and image */
    transition: transform 0.2s ease;
    /* Smooth transition */
}

/* .publication-thumbnail img:hover { */
/* transform: scale(1.2); */
/* Scale to 1.5 times the original size */
/* box-shadow: 0px 4px 15px #1351c3; */
/* Add shadow effect */
/* } */

.publication-info {
    margin-bottom: 5px;
    /* Space between author and journal */
    /* border-bottom: 1px solid #ccc; */
    /* Track line under authors */
}

.publication-year {
    position: absolute;
    right: 15px;
    /* Aligns the year to the right */
    top: 5px;
    /* Positions year at the top-right of the entry */
    font-style: italic;
}

@media (max-width: 768px) {

    .publication-entry {
        flex-direction: column;
        align-items: flex-start;
    }

    .publication-thumbnail {
        margin-left: 0;
        margin-top: 10px;
    }

    .publication-thumbnail img {
        max-width: 100%;
    }

    .publication-year {
        position: static;
        /* Resets to default positioning on smaller screens */
        text-align: right;
        /* Keeps the year aligned to the right */
        font-size: 0.9em;
        /* Adjust the font size for smaller screens if needed */
        padding-top: 10px;
        /* Provides some spacing from the publication entry */
    }

    #publications li {
        position: relative;
        /* Needed for absolute positioning context */
        padding-top: 20px;
        /* Provide space for the year when in absolute position */
    }
}

@media (max-width: 480px) {

    body,
    .main,
    section,
    header,
    footer,
    nav {
        font-size: 0.8em;
    }

    .publication-year {
        font-size: 0.8em;
        /* Even smaller font size for very small devices */
    }

    .publication-entry {
        padding-top: 5px;
        /* Reduces padding to save space on very small devices */
    }
}

.btn {
    display: inline-block;
    padding: 3px 30px;
    margin-top: 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    background-color: #e5f6fc;
    color: rgb(0, 9, 135);
    text-align: center;
    text-decoration: none;
    font-size: 0.9em;
    border-radius: 5px;
    transition: background-color 0.3s;
}

/* .btn:hover {
    text-decoration: none;
    color: #4698b6;
    background-color: #d4ecffd1;
} */

#service ul li {
    padding: 5px 0;
    /* Adjust the value as needed for desired spacing */
}

#awards ul li {
    padding: 5px 0;
    /* Adjust the value as needed for desired spacing */
}


/* @media (hover: hover) { */

.profile-info a:hover {
    text-decoration: underline;
}

nav ul li a:hover {
    color: #4698b6;
    background-color: #d4ecffd1;
}

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

.btn:hover {
    text-decoration: none;
    color: #4698b6;
    background-color: #d4ecffd1;
}

.publication-thumbnail img:hover {
    transform: scale(1.2);
    box-shadow: 0px 4px 15px #1351c3;
}

/* } */







/* overide  */
:root {
    --text: #111;
    --muted: #555;
    --border: #e6e9ef;
    --blue: #2563eb;
    --blue-soft: #eff6ff;
}

.main {
    max-width: 900px;
    width: min(900px, 92vw);
    margin: 0 auto 72px;
    padding: 56px 18px 0;
    font-size: 17px;
    line-height: 1.7;
    text-align: left;
}

header {
    text-align: left;
    margin-bottom: 28px;
}

nav {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 22px 0 44px;
}

section {
    padding: 0;
    margin: 56px 0;
    border-radius: 0;
    text-align: left;
}

section ul {
    list-style-position: outside;
    padding-left: 18px;
}

section a,
.profile-info a {
    color: var(--blue);
}

nav ul li a {
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background-color .15s ease, color .15s ease;
}

@media (hover:hover) {
    nav ul li a:hover {
        background: var(--blue-soft);
        color: var(--blue);
    }
}

#publications li {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.publication-thumbnail img {
    transition: transform .15s ease, box-shadow .15s ease;
}

@media (hover:hover) {
    .publication-thumbnail img:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 30px rgba(0, 0, 0, .10);
    }
}

/* --- Mobile: nav in one line with horizontal scroll --- */
@media (max-width: 600px) {
    nav {

        margin: 16px 0 28px;
    }

    nav ul {
        flex-wrap: nowrap;

        justify-content: flex-start;

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;
        gap: 8px;

        padding: 6px 4px;

        scrollbar-width: none;

    }

    nav ul::-webkit-scrollbar {
        display: none;

    }

    nav ul li {
        padding: 0;

        flex: 0 0 auto;

    }

    nav ul li a {
        display: inline-block;
        white-space: nowrap;

        padding: 8px 10px;

        border-radius: 10px;
        font-size: 0.95em;
    }

    @media (hover: hover) {
        nav ul li a:hover {
            background: var(--blue-soft, #eff6ff);
            color: var(--blue, #2563eb);
        }
    }
}

@media (max-width: 600px) {

    body,
    .main,
    section,
    header,
    footer,
    nav {
        font-size: 0.85em;
    }

    .main {
        width: 90%;
        /* Use more of the screen width */
        margin-left: auto;
        /* Keep it centered */
        margin-right: auto;
        /* Keep it centered */
        min-width: 0;
        /* Remove the minimum width restriction */
    }

    /* nav ul li a { */
    /* padding: 0.5px; */
    /* Reduce padding on smaller screens */
    /* } */
}