:root {
    /* Color Palette (Slate equivalent) */
    --bg-white: #ffffff;
    --bg-surface: #f8fafc; /* slate-50 */
    --bg-subtle: #f1f5f9; /* slate-100 */
    
    --text-primary: #0f172a; /* slate-900 */
    --text-secondary: #334155; /* slate-700 */
    --text-muted: #64748b; /* slate-500 */
    --text-light: #94a3b8; /* slate-400 */

    --border-color: #e2e8f0; /* slate-200 */
    
    --accent-color: #2563eb; /* blue-600 */
    --accent-hover: #1d4ed8; /* blue-700 */
    --accent-bg: #dbeafe; /* blue-100 */
    --accent-text: #1e40af; /* blue-800 */

    --success-bg: #dcfce7; /* green-100 */
    --success-text: #166534; /* green-800 */

    /* Spacing & Layout */
    --max-width: 60rem; /* 4xl */
    --header-height: 4rem;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: #4285F4;
    transition: color 0.2s;
}

ul {
    /*list-style: none;*/
}

/* Utility Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.brand a {
    text-decoration: none;
    color: inherit;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Mobile Nav Placeholder */
.mobile-nav {
    display: none;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Main Content */
main {
    padding: 3rem 1rem;
}

section {
    margin-bottom: 4rem;
    scroll-margin-top: 5rem;
}

.hero {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    align-items: flex-start;
}

.profile-image-container {
    width: 12rem;
    height: 12rem;
    background-color: var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 4px solid white;
    flex-shrink: 0;
}

.profile-image {
    width: 100%;
    height: 100%;
    background-image: url('image/peggychi.png');
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 300;
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    margin-top: 2rem;
}

.hero-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.hero-institution {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.hero-bio {
    color: var(--text-secondary);
}

.hero-bio p {
    padding-top: 0.7rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background-color: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    color: var(--text-primary);
}

.social-link.hover-blue:hover { color: var(--accent-color); }
.social-link.hover-dark:hover { color: var(--text-primary); }

/* News Section */
.news-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-date {
    color: var(--text-light);
    font-family: monospace;
    font-size: 0.875rem;
    min-width: 80px;
    white-space: nowrap;
}

.news-text {
    color: var(--text-secondary);
}

.news-text a {
    color: var(--accent-color);
}

/* Publications Section */
.pubs-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.pubs-header h2 {
    border: none;
    margin: 0;
    padding: 0;
    margin-bottom: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 0.25rem;
    background-color: var(--bg-subtle);
    padding: 0.25rem;
    border-radius: 0.5rem;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--text-secondary);
}

.filter-btn.active {
    background-color: white;
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pub-item {
    margin-bottom: 1.5rem;
}

.pub-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pub-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pub-title a:hover {
    color: var(--accent-hover);
}

.pub-year {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.pub-authors {
    color: var(--text-secondary);
    /*margin-bottom: 0.25rem;*/
}
.pub-institute {
    margin-top: 0.2rem;
    font-size: 0.875rem;
}

.pub-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    margin-top: 0.2rem;
    margin-bottom: 0.5rem;
}

.pub-venue {
    font-style: italic;
    color: var(--text-secondary);
    font-weight: 500;
}

.pub-type {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.pub-topic {
    padding: 0.125rem 0.5rem;
    border-radius: 0.6rem;
    font-size: 0.7rem;
    font-weight: 500;
    background-color: lightgrey;
}

.type-journal {
    background-color: var(--accent-bg);
    color: var(--accent-text);
}

.type-conference {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.type-demo {
    background-color: var(--bg-subtle);
}

.type-workshop {
    background-color: var(--bg-subtle);
}

.pub-actions {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.action-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    font-family: inherit;
}

.action-btn:hover {
    text-decoration: underline;
}

.action-link {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.abstract-content {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: none;
}

.abstract-content.show {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.scholar-link-container {
    text-align: center;
    margin-top: 2rem;
}

.scholar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.scholar-link:hover {
    color: var(--accent-color);
}

#about-container ul {
    padding-left: 1em;
}

/* Footer */
footer {
    background-color: var(--text-primary);
    color: var(--text-light);
    text-align: center;
    padding: 3rem 1rem;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .hero {
        flex-direction: row;
        align-items: flex-start;
    }
    .profile-image-container {
        width: 14rem;
        height: 14rem;
        margin-top: 2rem;
    }
    .hero-content {
        text-align: left;
    }
    .tags, .social-links {
        justify-content: flex-start;
    }
    .pubs-header {
        flex-direction: row;
        align-items: center;
    }
    .pubs-header h2 {
        margin-bottom: 0;
        border: none;
    }
    .pub-header {
        flex-direction: row;
        align-items: baseline;
        gap: 0.5rem;
    }
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    .mobile-nav {
        display: none;
    }
    .nav-links {
        display: flex;
    }
    .menu-toggle {
        display: none;
    }
}

@media (max-width: 639px) {
    .nav-links {
        display: none; /* Hidden by default */
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        border-bottom: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
    .mobile-nav {
        display: block;
    }
    .profile-image-container {
        margin: 1rem auto;
    }
    .hero {
        gap: 0;
    }
    .hero-content {
        text-align: center;
    }
    .tags, .social-links {
        justify-content: center;
    }
}

.mainList {
    margin-bottom: 0.5rem;
    margin-left: 2rem;
}
