/* =========================================================
   PROJECTS.CSS
   Styles only for projects.html.
   Includes project rows/cards and Power BI iframe panel.
   ========================================================= */

.project-section {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: stretch;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.52);
}

.project-section + .project-section { margin-top: 1.2rem; }

.project-section.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
}

.project-section.reverse .project-media { order: 2; }

.project-media {
  position: relative;
  isolation: auto;
  contain: paint;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  min-height: 220px;
  margin: 0 auto;
  padding: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: transparent;
}

.project-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  border-radius: 14px;
  background: transparent;
  object-fit: contain;
  filter: none;
}

.project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: clamp(0.75rem, 3vw, 1.5rem);
}

.project-copy h2 {
  margin-bottom: 0.75rem;
  font-size: 1.65rem !important;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.project-copy p { max-width: none; }
.project-copy .stack-wrap { margin: 0.35rem 0 1.2rem; }

@media (max-width: 980px) {
  .project-section,
  .project-section.reverse { grid-template-columns: 1fr; }
  .project-section.reverse .project-media { order: initial; }
  .project-media { max-width: 340px; }
}

@media (max-width: 680px) {
  .project-media img { min-height: 230px; }
}


/* Subpage hero sizing */
.page-hero {
  padding-top: 3rem;
}

.page-hero h1 {
  max-width: 26ch;
}

/* Projects Showcase hero with portrait GIF */
.projects-hero {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.projects-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 330px);
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: center;
}

.projects-hero-copy {
  max-width: 760px;
}

.projects-hero-copy h1 {
  max-width: 28ch;
}

.projects-hero-copy .lead {
  max-width: 68ch;
}

.projects-hero-visual {
  justify-self: start;
  max-width: 185px;
  overflow: hidden;
  border: 1px solid rgba(191, 219, 254, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
    rgba(13, 16, 34, 0.62);
  padding: 0.75rem;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.projects-hero-visual img,
.projects-hero-visual video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  object-fit: contain;
}

@media (max-width: 980px) {
  .projects-hero-grid {
    grid-template-columns: 1fr;
  }

  .projects-hero-visual {
    max-width: 320px;
  }
}

@media (max-width: 680px) {
  .projects-hero {
    padding-top: 1.5rem;
  }

  .projects-hero-visual {
    border-radius: 22px;
    padding: 0.55rem;
  }

  .projects-hero-visual img,
  .projects-hero-visual video {
    border-radius: 16px;
  }
}

@media (max-width: 680px) {
  .project-copy h2 {
    font-size: 1.4rem !important;
    line-height: 1.18;
  }
}


/* Better media wrappers and large-screen scaling */
.project-media picture {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

