/* Custom styles for BRAINS Research Group website */

/* Navbar styling - RPI red with white text */
.navbar,
.navbar-default,
.navbar-light,
.navbar-dark {
  background-color: #d6001c !important; /* RPI Primary Red */
  background: linear-gradient(135deg, #d6001c 0%, #ab2328 100%) !important;
  border-bottom: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus {
  color: white !important;
  font-weight: 600 !important;
}

.navbar-nav .nav-link,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav a,
.navbar-nav a:hover,
.navbar-nav a:focus {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav a:hover {
  color: white !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .active > .nav-link {
  color: white !important;
  font-weight: 600 !important;
}

/* Navbar icons (GitHub, etc.) */
.navbar-nav .bi,
.navbar-nav .fa,
.navbar-nav svg {
  color: white !important;
  fill: white !important;
}

.navbar-nav .nav-link:hover .bi,
.navbar-nav .nav-link:hover .fa,
.navbar-nav .nav-link:hover svg {
  color: white !important;
  fill: white !important;
}

/* Search icon styling */
.navbar .bi-search,
.navbar .fa-search,
.navbar [class*="search"],
.navbar svg[class*="search"],
.navbar .nav-link svg,
.navbar .navbar-nav svg,
.navbar .quarto-search,
.navbar .quarto-search svg,
.navbar .quarto-search path,
.navbar .quarto-search circle,
.navbar .quarto-search line {
  color: white !important;
  fill: white !important;
  stroke: white !important;
}

/* All SVG elements in navbar should be white */
.navbar svg,
.navbar svg path,
.navbar svg circle,
.navbar svg line,
.navbar svg rect,
.navbar svg polygon {
  color: white !important;
  fill: white !important;
  stroke: white !important;
}

/* Navbar toggler (mobile menu button) */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Hide the page title block only on pages with hero section (index page) */
body:has(.hero-section) .quarto-title-block,
.quarto-title-block:has(~ .hero-section) {
  display: none;
}

/* Hero section styling with particles.js */
.hero-section {
  position: relative;
  text-align: center;
  padding: 2rem 2rem;
  background: linear-gradient(135deg, #d6001c 0%, #ab2328 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-section h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-section p {
  font-size: 1.1rem;
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 1.5rem;
    min-height: 350px;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section h2 {
    font-size: 1.2rem;
  }
}

/* Research areas grid layout */
.research-areas {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.research-area {
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-align: center;
}

.research-area:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--bs-primary);
}

.research-area h3 {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--bs-primary);
  font-size: 1.2rem;
  font-weight: 600;
}

.research-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  display: block;
}

.research-area p {
  color: var(--bs-body-color);
  line-height: 1;
  margin-bottom: 1rem;
}

.research-area strong {
  color: var(--bs-primary);
  font-size: 0.9rem;
  display: block;
  margin-top: 1rem;
}

/* News preview styling */
.news-preview {
  background: var(--bs-light);
  border-left: 4px solid var(--bs-primary);
  padding: 1rem;
  margin: 2rem 0;
  border-radius: 4px;
}

/* News items styling */
.news-item {
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.news-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--bs-primary);
}

.news-date {
  font-size: 0.9rem;
  color: var(--bs-secondary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.news-content {
  color: var(--bs-body-color);
  line-height: 1.7;
}

.news-content p {
  margin-bottom: 1rem;
}

.news-content p:last-child {
  margin-bottom: 0;
}

.news-link {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 500;
}

.news-link:hover {
  text-decoration: underline;
  color: var(--bs-primary-dark);
}

.news-highlight {
  background: var(--bs-light);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  border-left: 3px solid var(--bs-primary);
}

.news-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.news-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.news-list li::before {
  content: "🏆";
  position: absolute;
  left: 0;
}

/* News filter styling */
.news-filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--bs-light);
  border-radius: 8px;
}

.news-filters label {
  font-weight: 600;
  color: var(--bs-body-color);
  margin-right: 0.5rem;
}

.news-filter-select {
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.news-filter-select:focus,
.news-filter-input:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.news-filter-input {
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 200px;
}

.news-filter-button {
  padding: 0.5rem 1rem;
  border: 2px solid var(--bs-primary);
  border-radius: 6px;
  background: var(--bs-primary);
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-filter-button:hover {
  background: var(--bs-primary-dark);
  border-color: var(--bs-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Make main content wider */
.container,
.container-fluid,
.quarto-layout-row .column-body,
main.content,
.quarto-body {
  max-width: 1600px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Make home page content 1.5x wider (2400px) */
body:has(.hero-section) .container,
body:has(.hero-section) .container-fluid,
body:has(.hero-section) .quarto-layout-row .column-body,
body:has(.hero-section) main.content,
body:has(.hero-section) .quarto-body,
body:has(.hero-section) .quarto-layout-row > .quarto-body {
  max-width: 2400px !important;
}

/* Override Bootstrap container constraints */
@media (min-width: 1400px) {
  .container {
    max-width: 1600px !important;
  }
  
  /* Home page wider container */
  body:has(.hero-section) .container {
    max-width: 2400px !important;
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .research-areas {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .research-areas {
    grid-template-columns: 1fr;
  }
}

/* Custom callout styling */
.callout {
  margin: 1.5rem 0;
}

/* Link styling */
a {
  color: var(--bs-primary);
  text-decoration: none;
}

a:hover {
  color: var(--bs-primary-dark);
  text-decoration: underline;
}

/* People grid layout */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
  max-width: 100%;
}

@media (min-width: 900px) {
  .people-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.person-card {
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  overflow: hidden;
}

.person-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--bs-primary);
}

.person-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid var(--bs-border-color);
  transition: border-color 0.3s ease;
}

.person-card:hover .person-photo {
  border-color: var(--bs-primary);
}

.person-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.person-role {
  font-size: 0.9rem;
  color: var(--bs-body-color);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.person-info {
  font-size: 0.85rem;
  color: var(--bs-secondary);
  line-height: 1.4;
}

.person-thesis {
  font-size: 0.85rem;
  color: var(--bs-body-color);
  line-height: 1.4;
  margin-top: 0.5rem;
  font-style: italic;
}

.person-period {
  font-size: 0.8rem;
  color: var(--bs-secondary);
  margin-top: 0.3rem;
}

.person-employer {
  font-size: 0.85rem;
  color: var(--bs-primary);
  margin-top: 0.5rem;
  font-weight: 500;
}

.alumni-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.alumni-list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.alumni-list-item:last-child {
  border-bottom: none;
}

.alumni-list-name {
  font-weight: 600;
  color: var(--bs-primary);
}

.alumni-list-thesis {
  font-style: italic;
  color: var(--bs-body-color);
  margin-top: 0.25rem;
}

.alumni-list-period {
  font-size: 0.9rem;
  color: var(--bs-secondary);
  margin-top: 0.25rem;
}

@media (max-width: 899px) {
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .people-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .person-photo {
    width: 120px;
    height: 120px;
  }
}

/* Publications page styling */
.pub-category {
  margin: 2rem 0;
}

.pub-category ul {
  list-style: none;
  padding-left: 0;
}

.pub-category li {
  padding: 1rem;
  margin: 0.75rem 0;
  background: var(--bs-light);
  border-left: 4px solid var(--bs-primary);
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-category li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#pubSearch {
  margin-bottom: 2rem;
}

#pubSearch:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Projects page styling */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.project-card {
  background: var(--bs-body-bg);
  border: 2px solid var(--bs-border-color);
  border-radius: 12px;
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--bs-primary);
}

.project-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.project-sponsor {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--bs-border-color);
  font-size: 0.9rem;
  color: var(--bs-secondary);
}

.project-sponsor-label {
  font-weight: 600;
  color: var(--bs-body-color);
  margin-right: 0.5rem;
}

.project-sponsor-link {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 500;
}

.project-sponsor-link:hover {
  text-decoration: underline;
  color: var(--bs-primary-dark);
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

