/* ==============================================
   PUBLICATIONS PAGE - CLEANED & ORGANIZED STYLES
   (This version works with the original HTML structure)
   ============================================== */

/* ----------------------------
   1. Main Container Layout
   ---------------------------- */
/* This is the main wrapper for the publications list.
   It centers the content and sets the maximum width. */
.publications-container {
    max-width: 1050px;
/*    max-width: var(--container-width);*/
    margin: 0 auto;
    padding: 2rem;
}

/* ----------------------------
   2. Headings
   ---------------------------- */
.publications-container h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.publications-container h3 {
    color: #005fa3;
    margin: 2rem 0 1rem;
    font-size: 1.1rem;
}

/* ----------------------------
   3. Individual Publication Entry
   ---------------------------- */
.pub {
    margin-bottom: 1.8rem;
    padding-left: 1rem;
    border-left: 3px solid #f0f0f0;
    transition: all 0.3s ease;
}

.pub:hover {
    border-left-color: #005fa3;
    background-color: #f8f9fa;
}

.pub .header {
    font-weight: 600;
    color: #222;
    margin-bottom: 0.3rem;
}

.pub .authors {
    color: #555;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    line-height: 1.4; /* Improves readability for long author lists */
}

.pub .journal {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

.pub .journal a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px dotted #0066cc;
}

.pub .journal a:hover {
    color: #e63946;
    border-bottom-style: solid;
}


/* =============================================================
   REPLACE the old academic links styles with this new version.
   ============================================================= */

/* --- 5. Academic Service Links Section (Icon-Only) --- */

.academic-links-section {
    text-align: center;
    padding: 1rem 2rem;
/*    margin-top: 2rem;*/
    border-top: 5px solid #e0e0e0;
}

.academic-links-section h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.links-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Vertically align icons */
    flex-wrap: wrap;
    gap: 3rem; /* More space between icons */
}

/* This is the main link style that makes the image clickable */
.academic-icon-link {
    display: inline-block;
    /* Remove all button-like styles */
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
    
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* This styles the image itself */
.academic-icon-link img {
    /* Set a consistent height for all logos */
    height: 60px;
    
    /* Let the width adjust automatically to maintain the aspect ratio */
    width: auto;
    
    /* A subtle effect for a non-hovered state */
    opacity: 1;
    
    
    transition: opacity 0.3s ease;
}

/* --- Hover Effects --- */
.academic-icon-link:hover {
    transform: scale(1.1); /* Slightly enlarge the icon on hover */
}

.academic-icon-link:hover img {
    opacity: 1; /* Make the icon fully opaque on hover */
}

/* ----------------------------
   5. Responsive Design
   ---------------------------- */
@media (max-width: 768px) {
    .publications-container {
        padding: 1rem;
    }
    
    .pub {
        padding-left: 0.5rem;
    }
}

/* ==============================================
   - Responsive adjustments for academic icons.
   ============================================== */

@media (max-width: 768px) {
    
    /* Target the container that holds the icons */
    .links-container {
        /* Reduce the space between the icons on smaller screens */
        gap: 2rem;
    }

    /* Target the icon images themselves */
    .academic-icon-link img {
        /* Make the icons smaller on mobile */
        height: 25px;
    }
}

/* ==============================================
   Abstract toggle buttion
   ============================================== */

/* --- Abstract Toggle Button --- */
.toggle-abstract-btn {
    background-color: transparent;
    border: 1px solid #d0dbe5;
    color: #34495e;
    padding: 6px 14px;
    border-radius: 50px; /* Pill shape */
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s ease-in-out;
}

.toggle-abstract-btn:hover {
    background-color: #f0f4f8;
    border-color: #a7b7c7;
}

/* --- The Abstract Content Box --- */
.abstract-content {
    /* Hide the abstract by default */
    display: none;
    
    /* Styling for when it's visible */
    background-color: #f8f9fa;
    border-left: 3px solid var(--accent-color-hover);
    padding: 1rem 1.5rem;
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #34495e;
}

/* A simple class to add a fade-in animation, toggled by JS */
@keyframes fadeInAbstract {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.abstract-content.visible {
    animation: fadeInAbstract 0.4s ease;
}

/* ==============================================
   ADD THIS TO THE END of publications.css
   - Styles for new publication action buttons.
   ============================================== */

/* --- Publication Action Buttons --- */
.pub-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 6px 14px;
    border-radius: 50px; /* Pill shape */
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.action-button i {
    font-size: 0.8rem;
}

/* --- Individual Button Colors --- */
.action-button.journal-btn {
    background-color: #f0f4f8;
    border-color: #d0dbe5;
    color: #34495e;
}
.action-button.journal-btn:hover {
    background-color: #34495e;
    border-color: #34495e;
    color: #fff;
}

.action-button.arxiv-btn {
    background-color: #fbeee6;
    border-color: #f2d9cb;
    color: #B35520;
}
.action-button.arxiv-btn:hover {
    background-color: #B35520;
    border-color: #B35520;
    color: #fff;
}

.action-button.bibtex-btn {
    background-color: #eaf6f8;
    border-color: #c4e4e8;
    color: #0097A7;
}
.action-button.bibtex-btn:hover,
.action-button.bibtex-btn.active { /* Style for when it's open */
    background-color: #0097A7;
    border-color: #0097A7;
    color: #fff;
}


/* --- BibTeX Content Block --- */
/* =====================================================================
   IN publications.css, REPLACE all old .bibtex-content styles
   with this new, definitive block.
   ===================================================================== */

/* --- The Main BibTeX Content Block --- */
.bibtex-content {
    display: none; /* Hidden by default */
    position: relative;
    background-color: #2c3e50;
    color: #ccc;
    border-radius: 8px;
    padding: 1.5rem; /* Control the internal spacing here */
    overflow: hidden; /* This is a key part of the fix */
}

/* --- This is the CRITICAL part for fixing wrapping and spacing --- */
.bibtex-content pre,
.bibtex-content code {
    /* 1. Reset all browser defaults */
    margin: 0;
    padding: 0;
/*    font-family: 'Courier New', Courier, monospace;*/
    font-family: 'Consolas', 'Menlo', 'Courier New', monospace;
    font-size: 0.9rem;
    
    /* 2. Force the text to wrap under all conditions */
    /*white-space: pre-wrap; */  /* Respects line breaks but also wraps */
    /*word-wrap: break-word;*/   /* An older property for better browser compatibility */
    /*overflow-wrap: break-word;*/ /* The modern standard for forcing wraps */
    
    /* 3. Ensure the code block fills the container */
    display: block;
    width: 100%;
    
    /* --- THIS IS THE KEY FIX FOR HORIZONTAL SCROLLING --- */
    overflow-x: auto; /* Show horizontal scrollbar ONLY when needed */
        
    /* --- THIS IS THE OTHER KEY FIX --- */
    white-space: pre; /* Tell the browser NOT to wrap lines */
            
    /* Syntax highlighting colors */
    color: #c3e88d;
}

/* Minimal "Highlighting" using CSS */
.bibtex-content code::first-line {
    color: #ffcb6b;
}

/* --- Custom HORIZONTAL Scrollbar --- */
/* This now styles the horizontal scrollbar at the bottom */
.bibtex-content pre::-webkit-scrollbar {
    height: 14px; /* Use height for a horizontal scrollbar */
}
.bibtex-content pre::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.bibtex-content pre::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 10px;
    border: 4px solid #2c3e50;
}
.bibtex-content pre::-webkit-scrollbar-thumb:hover {
    background-color: #777;
}


.copy-bibtex-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4a5c6d;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.copy-bibtex-btn:hover {
    background: #5a6c7d;
}
.copy-bibtex-btn.copied {
    background: #27ae60; /* Green for success */
}

/* In publications.css */


