/* ==========================================================================
   Controls width of body text in single.html. Post pages for example
   ========================================================================== */

/* This takes absolute control over the text blocks generated by Hugo */
.article-content > p,
.article-content > ul,
.article-content > ol,
.article-content > blockquote {
    max-width: 720px !important; /* CHANGE THIS VALUE to get your perfect width */
    width: 100% !important;
}

/* ==========================================================================
   Custom Fonts
   ========================================================================== */
/* 1. Define the Regular style */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-ExtraLight.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-Light.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* 2. Define the Italic style */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

/* 3. Define the SemiBold style (600) */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal; 
}

/* 4. Define the Bold style */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('/fonts/PlusJakartaSans-Bold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
}

/* 5. Apply to  website */

body {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
}

h1, h2, h3 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 600 !important;
}

/* 1. Target main navigation menu links */
/*
header .nav-link,
header nav a {
    font-size: 1.1rem !important;
    font-weight: 100 !important;
    text-transform: uppercase; 
}

header .navbar-brand,
header a[class*="text-"] {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}
*/

/* ==========================================================================
   I cannot remeber what this changes
   ========================================================================== */

.custom-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

/* 
.link-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}
*/

/* ==========================================================================
   For image hover in Featured pubs
   ========================================================================== */

 .theme-group .group:hover img {
    opacity: 0.4 !important;
}

/* ==========================================================================
   For lightbox3
   ========================================================================== */

/* Block Blowfish from binding global click zoom handlers to your shortcode images */
a[data-lightbox] img {
    pointer-events: none !important;
}

/* Re-enable pointer events strictly on the parent anchor so Lightbox3 triggers normally */
a[data-lightbox] {
    pointer-events: auto !important;
    display: inline-block;
}

.lightbox3-caption a {
    text-decoration: underline;
}

/* ==========================================================================
   For superscript
   ========================================================================== */

sup {
  font-size: 0.9em;
}

sup:has(> a.footnote-ref) {
  position: relative;
}

/* ====================================================
   Make all markdown tables on the site larger
   ==================================================== */
.prose table {
    font-size: 0.95rem; /* Increases size by roughly 20% */
    line-height: 1.75;  /* Adjusts line spacing for readability */
}

/* ==============================================================================================
   Altmetric Badges - Hugo Blowfish Dark Mode Fixes (CANNOT BE MOVED TO ITS OWN CSS FILE, I TRIED)
   =============================================================================================*/

/* 1. Base badge structural adjustments */
.dark .altmetric-embed {
    position: relative;
    display: inline-block;
}

/* Base graphic inversion to fix donut colors */
.dark .altmetric-embed img,
.dark .altmetric-embed svg,
.dark .altmetric-embed embed {
    filter: invert(0.9) hue-rotate(180deg) !important;
}

/* 2. FORCE INNER TEXT AND TRANSPARENCY
   Altmetric badges generate absolute child containers that trap text layers.
   This pulls the score text forward and strips background block masks. */
.dark .altmetric-embed text,
.dark .altmetric-embed .altmetric-score,
.dark .altmetric-embed a,
.dark .altmetric-embed div {
    color: #ffffff !important;
    fill: #ffffff !important;
    mix-blend-mode: initial !important;
}

/* 3. Popover Layout Fixes 
   Completely overrides text blocks, links, and line items inside the hover modal */

/* Target ONLY the topmost absolute outer containers for background and borders */
.dark div[class*="altmetric-popover"],
.dark div[class*="altmetric-popup"] {
    background-color: #262626 !important; 
    border: 1px solid #404040 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
    z-index: 99999 !important;
}

/* Safely strip background/borders from the internal content wrappers without affecting line elements */
.dark div[class*="-content"],
.dark div[class*="-inner"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Force ALL inner popover typography (links, blocks, list items) to light grey */
.dark [class*="altmetric-popover"] *,
.dark [class*="altmetric-popup"] *,
.dark .tip_mendeley,
.dark [class*="mendeley"] {
    color: #e5e5e5 !important;
    fill: #e5e5e5 !important;
}

/* Ensure color legends look vibrant on the dark card */
.dark [class*="altmetric-popover"] .altmetric-legend-square,
.dark [class*="altmetric-popover"] [style*="background-color"] {
    filter: saturate(1.5) brightness(1.1) !important;
}

