/* ==========================================================
   Paige Irvine portfolio — custom overrides
   Loaded after the template stylesheets on every page.
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,700;0,800;1,700&family=Bebas+Neue&display=swap');

/* ---- Overall smaller, calmer type ----
   The template's base body font-size is 18px; bring the whole
   site down a further notch across all body copy. ---- */
body { font-size: 13.5px; }

/* ---- Site title / logo: bold, condensed poster-style display font ---- */
.probootstrap-logo,
.probootstrap-main-site-logo a {
  font-family: 'Bebas Neue', 'Montserrat', 'Work Sans', sans-serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: .03em;
}
.probootstrap-aside .probootstrap-site-logo .probootstrap-logo {
  font-size: 34px;
  white-space: nowrap;
  line-height: 1.15;
  display: block;
}
.probootstrap-main .probootstrap-bar .probootstrap-main-site-logo a {
  font-size: 22px;
}

/* ---- Calmer type ---- */
.probootstrap-main .container-fluid h1 { font-family: 'Montserrat', 'Work Sans', sans-serif; font-size: 24px; margin-bottom: 16px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.probootstrap-main .container-fluid h2, .probootstrap-main .container-fluid h2.h1 { font-size: 19px; margin-bottom: 18px; font-weight: 700; }
.pi-projects-title {
  font-family: 'Bebas Neue', 'Montserrat', 'Work Sans', sans-serif;
  font-weight: 400;
  font-size: 44px;
  letter-spacing: .04em;
}
.pi-subtitle { font-size: 14px; color: var(--faint, #8a8a8a); margin-bottom: 28px; }
.pi-subtitle--lg { font-size: 16.5px; }
.probootstrap-main .container-fluid p { font-size: 14px; line-height: 1.7; }

/* Client / Role / Year meta line on project detail pages — bold throughout */
.pi-meta { font-size: 12.5px; font-weight: 700; color: #333; line-height: 1.6; }

/* Extra breathing room between the title/subtitle block and the work below it */
.probootstrap-main .container-fluid > .row.justify-content-center:first-child { margin-bottom: 34px; }

/* Extra breathing room above the "Back to Projects" link, so it doesn't sit
   right under the last image on a project page */
.pi-back-row { margin-top: 50px; }

@media (max-width: 768px) {
  .probootstrap-main .container-fluid h1 { font-size: 21px; }
  .probootstrap-main .container-fluid h2, .probootstrap-main .container-fluid h2.h1 { font-size: 17px; }
  .pi-projects-title { font-size: 32px; }
}

/* ---- Uniform artwork grid (Character / Background / Illustration / project detail extras) ---- */
.pi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin: 0 0 40px;
}
.pi-grid-item {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.pi-grid-item img {
  width: 100%;
  height: 300px;
  object-fit: contain;
  display: block;
}

.pi-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 700px) {
  .pi-grid-3col { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Theme-grouped gallery (Story Beats): fixed 4-across rows with
   visible space between each theme group ---- */
.pi-theme-group { margin-bottom: 44px; }
.pi-theme-group:last-child { margin-bottom: 0; }
.pi-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
}
.pi-grid-4col .pi-grid-item img { height: 190px; }
@media (max-width: 768px) {
  .pi-grid-4col { grid-template-columns: repeat(2, 1fr); }
}

/* Fixed 3-across and single-image variants, matching the 4-col tile size,
   so all Story Beats groups line up visually */
.pi-grid-3col-fixed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0;
}
.pi-grid-3col-fixed .pi-grid-item img { height: 190px; }
@media (max-width: 768px) {
  .pi-grid-3col-fixed { grid-template-columns: repeat(2, 1fr); }
}
.pi-grid-1col {
  display: grid;
  grid-template-columns: minmax(0, calc((100% - 42px) / 4));
  justify-content: center;
  gap: 14px;
  margin: 0;
}
.pi-grid-1col .pi-grid-item img { height: 190px; }
@media (max-width: 768px) {
  .pi-grid-1col { grid-template-columns: minmax(0, calc((100% - 14px) / 2)); }
}

/* Full-width, one image per row (Blaze / Archibald / Captain Underpants / Home) */
.pi-grid-1col-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 0 0 40px;
}
.pi-grid-1col-wide .pi-grid-item img { height: 420px; }
@media (max-width: 768px) {
  .pi-grid-1col-wide .pi-grid-item img { height: 280px; }
}

/* Two-across grid (e.g. Dispatch Visual Development, after the lead image) */
.pi-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0;
}
.pi-grid-2col .pi-grid-item img { height: 260px; }
@media (max-width: 560px) {
  .pi-grid-2col { grid-template-columns: 1fr; }
}

/* Large lead image ahead of a grid (e.g. Dispatch Visual Development) */
.pi-lead-img {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  margin: 0 0 14px;
}
.pi-lead-img img {
  width: 100%;
  height: 420px;
  object-fit: contain;
  display: block;
}

/* ---- Section headers within a gallery page (e.g. Background) ---- */
.pi-section { margin-bottom: 8px; }
.pi-section-title {
  font-size: 17px;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--ink, #222);
}
.pi-section:first-of-type .pi-section-title { margin-top: 0; }

/* ---- Uniform nav tiles (Home's 4 tiles / Storyboard's 5 tiles) ----
   Grid stretches edge-to-edge across the layout; columns share the
   full row width evenly instead of sitting at a fixed size. ---- */
.pi-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.pi-tile { width: 100%; text-align: center; text-decoration: none; display: block; }
.pi-tile img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin: 0 0 10px;
}
.pi-tile h5 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--ink, #222);
}
.pi-tile:hover img { opacity: .88; }

@media (max-width: 560px) {
  .pi-tile-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Home page top tiles: flush, sharp-cornered, darken-and-fade on hover ---- */
.pi-home-tiles { gap: 0; }
.pi-home-tiles .pi-tile { position: relative; overflow: hidden; }
.pi-home-tiles .pi-tile img { border-radius: 0; margin: 0; transition: filter .35s ease; }
.pi-home-tiles .pi-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  opacity: 0;
  transition: opacity .35s ease;
}
.pi-home-tiles .pi-tile:hover::after { opacity: 1; }
.pi-home-tiles .pi-tile:hover img { opacity: 1; filter: brightness(.82); }

/* ---- Projects row (Home page) ----
   Spans the full layout width edge-to-edge, same as the tiles above —
   one row of 8, sized purely by the grid rather than a fixed max-width. ---- */
.pi-project-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.pi-project-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.pi-project-card .pi-project-thumb {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 0;
  background: #eee;
  margin-bottom: 8px;
}
.pi-project-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  display: block;
  margin-bottom: 0;
  transition: filter .3s ease;
}
.pi-project-card .pi-project-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .3s ease;
}
.pi-project-card:hover .pi-project-thumb::after { opacity: 1; }
.pi-project-card:hover img { filter: brightness(.85); }
.probootstrap-main .container-fluid .pi-project-card h5 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
  color: var(--ink, #222);
}
/* Higher specificity than the general ".container-fluid p" rule above,
   so this Client/Role caption actually stays small instead of being
   overridden back up to 15px. Darker grey (not the faint tone) so it
   stays legible at this size. */
.probootstrap-main .container-fluid .pi-project-card p {
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  color: #5c5c5c;
}
@media (max-width: 991px) {
  .pi-project-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 560px) {
  .pi-project-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Light grey info "bar" (e.g. Storyboards intro on a project page) ---- */
.pi-bar {
  background: #f4f4f4;
  border-radius: 6px;
  padding: 22px 26px;
  margin: 0 0 30px;
}
.pi-bar .pi-section-title { margin: 0 0 10px; padding-top: 0; border-top: none; }
.pi-bar .pi-section-intro { margin: 0; }
.pi-bar--center { text-align: center; }

/* Subtitle placed directly under a gallery section title (e.g. Background page) */
.pi-section-subtitle { font-size: 13px; color: var(--faint, #8a8a8a); margin: -10px 0 18px; line-height: 1.6; }

/* ---- Storyboard menu tiles: smaller thumbnails, 5-across, dark hover fade ---- */
.pi-storyboard-menu-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}
.pi-storyboard-menu-grid .pi-tile {
  flex: 0 0 calc(20% - 16px);
  max-width: 230px;
}
.pi-storyboard-menu-grid .pi-tile-thumb {
  position: relative;
  overflow: hidden;
  display: block;
  border-radius: 4px;
  margin-bottom: 10px;
}
.pi-storyboard-menu-grid .pi-tile-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
  display: block;
  margin: 0;
  transition: filter .3s ease;
}
.pi-storyboard-menu-grid .pi-tile-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .3s ease;
}
.pi-storyboard-menu-grid .pi-tile:hover .pi-tile-thumb::after { opacity: 1; }
.pi-storyboard-menu-grid .pi-tile:hover .pi-tile-thumb img { filter: brightness(.85); }
.pi-storyboard-menu-grid .pi-tile:hover img { opacity: 1; }
.pi-tile-genre {
  font-size: 11.5px;
  color: var(--faint, #8a8a8a);
  margin: 3px 0 0;
  line-height: 1.4;
}
@media (max-width: 768px) {
  .pi-storyboard-menu-grid .pi-tile { flex: 0 0 calc(33.333% - 14px); max-width: 220px; }
}
@media (max-width: 480px) {
  .pi-storyboard-menu-grid .pi-tile { flex: 0 0 calc(50% - 10px); max-width: none; }
}

/* ---- Story entry layout (Personal Work page): title / synopsis / video / label / image,
   each entry boxed in its own soft background colour, cycling through 3 tones ---- */
.pi-story-entry {
  margin-bottom: 34px;
  padding: 32px 34px 36px;
  border-radius: 10px;
  text-align: center;
}
.pi-story-entry:last-child { margin-bottom: 0; }
.pi-story-entry:nth-child(3n+1) { background: #f5efe6; }
.pi-story-entry:nth-child(3n+2) { background: #e9f1ef; }
.pi-story-entry:nth-child(3n+3) { background: #efeaf5; }
@media (max-width: 560px) {
  .pi-story-entry { padding: 24px 18px 28px; }
}
.pi-entry-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0 0 6px;
  color: var(--ink, #222);
}
.pi-entry-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 8px;
  color: var(--ink, #222);
  text-align: center;
}
.pi-entry-synopsis { font-size: 14px; line-height: 1.65; margin: 0 0 20px; text-align: center; }

/* ---- Two-across storyboard entry grid (e.g. Dispatch storyboard page) ---- */
.pi-board-list-pairs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 28px;
}
@media (max-width: 768px) {
  .pi-board-list-pairs { grid-template-columns: 1fr; }
}
.pi-board-list { margin: 0 0 40px; }
.pi-board { margin-bottom: 44px; }
.pi-board:last-child { margin-bottom: 0; }
.pi-board-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
  text-align: center;
  color: var(--ink, #222);
}
.pi-board-subtitle {
  font-size: 12px;
  color: var(--faint, #8a8a8a);
  margin: 0 0 12px;
  line-height: 1.5;
  text-align: center;
}
.pi-section-intro { font-size: 14px; color: var(--faint, #8a8a8a); margin: -8px 0 20px; line-height: 1.6; }
.pi-video-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 14px;
}
.pi-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* ---- Side-by-side video + Canva embed pairing (Personal Work page) ---- */
.pi-media-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto 14px;
}
.pi-media-row .pi-video-wrap,
.pi-media-row .pi-canva-wrap {
  flex: 1 1 380px;
  max-width: 460px;
  margin: 0;
}
@media (max-width: 680px) {
  .pi-media-row .pi-video-wrap,
  .pi-media-row .pi-canva-wrap {
    flex: 1 1 100%;
    max-width: 480px;
  }
}

.pi-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1d1f24, #3a3f47);
}
.pi-video-play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.pi-video-label { font-size: 12.5px; opacity: .75; letter-spacing: .02em; }

/* ---- Canva slideshow embed space (e.g. Bossy Bear page) ---- */
.pi-canva-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto 30px;
}
.pi-canva-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.pi-board-img {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  max-width: 200px;
  margin: 0 auto;
}
.pi-board-img img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  display: block;
}

/* ---- Wide variant: image below the video matches the video's width (Dispatch page) ---- */
.pi-board-img.pi-board-img--wide {
  max-width: 560px;
  width: 100%;
}
.pi-board-img.pi-board-img--wide img {
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

/* ---- Extra-wide/panoramic variant (Personal Work boards): longer, shorter strip ---- */
.pi-board-img.pi-board-img--wide.pi-board-img--panoramic {
  max-width: 720px;
}
.pi-board-img.pi-board-img--wide.pi-board-img--panoramic img {
  aspect-ratio: 21 / 9;
}

/* ---- Single-project hero image (title card, not clickable/magnifiable) ---- */
.pi-hero {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  cursor: default;
}

/* Smaller variant for banners that were running oversized
   (Home, Captain Underpants, Bossy Bear, Archibald). width:auto so a
   low-resolution banner (e.g. Home) is never stretched/upscaled past
   its native size — it only ever scales down to fit the box. */
.pi-hero--sm {
  width: auto;
  height: auto;
  max-width: 320px;
  max-height: 150px;
  margin: 0 auto 12px;
}

/* ---- Lightbox (in-page image enlarge, no new tab) ---- */
.pi-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  z-index: 9999;
}
.pi-lightbox.show { opacity: 1; visibility: visible; }
.pi-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.pi-lightbox-close {
  position: absolute;
  top: 18px;
  right: 26px;
  font-size: 34px;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  font-family: Arial, sans-serif;
  user-select: none;
}
body.pi-lightbox-open { overflow: hidden; }

/* ---- About page: photo beside text, never behind/overlapping ---- */
.pi-about-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 32px;
  position: relative;
}
.pi-about-photo {
  flex: 0 0 220px;
  max-width: 220px;
  position: relative;
  z-index: 1;
}
.pi-about-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}
.pi-about-text {
  flex: 1 1 320px;
  min-width: 260px;
  position: relative;
  z-index: 1;
}
@media (max-width: 560px) {
  .pi-about-layout { flex-direction: column; }
  .pi-about-photo { flex-basis: auto; max-width: 180px; margin: 0 auto; }
}

/* ---- Storyboard sub-navigation (aside menu) ---- */
.probootstrap-aside .probootstrap-nav .probootstrap-subnav {
  list-style: none;
  margin: 4px 0 10px 6px;
  padding: 0 0 0 14px;
  border-left: 1px solid #ddd;
}
.probootstrap-aside .probootstrap-nav .probootstrap-subnav li { margin: 0; }
.probootstrap-aside .probootstrap-nav .probootstrap-subnav li a {
  display: block;
  font-size: 12px;
  font-weight: 400 !important;
  padding: 3px 0;
  color: #aaa !important;
}
.probootstrap-aside .probootstrap-nav .probootstrap-subnav li a:hover,
.probootstrap-aside .probootstrap-nav .probootstrap-subnav li.active a {
  color: #777 !important;
  font-weight: 600 !important;
}

/* ---- Smaller main nav links (Home / Storyboard / Character / etc.) ----
   Direct-child combinator so this only touches the top-level links,
   never the nested Storyboard sub-links above. ---- */
.probootstrap-aside .probootstrap-nav > ul > li > a { font-size: 13px; }
