/* Shared page edges for the home and about pages. */
:is(.home-page,.about-page) {
  --page-gutter: 2%;
  --page-max: none;
}
:is(.home-page,.about-page) > footer,
.home-page > .portfolio-grid,
.about-page > .about-layout {
  box-sizing: border-box;
  width: calc(100% - 2 * var(--page-gutter));
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 0;
}
:is(.home-page,.about-page) footer a { padding-inline: 0; }
.home-page > .portfolio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 50px;
  padding-block: 48px;
}
.home-page a.projects {
  display: block;
  min-width: 0;
  width: 100%;
  font-size: 1rem;
  text-decoration: none;
}
.home-page .projects img { padding: 0; }
.home-page .projects h2 {
  font-size: 24px;
  margin: 16px 0 6px;
}
.home-page .projects p { margin: 0; }
.home-page a.projects:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 8px;
}
.about-page .about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-block: 48px 64px;
}
.about-page .about-layout > .container {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
}
.about-page .aboutme-info { padding: 0; }
.about-page .aboutme-info h1 {
  font-size: clamp(40px, 4.5vw, 68px);
  line-height: 1.1;
  margin: 0 0 24px;
  padding: 0;
}
.about-page .about-copy {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: inherit;
  margin: 0;
}
.about-page .about-layout > .carousel {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}
.about-page .carousel-images {
  width: 100%;
  height: auto;
  padding: 0;
}
@media (max-width: 999px) {
  :is(.home-page,.about-page) { --page-gutter: 2%; }
  .home-page > .portfolio-grid { gap: 32px; }
  .about-page .about-layout { gap: 32px; align-items: start; }
  .about-page .about-copy { font-size: 14px; }
}
@media (max-width: 600px) {
  :is(.home-page,.about-page) { --page-gutter: 2%; }
  .home-page > .portfolio-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding-block: 24px;
  }
  .home-page .projects h2 { font-size: 22px; }
  .about-page .about-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 24px 40px;
  }
}

/* Keep the original header geometry, with a responsive viewport width. */
:is(.home-page,.about-page) > header {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-left: 2%;
  padding-right: 2%;
}

@media (max-width: 600px) {
  :is(.home-page,.about-page) { --page-gutter: calc(2% + 10px); }
  :is(.home-page,.about-page) > header {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }
}

/* Match project-title weight and keep About links on the body-text scale. */
.home-page .projects h2 { font-family: 'Parastoo', serif; font-weight: 500; }
.about-page .about-copy a {
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
