/* css styles */
/* Tom wanted a table. He was overruled. */


/* =========================================================
   HOMEPAGE PROJECT GRID
   ========================================================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.project-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.project-card h3 {
  margin-top: 0;
}

.project-card a {
  font-weight: 600;
  text-decoration: none;
}

.card-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  display: block;
  margin-bottom: 1.25rem;
}


/* =========================================================
   MATHEMATICS PAGE: RESEARCH PROJECTS
   ========================================================= */

.research-project {
  display: grid;
  grid-template-columns: 38% 1fr;
  gap: 2rem;
  align-items: center;

  margin: 1.5rem 0;
  padding: 1.25rem;

  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
}

.research-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.research-image p {
  margin: 0;
  width: 100%;
}

.research-image img {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  max-height: 230px;
  object-fit: contain;
  margin: 0 auto;
}

.research-text h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.research-text p:last-child {
  margin-bottom: 0;
}

.research-text a {
  font-weight: 600;
  text-decoration: none;
}


/* =========================================================
   RESPONSIVE LAYOUT
   ========================================================= */

@media (max-width: 768px) {

  /* Homepage cards become a single column */

  .project-grid {
    grid-template-columns: 1fr;
  }

  /* Research projects put image above text */

  .research-project {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }

  .research-image img {
    max-height: 220px;
  }
}

/* =========================================================
   MATHEMATICS PAGE: FEATURED BOOK
   ========================================================= */

.book-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  column-gap: 3rem;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 3rem;
}

.book-feature-text {
  min-width: 0;
}

.book-feature-text p:first-child {
  margin-top: 0;
}

.book-feature-text a {
  font-weight: 600;
  text-decoration: none;
}

.book-feature-image {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateX(-25px);
}

.book-feature-image p {
  margin: 0;
}

.book-feature-image img,
.book-feature-image img.book-graphic {
  display: block;
  width: 100% !important;
  max-width: 360px !important;
  height: auto !important;
  margin: 0 auto !important;
}


/* Mobile */

@media (max-width: 768px) {
  .book-feature {
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
  }

  .book-feature-image {
    transform: none;
  }

  .book-feature-image img,
  .book-feature-image img.book-graphic {
    width: 75% !important;
    max-width: 320px !important;
  }
}

/* HEPHAESTUS_PRIVATE_WHOLE_CARD_NAV_20261020: scoped click-anywhere links, keyboard focus retained. */
.research-project,.book-feature,.home-shell .home-feature,.home-shell .home-compact-item{position:relative}
.research-project,.home-shell .home-feature,.home-shell .home-compact-item{cursor:pointer}
.research-project .research-text a::after,
.book-feature .book-feature-text a::after,
.home-shell .home-feature-body a::after,
.home-shell .home-compact-copy a::after{content:"";position:absolute;inset:0;z-index:1}
.research-project:focus-within,.book-feature:focus-within,
.home-shell .home-feature:focus-within,.home-shell .home-compact-item:focus-within{outline:3px solid #1e5eaa;outline-offset:3px}
