body {
    font-family: Arial, sans-serif;
    margin: 40px;
    background-color: #f9f9f9;
}

/* Navigation button styles */
.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 5px 5px;
}

.nav-button {
    background-color: #008B8B;
    color: #ece2e2;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #99D6FF;
}

.nav-button:hover {
    background-color: rgb(100, 146, 179); /* Slightly darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-button:active {
    transform: translateY(0);
}

nav a {
    text-decoration: none;
    /* margin-right: 10px; */
    /* color: #0077cc; */
}

nav a:hover {
    text-decoration: underline;
}

h1 {
    color: #333;
}

hr {
    margin-top: 15px;
    margin-bottom: 15px;
}

.content {
    margin-top: 20px;
}

/* Chat interface styling */
.chat-container {
    max-width: 80%;
    margin: 0 auto;
    padding: 20px;
}

.input-area {
    display: flex;
    width: 100%;
    margin-bottom: 8px;
}

/* Single-line input styling - updated for chat */
.input-area input[type="text"] {
    flex: 1;
    height: 46px;
    padding: 0 16px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
    resize: none;
}

.input-area input[type="text"]:focus {
    border-color: #0366d6;
    box-shadow: 0 0 5px rgba(3, 102, 214, 0.2);
}

/* Button styling with matching height */
.input-area button {
    height: 46px;
    padding: 0 24px;
    background-color: #0078d4;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
}

.input-area button:hover {
    background-color: #005a9e;
}

/* Updated disclaimer styling */
.disclaimer {
    margin: 0 0 20px 0;
    padding: 1px 0;
    font-size: 0.7em;
    color: #666;
    line-height: 1.4;
}

.disclaimer p {
    margin: 0;
}

/* Response container styling */
.response-container {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border: 1px solid #eaecef;
}

.response-container h3 {
    margin-top: 0;
    color: #24292e;
    border-bottom: 1px solid #eaecef;
    padding-bottom: 8px;
    font-size: 18px;
}

.markdown-content {
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid #0366d6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    line-height: 1.6;
}

/* Markdown content styling */
.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.markdown-content code {
    background-color: #f1f1f1;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.markdown-content pre {
    background-color: #f1f1f1;
    padding: 1em;
    overflow-x: auto;
    border-radius: 5px;
}

.error {
    color: #d73a49;
    font-weight: bold;
    padding: 10px;
    background-color: #fff8f8;
    border-left: 4px solid #d73a49;
    margin: 15px 0;
}

.contact-list {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
}

.contact-list li {
    margin-bottom: 15px;
}

.contact-list a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #0077cc;
    transition: color 0.3s;
}

.contact-list a:hover {
    color: #004488;
}

.contact-list i {
    margin-right: 10px;
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.language-selector a {
    text-decoration: none;
    color: #333;
    padding: 3px 3px;
    border-radius: 3px;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
}

.language-selector a:hover {
    background-color: #f0f0f0;
}

.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Chat interface styling */
.chat-container {
    /* max-width: 800px; */
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.conversation-history {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #eaecef;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.user-message,
.assistant-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 8px;
}

.user-message {
    background-color: #e3f2fd;
    margin-left: 20px;
    border-left: 4px solid #2196F3;
}

.assistant-message {
    background-color: #fff;
    margin-right: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message-header {
    font-weight: bold;
    margin-bottom: 5px;
}

.clear-chat {
    display: inline-block;
    margin-bottom: 15px;
    padding: 5px 10px;
    background-color: #f1f1f1;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    font-size: 0.8em;
}

.clear-chat:hover {
    background-color: #e0e0e0;
}

.profile-container {
    position: relative;
    padding-top: 250px; /* Space for the image above content */
    text-align: center; /* Center align text content */
    margin-bottom: 30px;
}

.profile-container p {
    margin-top: 20px;
    text-align: justify; /* Add this line to justify text */
    line-height: 1.6; /* Improve readability of justified text */
}

.portrait {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%); /* Perfect centering */
    width: 200px;
    border-radius: 10px;
    object-fit: cover; /* Ensure image fills the circle properly */
    border: 4px solid #fff; /* White border around the circle */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Add some spacing for the heading */
.profile-container p {
    margin-top: 20px;
}

@media (max-width: 768px) {
    .profile-container {
        padding-top: 180px; /* Slightly less space on mobile */
    }
    
    .portrait {
        width: 150px;
        height: 150px;
    }
}

.publication-list ul {
    list-style-type: none;
    padding-left: 0;
}

.publication-list li {
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.pub-year {
    flex: 0 0 60px;
    font-weight: bold;
    color: #0078d4;
}

.pub-content {
    flex: 1;
}

.authors {
    font-weight: 500;
}

.title {
    font-style: italic;
}

.journal {
    font-weight: 500;
}

.doi {
    color: #0078d4;
    text-decoration: none;
}

.doi:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .publication-list li {
        flex-direction: column;
    }
    
    .pub-year {
        margin-bottom: 5px;
    }
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.about-section:last-child {
    border-bottom: none;
}

.about-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.about-section p {
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 15px;
}

.two-column {
    display: flex;
    gap: 30px;
}

.column {
    flex: 1;
}

.timeline {
    list-style-type: none;
    padding-left: 0;
}

.timeline li {
    position: relative;
    padding-left: 100px;
    margin-bottom: 20px;
}

.timeline .date {
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #3498db;
}

.timeline .content {
    border-left: 2px solid #3498db;
    padding-left: 20px;
}

.timeline .content strong {
    display: block;
    margin-bottom: 5px;
}

.timeline .content .note {
    font-style: italic;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.highlight-list {
    padding-left: 20px;
}

.highlight-list li {
    margin-bottom: 10px;
    position: relative;
}

.highlight-list li:before {
    color: #3498db;
    position: absolute;
    left: -20px;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.skill-category {
    flex: 1;
    min-width: 250px;
}

.skill-category h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skill-name {
    font-weight: 500;
}

.skill-level {
    display: flex;
    gap: 3px;
}

.skill-level:before {
    content: "";
    width: 50px;
    height: 8px;
    background: linear-gradient(to right,
        #3498db 0%, #3498db var(--percent),
        #e0e0e0 var(--percent), #e0e0e0 100%);
    border-radius: 4px;
}

.level-1:before { --percent: 20%; }
.level-2:before { --percent: 40%; }
.level-3:before { --percent: 60%; }
.level-4:before { --percent: 80%; }
.level-5:before { --percent: 100%; }

.language-list {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.language-list li {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.language {
    font-weight: 500;
}

.proficiency {
    font-size: 0.9em;
    padding: 3px 8px;
    border-radius: 3px;
}

.native { background-color: #d4edda; color: #155724; }
.c1 { background-color: #d1ecf1; color: #0c5460; }
.n4 { background-color: #fff3cd; color: #856404; }

.cta-section {
    text-align: center;
    margin-top: 40px;
}

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

.cta-button {
    background-color: #008B8B;
    color: #ece2e2;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.cta-button:hover {
    background-color: rgb(100, 146, 179); /* Slightly darker blue on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .two-column {
        flex-direction: column;
    }
    
    .timeline li {
        padding-left: 0;
        padding-top: 30px;
    }
    
    .timeline .date {
        top: 0;
        left: 0;
    }
    
    .skills-container {
        flex-direction: column;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
}