@import url('https://fonts.googleapis.com/css2?family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&family=Kalam:wght@300;400;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background-color: #f8fafc;
    line-height: 1.6;
    margin: 0;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode */
body.dark-mode {
    color: #e2e8f0;
    background-color: #0f172a;
}

body.dark-mode .top-nav {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: #1e293b;
}

body.dark-mode .glass {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: rgba(30, 41, 59, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

body.dark-mode .nav-item {
    color: #94a3b8;
}

body.dark-mode .nav-item:hover,
body.dark-mode .nav-item.active {
    color: #e2e8f0;
}

body.dark-mode .profile-card,
body.dark-mode .research-interests-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .research-interests-card {
    background: #1e293b;
}

body.dark-mode .scholar-badge {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode .text-primary {
    color: #f1f5f9;
}

body.dark-mode .text-neutral-600,
body.dark-mode .text-neutral-700 {
    color: #94a3b8;
}

body.dark-mode .text-neutral-500 {
    color: #64748b;
}

body.dark-mode .text-accent {
    color: #7b9eb8;
}

body.dark-mode .social-btn {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .social-btn:hover {
    border-color: rgba(123, 158, 184, 0.5);
    color: #7b9eb8;
}

body.dark-mode .prose a {
    color: #7b9eb8;
}

body.dark-mode .prose a:hover {
    color: #93b5cf;
}

body.dark-mode .pub-list-item {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}

body.dark-mode .pub-list-item:hover {
    border-color: rgba(123, 158, 184, 0.55);
}

body.dark-mode .pub-title-text {
    color: #f1f5f9;
}

body.dark-mode .pub-line-2 {
    color: #94a3b8;
}

body.dark-mode .pub-line-2 strong,
body.dark-mode .pub-line-2 b {
    color: #e2e8f0;
}

body.dark-mode .pub-line-3 {
    color: #64748b;
}

body.dark-mode .pub-link-btn {
    background-color: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

body.dark-mode .pub-link-btn:hover {
    background-color: #0f172a;
    border-color: rgba(123, 158, 184, 0.55);
    color: #7b9eb8;
}

body.dark-mode .pub-year-header {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

body.dark-mode .pub-venue-tag {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.28);
}

body.dark-mode .pub-thumbnail-box {
    background: #1e293b;
    border-color: rgba(51, 65, 85, 0.9);
}

body.dark-mode .highlight-box {
    background: rgba(123, 158, 184, 0.1);
}

body.dark-mode .border-neutral-200 {
    border-color: #334155;
}

body.dark-mode .mobile-menu {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: #334155;
}

body.dark-mode .mobile-nav-item {
    color: #94a3b8;
}

body.dark-mode .mobile-nav-item:hover {
    color: #e2e8f0;
}

body.dark-mode footer {
    background: #0f172a;
    border-top-color: #1e293b;
}

body.dark-mode .text-neutral-400 {
    color: #64748b;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1e293b;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #475569;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Crimson Text', serif;
}

a {
    color: inherit;
}

.prose a {
    color: #5f84a1;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-color: rgba(95, 132, 161, 0.35);
    transition: color 0.2s, text-decoration-color 0.2s;
}

.prose a:hover {
    color: #4a6d82;
    text-decoration-color: #4a6d82;
}

.font-serif {
    font-family: 'Crimson Text', serif;
}

.font-sans {
    font-family: 'Inter', sans-serif;
}

.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.top-nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #e2e8f0;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    font-weight: 500;
    color: #475569;
    transition: color 0.2s;
    text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
    color: #1e293b;
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #7b9eb8;
    transition: width 0.3s ease;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

.profile-image-container {
    position: relative;
    z-index: 10;
}

section {
    position: relative;
}

.section-header h2,
.section-title {
    position: relative;
    display: inline-block;
}

.section-header h2::after,
.section-title::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 40%;
    height: 3px;
    background-color: rgba(123, 158, 184, 0.3);
    z-index: -1;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .grid-layout {
        grid-template-columns: 320px 1fr;
        gap: 4rem;
        align-items: start;
    }

    .profile-column {
        align-self: stretch;
    }

    .profile-card {
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }
}

.contact-card {
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.text-accent {
    color: #7b9eb8;
}

.bg-accent {
    background-color: #7b9eb8;
}

.border-accent {
    border-color: #7b9eb8;
}

.hover\:text-accent:hover {
    color: #7b9eb8;
}

details summary {
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: justify;
}

.formal-font {
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.1rem;
    line-height: 1.6;
}

.link-highlight {
    color: #5f84a1;
    text-decoration: none;
    border-bottom: 1px solid rgba(123, 158, 184, 0.35);
}

.link-highlight:hover {
    color: #4a6d82;
}

.social-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 6px 18px -16px rgba(15, 23, 42, 0.55);
}

.social-btn:hover {
    border-color: rgba(123, 158, 184, 0.5);
    color: #5f84a1;
    transform: translateY(-1px);
}

.timeline-item {
    align-items: flex-start;
}

.school-logo-container {
    box-sizing: border-box;
}

.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 1.25rem 3rem;
}

.main-wrapper {
    width: 100%;
}

.main-content {
    width: 100%;
}

.section {
    background: transparent;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem;
}

.subtitle-text {
    font-size: 0.95rem;
    color: #64748b;
    margin-left: 0.5rem;
}

.content-block {
    margin-top: 1.5rem;
}

.view-all-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #dbe4ef;
    background: #ffffff;
    color: #334155;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    border-color: rgba(123, 158, 184, 0.55);
    color: #5f84a1;
    background: #f0f6fa;
}

.publication-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.filter-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    border: 1px solid #dbe4ef;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-link:hover,
.filter-link.active {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

.empty-state {
    text-align: center;
    color: #64748b;
    padding: 2rem 0;
}

.pub-year-group {
    margin-bottom: 2rem;
}

.pub-year-header {
    font-family: 'Inter', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.05em;
    color: #1e293b;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.25rem;
    display: inline-block;
}

.pub-list-ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.pub-list-item {
    display: flex;
    gap: 1.4rem;
    align-items: flex-start;
    padding: 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: border-color 0.25s ease, background-color 0.25s ease;
    line-height: 1.5;
}

.pub-list-item:hover {
    border-color: rgba(123, 158, 184, 0.55);
}

.pub-content-wrapper {
    width: 100%;
    flex: 1 1 auto;
}

.pub-line-1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.1rem;
    margin-bottom: 0.45rem;
}

.pub-title-text {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.2rem;
    line-height: 1.35;
    flex: 0 1 auto;
}

.pub-line-2 {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 0.35rem;
}

.pub-line-2 strong,
.pub-line-2 b {
    color: #1e293b;
    font-weight: 600;
}

.pub-line-3 {
    font-size: 0.91rem;
    color: #64748b;
    font-style: italic;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.pub-line-4 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.45rem;
}

.pub-link-btn {
    display: inline-block;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    background-color: #ffffff;
    box-shadow: 0 8px 16px -14px rgba(15, 23, 42, 0.45);
}

.pub-link-btn:hover {
    border-color: rgba(123, 158, 184, 0.55);
    color: #5f84a1;
    background-color: #f0f6fa;
}

.pub-link-btn.is-placeholder {
    color: #94a3b8;
    border-style: dashed;
    background-color: #f8fafc;
    cursor: default;
}

.pub-venue-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.96);
    font-size: 0.78rem;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.pub-venue-inline-tag {
    padding: 0.18rem 0.58rem;
    font-size: 0.68rem;
    letter-spacing: 0.025em;
}

.tag-conference {
    color: #5f84a1;
    border-color: rgba(123, 158, 184, 0.36);
    background: #f0f6fa;
}

.tag-under-review {
    color: #2563eb;
    border-color: rgba(37, 99, 235, 0.22);
    background: #eff6ff;
}

.pub-venue-note {
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
    margin-left: 0.2rem;
}

.pub-badge-highlight {
    display: inline-block;
    background-color: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    line-height: 1.2;
}

.pub-list-item.with-thumbnail-expanded {
    display: flex;
}

.pub-thumbnail-box {
    width: 300px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    order: -1;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 0.35rem;
}

.pub-thumbnail-box img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px;
    object-fit: fill;
    background: #ffffff;
}

.news-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    align-items: baseline;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-family: 'Kalam', cursive;
    font-weight: 400;
    font-size: 0.9rem;
    color: #64748b;
    white-space: nowrap;
}

.news-content {
    font-family: 'Kalam', cursive;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
}

.news-content a {
    color: #5f84a1;
    text-decoration: none;
}

.honor-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    align-items: baseline;
    margin-bottom: 1.5rem;
}

.honor-year {
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: #7b9eb8;
    text-align: right;
    white-space: nowrap;
}

.honor-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.2rem;
}

.honor-content p {
    margin: 0;
    color: #475569;
}

@media (max-width: 640px) {
    .content-container {
        padding-top: 5rem;
    }

    .news-item,
    .honor-item {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .honor-year {
        text-align: left;
    }

    .pub-list-item,
    .pub-list-item.with-thumbnail-expanded {
        flex-direction: column;
    }

    .pub-thumbnail-box {
        width: 100%;
        max-width: none;
    }

    .publication-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Theme toggle button */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    border-color: rgba(123, 158, 184, 0.5);
    color: #5f84a1;
    transform: translateY(-1px);
}

.theme-icon-dark,
.theme-icon-light {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-icon-dark {
    opacity: 1;
    transform: rotate(0deg);
}

.theme-icon-light {
    opacity: 0;
    transform: rotate(-90deg);
}

body.dark-mode .theme-toggle-btn {
    background: #1e293b;
    border-color: #334155;
    color: #fbbf24;
}

body.dark-mode .theme-icon-dark {
    opacity: 0;
    transform: rotate(90deg);
}

body.dark-mode .theme-icon-light {
    opacity: 1;
    transform: rotate(0deg);
}

/* Scholar badge — minimal style */
.scholar-badges {
    display: flex;
    justify-content: center;
}

.scholar-badge-link {
    text-decoration: none !important;
}

.scholar-badge {
    display: inline-flex;
    align-items: stretch;
    height: 28px;
    border-radius: 14px;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
}

.scholar-badge:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.scholar-badge-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 10px;
    background: #64748b;
    color: #fff;
    white-space: nowrap;
    font-size: 12px;
    letter-spacing: 0.02em;
}

.scholar-badge-value {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    background: #f1f5f9;
    color: #475569;
    white-space: nowrap;
    min-width: 28px;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Loading state */
.scholar-badge-value.loading {
    animation: badge-pulse 1.2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

body.dark-mode .scholar-badge {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

body.dark-mode .scholar-badge-label {
    background: #475569;
}

body.dark-mode .scholar-badge-value {
    background: #1e293b;
    color: #e2e8f0;
}
