/* =========================================================
   MARINO LAB WEBSITE STYLES
   =========================================================
   This file has two roles:

   1. GLOBAL SITE THEME
      - controls colors, text, navbar, links, images, buttons

   2. PUBLICATIONS PAGE LAYOUT
      - controls the custom publication entries you already built

   HOW TO EDIT THIS FILE IN THE FUTURE
   -----------------------------------
   - If you want to change the overall site colors, go to section 1.
   - If you want to change navbar appearance, go to section 7.
   - If you want to change image spacing/shadows, go to section 9.
   - If you want to change publications layout, go to section 13 onward.
   ========================================================= */


/* =========================================================
   1. COLOR VARIABLES
   =========================================================
   These variables define the color palette for the whole site.
   Change these first if you want to update the visual identity.
   ========================================================= */
:root {
  /* Main page background */
  --bg-main: #0f2a3f;

  /* Slightly lighter dark tone, useful for navbar if you want separation */
  --bg-secondary: #435365;

  /* Main body text */
  --text-main: #e6eef5;

  /* Bright white for headings */
  --text-heading: #ffffff;

  /* Slightly muted text for captions and secondary elements */
  --text-muted: #c9d6e2;

  /* Accent color inspired by your figures */
  --accent-gold: #f2a65a;

  /* Lighter version of accent for hover effects */
  --accent-gold-light: #ffd08a;

  /* Soft border color */
  --border-soft: rgba(255, 255, 255, 0.12);

  /* Soft image / block shadow */
  --shadow-soft: rgba(0, 0, 0, 0.16);
}


/* =========================================================
   2. GLOBAL PAGE STYLES
   =========================================================
   These rules affect the whole website.
   ========================================================= */
body {
  background-color: var(--bg-main);
  color: var(--text-main);

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;

  line-height: 1.7;
}

/* Subtle hexagonal dot background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(circle at 20% 10%, rgba(74, 144, 226, 0.14), transparent 32%),
    radial-gradient(circle at 85% 75%, rgba(242, 166, 90, 0.10), transparent 30%),

    radial-gradient(circle, rgba(255,255,255,0.15) 1.4px, transparent 1.8px),
    radial-gradient(circle, rgba(255,255,255,0.15) 1.4px, transparent 1.8px),
    var(--bg-main);

  background-size:
    auto,
    auto,
    48px 83px,
    48px 83px,
    auto;

  background-position:
    center,
    center,
    0 0,
    24px 41.5px,
    center;
}

/* Keep Quarto page/footer backgrounds transparent so the grid continues */
.page-footer,
.nav-footer,
footer,
main,
main.content {
  background: transparent !important;
}


/* =========================================================
   3. MAIN CONTENT WIDTH
   =========================================================
   Controls how wide the main page content can become.
   Increase if the page feels too narrow.
   Decrease if text feels too stretched horizontally.
   ========================================================= */
main.content {
  max-width: 1250px;
}


/* =========================================================
   4. HEADINGS
   =========================================================
   Controls all heading levels across the site.
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}

/* Page title spacing */
h1 {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

/* Section title spacing */
h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Subsection title spacing */
h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}


/* =========================================================
   5. PARAGRAPHS, LISTS, AND EMPHASIS
   =========================================================
   Keeps text readable and visually balanced.
   ========================================================= */
p {
  margin-bottom: 1.1rem;
}

ul, ol {
  margin-bottom: 1.1rem;
}

/* Strong text gets the accent color */
strong {
  color: var(--accent-gold);
  font-weight: 600;
}


/* =========================================================
   6. LINKS
   =========================================================
   Controls all normal links across the site.
   ========================================================= */
a {
  color: var(--accent-gold);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--accent-gold-light);
  text-decoration: underline;
}


/* =========================================================
   7. NAVBAR
   =========================================================
   Controls the top navigation bar.
   If you want the navbar to match the page background exactly,
   change var(--bg-secondary) to var(--bg-main).
   ========================================================= */
.navbar {
  background-color: var(--bg-secondary) !important;
  border-bottom: 1px solid var(--border-soft);
  box-shadow: 0 2px 8px var(--shadow-soft);
}

/* Navbar text and links */
.navbar-brand,
.navbar-nav .nav-link,
.navbar .menu-text {
  color: var(--text-main) !important;
}

/* Make only "Marino" bold in the navbar title */
.navbar-brand strong {
  color: inherit;
  font-weight: 700;
}

/* Navbar hover color */
.navbar-brand:hover,
.navbar-nav .nav-link:hover,
.navbar .menu-text:hover {
  color: var(--accent-gold) !important;
}

/* Active navbar page */
.navbar-nav .nav-link.active {
  color: var(--text-heading) !important;
  font-weight: 600;
}

/* Search icon / navbar icons */
.navbar i,
.navbar svg {
  color: var(--text-main) !important;
}


/* =========================================================
   8. HORIZONTAL RULES
   =========================================================
   Styles the --- separators used in Quarto.
   ========================================================= */
hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: 2rem 0;
}


/* =========================================================
   9. IMAGES AND FIGURES
   =========================================================
   Controls image size behavior, spacing, and shadow.
   If you prefer flatter images, remove the box-shadow line.
   ========================================================= */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Figure captions under images */
.figure-caption,
figcaption {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}


/* =========================================================
   10. BUTTONS
   =========================================================
   Useful for call-to-action links such as:
   [Explore Research](research.qmd){.btn .btn-outline-light}
   ========================================================= */
.btn-outline-light {
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  background-color: transparent;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  transition: all 0.2s ease;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: var(--accent-gold);
  color: var(--bg-main);
  text-decoration: none;
}


/* =========================================================
   11. OPTIONAL HERO SECTION
   =========================================================
   Use this only if you wrap homepage content in:
   ::: {.hero}
   ...
   :::
   ========================================================= */
.hero {
  max-width: 900px;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.hero h1,
.hero h2 {
  margin-bottom: 1rem;
}


/* =========================================================
   12. QUARTO CLEANUP
   =========================================================
   Removes automatic anchor-link icons from headings.
   ========================================================= */
.anchorjs-link,
.anchor-section,
.quarto-anchor {
  display: none !important;
}


/* =========================================================
   13. PUBLICATIONS LAYOUT
   =========================================================
   This is your original publications styling, preserved and
   slightly commented for future editing.
   ========================================================= */

/* One publication entry: image on left, text on right */
.pub-entry {
  display: flex;
  gap: 2.5rem;              /* Space between image and text */
  align-items: center;      /* Vertically align image and text */
  margin-bottom: 3rem;      /* Space below each entry */
  transition: transform 0.2s ease;
}

/* Small hover lift effect */
.pub-entry:hover {
  transform: translateY(-2px);
}


/* =========================================================
   14. PUBLICATION IMAGE COLUMN
   ========================================================= */

/* Width of the left image column */
.pub-image {
  width: 420px;
  flex-shrink: 0;           /* Prevent image column from shrinking too much */
}

/* Publication thumbnail image */
.pub-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;       /* Slight rounded corners */
}


/* =========================================================
   15. PUBLICATION TEXT COLUMN
   ========================================================= */

/* Right-side text block */
.pub-text {
  flex: 1;                  /* Take remaining horizontal space */
  min-width: 0;             /* Prevent overflow issues */
  display: flex;
  flex-direction: column;
  justify-content: center;
}


/* =========================================================
   16. PUBLICATION TITLE
   ========================================================= */

/* Title block styling */
.pub-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 700;
}

/* Publication title link */
.pub-title a {
  text-decoration: none;
}

/* Underline title on hover */
.pub-title a:hover {
  text-decoration: underline;
}


/* =========================================================
   17. PUBLICATION META
   =========================================================
   Journal name, year, and related metadata.
   ========================================================= */
.pub-meta {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.85;
}

/* Journal in italics */
.pub-journal {
  font-style: italic;
}

/* Year slightly emphasized */
.pub-year {
  font-weight: 700;
  margin-left: 0.35rem;
}


/* =========================================================
   18. PUBLICATION YEAR HEADINGS
   =========================================================
   For headings like 2025, 2024, etc.
   ========================================================= */
.pub-year-heading {
  margin: 3rem 0 1.25rem 0;
  font-size: 2rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 0.35rem;
}


/* =========================================================
   19. RESPONSIVE / MOBILE ADJUSTMENTS
   =========================================================
   Makes the publication layout stack vertically on smaller screens.
   ========================================================= */
@media (max-width: 900px) {
  .pub-entry {
    flex-direction: column;   /* Stack image above text */
    gap: 1rem;
    align-items: flex-start;
  }

  .pub-image {
    width: 100%;
  }

  .pub-image img {
    width: 100%;
    height: auto;
  }

  .pub-title {
    font-size: 1.3rem;
  }
}

/* Force Quarto figures to center properly */
.quarto-figure {
  text-align: center;
}

/* Ensure images inside figures are centered */
.quarto-figure img {
  display: inline-block;
}

/* Catch all images and center them */
img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   CUSTOM FOOTER
   ========================================================= */

.custom-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: nowrap;

  padding: 1.5rem 0;
  margin-top: 3rem;

  border-top: 1px solid rgba(255,255,255,0.15);

  font-size: 0.95rem;
}

/* Each block (links / linkedin / copyright) */
.footer-section {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Footer links */
.custom-footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

.custom-footer a:hover {
  color: var(--accent-gold-light);
  text-decoration: underline;
}

/* Copyright styling */
.footer-copy {
  opacity: 0.75;
}

/* Mobile layout */
@media (max-width: 700px) {
  .custom-footer {
    flex-direction: column;
    gap: 0.8rem;
  }
}

/* Icon styling */
.custom-footer i {
  color: var(--accent-gold);
  font-size: 1.1rem;
  margin-right: 0.4rem;
}

/* Divider between links */
.footer-divider {
  margin: 0 0.5rem;
  opacity: 0.6;
}

/* =========================================================
   IMAGE GALLERIES
   =========================================================
   Two uses:
   1. Homepage featured gallery
   2. Publications cover gallery

   HOW TO EDIT:
   - Change min width in grid-template-columns to make tiles larger/smaller
   - Change aspect-ratio to make images taller/wider
   - Change hover transform if you want stronger/weaker movement
   ========================================================= */

/* Shared gallery container */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

/* Each gallery item */
.gallery-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Shared image card look */
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;        /* Homepage images: moderately wide */
  object-fit: cover;          /* Crop neatly without distortion */
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Hover effect */
.gallery-item:hover img {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.20);
}

/* Caption under image */
.gallery-caption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Homepage gallery variant */
.feature-gallery .gallery-item img {
  aspect-ratio: 4 / 3;
}

/* Publications gallery variant */
.cover-gallery {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.cover-gallery .gallery-item img {
  aspect-ratio: 3 / 4;        /* Better for journal covers */
  object-fit: cover;
}

/* Optional: slightly tighter caption for publication covers */
.cover-gallery .gallery-caption {
  font-size: 0.9rem;
}

/* Mobile spacing */
@media (max-width: 700px) {
  .image-gallery {
    gap: 1rem;
  }
}

/* =========================================================
   HERO SLIDESHOW
   ========================================================= */

.hero-slideshow {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 2rem auto 3rem auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}

.hero-slideshow .slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slideshow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

/* Caption overlay */
.slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.4;
}

/* =========================================================
   PUBLICATION COVER CAROUSEL
   =========================================================
   This creates a horizontal scrolling strip of journal covers.

   HOW TO EDIT:
   - Change min-width to make covers larger/smaller
   - Change aspect-ratio if your covers are taller/wider
   - Change gap for more or less space between covers
   ========================================================= */

.cover-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 1rem 0 1.25rem 0;
  margin: 2rem 0 3rem 0;

  /* smoother scrolling on touch devices */
  -webkit-overflow-scrolling: touch;

  /* subtle divider above and below */
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* scrollbar styling */
.cover-carousel::-webkit-scrollbar {
  height: 10px;
}

.cover-carousel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
}

.cover-carousel::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 999px;
}

.cover-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.4);
}

/* each cover item */
.cover-item {
  flex: 0 0 auto;
  min-width: 150px;
  max-width: 170px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

/* cover image */
.cover-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  margin: 0;
}

/* hover effect */
.cover-item:hover img {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24);
}

/* caption */
.cover-label {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* mobile */
@media (max-width: 700px) {
  .cover-item {
    min-width: 170px;
  }

  .cover-label {
    font-size: 0.9rem;
  }
}

/* =========================================================
   PEOPLE PAGE LAYOUT
   ========================================================= */

.people-entry {
  display: flex;
  align-items: flex-start;
  gap: 3rem;
  margin: 2rem 0 3rem 0;
}

.people-entry img {
  width: 220px !important;
  max-width: 220px !important;
  height: auto;
  border-radius: 10px;
  flex-shrink: 0;
  margin: 0;
}

.people-text {
  flex: 1;
  min-width: 0;
}

.people-text h2,
.people-text h3,
.people-text h4 {
  margin-top: 0;
}

/* Stack image and text on tablets/phones, but keep photo controlled */
@media (max-width: 900px) {
  .people-entry {
    flex-direction: column;
    gap: 1.25rem;
  }

  .people-entry img {
    width: 220px !important;
    max-width: 220px !important;
  }
}