/* Base styles from al-folio theme */
:root {
    --global-bg-color: #ffffff;
    --global-code-bg-color: #f8f9fa;
    --global-text-color: #000000;
    --global-text-color-light: #6c757d;
    --global-theme-color: #000000;
    --global-hover-color: #007bff;
    --global-hover-text-color: #ffffff;
    --global-footer-bg-color: #343a40;
    --global-footer-text-color: #6c757d;
    --global-footer-link-color: #ffffff;
    --global-distill-app-color: #6c757d;
    --global-divider-color: rgba(0, 0, 0, 0.1);
    --global-card-bg-color: #ffffff;
}

body {
    font-family: Helvetica, sans-serif;
    color: var(--global-text-color);
    background-color: var(--global-bg-color);
    line-height: 1.6;
}

.container {
    max-width: 930px;
}

/* Navigation */
.navbar {
    background-color: var(--global-bg-color);
    border-bottom: 1px solid var(--global-divider-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 600;
    color: var(--global-theme-color) !important;
}

.navbar-nav .nav-link {
    color: var(--global-text-color) !important;
    font-weight: 400;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--global-theme-color) !important;
    text-decoration: underline;
}

.navbar-nav .nav-link.active {
    color: var(--global-theme-color) !important;
    font-weight: 600;
    text-decoration: underline;
}

/* Main content */
.main-content {
    margin-top: 80px;
    padding: 20px 0;
}

/* Content area with profile */
.clearfix {
    margin-right: 260px; /* Give space for the profile */
}

/* Post styles */
.post {
    margin-bottom: 2rem;
}

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--global-text-color);
    margin-bottom: 0.5rem;
}

.post-title .font-weight-bold {
    font-weight: 700;
}

.desc {
    font-size: 1.2rem;
    color: var(--global-text-color-light);
    margin-bottom: 1rem;
}

/* Profile section */
.profile {
    margin-bottom: 1rem;
}

.profile.float-right {
    float: right;
    margin-left: 2rem;
    width: 240px;
}

.profile img {
    max-width: 160px;
    height: auto;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.z-depth-1 {
    box-shadow: 0 2px 5px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
}

.rounded {
    border-radius: 0.25rem;
}

.more-info {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--global-text-color-light);
}

.more-info p {
    margin-bottom: 0.25rem;
}

/* Content */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

article p {
    margin-bottom: 1rem;
}

article a {
    color: var(--global-theme-color);
    text-decoration: underline;
}

article a:hover {
    color: var(--global-theme-color);
}

article strong {
    font-weight: 600;
}

article ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

article li {
    margin-bottom: 0.25rem;
}

/* Section headers */
h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--global-text-color);
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid var(--global-theme-color);
    padding-bottom: 0.5rem;
}

h2 a {
    color: inherit;
    text-decoration: none;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--global-text-color);
    margin: 1.5rem 0 1rem 0;
}

/* Education section */
.education {
    margin-bottom: 2rem;
}

.education-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--global-divider-color);
}

.education-item:last-child {
    border-bottom: none;
}

.education-year {
    font-weight: 600;
    color: var(--global-theme-color);
    font-size: 1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.education-degree {
    font-weight: 600;
    color: var(--global-text-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.education-institution {
    color: var(--global-text-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.education-location {
    color: var(--global-text-color-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.education-description {
    color: var(--global-text-color-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* News section */
.news table {
    width: 100%;
    margin-bottom: 1rem;
}

.news table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--global-divider-color);
    vertical-align: top;
}

.news table .date {
    width: 120px;
    font-weight: 600;
    color: var(--global-text-color-light);
    font-size: 0.9rem;
}

/* Publications */
.bibliography {
    margin-bottom: 2rem;
}

.bibliography li {
    list-style: none;
    margin-bottom: 1.5rem;
    padding: 0;
    transition: all 0.3s ease;
}

.bibliography li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.bibliography .author {
    color: var(--global-text-color-light);
    font-style: italic;
    margin-bottom: 0.25rem;
}

.bibliography .author em {
    font-weight: 600;
    font-style: normal;
}

.bibliography .periodical {
    color: var(--global-text-color-light);
    margin-bottom: 0.5rem;
}

.bibliography .links {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.bibliography .links a {
    color: var(--global-theme-color);
    text-decoration: underline;
    font-size: 0.9rem;
}

.bibliography .links .citations {
    color: var(--global-text-color-light);
    font-size: 0.85rem;
}

/* Abstract toggle */
.abstract-toggle {
    margin: 0.5rem 0;
}

.abstract {
    margin-top: 0.5rem;
}

/* Blog styles */
.featured-posts .card {
    transition: all 0.3s ease;
    border: 1px solid var(--global-divider-color);
}

.featured-posts .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hoverable {
    transition: all 0.3s ease;
}

.hoverable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.post-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--global-divider-color);
}

.post-list .post-title {
    color: var(--global-theme-color);
    text-decoration: none;
    font-weight: 600;
}

.post-list .post-title:hover {
    color: var(--global-theme-color);
    text-decoration: underline;
}

.post-meta {
    color: var(--global-text-color-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.post-tags a {
    color: var(--global-text-color-light);
    text-decoration: none;
    font-size: 0.85rem;
}

.post-tags a:hover {
    color: var(--global-theme-color);
    text-decoration: underline;
}

/* Publications page specific */
.publications-search {
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 2rem;
}

.year-header {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--global-theme-color);
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--global-divider-color);
}



.publication-stats {
    padding: 2rem;
    border-radius: 0.25rem;
    text-align: center;
}

.publication-stats h4 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Social icons */
.social {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--global-divider-color);
}

/* Social links in content */
.social-links {
    margin: 1.5rem 0;
}

.social-links .social-icon {
    color: var(--global-text-color);
    margin: 0 0.5rem;
    text-decoration: none;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links .social-icon:hover {
    color: var(--global-theme-color);
}

/* Advisor link styles */
.advisor-link {
    color: var(--global-theme-color) !important;
    text-decoration: none !important;
}

.advisor-link:hover {
    color: var(--global-theme-color) !important;
    text-decoration: none !important;
}

/* Research page styles */
.research-projects {
    margin-top: 2rem;
}

/* Project detail styles */
.project-detail {
    padding-bottom: 3rem;
    border-bottom: 2px solid var(--global-divider-color);
    margin-bottom: 3rem;
}

.project-detail:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.project-title {
    color: var(--global-text-color);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.project-description {
    color: var(--global-text-color);
    line-height: 1.6;
    font-size: 1.1rem;
}

.project-figure {
    margin: 2rem 0;
}

.project-placeholder-large {
    width: 100%;
    height: 250px;
    background-color: var(--global-code-bg-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--global-theme-color);
    transition: all 0.3s ease;
    margin: 0 auto;
    max-width: 600px;
}

.project-placeholder-large:hover {
    background-color: var(--global-theme-color);
    color: white;
}

.project-placeholder-large::after {
    content: attr(data-project);
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

.project-image-large {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.project-image-small {
    max-width: 60%;
    height: auto;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.project-images-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: flex-start;
    margin: 2rem 0;
}

.project-image-item {
    flex: 1;
    text-align: center;
}

.project-image-item img {
    height: 320px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.project-image-item .image-caption {
    color: var(--global-text-color-light);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .project-images-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .project-image-small {
        max-width: 80%;
    }
}

.figure-caption {
    color: var(--global-text-color-light);
    font-size: 0.9rem;
    font-style: italic;
    max-width: 600px;
    margin: 0 auto;
}

.related-work h2 {
    color: var(--global-text-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--global-divider-color);
    padding-bottom: 0.5rem;
}



/* Responsive adjustments */
@media (max-width: 768px) {
    .project-title {
        font-size: 1.6rem;
    }
    
    .project-placeholder-large {
        height: 200px;
    }
}

.contact-icons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contact-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background-color: var(--global-theme-color);
    color: var(--global-hover-text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.contact-icons a:hover {
    background-color: var(--global-hover-color);
    color: var(--global-hover-text-color);
    transform: translateY(-2px);
}

.contact-note {
    font-size: 0.9rem;
    color: var(--global-text-color-light);
}

/* Responsive */
@media (max-width: 768px) {
    .profile.float-right {
        float: none;
        margin-left: 0;
        text-align: center;
        margin-bottom: 1.5rem;
        width: auto;
    }

    .clearfix {
        margin-right: 0; /* Remove margin on mobile */
    }

    .profile img {
        max-width: 150px;
    }

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

    .navbar-nav {
        text-align: center;
    }

    .bibliography .links {
        flex-direction: column;
        align-items: flex-start;
    }

    .publications-search .row {
        margin-bottom: 1rem;
    }

    .publication-stats .row {
        text-align: center;
    }

    .publication-stats .col-md-3 {
        margin-bottom: 1rem;
    }

    .education-item .row {
        flex-direction: column;
    }

    .education-year {
        text-align: left;
        margin-bottom: 0.5rem;
    }
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Pagination */
.pagination .page-link {
    color: var(--global-theme-color);
    border-color: var(--global-divider-color);
}

.pagination .page-link:hover {
    color: var(--global-hover-text-color);
    background-color: var(--global-hover-color);
    border-color: var(--global-hover-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--global-theme-color);
    border-color: var(--global-theme-color);
}

/* Badges */
.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
}

.badge-secondary {
    background-color: #6c757d;
}
