/* =====================================================================
   Computer Xperts — Portfolio styles (css/portfolio.css)
   Loaded on the five Portfolio pages after css/site.css and css/section.css (hero, category strip and
   the picture gallery live there); the four website pages also load css/showcase.css first (the
   "Featured work" slider in the hero and the red wall of websites):
     web_design_portfolio.html, our_portfolio.html (E-Commerce), ebay_store_design.html,
     custom_design_rooms.html, logo_design_portfolio.html

   Contents
    1. Logo Design hero: four graphic samples in browser frames
    2. Project cards: the homepage scrolls past while a card is hovered
    3. Responsive: 1180px, 1023px, 640px; reduced motion
   ===================================================================== */


/* 1. Logo Design hero ------------------------------------------------------ */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: 100%; max-width: 560px; margin: 0 auto; }
.shots > li:nth-child(even) { transform: translateY(28px); }   /* staggered, so it reads as a wall of work */
.shot { overflow: hidden; border-radius: 12px; background: var(--white); box-shadow: 0 0 0 1px #3a3a3a, 0 24px 40px -18px rgba(0, 0, 0, .8); }
.shot__bar { display: flex; gap: 5px; padding: 8px 10px; background: #0d0d0d; }
.shot__bar i { width: 7px; height: 7px; border-radius: 50%; background: #4a4a4a; }
.shot__bar i:first-child { background: var(--accent); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 348 / 243; object-fit: cover; object-position: top; }


/* 2. Project cards ---------------------------------------------------------
   The picture is a whole homepage (576px wide, any height) in a browser frame. The view shows the top
   of it; while the card is hovered (or focused) it slides up until the bottom of the page shows. --t
   (set per site from the page height) keeps the speed the same for short and long pages. */
.frame-bar { display: flex; gap: 5px; padding: 8px 10px; background: #ededed; }
.frame-bar i { width: 7px; height: 7px; border-radius: 50%; background: #c4c4c4; }
.frame-bar i:first-child { background: var(--accent, var(--red)); }
.frame-view { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; container-type: size; background: var(--white); }
.frame-view picture { display: block; }
.frame-view img {
  display: block; width: 100%; height: auto; min-height: 100cqh;   /* a page shorter than the view still fills it */
  object-fit: cover; object-position: top; transition: transform .6s cubic-bezier(.45, 0, .55, 1);
}
a:hover > .frame-view img,
a:focus-visible > .frame-view img {
  transform: translateY(min(0px, calc(-100% + 100cqh)));   /* never moves a short page down */
  transition-duration: var(--t, 3s);
}

.projects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
.project { display: flex; flex-direction: column; min-width: 0; }
.project__shot {
  display: block; overflow: hidden; border-radius: 12px; background: var(--white);
  border: 1px solid var(--line); transition: border-color .2s ease, box-shadow .2s ease;
}
a.project__shot:hover,
a.project__shot:focus-visible { border-color: var(--accent); box-shadow: 0 18px 34px -24px rgba(0, 0, 0, .45); }
.project h3 { margin-top: 12px; color: var(--ink); font-size: 17px; font-weight: 900; line-height: 1.3; }
.project__link {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; margin-top: 2px;
  color: var(--accent-text); font-size: 14px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere;
}
@media (pointer: coarse) { .project__link { margin-top: -6px; padding: 8px 0; } }   /* easier to tap */
a.project__link:hover { text-decoration: underline; }
.project__link .ic { flex: none; width: 14px; height: 14px; }
.project__link--off { color: var(--muted); font-weight: 400; }


/* 3. Responsive ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1023px) {
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shots { max-width: 480px; }
}

@media (max-width: 640px) {
  .projects { gap: 20px 14px; }
  .project h3 { font-size: 15px; }
  .project__link { font-size: 13px; }
  .shots { gap: 10px; }
  .shots > li:nth-child(even) { transform: translateY(16px); }
}

/* reduced motion: the homepages stay still */
@media (prefers-reduced-motion: reduce) {
  a:hover > .frame-view img,
  a:focus-visible > .frame-view img { transform: none; }
}
