:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

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

/* Header Styles */
.portfolio-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
}

/* Section Styles */
section {
    padding: 3rem 0;
}

.intro-section {
    background-color: var(--light);
    text-align: center;
}

.intro-section p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* AI Chat Section */
.ai-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin: 2rem auto;
    max-width: 900px;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--primary);
}

.popup {
    display: none;
    position: absolute;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    z-index: 10;
    max-width: 300px;
}

/* Chat History */
.chat-history {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background-color: #fafafa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-gray);
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    max-width: 80%;
}

.message.You {
    background-color: var(--primary);
    color: white;
    margin-left: auto;
}

.message.AI {
    background-color: var(--light-gray);
    margin-right: auto;
}

/* Quick Questions */
.quick-questions {
    margin-bottom: 1.5rem;
}

.question-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.question-chip {
    background-color: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.9rem;
}

.question-chip:hover {
    background-color: var(--primary);
    color: white;
}

/* Input Area */
.input-area {
    display: flex;
    gap: 0.5rem;
}

#user-input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
}

.primary-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-btn:hover {
    background-color: var(--primary-dark);
}

/* Portfolio Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .question-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-history {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .timeline {
        padding-left: 40px;
    }
    
    .timeline-date {
        left: -35px;
        width: 30px;
        font-size: 0.8em;
    }
}

.timeline {
    position: relative;
    padding-left: 100px; 
    margin: 30px 0; 
}


.timeline::before {
    content: '';
    position: relative;
    left: 50px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
    margin-right: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-date {
    position: relative;
    left: -100px;
    width: 70px;
    text-align: right;
    color: #666;
    font-size: 0.9em;
    font-weight: 800;
}


.timeline-content {
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-right: 20px;
}

.timeline-content h4 {
    margin-top: 0;
    color: #333;
}

.timeline-content .meta {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    margin-left: 20px;
}

.timeline-content ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
}

/* Skills Styles */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

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

.skills-category h4 {
    margin-bottom: 15px;
    color: #333;
}

.skills-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list li {
    background: #f0f0f0;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    color: #444;
}
/* Publication Grid Styles */
.publication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.publication-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.publication-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-header {
    padding: 20px;
    position: relative;
    cursor: pointer;
    background: #f9f9f9;
}

.card-header h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    padding-right: 25px;
}

.publication-meta {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

.expand-btn {
    position: absolute;
    right: 20px;
    top: 25px;
    transition: transform 0.3s ease;
}

.card-preview {
    padding: 0 20px;
    max-height: 200px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-preview p {
    margin: 0 0 20px 0;
    color: #34495e;
    line-height: 1.5;
}

.card-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding: 0 20px;
}

.abstract-full {
    padding: 10px 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.abstract-full p {
    line-height: 1.6;
    color: #34495e;
}

.publication-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.keyword-tag {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
}

.publication-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.publication-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Active state when expanded */
.publication-card.active .card-full {
    max-height: 1000px;
    padding: 0 20px 20px 20px;
}

.publication-card.active .card-preview {
    max-height: 0;
    padding: 0 20px;
}

.publication-card.active .expand-btn {
    transform: rotate(180deg);
}

.project-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.project-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-header {
    padding: 20px;
    position: relative;
    cursor: pointer;
    background: #f9f9f9;
}

.project-header h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    padding-right: 25px;
}

.project-meta {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

.project-preview {
    padding: 0 20px 20px 20px;
    max-height: 300px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.project-preview p {
    margin: 0;
    color: #34495e;
    line-height: 1.5;
    flex: 1;
}

.project-image {
    width: 150px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding: 0 20px;
}

.project-content {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.project-image-full {
    width: 250px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.project-image-full img {
    width: 100%;
    height: auto;
    display: block;
}

.project-details {
    flex: 1;
}

.project-features {
    margin: 20px 0;
}

.project-features h5 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.project-features ul {
    margin: 0;
    padding-left: 20px;
}

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

.project-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.project-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Active state when expanded */
.project-card.active .project-full {
    max-height: 1000px;
    padding: 0 20px 20px 20px;
}

.project-card.active .project-preview {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

.project-card.active .expand-btn {
    transform: rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-preview {
        flex-direction: column;
    }
    
    .project-image {
        width: 100%;
        height: 150px;
    }
    
    .project-content {
        flex-direction: column;
    }
    
    .project-image-full {
        width: 100%;
        margin-bottom: 20px;
    }
}.project-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.project-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.project-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.project-header {
    padding: 20px;
    position: relative;
    cursor: pointer;
    background: #f9f9f9;
}

.project-header h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    padding-right: 25px;
}

.project-meta {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

.project-preview {
    padding: 0 20px 20px 20px;
    max-height: 300px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.project-preview p {
    margin: 0;
    color: #34495e;
    line-height: 1.5;
    flex: 1;
}

.project-image {
    width: 150px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-full {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    padding: 0 20px;
}

.project-content {
    display: flex;
    gap: 30px;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.project-image-full {
    width: 250px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.project-image-full img {
    width: 100%;
    height: auto;
    display: block;
}

.project-details {
    flex: 1;
}

.project-features {
    margin: 20px 0;
}

.project-features h5 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.project-features ul {
    margin: 0;
    padding-left: 20px;
}

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

.project-link {
    color: #1e40af;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.project-link:hover {
    color: #1e3a8a;
    text-decoration: underline;
}

/* Active state when expanded */
.project-card.active .project-full {
    max-height: 1000px;
    padding: 0 20px 20px 20px;
}

.project-card.active .project-preview {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

.project-card.active .expand-btn {
    transform: rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-preview {
        flex-direction: column;
    }
    
    .project-image {
        width: 100%;
        height: 150px;
    }
    
    .project-content {
        flex-direction: column;
    }
    
    .project-image-full {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Contact Section Styles */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.contact-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 2.5rem;
    color: #4a6fa5;
    margin-bottom: 15px;
}

.contact-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.contact-card p {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.contact-btn {
    display: inline-block;
    background: #4a6fa5;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    margin-top: 10px;
}

.contact-btn:hover {
    background: #3a5a80;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}