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

:root {
    --primary-text: #2c3e50;
    --secondary-text: #555;
    --link-color: #2980b9;
    --link-hover: #3498db;
    --border-color: #ddd;
    --bg-white: #ffffff;
    --bg-gray: #f8f9fa;
}

body {
    font-family: 'Merriweather', Georgia, serif;
    color: var(--primary-text);
    line-height: 1.7;
    background: var(--bg-white);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Navigation */
.main-nav {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px 30px;
}

.nav-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    color: var(--secondary-text);
    transition: color 0.2s;
    text-transform: uppercase;
}

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

/* Tab Content */
.tab-content {
    display: none;
    padding: 60px 0 80px;
    min-height: calc(100vh - 200px);
}

.tab-content.active {
    display: block;
}

/* Typography */
h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-text);
}

h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--primary-text);
}

h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 30px 0 10px;
    color: var(--primary-text);
}

p {
    margin-bottom: 20px;
}

.title {
    font-size: 20px;
    color: var(--secondary-text);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 18px;
    color: var(--secondary-text);
    margin-bottom: 30px;
}

.bio {
    font-size: 22px;
    font-weight: 300;
    margin: 30px 0;
    color: var(--primary-text);
}

.section-intro {
    font-size: 18px;
    color: var(--secondary-text);
    margin-bottom: 40px;
}

/* About Section */
.about-grid {
    max-width: 900px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 48px;
    align-items: start;
}

.about-photo {
    position: sticky;
    top: 100px;
}

.profile-photo {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .about-photo {
        position: static;
        max-width: 280px;
        margin: 0 auto;
    }
}

.about-text ul {
    margin: 20px 0;
}

.about-text li {
    margin-bottom: 10px;
}

.philosophy {
    border-left: 4px solid var(--link-color);
    padding-left: 24px;
    margin: 40px 0;
    font-style: italic;
    color: var(--secondary-text);
    font-size: 20px;
    line-height: 1.6;
}

.impact-list {
    list-style: none;
    padding: 0;
}

.impact-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.impact-list li:last-child {
    border-bottom: none;
}

/* Publications Section */
.publications-content {
    max-width: 800px;
}

.research-areas {
    list-style: none;
    padding: 0;
}

.research-areas li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.publication {
    margin-top: 30px;
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.publication h3 {
    margin-top: 0;
    color: var(--link-color);
    font-size: 18px;
    line-height: 1.4;
}

.publication .meta {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 15px;
    font-style: italic;
}

.publication p {
    margin-bottom: 0;
}

.article {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.article .meta {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 15px;
}

/* Patents Section */
.patents-content {
    max-width: 800px;
}

.patent {
    margin-top: 30px;
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.patent h3 {
    margin-top: 0;
    color: var(--link-color);
    font-size: 18px;
    line-height: 1.4;
}

.patent .meta {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 15px;
    font-style: italic;
}

.patent p {
    margin-bottom: 0;
}

.patent-areas {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.patent-areas li {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.patent-areas li:last-child {
    border-bottom: none;
}

.patent-highlight {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.patent-highlight h3 {
    margin-top: 0;
    font-size: 20px;
}

.patent-note {
    margin-top: 30px;
    padding: 20px;
    background: #f0f7ff;
    border-left: 4px solid var(--link-color);
    border-radius: 4px;
}

.patent-note p {
    margin-bottom: 0;
    font-size: 14px;
    color: var(--secondary-text);
}

/* Thesis Section */
.thesis-content {
    max-width: 800px;
}

.thesis-title {
    margin-bottom: 50px;
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.thesis-title h3 {
    margin-top: 0;
    color: var(--link-color);
    font-size: 22px;
    line-height: 1.4;
}

.thesis-title .meta {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 20px;
    font-style: italic;
}

.award {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.award h3 {
    margin-top: 0;
    color: var(--link-color);
    font-size: 18px;
}

.award p {
    margin-bottom: 5px;
    color: var(--secondary-text);
}

.award p:last-child {
    margin-bottom: 0;
}

/* Media Section */
.media-grid {
    display: grid;
    gap: 40px;
    max-width: 800px;
}

.media-item {
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.media-item h3 {
    margin-top: 0;
    color: var(--link-color);
    font-size: 16px;
    font-weight: 700;
}

.media-item .date {
    font-size: 14px;
    color: var(--secondary-text);
    margin-bottom: 10px;
}

.media-item .title {
    font-weight: 600;
    margin-bottom: 10px;
}

.media-item .description {
    margin-bottom: 0;
    color: var(--secondary-text);
}

/* Books Section */
.books-content {
    max-width: 800px;
}

.placeholder-note {
    padding: 40px;
    background: var(--bg-gray);
    border-radius: 4px;
    text-align: center;
    color: var(--secondary-text);
    font-size: 18px;
}

.book-entry {
    margin-top: 30px;
    padding: 30px;
    background: var(--bg-gray);
    border-radius: 4px;
}

.book-entry h3 {
    margin-top: 0;
    color: var(--link-color);
    font-size: 20px;
}

.book-meta {
    font-size: 14px;
    color: var(--secondary-text);
    font-style: italic;
    margin-bottom: 15px;
}

/* Chat Widget */
.chat-widget {
    margin-top: 50px;
    max-width: 600px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 30px;
    background: var(--bg-gray);
}

.chat-widget h2 {
    margin-top: 0;
    font-size: 22px;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-white);
    border-radius: 4px;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message-content {
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 80%;
    line-height: 1.5;
}

.ai-message .message-content {
    background: #e3f2fd;
    color: var(--primary-text);
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: var(--link-color);
    color: white;
}

.typing .message-content {
    opacity: 0.6;
    font-style: italic;
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#chat-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 45px;
}

#chat-input:focus {
    outline: none;
    border-color: var(--link-color);
}

#chat-send {
    padding: 12px 20px;
    background: var(--link-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-send:hover {
    background: var(--link-hover);
}

#chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Contact Section */
.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 500px;
    margin-top: 40px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--bg-gray);
    border-radius: 4px;
    text-decoration: none;
    color: var(--primary-text);
    transition: background 0.2s;
}

.contact-link:hover {
    background: #e9ecef;
}

.contact-link svg {
    flex-shrink: 0;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--secondary-text);
    font-size: 14px;
}

/* Books Section */
.books-content {
    margin-top: 40px;
}

.books-content h2 {
    font-size: 24px;
    margin: 50px 0 30px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-text);
}

.books-content h2:first-child {
    margin-top: 0;
}

.book-entry {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.book-entry:last-of-type {
    border-bottom: none;
}

.book-entry h3 {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-text);
    margin-bottom: 10px;
    line-height: 1.4;
}

.book-meta {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--secondary-text);
}

.book-entry p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--secondary-text);
    margin-top: 10px;
}

.book-entry blockquote {
    font-size: 16px;
    line-height: 1.7;
    color: var(--primary-text);
    font-style: italic;
    margin: 10px 0 0 20px;
    padding-left: 20px;
    border-left: 3px solid var(--link-color);
}

.books-note {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--secondary-text);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    .bio {
        font-size: 18px;
    }
    
    .tab-content {
        padding: 40px 0 60px;
    }
}
