/* Amatooni V12: larger Projects grid, building on the proven V11 layout fix.
   Load AFTER styles.css. Changes only presentation, never CMS/content or image behavior.
   Verifiable marker: AMATOONI_V12_WIDER_PROJECTS_20261125 */


/* V11 FIX — floating cards and full-width header, based on the approved reference.
   Presentation-only update. CMS, JavaScript, artwork, image aspect ratios and
   original hover transitions are intentionally unchanged. */
:root {
  --floating-grid-width: 980px;
  --masthead-content-width: 980px;
  --floating-card-gap: 24px;
}

/* Remove V10's continuous white page frame so the CMS-selected background
   remains visible between the individual project cards. */
body .site-shell {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  min-height: 100vh;
  background: transparent;
  box-shadow: none;
}

/* The header band spans the browser; its content is still carefully centered. */
body .site-header {
  width: 100%;
  flex-shrink: 0;
  padding: 24px max(24px, calc((100% - var(--masthead-content-width)) / 2));
  background: #fff;
  border-bottom: 0;
  align-items: center;
}

/* Homepage: leave the original project image aspect ratio and zoom unchanged. */
body[data-page="projects"] .projects-main {
  width: min(var(--floating-grid-width), calc(100% - 44px));
  flex: 1 0 auto;
  margin: 0 auto;
  padding: 44px 0 70px;
  background: transparent;
}
body[data-page="projects"] .project-grid {
  gap: var(--floating-card-gap);
}
body[data-page="projects"] .project-card {
  background: #fff;
  border-radius: 0;
  box-shadow: 0 3px 15px rgba(55, 42, 34, .085);
}
body[data-page="projects"] .project-card .card-info {
  padding: 16px 17px 20px;
}
/* Make project titles and descriptions more legible at desktop sizes. */
body[data-page="projects"] .project-card .card-name {
  font-size: 15px;
  line-height: 1.4;
}
body[data-page="projects"] .project-card .card-subtitle {
  font-size: 13px;
  line-height: 1.5;
}

/* About retains a single white content panel, as in the reference screenshot.
   Keep its existing heading, biography, portrait and all subsequent sections. */
body[data-page="about"] .about-main {
  flex: 0 0 auto;
  width: min(920px, calc(100% - 44px));
  max-width: 920px;
  margin: 46px auto 64px;
  padding: clamp(26px, 3.8vw, 38px);
  background: #fff;
  box-shadow: 0 4px 22px rgba(55, 42, 34, .055);
}

/* Other pages keep white reading surfaces over the same background.
   Their image and gallery rules remain exactly as previously defined. */
body[data-page="gallery"] .inner-main,
body[data-page="project"] .detail-main {
  flex: 0 0 auto;
  width: min(1160px, calc(100% - 44px));
  max-width: 1160px;
  margin: 46px auto 64px;
  padding: clamp(24px, 3.3vw, 46px);
  background: #fff;
  box-shadow: 0 4px 22px rgba(55, 42, 34, .055);
}

/* Original copyright-only footer, now another full-width white band. */
body .site-footer {
  width: 100%;
  margin-top: auto;
  padding: 22px 24px;
  text-align: center;
  background: #fff;
  border-top: 0;
}

@media (max-width: 900px) {
  body .site-shell { width: 100%; padding: 0; }
  body .site-header { padding: 24px max(22px, calc((100% - var(--masthead-content-width)) / 2)); }
}
@media (max-width: 600px) {
  body .site-shell { width: 100%; padding: 0; }
  body .site-header { padding: 22px; }
  .main-nav { top: 76px; left: 0; right: 0; background: #fff; }
  body[data-page="projects"] .projects-main {
    width: calc(100% - 36px);
    padding: 28px 0 48px;
  }
  body[data-page="projects"] .project-grid { gap: 20px; }
  /* Keep compact mobile typography; only the desktop grid is enlarged. */
  body[data-page="projects"] .project-card .card-name { font-size: 14px; }
  body[data-page="projects"] .project-card .card-subtitle { font-size: 12px; }
  body[data-page="about"] .about-main,
  body[data-page="gallery"] .inner-main,
  body[data-page="project"] .detail-main {
    width: calc(100% - 28px);
    margin: 24px auto 42px;
    padding: 22px;
  }
  body .site-footer { padding: 22px; }
}
