/* ==========================================================================
   Responsive rules (breakpoints match the original: 640 / 768 / 1024 / 1280 / 1536)
   ========================================================================== */

@media (min-width: 640px) {
  .container {
    max-width: 640px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .mobile-sheet.offcanvas-end {
    --bs-offcanvas-width: 24rem;
  }

  .sheet-header {
    text-align: left;
  }

  .endorse-card-body {
    padding: 2rem;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }

  .section {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .section-title,
  .page-title {
    font-size: 3rem;
    line-height: 1.1;
  }

  .bio-heading {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  .endorse-card-body {
    padding: 3rem;
  }

  .endorse-quote {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  /* Timeline: alternating two-column layout around a centre line */
  .timeline-line {
    left: 50%;
  }

  .timeline-item {
    margin-bottom: 2rem;
  }

  .timeline-item.flex-row-reverse {
    flex-direction: row-reverse !important;
  }

  .timeline-item .timeline-spacer {
    display: block;
  }

  .timeline-item .timeline-content {
    flex: 0 0 auto;
    width: 41.66666667%;
    padding-left: 0;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  /* Desktop nav needs ~1024px for all 8 links next to the logo */
  .main-nav {
    display: flex;
  }

  .menu-toggle-wrap {
    display: none;
  }

  .header-inner {
    height: 6rem;
  }

  .header-logo img {
    width: 130px;
  }

  html {
    scroll-padding-top: 6rem;
  }

  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    scroll-margin-top: 6rem;
  }

  .portrait {
    margin-left: 0;
  }

  /* Endorsement arrows beside the card */
  .endorse-carousel {
    padding-bottom: 0;
  }

  .carousel-arrow {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .carousel-arrow-prev {
    left: -3.5rem;
  }

  .carousel-arrow-next {
    right: -3.5rem;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }

  .main-nav {
    gap: 1.75rem;
  }

  .header-logo img {
    width: 150px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

/* Very small phones */
@media (max-width: 374.98px) {
  .section-title,
  .page-title {
    font-size: 1.625rem;
    line-height: 2rem;
  }

  .btn-accent {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card-img,
  .gallery-item img,
  .social-links a {
    transition: none;
  }
}

/* Tablet / mobile: keep the bio details block centred under the portrait */
@media (max-width: 1023.98px) {
  .bio-aside {
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
  }
}
