.about-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* Header */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #404040;
}

.page-title {
  font-size: 2rem;
  color: #ffffff;
  margin: 0 0 1rem 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-description {
  font-size: 1.1rem;
  color: #b0b0b0;
  line-height: 1.7;
  max-width: 800px;
  margin: 0;
}

/* Table of contents */
.table-of-contents {
  background-color: #2a2a2a;
  padding: 1.5rem;
  border-radius: 2px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  margin-bottom: 2rem;
  border: 1px solid #404040;
}

.toc-title {
  font-size: 1.2rem;
  color: #ffffff;
  margin: 0 0 1rem 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.toc-link {
  color: #4080ff;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #4080ff;
  border-radius: 2px;
  transition: all 0.2s ease;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.toc-link:hover,
.toc-link:focus {
  background-color: #4080ff;
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 8px rgba(64, 128, 255, 0.4);
}

/* Content */
.content-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.content-card {
  background-color: #2a2a2a;
  border-radius: 2px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  border: 1px solid #404040;
}

.card-content {
  padding: 2rem;
}

.card-title {
  font-size: 1.4rem;
  color: #ffffff;
  margin: 0 0 1.5rem 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.card-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card-text p {
  color: #b0b0b0;
  line-height: 1.7;
  margin: 0;
}

.card-text a {
  color: #4080ff;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.2s ease;
}

.card-text a:visited {
  color: #6699ff;
}

.card-text a:hover,
.card-text a:focus {
  color: #ffffff;
  text-shadow: 0 0 4px rgba(64, 128, 255, 0.5);
  outline: none;
}

.card-image {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Section w/ no image */
#methodology .card-body {
  grid-template-columns: 1fr;
}

/* Back to top link */
.back-to-top {
  text-align: center;
  padding: 1.5rem 0;
  border-top: 1px solid #404040;
}

.back-to-top-link {
  color: #4080ff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 1px solid #4080ff;
  border-radius: 2px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.back-to-top-link:hover,
.back-to-top-link:focus {
  background-color: #4080ff;
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 8px rgba(64, 128, 255, 0.4);
}

@media screen and (max-width: 767px) {
  .about-main {
    padding: 1rem;
  }

  /* Page header */
  .page-title {
    font-size: 1.5rem;
  }

  .page-description {
    font-size: 1rem;
  }

  /* Table of contents stack vertically on mobile */
  .table-of-contents {
    padding: 1rem;
  }

  .toc-list {
    flex-direction: column;
    gap: 0.75rem;
  }

  .toc-link {
    display: block;
    text-align: center;
    padding: 0.75rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Content cards using single column layout */
  .card-content {
    padding: 1.5rem;
  }

  .card-title {
    font-size: 1.2rem;
  }

  .card-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .card-image {
    order: -1; /* Move images above text on mobile */
  }

  .content-image {
    max-width: 100%;
    height: auto;
  }

  .back-to-top-link {
    display: block;
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media screen and (min-width: 768px) and (max-width: 1023px) {
  .about-main {
    padding: 1.25rem;
  }

  .page-title {
    font-size: 1.75rem;
  }

  /* 2 columns on tablet */
  .toc-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  /* Adjust image size for tablet */
  .card-body {
    grid-template-columns: 1fr 250px;
    gap: 1.5rem;
  }

  .card-content {
    padding: 1.75rem;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1199px) {
  .about-main {
    max-width: 100%;
    padding: 0 1.5rem;
  }

  .card-body {
    grid-template-columns: 1fr 280px;
  }
}

@media screen and (max-width: 479px) {
  .about-main {
    padding: 0.75rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .page-description {
    font-size: 0.95rem;
  }

  .table-of-contents,
  .card-content {
    padding: 0.75rem;
  }

  .toc-title,
  .card-title {
    font-size: 1rem;
  }

  .toc-link {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .card-text p {
    font-size: 0.9rem;
  }

  .back-to-top-link {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

@media screen and (min-width: 1400px) {
  .about-main {
    max-width: 1400px;
  }
}

/* Bigger touch targets for accessibility on mobile */
@media screen and (max-width: 767px) {
  .toc-link,
  .back-to-top-link {
    min-height: 44px;
    min-width: 44px;
  }
}
