html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, sans-serif;
    font-weight: 400;
    font-size: 16px;
    margin: 0;
    padding: 28px 16px;
    color: #0d1b2a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

.top-nav {
    text-align: right;
    margin: 0 auto 16px auto;
    padding: 0 8px 12px 0;
}

.top-nav a {
    display: inline-block;
    margin: 0 0 0 22px;
    font-size: 16px;
    font-weight: 500;
    color: #0d1b2a;
    border-bottom: none;
    transition: color 0.15s ease;
}

.top-nav a:hover {
    color: #5d9100;
    border-bottom: none;
}

.theme-toggle {
    display: inline-block;
    margin: 0 0 0 22px;
    padding: 0;
    background: none;
    border: none;
    color: #0d1b2a;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    vertical-align: middle;
    transition: color 0.15s ease;
}

.theme-toggle:hover {
    color: #5d9100;
}

/* ===== Dark mode ===== */
.dark body {
    background-color: #1a1f2a;
    color: #e8e8e8;
}

.dark p {
    color: #e8e8e8;
}

.dark a {
    color: #9bd64f;
    border-bottom-color: rgba(155, 214, 79, 0.3);
}

.dark a:hover {
    color: #c5e88a;
    border-bottom-color: rgba(197, 232, 138, 0.6);
}

.dark .section-title,
.dark h2,
.dark .name,
.dark .papertitle,
.dark .copyright,
.dark .top-nav a,
.dark .service-category,
.dark .highlight,
.dark .theme-toggle {
    color: #e8e8e8;
}

.dark .section-title,
.dark h2 {
    border-bottom-color: #76b900;
}

.dark .tagline {
    color: #b0b0b0;
}

.dark .email-line,
.dark .footer {
    color: #888888;
}

.dark .pub-authors {
    color: #a8b4c8;
}

.dark .pub-authors b {
    color: #e8e8e8;
}

.dark .pub-authors a {
    color: inherit;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.dark .pub-authors a:hover {
    border-bottom-color: currentColor;
}

.dark .pub-venue {
    color: #9bd64f;
}

.dark .news-list,
.dark .service-list {
    color: #e8e8e8;
}

.dark .pill-link,
.dark .meta-pill {
    background: #2a3a1e;
    color: #c5e88a;
}

.dark .pill-link:hover,
.dark .meta-pill:hover {
    background: #76b900;
    color: #0d1b2a;
}

.dark .pub-abstract {
    background: #242a36;
    color: #c0cad9;
    border-left-color: #9bd64f;
}

.dark .pub-divider > td {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark .section.footer-section td {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dark .top-nav a:hover,
.dark .theme-toggle:hover {
    color: #9bd64f;
}

.dark .award-note {
    color: #ff7676;
}

.dark .show-more {
    color: #9bd64f;
}

.dark .show-more:hover {
    color: #c5e88a;
}

.section-title {
    scroll-margin-top: 16px;
}

#about {
    scroll-margin-top: 16px;
}

b, strong {
    font-weight: 600;
}

.kw {
    color: #5d9100;
}

.dark .kw {
    color: #9bd64f;
}

p {
    line-height: 1.6em;
    margin: 0.5em 0;
    color: #0d1b2a;
}

a {
    color: #5d9100;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(118, 185, 0, 0.3);
    transition: color 0.15s ease, border-color 0.15s ease;
}

a:hover {
    color: #3d6500;
    border-bottom-color: rgba(90, 143, 0, 0.6);
}

a:has(img) {
    border-bottom: none;
}

h2 {
    font-size: 23px;
    font-weight: 600;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(118, 185, 0, 0.18);
    color: #0d1b2a;
    letter-spacing: -0.01em;
}

.section-title {
    display: inline-block;
    font-size: 24px;
    font-weight: 600;
    margin: 32px 8px 0 8px;
    padding: 0 0 8px 0;
    border-bottom: 3px solid #5d9100;
    color: #0d1b2a;
    letter-spacing: -0.015em;
}

.section {
    margin: 0 auto 8px auto;
}

.section.footer-section {
    margin-top: 24px;
}

.section.footer-section td {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 24px !important;
}

.name {
    font-size: 36px;
    font-weight: 600;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
    text-align: center;
    color: #0d1b2a;
}

.tagline {
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #444444;
    line-height: 1.55em;
    margin: 0 0 8px 0;
}

.email-line {
    text-align: center;
    font-size: 14px;
    color: #999999;
    margin: 0 0 12px 0;
}

.papertitle {
    display: block;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.35em;
    color: #0d1b2a;
}

.pub-authors {
    margin-bottom: 6px;
    line-height: 1.5em;
    color: #2e3e5a;
}

.pub-authors b {
    color: #0d1b2a;
}

.pub-authors a {
    color: inherit;
    font-weight: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.pub-authors a:hover {
    color: inherit;
    border-bottom-color: currentColor;
}

.pub-venue {
    line-height: 1.5em;
    color: #5d9100;
    font-weight: 500;
}

.pub-abstract {
    margin-top: 12px;
    padding: 12px 16px;
    background: #f7f8fa;
    border-left: 3px solid #5d9100;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6em;
    color: #2e3e5a;
}

.pub-abstract.collapsed {
    display: none;
}

.award-note {
    font-size: 13px;
    font-weight: 600;
    color: #d63031;
    margin-top: 4px;
}

.highlight {
    color: #0d1b2a;
    font-weight: 600;
}

.pub-divider > td {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Pill-style contact links */
.contact-row {
    text-align: center;
    margin-top: 16px;
}

.pill-link {
    display: inline-block;
    padding: 7px 16px;
    margin: 4px 3px;
    background: #e8f5cc;
    color: #0d1b2a;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.pill-link:hover {
    background: #0d1b2a;
    color: #ffffff;
    border-bottom-color: transparent;
}

/* Black CTA pill */
.cta-button {
    display: inline-block;
    background: #0d1b2a;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    border: none;
}

.cta-button:hover {
    background: #9bd64f;
    color: #fff;
    border-bottom-color: transparent;
}

/* Small warm-brown pill badge (Oral / Highlight) */
.badge {
    display: inline-block;
    background: #0d1b2a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: 4px;
}

.news-list,
.service-list {
    margin: 0;
    padding-left: 18px;
    line-height: 1.8em;
    color: #0d1b2a;
}

.service-list ul {
    padding-left: 22px;
    margin: 2px 0 6px 0;
}

.service-list ul li {
    font-size: 14px;
    line-height: 1.6em;
}

.service-category {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #0d1b2a;
}

.news-list.collapsed li:nth-child(n+4) {
    display: none;
}

.show-more {
    display: inline-block;
    background: none;
    border: none;
    color: #5d9100;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    padding: 4px 0 0 18px;
    cursor: pointer;
    transition: color 0.15s ease;
}

.show-more:hover {
    color: #3d6500;
}

.news-list li {
    margin-bottom: 6px;
}

.hoverZoomLink img {
    transition: transform 0.3s ease;
}

.hoverZoomLink:hover img {
    transform: scale(1.02);
}

.profile-photo {
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.pub-row td {
    vertical-align: top !important;
}

.footer {
    font-size: 13px;
    color: #7a8aa2;
    margin: 0;
}

.copyright {
    font-weight: 600;
    color: #0d1b2a;
    margin-bottom: 4px;
}

/* Pill-style pub-meta links (project page / arXiv / code / bibtex) */
.pub-meta {
    margin-top: 8px;
    line-height: 1.4em;
}

.meta-pill {
    display: inline-block;
    background: #e8f5cc;
    color: #0d1b2a;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 13px;
    border-radius: 999px;
    margin: 2px 4px 2px 0;
    border: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.meta-pill i,
.pill-link i {
    margin-right: 6px;
    font-size: 12px;
}

.meta-pill:hover {
    background: #0d1b2a;
    color: #ffffff;
    border-bottom-color: transparent;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 16px 10px;
    }

    .name {
        font-size: 30px;
    }

    .section {
        border-radius: 20px;
    }

    table table tr td:first-child,
    table table tr td:nth-child(2) {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        padding: 14px !important;
    }

    .pub-row td {
        display: block;
        width: 100% !important;
    }
}
