/* ------------ Main Layout ------------ */
  main {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* Allows content to wrap on smaller screens */
  }

  /* ------------ Responsive ------------ */
  @media (max-width: 768px) {
    header {
      text-align: center;
    }
  
    .header-content {
      flex-direction: column;
      gap: 0.5rem;
    }
  
    main {
      flex-direction: column; 
    }
  
/* ------------ Interactive Elements ------------ */
/* Text with hover effect */
    .nav-links {
      flex-direction: column;
      gap: 0.5rem;
    }}

    /* Clickable text class */
    .jump {
      transition: transform 0.2s ease;
    }

    .jump:hover {
      color: rgb(59, 96, 156);
    }

/* ------------ Gallery Layout ------------ */
    .gallery-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      margin: 2rem 0;
      justify-content: center; /* Center-align the gallery items */
    }
    
    .gallery-item {
      width: 280px;
      background: #fff;
      border-radius: 10px;
      padding: 1rem;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      cursor: pointer;
      text-align: center;
      transition: transform 0.2s;
    }
    
    .gallery-item:hover {
      transform: translateY(-4px); /* Lift the item slightly on hover */
    }
    
    .gallery-item img {
      width: 100%;
      height: auto;
      border-radius: 8px;
    }

/* ------------ Embedded Content Styling ------------ */
/* Adjust iframe specifically for one chart */
    iframe[src*="random_forest_regression_smaller_fig.png"] {
    zoom: 0.35 !important; 
    height: 180vh !important;
  }

/* ------------ Modal Styling ------------ */    
    .modal {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100vw; height: 100vh;
      background: rgba(0,0,0,0.7);
      justify-content: center;
      align-items: start;
      overflow-y: auto;
      padding: 2rem;
      z-index: 1000;
    }
    
    .modal iframe {
      width: 90%;
      height: 80%;
      border-radius: 12px;
    }

/* Optional sidebar within modal */     
    .modal-sidebar {
      width: 30%; 
      padding: 1rem;
      overflow-y: auto;
      background-color: #fff;
      color: #000;
    }
  
    .gallery-item img {
      width: 100%;
      height: 180px;
      object-fit: cover;
      border-radius: 8px;
      margin-bottom: 0.5rem;
    }

/* Text intro above gallery */
    .gallery-intro {
      font-size: 1.05rem;
      line-height: 1.7;
      color: #444;
      margin-bottom: 2rem;
      max-width: 100%;
    }

/* Section styling for gallery */
    .gallery-section {
      background-color: #f9f9fb;
      padding: 3rem 2rem;
      margin-bottom: 3rem;
      border-radius: 12px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    }
    
/* Section title inside gallery */
    .gallery-section-title {
      font-size: 1.8rem;
      color: #3B609C;
      text-align: center;
      margin-bottom: 2rem;
      font-weight: 600;
    }
    

    /* modal description */
    .modal-content-wrapper {
      position: relative;
      background: #fff;              
      width: 90vw;
      max-width: 900px;
      gap: 0.5rem;
      padding: 2rem;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.15);
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
    }

    #modal.title {
      margin: 0;
      font-size: 2.5rem;
      color: #2a5885;
    }

    #modal-content {
      width: 100%;
      height: 90vh;        
      border: none;
      border-radius: 6px;
    }

/* Description section in modal */
    #modal-description {
      order: 3;
      padding: 1rem 0;
      background: white;
    }
    
/* Close button for modal */
    .modal-close {
      position: absolute;
      top: 1rem;
      right: 1rem;
      background: none;
      border: none;
      font-size: 2rem;
      cursor: pointer;
      color: #666;
      z-index: 10;
    }


    /* Modal description blocks */
    .modal-intro {
      background: white;
      padding: 1.5rem 1rem;
      margin-top: 2rem;
      text-align: center;
      font-family: sans-serif;
      font-size: 15px;
      color: #333;
      max-width: 800px;
      margin-left: auto;
      margin-right: auto;
      border-radius: 8px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    }

    .moodal-description {
      position: static;
      margin-top: 1rem;
    }

/* Modal body wrapper */
    .modal-body {
      display: flex;
      flex-direction: column;
      gap: 1.5rem;
      align-items: stretch;
    }

/* Main content block inside modal */
    .modal-analysis {
      background: #fff;
      padding: 0rem;
      margin-top: 0rem;
      margin-bottom: 0rem;
      font-family: 'Segoe UI', sans-serif;
      font-size: 16px;
      line-height: 1.7;
      color: #333;
      max-width: 900px;
      margin: 0.5rem auto 0 auto;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .modal-analysis h2 {
      text-align: center;
      margin-bottom: 1.2rem;
      color: #2a5885;
    }

    .modal-analysis img {
      max-width: 100%;
      height: auto;
      display: block;
      margin: 1rem auto;
      border: 1px solid #eee;
      border-radius: 3px;
    }

/* Image container inside modal */
    .image-container {
      padding: 15px;
      background: white;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      margin: 25px 0;
    }

/* Highlight box inside modal */
    .modal-highlight {
      background: #f2f9ff;
      padding: 1.2rem 1.5rem;
      margin-top: 0.5rem;
      border-left: 4px solid #3b609c;
      border-radius: 8px;
    }

/* Link color inside modal */
    .modal-analysis a {
      color: #2a5885;
    }

/* Embedded content inside modal */
    .modal-analysis iframe {
      margin-bottom: 0;   
      margin-top: 0;
      display: block;
      border: none;
    }

/* Headings and spacing inside modal content */
    .modal-analysis h3 {
      margin-top: 1.8rem;
      margin-bottom: 0.8rem;
    }
    
    .modal-analysis p,
    .modal-analysis ul {
      margin-bottom: 1rem;
    }
    
    .modal-analysis li {
      margin-bottom: 0.4rem;
    }
    
    .modal-analysis ul {
      padding-left: 1.2rem;
    }
    