/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

/* Header Section */
header {
    text-align: center;
    padding: 40px 0 30px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin: 0;
}

.tagline {
    font-size: 1.2em;
    color: #7f8c8d;
    font-weight: 300;
    margin-top: 10px;
}

.header-email {
    margin-top: 15px;
    font-size: 1.05em;
}

.header-email a {
    color: #3498db;
    text-decoration: none;
}

.header-email a:hover {
    text-decoration: underline;
}

.social-icons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.social-icon {
    color: #2c3e50;
    font-size: 1.8em;
    transition: color 0.3s, transform 0.2s;
}

.social-icon:hover {
    color: #3498db;
    transform: translateY(-3px);
}

/* Profile and About Section - Side by Side */
.profile-about {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 50px;
}

.profile-column {
    flex-shrink: 0;
}

.profile-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2c3e50;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.about-column {
    flex: 1;
}

.about-column h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    margin-top: 0;
}

.about-column p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.8;
    text-align: justify;
}

/* Section Styles */
section {
    margin-bottom: 50px;
}

h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Papers Section */
.paper-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 20px;
}

.publications-note {
    font-size: 0.9em;
    color: #7f8c8d;
    text-align: center;
    margin-top: 30px;
    font-style: italic;
}

.publications-note a {
    color: #3498db;
    text-decoration: none;
}

.publications-note a:hover {
    text-decoration: underline;
}

.paper-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: transform 0.2s, box-shadow 0.2s;
}

.paper-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.paper-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    border: 2px solid #ddd;
}

.paper-content {
    flex: 1;
    min-width: 0;
}

.paper-item h4 {
    font-size: 1.1em;
    color: #2c3e50;
    margin-bottom: 10px;
    margin-top: 0;
}

.paper-item .authors {
    color: #555;
    margin-bottom: 5px;
    font-size: 0.95em;
}

.paper-item .venue {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 0.9em;
}

.paper-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1em;
    transition: background-color 0.3s, transform 0.2s;
}

.link-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.link-button i {
    font-size: 0.9em;
}

/* Contact Section */
.contact-info {
    margin-bottom: 30px;
}

.contact-item {
    margin-bottom: 15px;
    font-size: 1.05em;
    line-height: 1.6;
}

.contact-item strong {
    color: #2c3e50;
    margin-right: 10px;
}

.contact-item a {
    color: #3498db;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.social-button {
    padding: 10px 20px;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.95em;
    transition: background-color 0.3s;
}

.social-button:hover {
    background-color: #34495e;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
    border-top: 1px solid #e0e0e0;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
}

.last-updated {
    font-size: 0.85em;
    color: #95a5a6;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    /* Stack profile and about vertically on mobile */
    .profile-about {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .profile-image {
        width: 180px;
        height: 180px;
    }

    .about-column {
        text-align: left;
    }

    /* Stack paper items vertically on mobile */
    .paper-item {
        flex-direction: column;
        align-items: center;
    }

    .paper-image {
        width: 100%;
        max-width: 200px;
        height: auto;
    }

    .paper-content {
        text-align: left;
    }

    .paper-links,
    .social-links {
        justify-content: center;
    }
}

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

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
}

.close-button {
    background: none;
    border: none;
    font-size: 2em;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.close-button:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.bibtex-code {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.copy-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.copy-button:hover {
    background-color: #2980b9;
}

.copy-button i {
    font-size: 1em;
}
