/* General */
:root {
    --ink: #25313d;
    --ink-soft: #52606d;
    --blue: #4f79a7;
    --blue-dark: #365f8d;
    --blue-soft: #e6eff8;
    --surface: #ffffff;
    --line: #d8e1e9;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    background-color: var(--blue-soft);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.68;
}

h1 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

h2 {
    color: var(--ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.55rem, 2.5vw, 1.85rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 0 0 1rem;
}

h3 {
    color: var(--blue-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.65rem;
}

p {
    color: var(--ink);
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0 0 1rem;
}

a {
    color: var(--blue-dark);
    text-underline-offset: 0.18em;
}

a:hover {
    color: #244b75;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(230, 239, 248, 0.96);
    padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
    border-bottom: 1px solid rgba(79, 121, 167, 0.18);
    box-shadow: 0 2px 8px rgba(37, 49, 61, 0.07);
}
.navbar h1 {
    color: var(--ink);
    font-size: clamp(1.75rem, 3vw, 2.15rem);
    margin: 0;
}
.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}
.nav-links li {
    margin: 0 0 0 clamp(1rem, 3vw, 2rem);
}
.nav-links a {
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration-thickness: 1px;
}
.nav-links a:hover {
    text-decoration: underline;
}

/* Sections */
section {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin: 2rem auto;
    max-width: 1200px;
    background-color: var(--surface);
    border: 1px solid rgba(79, 121, 167, 0.13);
    box-shadow: 0 8px 24px rgba(37, 49, 61, 0.07);
    border-radius: 10px;
}


/* About */
.about-section {
    display: flex;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    background-color: var(--surface);
    max-width: 1200px;
    margin: 2rem auto;
    border: 1px solid rgba(79, 121, 167, 0.13);
    box-shadow: 0 8px 24px rgba(37, 49, 61, 0.07);
    border-radius: 10px;
    flex-wrap: wrap;
}
.about-left {
    flex: 0.2; /* Set the left side to take 20% width */
    padding: 1rem;
    text-align: center;
    border-right: 1px solid var(--line);
}
.about-right {
    flex: 0.8; /* Set the right side to take 80% width */
    padding: 1rem;
    text-align: left;
}
.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid #dce7f0;
}
.research-overview {
    flex: 0 0 100%;
    width: 100%;
    margin: 2rem 0 0;
}
.research-overview img {
    display: block;
    width: 100%;
    height: auto;
}
/* Preserve readability on small screens */
.research-overview-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* News */
.news-section {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin: 2rem auto;
    max-width: 1200px;
    background-color: var(--surface);
    border: 1px solid rgba(79, 121, 167, 0.13);
    box-shadow: 0 8px 24px rgba(37, 49, 61, 0.07);
    border-radius: 10px;
}
.news-content {
    max-height: 200px;
    overflow-y: auto; 
    overflow-x: hidden;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background-color: #f8fafc;
    font-size: 0.98rem;
    line-height: 1.65;
}
.news-content li strong {
    color: var(--blue-dark);
}

/* Publication */
.publication-section {
    padding: clamp(1.5rem, 4vw, 2.5rem);
    margin: 2rem auto;
    max-width: 1200px;
    background-color: var(--surface);
    border: 1px solid rgba(79, 121, 167, 0.13);
    box-shadow: 0 8px 24px rgba(37, 49, 61, 0.07);
    border-radius: 10px;
}
.publication-block {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.8rem;
    padding: 1rem 0;
}
.publication-image {
    width: 35%;
    height: auto;
    margin-right: 1.5rem;
    border-radius: 4px;
    border: 1px solid var(--line);
}
.publication-details {
    flex: 1;
}
.publication-details h3 {
    margin-bottom: 0.5rem;
}
.publication-details p {
    margin-bottom: 0.5rem;
    /* font-size: 1rem;
    color: #555; */
}
hr {
    border: 0;
    height: 1px;
    background-color: var(--line);
    margin: 1rem 0;
}

/* Publication Technical Tags */
.publication-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
    margin-bottom: 0.65rem;
}

.publication-tags span {
    display: inline-block;
    background-color: #f0f4f8;
    color: var(--blue-dark);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.15rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Expandable Publication Details */
.publication-expand {
    margin-top: 0.45rem;
}

.publication-expand summary {
    color: var(--blue-dark);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    width: fit-content;
    padding: 0.2rem 0;
}

.publication-expand summary:hover {
    text-decoration: underline;
}

.publication-expand[open] summary {
    margin-bottom: 0.75rem;
}

.publication-expand p {
    color: var(--ink-soft);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 0.7rem;
}

@media (max-width: 760px) {
    .navbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.8rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.75rem 1.25rem;
    }

    .nav-links li {
        margin: 0;
    }

    section,
    .about-section,
    .news-section,
    .publication-section {
        margin: 1rem;
    }

    .about-section,
    .publication-block {
        flex-direction: column;
    }

    .about-left {
        width: 100%;
        padding: 0 0 1.5rem;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .about-right {
        padding: 1.5rem 0 0;
    }

    .publication-image {
        width: 100%;
        margin: 0 0 1.25rem;
    }
}
