/* ===== JON BARRON INSPIRED ACADEMIC DESIGN ===== */

:root {
    --text-primary: #000000;
    --text-secondary: #333333;
    --text-muted: #666666;
    --link-color: #1772d0;
    --link-hover: #f09228;
    --background: #ffffff;
    --border-color: #dddddd;

    --font-family: 'Inter', Arial, sans-serif;
    --font-size-base: 14px;
    --line-height-base: 1.4;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    background: var(--background);
}

/* ===== CONTAINER & LAYOUT ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}

/* ===== PROFILE COLUMN ===== */
.profile-column {
    position: sticky;
    top: 40px;
}

.profile-content.compact {
    padding-top: 0;
    margin-top: 15vh;
}

.profile-content.compact .name,
.profile-content.compact .title {
    transform: translateX(-50px);
    opacity: 0;
    pointer-events: none;
}

.profile-content {
    text-align: center;
    padding: 20px 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.name {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-primary);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateX(-30px);
}

.name.visible {
    opacity: 1;
    transform: translateX(0);
}

.profile-content:not(.compact) .name,
.profile-content:not(.compact) .title {
    transition: all 0.3s ease;
}

.profile-content:not(.compact) .contact-info,
.profile-content:not(.compact) .phd-note {
    transition: transform 0.3s ease;
    transform: translateY(0);
}

.profile-content.compact .contact-info,
.profile-content.compact .phd-note {
    transform: translateY(-60px);
    transition: transform 0.3s ease;
}

.title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.3;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateX(-30px);
}

.title.visible {
    opacity: 1;
    transform: translateX(0);
}

.sidebar-connect {
    margin-bottom: 15px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.sidebar-connect.visible {
    opacity: 1;
    transform: translateY(0);
}

.sidebar-connect-text {
    font-size: 13px;
    color: var(--text-primary);
    margin: 0 0 5px 0;
    font-weight: 600;
    text-align: center;
}

.sidebar-connect-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0;
    text-align: center;
    line-height: 1.3;
    font-style: italic;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.links {
    font-size: 13px;
}

.links a {
    color: var(--link-color);
    text-decoration: none;
}

.links a:hover {
    color: var(--link-hover);
}

.phd-note {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
}

/* ===== CONTENT COLUMN ===== */
.content-column {
    max-width: 650px;
    padding-top: 10px;
}

.content-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.content-header.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

.content-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.content-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    font-weight: 400;
}

.content-connect {
    margin-top: 20px;
}

.connect-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    font-weight: 500;
}

.connect-links {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    align-items: center;
}

.connect-links a {
    font-size: 1.2rem;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.8;
}

.connect-links a:hover {
    transform: scale(1.2);
    opacity: 1;
}

.section {
    margin-bottom: 35px;
}

.section h2 {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 3px;
}

.section p {
    margin-bottom: 12px;
    text-align: justify;
}

.section a {
    color: var(--link-color);
    text-decoration: none;
}

.section a:hover {
    color: var(--link-hover);
}

/* ===== NEWS SECTION ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.news-date {
    font-weight: bold;
    color: var(--text-secondary);
    min-width: 70px;
    font-size: 13px;
}

.news-text {
    flex: 1;
    font-size: 13px;
    line-height: 1.4;
}

/* ===== PUBLICATIONS ===== */
.publication {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eeeeee;
}

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

.pub-title {
    font-size: 15px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 3px;
    line-height: 1.3;
}

.pub-authors {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 3px;
}

.pub-venue {
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pub-description {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    text-align: justify;
}

.pub-links {
    font-size: 12px;
}

.pub-links a {
    color: var(--link-color);
    text-decoration: none;
    margin-right: 3px;
}

.pub-links a:hover {
    color: var(--link-hover);
}

.view-all {
    margin-top: 15px;
    text-align: center;
}

.view-all a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.view-all a:hover {
    color: var(--link-hover);
}

/* ===== PROJECTS ===== */
.project {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eeeeee;
}

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

.project-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.project-description {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
    text-align: justify;
}

.project-links {
    font-size: 12px;
}

.project-links a {
    color: var(--link-color);
    text-decoration: none;
    margin-right: 3px;
}

.project-links a:hover {
    color: var(--link-hover);
}

/* ===== SERVICE SECTION ===== */
.service-item {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 25px 15px;
    }

    .main-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .profile-column {
        position: static;
        text-align: center;
        display: none;
        /* Hide sidebar on mobile */
    }

    .content-header {
        margin-bottom: 30px;
        text-align: center;
    }

    .content-name {
        font-size: 2rem;
    }

    .connect-links {
        justify-content: center;
        gap: 20px;
    }

    .connect-links a {
        font-size: 1.4rem;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .name {
        font-size: 20px;
    }

    .section h2 {
        font-size: 16px;
    }
}

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

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .name {
        font-size: 18px;
    }

    .news-item {
        flex-direction: column;
        gap: 3px;
    }

    .news-date {
        min-width: auto;
        font-weight: bold;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .container {
        max-width: none;
        padding: 0;
    }

    .main-layout {
        grid-template-columns: 200px 1fr;
        gap: 20px;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .section {
        break-inside: avoid;
    }

    a {
        color: var(--text-primary);
        text-decoration: underline;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== SELECTION ===== */
::selection {
    background: rgba(23, 114, 208, 0.2);
}

/* ===== FOCUS STYLES ===== */
a:focus {
    outline: 2px solid var(--link-color);
    outline-offset: 2px;
}

/* ===== DETAILED PAGES STYLES ===== */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    border-bottom: 1px solid var(--border-color);
}

.index-nav {
    justify-content: center;
    padding: 15px 0;
    margin-bottom: 10px;
    margin-bottom: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.page-nav .nav-links {
    display: flex;
    gap: 20px;
}

.page-nav .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.page-nav .nav-links a.active,
.page-nav .nav-links a:hover {
    color: var(--link-color);
    background: rgba(59, 130, 246, 0.1);
}

.page-nav a[href*="index.html"] {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 0;
}

.page-nav a[href*="index.html"]:hover {
    color: var(--link-color);
}

.page-layout {
    max-width: 800px;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

/* Filter Section */
.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--link-color);
    color: white;
    border-color: var(--link-color);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.sort-options select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
}

/* Publications Page */
.publications-container {
    margin-bottom: 40px;
}

.year-section {
    margin-bottom: 30px;
}

.year-header {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--border-color);
}

.publication-item {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
}

.pub-header {
    margin-bottom: 8px;
}

.pub-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.status-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-badge.under-review {
    background: #fff3cd;
    color: #856404;
}

.status-badge.preprint {
    background: #d1ecf1;
    color: #0c5460;
}

.status-badge.published {
    background: #d4edda;
    color: #155724;
}

.pub-tags {
    margin: 10px 0;
}

.tag {
    display: inline-block;
    background: #e9ecef;
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 5px;
    margin-bottom: 3px;
}

.pub-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 12px;
}

.btn-secondary {
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--link-color);
    color: white;
    border-color: var(--link-color);
}

.btn-primary {
    padding: 6px 12px;
    background: var(--link-color);
    border: 1px solid var(--link-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* Statistics */
.pub-stats {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.pub-stats h3 {
    font-size: 16px;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--link-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Tags Cloud */
.research-areas-section {
    margin-bottom: 30px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud-item {
    background: #e9ecef;
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-cloud-item:hover {
    background: var(--link-color);
    color: white;
}

/* Projects Page */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.project-card {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    transition: all 0.2s ease;
}

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

.project-badges {
    display: flex;
    gap: 8px;
}

.featured-badge {
    background: #fff3cd;
    color: #856404;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.project-technologies {
    margin: 10px 0;
    font-size: 13px;
}

.tech-tag {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    margin-right: 4px;
    margin-bottom: 2px;
}

.project-collaboration {
    margin: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Lab Overview */
.lab-overview {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.lab-principles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.principle h4 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.principle p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Technologies Section */
.technologies-section {
    margin-bottom: 30px;
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tech-category h4 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-authors {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-venue {
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.modal-abstract {
    margin-bottom: 15px;
}

.modal-abstract h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.modal-abstract p {
    font-size: 13px;
    line-height: 1.5;
    text-align: justify;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h4,
.modal-section h5 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.modal-section ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.modal-section li {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.experiment-item {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.experiment-status,
.experiment-tech {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Blog Preview Styles (Homepage) - Compact List Style */
.blog-post-preview {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.blog-post-preview:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.blog-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.blog-preview-date {
    font-weight: 500;
}

.blog-preview-category {
    color: var(--text-muted);
    font-size: 11px;
}

.blog-preview-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    color: var(--text-primary);
}

.blog-preview-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-preview-title a:hover {
    color: var(--link-color);
}

.blog-preview-excerpt {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 6px;
}

.blog-preview-tags {
    display: none;
    /* Hide tags on homepage for cleaner look */
}

.blog-preview-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.blog-preview-read-time {
    color: var(--text-muted);
}

.blog-preview-link {
    color: var(--link-color);
    text-decoration: none;
    font-size: 11px;
}

.blog-preview-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Blog Post Content Styles (Reusable) */
.blog-post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px;
    line-height: 1.6;
}

.blog-post-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

/* Simple blog header layout */

.blog-post-main {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-post-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.blog-post-date {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Author info removed - clean row layout */

.blog-post-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0;
    line-height: 1.5;
    font-weight: 400;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
}

/* Responsive design for blog header */
@media (max-width: 768px) {
    .blog-post-title {
        font-size: 1.8rem;
    }
}

.series-info {
    background: #e3f2fd;
    color: #1565c0;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.blog-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 15px 0;
    color: var(--text-primary);
}

.blog-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 25px 0 10px 0;
    color: var(--text-primary);
}

.blog-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.blog-content ul,
.blog-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.blog-content li {
    margin-bottom: 8px;
}

.blog-content strong {
    font-weight: 600;
}

.blog-content code {
    background: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.blog-content pre {
    background: #2d3748 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    margin: 25px 0 !important;
    position: relative !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #4a5568 !important;
}

.blog-content pre code {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 0.9em !important;
    color: #e2e8f0 !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
}

/* Prism.js enhancements */
pre[class*="language-"] {
    background: #2d3748 !important;
    border: 1px solid #4a5568 !important;
    color: #e2e8f0 !important;
    padding: 20px !important;
    border-radius: 8px !important;
    overflow-x: auto !important;
    margin: 25px 0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

code[class*="language-"] {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 0.9em !important;
    color: #e2e8f0 !important;
    background: transparent !important;
}

/* Override Prism default styles */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #8892b0 !important;
}

.token.punctuation {
    color: #8892b0 !important;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f07178 !important;
}

.token.boolean,
.token.number {
    color: #f78c6c !important;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #c3e88d !important;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
    color: #c792ea !important;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
    color: #82aaff !important;
}

.token.keyword {
    color: #c792ea !important;
}

/* Copy button styling */
.copy-to-clipboard-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4a5568;
    color: #e2e8f0;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-to-clipboard-button:hover {
    background: #2d3748;
}

.blog-content blockquote {
    border-left: 4px solid var(--link-color);
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.math-formula {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    text-align: center;
    font-family: 'Times New Roman', serif;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

/* MathJax styling */
.MathJax {
    font-size: 1.2em !important;
}

mjx-container[jax="CHTML"] {
    line-height: 1.3 !important;
}

mjx-container[jax="CHTML"][display="true"] {
    margin: 1.5em 0 !important;
    text-align: center !important;
}

/* Inline math styling */
.blog-content mjx-container[display="true"] {
    margin: 1.5em 0 !important;
}

/* Math formula container enhancements */
.math-formula mjx-container {
    font-size: 1.3em !important;
}

.math-formula mjx-container[display="true"] {
    margin: 0 !important;
}

/* ===== TIMELINE PAGE ===== */
.minimal-timeline-container {
    margin-top: 25px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.minimal-timeline {
    position: relative;
    padding-left: 0;
}

.minimal-timeline-entry {
    margin-bottom: 8px;
    line-height: 1.65;
    text-align: justify;
}

.minimal-timeline-entry p {
    margin: 0;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 400;
}

.minimal-timeline-date {
    font-weight: 700;
    color: var(--text-primary);
    font-style: italic;
    display: inline;
    margin-right: 6px;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.minimal-timeline-content {
    display: inline;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
}

.minimal-timeline-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.minimal-timeline-links {
    display: inline;
    margin-left: 4px;
}

.minimal-timeline-link {
    font-size: 14px;
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 6px;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.2s ease;
}

.minimal-timeline-link:hover {
    border-bottom-color: var(--accent-color);
}

.minimal-timeline-year-section {
    margin-bottom: 35px;
}

.minimal-timeline-year-section:last-child {
    margin-bottom: 0;
}

.minimal-timeline-year-header {
    margin-bottom: 18px;
    position: relative;
}

.minimal-timeline-year {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    display: inline-block;
    padding-right: 20px;
    background-color: var(--background);
    position: relative;
    z-index: 2;
}

.minimal-timeline-year-header::after {
    content: '';
    position: absolute;
    height: 1px;
    background: linear-gradient(to right, var(--border-color) 0%, var(--border-color) 70%, transparent 100%);
    left: 0;
    right: 0;
    top: 50%;
    z-index: 1;
}

.minimal-timeline-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 15px;
}

@media (max-width: 768px) {
    .minimal-timeline-container {
        margin-top: 20px;
        max-width: 100%;
        padding: 0 15px;
    }

    .minimal-timeline-entry {
        margin-bottom: 7px;
        text-align: left;
    }

    .minimal-timeline-entry p {
        font-size: 14px;
    }

    .minimal-timeline-date {
        font-size: 13px;
        display: block;
        margin-bottom: 2px;
        margin-right: 0;
    }

    .minimal-timeline-content {
        font-size: 14px;
        display: block;
    }

    .minimal-timeline-link {
        font-size: 13px;
    }

    .minimal-timeline-year {
        font-size: 18px;
    }

    .minimal-timeline-year-section {
        margin-bottom: 28px;
    }
}

/* Blog Page Styles */
.blog-posts-container {
    margin-bottom: 40px;
}

.blog-post-item {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.blog-post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-post-item.featured {
    border-left: 4px solid var(--link-color);
}

.blog-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.blog-post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.blog-post-badges {
    display: flex;
    gap: 8px;
}

.featured-badge {
    background: #fff3cd;
    color: #856404;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.series-badge {
    background: #e3f2fd;
    color: #1565c0;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 10px;
}

.blog-post-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    color: var(--text-primary);
}

.blog-post-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
}

.blog-post-tags {
    margin-bottom: 15px;
}

.blog-post-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.blog-post-link {
    font-size: 13px;
    color: var(--link-color);
    text-decoration: none;
}

.blog-post-link:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* Blog Series Section */
.blog-series-section {
    margin-bottom: 40px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

.series-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.series-item {
    background: white;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.series-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.series-description {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.series-posts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.series-post {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.series-post:hover {
    background-color: #f8f9fa;
}

.series-post-number {
    background: var(--link-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.series-post-title {
    flex-grow: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.series-post-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* Blog Tags Section */
.blog-tags-section {
    margin-bottom: 40px;
}

/* Archive Section */
.blog-archive-section {
    margin-bottom: 40px;
}

.archive-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.archive-year {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
}

.archive-year-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.archive-posts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archive-post {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.archive-post:hover {
    background-color: white;
}

.archive-post-title {
    font-size: 13px;
    color: var(--text-primary);
    flex-grow: 1;
    margin-right: 10px;
}

.archive-post-date {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Blog Modal Styles */
.blog-modal {
    max-width: 600px;
}

.modal-blog-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.modal-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.modal-series-info {
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px;
    border-radius: 4px;
    margin-top: 8px;
    font-size: 13px;
}

.modal-blog-links {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.filter-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.filter-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.no-series {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 20px;
}

/* Responsive Design for Detailed Pages */
@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .lab-principles {
        grid-template-columns: 1fr;
    }

    .tech-categories {
        grid-template-columns: 1fr;
    }

    .pub-title-section {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .pub-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Blog responsive styles */
    .blog-post-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .blog-post-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .series-container {
        grid-template-columns: 1fr;
    }

    .archive-container {
        grid-template-columns: 1fr;
    }

    .archive-post {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .modal-blog-links {
        flex-direction: column;
    }
}