/* Card columns styling for research projects */
.card-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.card-columns .card {
  display: block;
  width: 100%;
  margin-bottom: 0;
}

/* Make project thumbnail images responsive and not overly tall */
.card .img-fluid {
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .card-columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card-columns .card {
    margin-bottom: 0;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .card-footer {
    padding: 0.5rem 1rem;
  }
  
  /* Person images smaller on mobile */
  .profile {
    width: 32px;
    height: 32px;
  }
  
  /* Project header image responsive */
  .project-header-image img {
    height: 180px;
  }

  .card .img-fluid {
    max-height: 220px;
  }
  
  /* Person entry mobile layout */
  .person-entry {
    padding: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
  }
  
  .person-header {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  
  .person-name {
    margin-bottom: 0;
    margin-right: 0.5rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  .person-description {
    font-size: 0.9rem;
  }
  
  .person-current-position {
    font-size: 0.85rem;
  }
  
  /* Publication links mobile */
  .publication-links .btn {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    margin-right: 0.2rem;
    margin-bottom: 0.2rem;
  }
  
  /* Table responsive */
  .table-borderless td {
    padding: 0.25rem;
  }
  
  /* Badge mobile */
  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .card-columns {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .card-columns {
    gap: 0.75rem;
  }
  
  .card-columns .card {
    margin-bottom: 0;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .project-header-image img {
    height: 150px;
  }

  .card .img-fluid {
    max-height: 180px;
  }
  
  .person-entry {
    padding: 0.5rem;
  }
  
  .person-name {
    font-size: 0.95rem;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  
  .person-description {
    font-size: 0.85rem;
  }
  
  .person-current-position {
    font-size: 0.8rem;
  }
  
  .publication-links .btn {
    font-size: 0.6rem;
    padding: 0.1rem 0.25rem;
    margin-right: 0.15rem;
    margin-bottom: 0.15rem;
  }
}

/* Project card styling */
.card {
  border: 1px solid rgba(0,0,0,.125);
  border-radius: .25rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  margin-bottom: .75rem;
  font-size: 1.25rem;
  font-weight: 500;
}

.card-subtitle {
  margin-top: -.375rem;
  margin-bottom: 0;
}

.card-text {
  margin-top: 0;
  margin-bottom: 1rem;
}

.card-footer {
  padding: .75rem 1.25rem;
  background-color: rgba(0,0,0,.03);
  border-top: 1px solid rgba(0,0,0,.125);
}

/* Person image styling */
.profile {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.noprofile {
  background-color: #e9ecef;
  fill: #6c757d;
}

.noprofile text {
  fill: #6c757d;
}

/* Project page styling */
.project-header-image {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.project-header-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* Person entry styling */
.person-entry {
  display: flex;
  align-items: flex-start;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 1rem;
  background-color: #f8f9fa;
  transition: all 0.2s ease;
  margin-bottom: 1.5rem;
}

.person-entry:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.person-image-container {
  margin-right: 1rem;
  flex-shrink: 0;
}

.person-info {
  flex: 1;
  min-width: 0;
}

.person-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.person-name {
  margin: 0;
  font-weight: 600;
  margin-right: 0.5rem;
}

.person-description {
  color: #6c757d;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.person-current-position {
  color: #17a2b8;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.person-links {
  margin-top: 0.5rem;
}

.person-links .btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
}

/* Publication styling */
.related-publications {
  margin-top: 2rem;
}

.publication-entry {
  padding: 1rem;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background-color: #f8f9fa;
  margin-bottom: 1rem;
}

.publication-entry:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

.publication-links .btn {
  font-size: 0.7rem;
  padding: 0.2rem 0.4rem;
  margin-right: 0.4rem;
  margin-bottom: 0.2rem;
}

.table-borderless {
  border: none;
}

.table-borderless td {
  border: none;
  padding: 0.5rem;
}

/* Publication specific styling */
.pub-image {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 4px;
}

.pub-title {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.pub-authors {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.pub-venue {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

/* Mobile publication styling */
@media (max-width: 768px) {
  .pub-image-cell {
    width: 30% !important;
  }
  
  .pub-image {
    max-width: 120px;
  }
  
  .pub-title {
    font-size: 1rem;
  }
  
  .pub-authors {
    font-size: 0.9rem;
  }
  
  .pub-venue {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .pub-image-cell {
    width: 35% !important;
  }
  
  .pub-image {
    max-width: 100px;
  }
  
  .pub-title {
    font-size: 0.95rem;
  }
  
  .pub-authors {
    font-size: 0.85rem;
  }
  
  .pub-venue {
    font-size: 0.8rem;
  }
}
