/* CSS Variables for Dark Mode Only */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #94a3b8;
    --background: #0f172a;
    --background-alt: #1e293b;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --error: #ef4444;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
    font-size: 16px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text);
    letter-spacing: -0.025em;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-brand:hover {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

.nav-menu a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
    }

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

    .nav-menu a {
        padding: 0.75rem 0;
        font-size: 1rem;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background: linear-gradient(180deg, var(--background-alt) 0%, var(--background) 100%);
}

.hero-greeting {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.hero-affiliation {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 2rem;
}

.hero-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

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

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}

.about-image {
    display: flex;
    justify-content: center;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
    overflow: hidden; /* Ensure image is clipped */
}

.avatar .profile-pic {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the avatar area without distortion */
    border-radius: 50%; /* Inherit or ensure circular shape */
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bio {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.about-social a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.about-social a i {
    font-size: 1.5rem; /* ~50% larger */
}

.about-social a:hover {
    color: var(--primary);
}

.optional-social-link {
    /* Hide by default, can be overridden if needed */
    display: none;
}

/* Publications Section */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.publication-item {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.5rem 0.25rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.publication-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.publication-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.publication-authors {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.publication-venue {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.publication-year {
    font-size: 0.875rem;
    color: var(--secondary);
}

.publication-abstract {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    margin-bottom: 0;
}


.publications-more {
    text-align: center;
    margin-top: 2rem;
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.2s ease;
}

.research-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.research-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1rem;
}

.research-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.research-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Project Cards */
a.project-card {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

/* Blog List Spacing */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-tag {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.blog-post {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.blog-post:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.blog-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.blog-date {
    font-size: 0.875rem;
    color: var(--secondary);
}

.blog-excerpt {
    color: var(--text-light);
}

.blog-read-more {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-read-more:hover {
    text-decoration: underline;
}

.blog-more {
    text-align: center;
    margin-top: 2rem;
}

/* Contact Section */
.contact-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-email-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.contact-email-row svg {
    color: var(--primary);
    flex-shrink: 0;
}

#contact-email-link {
    color: var(--primary);
    text-decoration: none;
}

#contact-email-link:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--background-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    width: 66%;
    min-width: 704px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--background);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: var(--success);
    color: var(--success);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    display: none;
}

.form-success.show {
    display: block;
}

/* Footer */
.footer {
    background: var(--background-alt);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

}

@media (max-width: 768px) {
    .contact-form {
        width: 100%;
        min-width: unset;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .hero {
        padding-top: 100px;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-affiliation {
        font-size: 1rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .about-content {
        gap: 1.5rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .publication-item,
    .form-group input,
    .form-group textarea {
        padding: 0.625rem 0.875rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-links,
    .about-social,
    .publications-more,
    .blog-more,
    .contact-form,
    .footer {
        display: none;
    }

    .section {
        padding: 2rem 0;
    }

    body {
        font-size: 12pt;
    }

    .publication-item {
        page-break-inside: avoid;
    }
}

/* Nav Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Post Content Styling */
#blog-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--background-alt);
    border-radius: 12px;
    border: 1px solid var(--border);
}

#blog-post-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.blog-post-date {
    font-size: 0.95rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    display: block;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

#blog-post-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

#blog-post-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

#blog-post-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

#blog-post-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

#blog-post-content a {
    color: var(--primary);
    text-decoration: underline;
}

#blog-post-content ul,
#blog-post-content ol {
    color: var(--text-light);
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

#blog-post-content ul li,
#blog-post-content ol li {
    margin-bottom: 0.5rem;
}

#blog-post-content strong {
    font-weight: 600;
    color: var(--text);
}

#blog-post-content em {
    font-style: italic;
}

#blog-post-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

#blog-post-content pre {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

#blog-post-content code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #e0e0e0; /* Lighter color for code in dark mode */
}

#blog-post-content pre code {
    display: block;
    padding: 0;
    background: none;
    border: none;
    color: var(--text);
}
