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

body {
    font-family: 'Lora', serif;
    line-height: 1.4;
    color: #333;
    background-color: #fff;
    font-size: 12px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0px 20px;
}

header {
    margin-bottom: 8px;
    padding-bottom: 0px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    gap: 20px;
}

.name {
    font-family: 'Lora', serif;
    font-size: 1.6rem;
    margin-bottom: 0;
    color: #000;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.01em;
}

.tagline {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lang-toggle {
    font-family: inherit;
    font-size: 0.75rem;
    color: #666;
    background: transparent;
    border: 1px solid #d0d0d0;
    border-radius: 999px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.lang-toggle:hover {
    border-color: #0066cc;
    color: #0066cc;
    background-color: #f0f6ff;
}

body.lang-zh {
    font-family: 'Lora', 'Noto Serif SC', 'Songti SC', 'PingFang SC', serif;
}

.resume-download {
    font-size: 0.75rem;
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.resume-download i {
    font-size: 0.9rem;
}

.resume-download:hover {
    color: #0066cc;
    text-decoration: underline;
}

.contact {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.contact span {
    margin: 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.contact a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.contact i {
    font-size: 0.9rem;
}

.links {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.links a {
    color: #0066cc;
    text-decoration: none;
    margin: 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.links a:hover {
    text-decoration: underline;
}

.links i {
    font-size: 0.9rem;
}

.section {
    margin-bottom: 15px;
}

.section h2 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #000;
    font-weight: 600;
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section h2::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
    margin-left: 10px;
}

.section h2 i {
    font-size: 1.1rem;
}

.item {
    margin-bottom: 12px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.item-header strong {
    font-size: 0.95rem;
    color: #000;
}

.date {
    color: #666;
    font-size: 0.8rem;
}

.location {
    color: #666;
    font-size: 0.8rem;
    margin-left: auto;
}

.degree {
    margin-bottom: 4px;
}

.degree em {
    font-style: italic;
    color: #444;
    font-size: 0.9rem;
}

.gpa {
    color: #666;
    font-size: 0.8rem;
    margin-left: 6px;
}

.coursework {
    margin-top: 6px;
    color: #555;
    font-size: 0.85rem;
}

.company {
    color: #555;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.company-info {
    flex: 1;
}

.company-logo {
    height: 18px;
    width: auto;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 2px;
}

.company a {
    color: #0066cc;
    text-decoration: none;
}

.company a:hover {
    text-decoration: underline;
}

ul {
    list-style-position: outside;
    margin-left: 18px;
    margin-top: 6px;
}

li {
    margin-bottom: 6px;
    color: #444;
    line-height: 1.5;
    font-size: 0.9rem;
}

.skills p {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.skills strong {
    color: #000;
}

/* Show More Button */
.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    margin-bottom: 12px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background-color: #e8f0fe;
    border-color: #0066cc;
    color: #0066cc;
}

.show-more-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

.hidden-experience {
    display: none;
}

.hidden-experience.visible {
    display: block;
}

footer {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #999;
    font-size: 0.8rem;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Community Link */
.community-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: #5865F2;
    color: white !important;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.community-link:hover {
    background-color: #4752C4;
    text-decoration: none !important;
}

.community-link i {
    font-size: 1.1rem;
}

.server-stats {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.85rem;
    padding: 4px 0;
}

.server-stats i {
    color: #888;
    font-size: 1rem;
}

.server-stats strong {
    color: #333;
    font-weight: 600;
}

/* Research & Projects Section */
.project-card {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.project-card:hover {
    border-color: #0066cc;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
    background-color: #f8f9fa;
}

.course-badge {
    display: inline-block;
    padding: 4px 10px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.project-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-header strong {
    font-size: 0.95rem;
    color: #000;
}

.project-description {
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e8f0fe;
    color: #1967d2;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 2% auto;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #666;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.2s;
}

.close:hover {
    color: #000;
}

.modal-body {
    display: flex;
    height: 100%;
    padding: 20px;
    gap: 20px;
}

.modal-sidebar {
    flex: 0 0 320px;
    overflow-y: auto;
    padding-right: 20px;
    border-right: 1px solid #e0e0e0;
}

.modal-sidebar h3 {
    font-size: 1.3rem;
    margin-bottom: 4px;
    color: #000;
}

.modal-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #000;
    font-weight: 600;
}

.modal-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
}

.modal-section ul {
    margin-left: 0;
    padding-left: 20px;
}

.modal-section li {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 8px;
    color: #444;
}

.modal-section li strong {
    color: #000;
}

.modal-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-viewer iframe {
    width: 100%;
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px 15px;
    }

    .name {
        font-size: 2rem;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .item-header {
        flex-direction: column;
    }

    .date, .location {
        margin-left: 0;
    }

    .course-badge {
        display: none;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .modal-body {
        flex-direction: column;
        padding: 15px;
    }

    .modal-sidebar {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 15px;
        margin-bottom: 15px;
    }

    .modal-viewer {
        min-height: 500px;
    }
}
