/* Enhanced responsive design with your aesthetic preferences */
body {
    font-family: 'Crimson Text', Georgia, serif;
    line-height: 1.7;
    max-width: 850px;
    margin: 0 auto;
    padding: 0rem;
    /* background-color: #fdfaf4; */
    background-color: #DBE0C3;
    color: #3f3e3e;
    padding-top: 3rem;
    font-size: clamp(16px, 2vw, 18px);
}

.header { text-align: center; margin-bottom: 1rem; padding: 2rem 0 1rem; }
.name { font-size: 1.5rem; font-weight: 600; margin: 0.5rem 0; color: #1a1a1a; letter-spacing: -0.02em; }
/* .chinese-name { font-family: 'KaiTi', '楷体', serif; } */
.section { margin-top: 0.5rem; padding: 0.5rem 0; border-top: 1px solid #e5e5e5; }
.publications { list-style-type: none; padding: 0; }
.publications li { margin-bottom: 0rem; }
.title { position: relative; font-weight: 600; cursor: pointer; color: #1a1a1a; font-family: 'Crimson Text', Georgia, serif; transition: color 0.2s ease; }
.title::after { content: ''; position: absolute; top: -2px; left: 0; width: 0; height: 2px; background: linear-gradient(to right, #1a1a1a, #595959); opacity: 0; transform-origin: left; }
.publication-item:hover .title::after { opacity: 1; animation: loadingBar 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.publication-item:not(:hover) .title::after { animation: none; opacity: 0; width: 0; }
@keyframes loadingBar { 0% { width: 0; opacity: 0.7; } 100% { width: 100%; opacity: 1; } }
.title:hover { color: #595959; }
.details { margin-top: 1rem; padding-left: 1rem; border-left: 2px solid #827e7e; font-size: 0.95rem; line-height: 1.7; color: #595959; opacity: 0; height: 0; overflow: hidden; pointer-events: auto; }
.publication-item:hover .details { animation: showDetails 0.3s ease 0.5s forwards; }
.publication-item:not(:hover):not(.expanded) .details { animation: none; opacity: 0; height: 0; }
@keyframes showDetails { from { opacity: 0; height: 0; } to { opacity: 1; height: auto; } }
.publication-item.expanded .details { opacity: 1; height: auto; animation: none; }
h3 { color: #1a1a1a; font-size: 1.5rem; margin-bottom: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
a { color: #1a1a1a; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: #595959; }
.view-toggle { margin-bottom: 0; display: flex; gap: 0.5rem; align-items: center; }
.toggle-link { padding: 0; border: none; background: none; cursor: pointer; font-family: inherit; color: #595959; font-size: 1rem; }
.toggle-link:hover { color: #1a1a1a; }
.toggle-link.active { color: #1a1a1a; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.header-container { display: flex; align-items: center; gap: 2rem; }
.profile-image { width: 150px; height: 150px; object-fit: cover; border-radius: 8px; }
.authors { color: #595959; }
.highlight-name { color: #1a1a1a; font-weight: 600; }
.publication-item { position: relative; padding: 0.3rem 0.5rem; transition: color 0.2s ease; }
.publication-item:hover { background-color: transparent; }
.publication-item:hover .title { color: #595959; }
.venue { color: #888; font-style: italic; font-size: 0.9rem; }
.links { margin-top: 0.5rem; }
.links a { margin-right: 0.5rem; }
.main-container { display: flex; flex-direction: column; gap: 1rem; }

/* Enhanced responsive media queries */
@media (max-width: 480px) {
    body { padding: 1rem; font-size: 14px; }
    .name { font-size: 1.4rem; }
    .header-container { gap: 0.5rem; flex-direction: column; }
    .profile-image { width: 100px; height: 100px; }
    .details { padding-left: 0.5rem; font-size: 0.85rem; }
}

@media (max-width: 768px) {
    body { padding: 1.5rem; }
    .name { font-size: 1.6rem; }
    .main-container { flex-direction: column; gap: 1rem; }
    .header-container { flex-direction: column; align-items: center; }
    .publication-item { padding: 0.2rem 0.3rem; }
}

@media (min-width: 599px) {
    .main-container { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 2rem; }
    .header-container { flex-direction: column; align-items: center; flex: 1; max-width: 300px; }
    .bio { flex: 2; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .main-container { gap: 1.5rem; }
    .profile-image { width: 130px; height: 130px; }
}

@media (min-width: 1025px) {
    .main-container { gap: 2rem; }
}

/* Touch fallback: Ensure expansions work on mobile */
@media (hover: none) {
    .publication-item:active .details { animation: showDetails 0.3s ease forwards; }
    .publication-item:active .title::after { animation: loadingBar 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
}
