/* articles/style.css */

:root {
    --app-bg: #F0F4F8; /* Light grayish-blue app background */
    --surface: #FFFFFF; /* Pure white for cards */
    --primary: #1A73E8; /* Android/Google Blue */
    --primary-hover: #1557B0;
    --text-main: #202124;
    --text-muted: #5F6368;
    --border-color: #E8EAED;
    
    /* Android Geometry */
    --radius-card: 24px;
    --radius-btn: 50px; /* Pill shape */
    
    /* Layered Shadows */
    --shadow-sm: 0 2px 6px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-hover: 0 12px 32px rgba(26, 115, 232, 0.15);
}

body {
    margin: 0;
    background-color: var(--app-bg);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* THIS RESTORES THE FONT */
    line-height: 1.6;
    overflow-x: hidden;
}

/* The "App Open" Cascade Animation */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- 3. APP BAR (Sticky Header with Glassmorphism) --- */
header {
    background: white; /* Changed to solid white for a cleaner look */
    position: relative; /* THIS FIXES IT: Stops the header from following you */
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 15px 0;
}

.header-content {
    max-width: 1400px;
    color: var(--accent-blue);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
}

.logo-container img {
    height: 50px;
    margin-right: 15px;
}

.title-container h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary);
}

.tagline {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- NEW: Top Icon Row Styling --- */
/* Styling for the icon row container */
.top-icon-row {
    max-width: 1400px;
    /* Reduced top margin from 30px to 20px to pull it closer to the header line */
    margin: 20px auto 10px auto; 
    padding: 0 20px;
    display: flex;
    gap: 30px; 
    /* THIS IS THE FIX: Centers the icons perfectly in the middle of the screen */
    justify-content: center; 
}

/* The link wrapper */
.img-icon-link {
    display: inline-block;
    transition: transform 0.2s ease;
    text-decoration: none;
}

/* The actual PNG image */
.img-icon-link img {
    width: 45px;  /* Set your preferred size here */
    height: auto;
    display: block;
    opacity: 0.85; /* Makes them look slightly more integrated */
    transition: opacity 0.2s ease;
}

/* Hover effects */
.img-icon-link:hover {
    transform: translateY(-3px); /* Gentle lift on hover */
}

.img-icon-link:hover img {
    opacity: 1; /* Brightens on hover */
}


/* --- 3-COLUMN ARTICLE LAYOUT --- */
.main-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr 280px; /* Sidebar | Math | Figures */
    gap: 30px;
    max-width: 1440px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: start;
}

/* Center Column (The Math) */
.journal-entry {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-width: 0; /* Prevents long math formulas from breaking the grid */
}


/* Sidebars (Links & Figures) */
.sidebar-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: bold;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Figure & Image Scaling */
.sidebar-box img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 1200px) {
    .main-wrapper {
        grid-template-columns: 1fr 300px; /* Drops the left sidebar */
    }
    .main-wrapper > aside:first-of-type { display: none; }
}

@media (max-width: 850px) {
    .main-wrapper {
        grid-template-columns: 1fr; /* Stacked layout for mobile */
    }
    .main-wrapper > aside:first-of-type { display: none; }
}







/* articles/style.css */

/* Target the figure sidebar specifically for large plots */
.article-page .main-wrapper > aside.sidebar-box:last-of-type {
    padding: 10px; /* Removes most of the internal white padding */
    width: 320px; /* Gives the whole column a bit more width to breathe */
}

.article-page .main-wrapper > aside.sidebar-box:last-of-type .sidebar-title {
    padding-left: 10px; /* Re-centers the title since we removed the box padding */
}

/* Ensure the image stretches fully into that extra space */
.article-page .main-wrapper > aside.sidebar-box:last-of-type img {
    cursor: zoom-in; /* Changes the mouse to a magnifying glass on hover */
    width: 100%;
}

















/* articles/style.css */

/* THE HIDDEN CONTAINER */
.lightbox-overlay {
    display: none;              /* Hidden by default, JS reveals it */
    position: fixed;            /* Sits on top of the math */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Dark backdrop */
    z-index: 9999;              /* Higher than any sticky headers */
    justify-content: center;    /* Center the figure */
    align-items: center;
}

/* THE ENLARGED PLOT */
.lightbox-overlay img {
    max-width: 90%;             /* Make it take up most of the screen */
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* THE CLOSE (x) BUTTON */
.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 50px;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close-btn:hover {
    color: #ff4d4d; /* Red highlight on hover */
}




/* articles/style.css */

.references-section {
    grid-column: 2; /* Matches the width and position of the math section */
    background: white;
    padding: 25px 35px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: -10px; /* Pulls it closer to the article above */
}

/* LaTeX Bibliography Style */
.bib-list {
    font-size: 0.9rem;
    color: var(--text-main);
    padding-left: 20px;
}

.bib-list li {
    margin-bottom: 12px;
    padding-left: 5px;
    line-height: 1.4;
}

/* Highlight reference when clicking a citation link */
.bib-list li:target {
    background-color: #fff9c4;
    transition: background-color 0.5s;
}



/* articles/style.css */

.main-wrapper {
    align-items: start; /* CRITICAL: Allows children to have their own height and stick */
}

.sidebar-box:last-of-type {
    position: -webkit-sticky; /* Support for Safari */
    position: sticky;
    top: 20px;               /* Distance from the top of the viewport when scrolling */
    z-index: 10;             /* Keeps it above the text flow */
}
