/* Angelo Moroncelli academic website */

body { font-size: 1.02rem; line-height: 1.65; }
h1, h2, h3 { font-weight: 650; }
.navbar-brand { font-weight: 650; }
main { max-width: 1180px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  align-items: center;
  margin: 1.5rem 0 4rem 0;
}
.hero-photo img {
  width: 100%;
  max-width: 330px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  margin: 0 auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.hero-text h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 0.7rem;
}
.hero-text p:first-of-type { font-size: 1.15rem; }
.btn { margin-right: 0.35rem; margin-bottom: 0.55rem; }

/* Paper cards */
.paper-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
  margin: 1rem 0 1.25rem 0;
}
.paper-card {
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 5px 18px rgba(0,0,0,0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.paper-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}
.paper-card > p:first-child { margin: 0; }
.paper-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0.45rem;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.paper-card-body { padding: 1.2rem 1.35rem 1.35rem; }
.paper-card-body h3 {
  font-size: 1.12rem;
  line-height: 1.35;
  margin-top: 0;
  margin-bottom: 0.6rem;
}
.paper-card-body p { margin-bottom: 0.75rem; }
.paper-link, .all-pubs { font-weight: 600; text-decoration: none; }

/* Research interests */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.interest-card {
  border-top: 3px solid currentColor;
  padding: 1rem 0.9rem;
  background: rgba(0,0,0,0.025);
  border-radius: 8px;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-photo img { max-width: 300px; }
  .paper-grid { grid-template-columns: 1fr; }
  .paper-image { height: 250px; }
  .interest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .hero { margin-top: 0.75rem; margin-bottom: 2.5rem; }
  .hero-photo img { max-width: 250px; }
  .hero-text h1 { font-size: 2.4rem; }
  .paper-image { height: 190px; }
  .interest-grid { grid-template-columns: 1fr; }
}

/* About page photo gallery */

.mountain-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.gallery-item {
  min-width: 0;
}

.gallery-item p {
  margin: 0;
}

.gallery-item a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
}

.gallery-item img.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item a:hover img.gallery-img {
  transform: scale(1.04);
}

.gallery-caption {
  margin-top: 0.45rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6c757d;
}

/* Tablet */
@media (max-width: 900px) {
  .mountain-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 560px) {
  .mountain-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-caption {
    font-size: 0.78rem;
  }
}