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

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

/* Navigation */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #3498db;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: calc(100vh - 250px);
}

.container a {
    color: inherit;
    text-decoration: underline;
}

.container a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    padding: 3rem 0;
    text-align: center;
    border-bottom: 2px solid #ecf0f1;
}

.hero h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* Sections */
section {
    padding: 2rem 0;
}

h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding: 2rem 0 1rem 0;
}

h2 {
    font-size: 1.5rem;
    color: #34495e;
    margin-bottom: 1rem;
    margin-top: 1.5rem;
}

h3 {
    font-size: 1.2rem;
    color: #34495e;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    text-align: justify;
}

/* Research Page */
.research-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
}

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

.video-placeholder {
    background-color: #ecf0f1;
    padding: 3rem;
    text-align: center;
    border-radius: 8px;
    margin-top: 1rem;
    color: #7f8c8d;
    font-style: italic;
}

.video-container {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.video-container video {
    width: 100%;
    height: auto;
    display: block;
}

/* Publications Page */
.publications-list {
    margin-top: 2rem;
}

.publication-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

.publication-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.publication-authors {
    color: #555;
    margin-bottom: 0.25rem;
}

.publication-venue {
    color: #7f8c8d;
    font-style: italic;
}

.publication-year {
    color: #95a5a6;
    font-weight: 600;
}

.publication-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: #3498db;
    text-decoration: none;
}

.publication-link:hover {
    text-decoration: underline;
}

/* Open Source Page */
.repositories-list {
    margin-top: 2rem;
}

.repo-item {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #2ecc71;
    border-radius: 4px;
}

.repo-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.repo-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.repo-name a {
    color: #2c3e50;
    text-decoration: none;
}

.repo-name a:hover {
    color: #3498db;
}

.repo-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.repo-description {
    color: #555;
    margin-bottom: 0.5rem;
}

.repo-language {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #3498db;
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.repo-role {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

.contribution-stats {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.contribution-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #a5d6a7;
}

.contribution-badge.contribution-link {
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.contribution-badge.contribution-link:hover {
    background-color: #c8e6c9;
    border-color: #81c784;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Different colors for different contribution types */
.contribution-badge.pr-badge {
    background-color: #e8eaf6;
    color: #3f51b5;
    border-color: #9fa8da;
}

.contribution-badge.pr-badge:hover {
    background-color: #c5cae9;
    border-color: #7986cb;
}

.contribution-badge.commit-badge {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-color: #a5d6a7;
}

.contribution-badge.commit-badge:hover {
    background-color: #c8e6c9;
    border-color: #81c784;
}

/* Update badge used for 'Fetched' info banners */
.update-banner {
    padding: 15px 20px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    margin-bottom: 30px;
    font-size: 15px;
    color: #2e7d32;
    border-radius: 4px;
}
.update-banner a {
    color: #2e7d32;
    font-weight: 600;
}

.contribution-badge.issue-badge {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

.contribution-badge.issue-badge:hover {
    background-color: #ffe0b2;
    border-color: #ffb74d;
}

/* CV Page */
.cv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0 1rem 0;
    border-bottom: 2px solid #ecf0f1;
}

.cv-download-section {
    text-align: right;
}

.cv-download-note {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.download-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: white !important;
    text-decoration: none !important;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #2980b9;
    color: white !important;
}

.cv-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #ecf0f1;
}

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

.cv-section.cv-compact {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

.cv-section.cv-compact p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.cv-section h2 {
    margin-bottom: 0.75rem;
}

.cv-list {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.cv-list li {
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

.cv-section h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
}

.cv-section h3:first-of-type {
    margin-top: 1rem;
}

.cv-section .date {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.cv-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.cv-section li {
    margin-bottom: 0.5rem;
}

/* Status Messages */
.status-message {
    padding: 1rem;
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    margin: 1rem 0;
    border-radius: 4px;
}

.error-message {
    padding: 1rem;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    margin: 1rem 0;
    border-radius: 4px;
}

.fallback-message {
    padding: 1rem;
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #3498db;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .cv-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

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

    .footer-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
