.student-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.student-sidebar {
  position: sticky;
  top: 5.5rem;
  padding-right: 1.5rem;
  border-right: 1px solid #dee2e6;
  font-size: 0.95rem;
}

.student-sidebar h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.student-sidebar h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.student-sidebar a {
  display: block;
  margin: 0.35rem 0;
  text-decoration: none;
}

.student-sidebar .profile-link {
  font-size: 0.78rem;
  color: #6c757d;
  margin-top: -0.25rem;
  margin-bottom: 0.55rem;
}

.student-entry {
  scroll-margin-top: 6rem;
  margin-bottom: 2.5rem;
}

.student-entry h3 {
  margin-bottom: 0.2rem;
}

@media (max-width: 768px) {
  .student-layout {
    display: block;
  }

  .student-sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
  }
}

/* Research Notes front page */

.notes-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.notes-sidebar {
  position: sticky;
  top: 5.5rem;
  padding-right: 1.5rem;
  border-right: 1px solid #dee2e6;
}

.notes-sidebar h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notes-sidebar a {
  display: block;
  margin-bottom: 1rem;
  line-height: 1.35;
  text-decoration: none;
}

.notes-main {
  max-width: 850px;
}

.featured-note img {
  width: 100%;
  max-width: 850px;
  margin-bottom: 1rem;
}

.featured-note h3 {
  margin-top: 0.4rem;
  font-size: 1.6rem;
}

.featured-note > p:last-child a {
  font-weight: 500;
  text-decoration: none;
}

@media (max-width: 768px) {
  .notes-layout {
    display: block;
  }

  .notes-sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
  }
}

/* Research Notes front page */

.notes-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.notes-sidebar {
  position: sticky;
  top: 5.5rem;
  padding-right: 1.5rem;
  border-right: 1px solid #dee2e6;
}

.notes-sidebar h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notes-sidebar a {
  display: block;
  margin-bottom: 1rem;
  line-height: 1.35;
  text-decoration: none;
}

.notes-main {
  max-width: 850px;
}

.featured-note img {
  width: 100%;
  max-width: 850px;
  margin-bottom: 1rem;
}

.featured-note h3 {
  margin-top: 0.4rem;
  font-size: 1.6rem;
}

.featured-note > p:last-child a {
  font-weight: 500;
  text-decoration: none;
}

@media (max-width: 768px) {
  .notes-layout {
    display: block;
  }

  .notes-sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
  }
}

/* Homepage profile rail */

.home-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

.home-sidebar {
  position: sticky;
  top: 5.5rem;
  padding-right: 1.5rem;
  border-right: 1px solid #dee2e6;
  font-size: 0.92rem;
  line-height: 1.45;
}

.home-sidebar h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.home-sidebar h3:first-child {
  margin-top: 0;
}

.home-sidebar a {
  text-decoration: none;
}

.home-sidebar p {
  margin-bottom: 0.7rem;
}

.home-main {
  max-width: 900px;
}

@media (max-width: 768px) {
  .home-layout {
    display: block;
  }

  .home-sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid #dee2e6;
    padding-right: 0;
    padding-bottom: 1.2rem;
    margin-bottom: 2rem;
  }
}

/* Make Research Notes sidebar entries visibly clickable */

#quarto-sidebar .sidebar-item a,
#quarto-sidebar .sidebar-item-text {
  color: var(--bs-link-color);
  text-decoration: none;
}

#quarto-sidebar .sidebar-item a:hover,
#quarto-sidebar .sidebar-item-text:hover {
  color: var(--bs-link-hover-color);
  text-decoration: underline;
}

#quarto-sidebar .sidebar-item a.active {
  font-weight: 600;
}

/* Research-note summary under the page title */

.quarto-title-block .description {
  color: #b22222;
  font-style: italic;
}

/* Final homepage profile-photo styling */
.home-sidebar img.profile-photo {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 18px !important;
  margin: 0 auto 2.2rem auto !important;
}
