/* Portfolio L3.59.1 — realistic MacBook Pro-inspired showcase. Changes ONLY the alt-websites cover. */
/* Deliberately does not style portfolio-gallery, details, summary or work cards. */
.p2-main .p2-showcase:has(> .ls-alt-websites) {
  height: clamp(590px, 51vw, 720px);
  overflow: hidden;
  isolation: isolate;
}

.ls-alt-websites {
  --alt-progress: 0;
  --alt-lid-angle: -86deg;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 58px 55px;
  overflow: hidden;
  perspective: 1700px;
}
.ls-alt-websites::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse at 50% 71%, rgba(252,255,255,.34), transparent 60%);
  pointer-events: none;
}
.ls-alt-websites-caption {
  position: absolute;
  left: clamp(24px, 4.4vw, 68px);
  top: clamp(22px, 3.2vw, 42px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
  color: #17332c;
}
.ls-alt-websites-caption span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
  opacity: .7;
}
.ls-alt-websites-caption strong {
  font-size: clamp(17px, 2.05vw, 25px);
  font-weight: 670;
  line-height: 1.12;
}

.ls-alt-macbook {
  position: relative;
  width: min(91%, 785px);
  aspect-ratio: 785 / 555;
  perspective: 1900px;
  transform-style: preserve-3d;
  flex: 0 0 auto;
  margin-top: clamp(40px, 5vw, 70px);
  transform: translateY(var(--alt-device-shift, -24px));
  filter: drop-shadow(0 16px 14px rgba(29, 50, 50, .07));
}
.ls-alt-macbook-floor {
  position: absolute;
  left: 7%; right: 7%; bottom: 1.8%; height: 7%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(20,35,32,.22), transparent 69%);
  filter: blur(15px);
  transform: scaleX(1.05);
}

/* Genuine 16:10 display proportions and the dark glass, slender bezel of a MacBook Pro. */
.ls-alt-macbook-lid {
  position: absolute;
  z-index: 3;
  left: 50%; top: 0;
  width: 96%;
  aspect-ratio: 16 / 10.05;
  transform-origin: 50% 98.6%;
  transform: translateX(-50%) rotateX(var(--alt-lid-angle));
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: visible;
}
.ls-alt-macbook-lid-back {
  position: absolute;
  inset: -1.2%;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(145deg,#d5dad9,#f9faf8 33%,#bdc5c8 75%,#e7ebea);
  border: 1px solid rgba(80,91,93,.5);
  box-shadow: 0 1px 5px rgba(21,35,35,.2), inset 0 1px 2px rgba(255,255,255,.7);
  transform: translateZ(-4px);
  backface-visibility: hidden;
}
.ls-alt-macbook-lid-back::before {
  content: '';
  position: absolute;
  left: calc(50% - 20px); top: 44%;
  width: 40px; height: 40px;
  background: rgba(80,94,96,.26);
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Cpath d="M41 10c-2 2-6 3-8 3 0-4 2-7 4-9s6-4 9-4c0 4-2 8-5 10ZM54 47c-3 7-7 14-13 14-3 0-5-2-9-2-3 0-6 2-9 2-6 0-10-6-14-14-5-11-5-22 0-29 4-6 10-9 16-9 4 0 7 2 10 2s7-3 12-2c5 1 9 4 12 8-11 6-13 22-5 30Z"/%3E%3C/svg%3E') center / contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Cpath d="M41 10c-2 2-6 3-8 3 0-4 2-7 4-9s6-4 9-4c0 4-2 8-5 10ZM54 47c-3 7-7 14-13 14-3 0-5-2-9-2-3 0-6 2-9 2-6 0-10-6-14-14-5-11-5-22 0-29 4-6 10-9 16-9 4 0 7 2 10 8-11 6-13 22-5 30Z"/%3E%3C/svg%3E') center / contain no-repeat;
}
.ls-alt-macbook-screen-shell {
  position: absolute;
  inset: 0;
  background: #0a0c0e;
  border: 4px solid #272a2e;
  border-radius: 12px 12px 8px 8px;
  box-shadow: 0 0 0 1px #c5cacb, inset 0 1px 2px rgba(255,255,255,.18), 0 12px 18px rgba(18,29,32,.1);
  transform: translateZ(3px);
  backface-visibility: hidden;
  overflow: hidden;
}
.ls-alt-macbook-display {
  position: absolute;
  inset: 9px 9px 10px;
  border-radius: 6px 6px 3px 3px;
  overflow: hidden;
  background: #080b15;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.065);
}
.ls-alt-macbook-notch {
  position: absolute;
  z-index: 12;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 10.5%; height: 4.7%;
  background: #090a0d;
  border-radius: 0 0 10px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ls-alt-macbook-notch::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 28%,#496278,#111c28 50%,#000 75%);
  box-shadow: 0 0 0 1px #121b23;
}
.ls-alt-websites-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: radial-gradient(circle at 74% 85%, #f3786d, transparent 28%),
              radial-gradient(circle at 12% 70%, #5456ac, transparent 36%),
              radial-gradient(circle at 64% 22%, #071831, #070d19 60%);
}
.ls-alt-websites-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform 1.2s ease;
}
.ls-alt-websites-slide.is-active {
  opacity: 1;
  transform: scale(1);
}
.ls-alt-websites-slide img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
}
.ls-alt-websites-placeholder {
  position: absolute; inset: 0;
  display: grid;
  place-items: end center;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 80%, #4655a1 0%,transparent 48%),
              radial-gradient(ellipse at 90% 37%, #ed9c76 0%, transparent 33%),
              radial-gradient(ellipse at 65% 86%, #11182e 0%, #0d1025 70%);
}
.ls-alt-websites-placeholder::before {
  content: '';
  width: 82%; height: 80%;
  border: min(7vw, 60px) solid rgba(243,149,132,.52);
  border-radius: 34% 52% 47% 48%;
  transform: rotate(-33deg) translate(9%,30%);
  filter: blur(11px);
  box-shadow: 0 0 0 20px rgba(89,95,189,.4), inset 0 0 0 22px rgba(32,35,87,.7);
}
.ls-alt-websites-placeholder-notice {
  position: absolute;
  z-index: 2;
  bottom: 20px;
  padding: 7px 14px;
  max-width: 70%;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  border-radius: 30px;
  color: #e9efff;
  background: rgba(4,9,20,.7);
  backdrop-filter: blur(12px);
  text-align: center;
}
.ls-alt-macbook-glass {
  position: absolute; inset: 0;
  z-index: 10;
  background: linear-gradient(125deg,rgba(255,255,255,.07),transparent 34%,transparent 75%,rgba(255,255,255,.035));
  pointer-events: none;
}

/* Real brushed-aluminium unibody with keyboard, perforated speakers and trackpad. */
.ls-alt-macbook-hinge {
  position: absolute;
  z-index: 2;
  left: 6%; width: 88%; top: 82.4%; height: 1.6%;
  border-radius: 5px;
  background: linear-gradient(180deg,#1d2227,#6e7677 45%,#b3b8b9 85%,#252b2e);
  box-shadow: 0 1px 0 rgba(255,255,255,.22);
}
.ls-alt-macbook-deck {
  position: absolute;
  z-index: 2;
  left: 50%; top: 82.7%;
  width: 100%; height: 43%;
  transform-origin: 50% 0%;
  transform: translateX(-50%) rotateX(66deg);
  transform-style: preserve-3d;
  border-radius: 11px 11px 14px 14px;
  background: linear-gradient(125deg, #bdc4c6 0%,#f2f4f3 24%,#ccd2d3 66%,#f1f3f2 96%);
  border: 1px solid rgba(94,111,116,.62);
  box-shadow: 0 19px 28px rgba(18,27,32,.22),inset 0 2px 3px rgba(255,255,255,.62);
}
.ls-alt-macbook-deck::after {
  content: '';
  position: absolute;
  left: 2%; right: 2%; bottom: 0;
  border-bottom: 1px solid rgba(255,255,255,.7);
}
.ls-alt-macbook-keyboard {
  position: absolute;
  left: 16.5%; right: 16.5%; top: 7.5%; height: 61%;
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(98,108,111,.16);
  box-shadow: inset 0 1px 3px rgba(95,105,108,.35), 0 1px 1px rgba(255,255,255,.5);
}
.ls-alt-macbook-key {
  display: block;
  min-width: 0;
  border-radius: 3px;
  background: linear-gradient(145deg,#363c40,#15191c 52%,#2f3538);
  border: 1px solid rgba(0,0,0,.42);
  box-shadow: 0 1px 0 rgba(232,234,233,.65),inset 0 1px 1px rgba(255,255,255,.11);
}
.ls-alt-macbook-key:nth-child(13n + 1),
.ls-alt-macbook-key:nth-child(13n + 13) { background:linear-gradient(145deg,#454a4c,#282c30); }
.ls-alt-macbook-key:nth-child(77) { grid-column: span 1; }
.ls-alt-macbook-speaker {
  position: absolute;
  top: 8%; height: 57%; width: 10%;
  opacity: .6;
  background-image: radial-gradient(circle, rgba(40,49,53,.7) .75px, transparent 1.25px);
  background-size: 4.8px 4.8px;
  border-radius: 4px;
  -webkit-mask-image: linear-gradient(to right,transparent 0%,black 14%,black 86%,transparent 100%);
  mask-image: linear-gradient(to right,transparent 0%,black 14%,black 86%,transparent 100%);
}
.ls-alt-macbook-speaker--left { left: 4.2%; }
.ls-alt-macbook-speaker--right { right: 4.2%; }
.ls-alt-macbook-trackpad {
  position: absolute;
  left: 50%; top: 72%;
  width: 36%; height: 25%;
  transform: translateX(-50%);
  border-radius: 7px;
  background:linear-gradient(160deg,rgba(198,205,207,.44),rgba(244,245,244,.32));
  box-shadow:inset 0 0 0 1px rgba(100,109,112,.32),inset 0 1px 2px rgba(122,133,136,.18);
}
.ls-alt-macbook-deck-front {
  position: absolute;
  left: -.4%; right: -.4%; bottom: -3.4%;
  height: 4.4%;
  border-radius: 0 0 65% 65%;
  background:linear-gradient(180deg,#a1abad,#f9fbfa 38%,#afb8bb 80%,#7b878b);
  box-shadow:0 4px 5px rgba(15,24,26,.12);
  transform: translateZ(-3px);
}
.ls-alt-macbook-deck-front::before {
  content:'';
  position:absolute;
  left: 40%; width: 20%; top: 0;
  height: 3px;
  border-radius: 0 0 10px 10px;
  background:rgba(88,101,104,.45);
}


/* Initial closed state: satin-aluminium outer lid covers the keyboard.
   Its fade is linked to the same scroll position as the opening hinge. */
.ls-alt-macbook-closed-shell {
  position: absolute;
  z-index: 5;
  left: 50%; top: 82.7%;
  width: 100%; height: 43%;
  transform: translateX(-50%) rotateX(66deg);
  transform-origin: 50% 0;
  opacity: var(--alt-closed-opacity, 1);
  pointer-events: none;
  border-radius: 9px 9px 14px 14px;
  border: 1px solid rgba(107,123,127,.38);
  background: linear-gradient(130deg,#a8b0b3 0%,#dce0e1 17%,#f4f6f6 36%,#c8cfd1 82%,#9ba7aa 100%);
  box-shadow: 0 4px 11px rgba(30,47,49,.14), inset 0 1px 0 rgba(255,255,255,.74);
}
.ls-alt-macbook-closed-shell::before {
  content: '';
  position: absolute;
  left: 50%; top: 33%;
  transform: translateX(-50%);
  width: 7%; aspect-ratio: 1;
  background: rgba(106,121,126,.25);
  -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Cpath d="M41 10c-2 2-6 3-8 3 0-4 2-7 4-9s6-4 9-4c0 4-2 8-5 10ZM54 47c-3 7-7 14-13 14-3 0-5-2-9-2-3 0-6 2-9 2-6 0-10-6-14-14-5-11-5-22 0-29 4-6 10-9 16-9 4 0 7 2 10 2s7-3 12-2c5 1 9 4 12 8-11 6-13 22-5 30Z"/%3E%3C/svg%3E') center/contain no-repeat;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Cpath d="M41 10c-2 2-6 3-8 3 0-4 2-7 4-9s6-4 9-4c0 4-2 8-5 10ZM54 47c-3 7-7 14-13 14-3 0-5-2-9-2-3 0-6 2-9 2-6 0-10-6-14-14-5-11-5-22 0-29 4-6 10-9 16-9 4 0 7 2 10 8-11 6-13 22-5 30Z"/%3E%3C/svg%3E') center/contain no-repeat;
}
.ls-alt-macbook-closed-shell::after {
  content: '';
  position: absolute;
  width: 19%; height: 4px;
  left: 40.5%; bottom: 0;
  border-radius: 3px 3px 0 0;
  background: rgba(114,128,133,.21);
}

@media(max-width: 900px) {
  .p2-main .p2-showcase:has(> .ls-alt-websites) { height: clamp(430px, 69vw, 600px); }
  .ls-alt-websites { padding: 58px 18px 30px; }
  .ls-alt-macbook { width: min(96%, 660px); margin-top: 40px; }
  .ls-alt-websites-caption { left: 22px; top: 19px; }
}
@media(max-width: 640px) {
  .p2-main .p2-showcase:has(> .ls-alt-websites) { height: clamp(320px, 94vw, 440px); }
  .ls-alt-websites { padding: 48px 7px 14px; }
  .ls-alt-websites-caption { top: 16px; left: 17px; }
  .ls-alt-websites-caption span { font-size: 8px; }
  .ls-alt-websites-caption strong { font-size: 17px; }
  .ls-alt-macbook { width: 98%; margin-top: 40px; }
  .ls-alt-macbook-keyboard { gap: 1.5px; padding: 1.5px; border-radius: 5px; }
  .ls-alt-macbook-key { border-radius: 2px; }
  .ls-alt-macbook-screen-shell { border-width: 2px; border-radius: 7px 7px 5px 5px; }
  .ls-alt-macbook-display { inset: 5px 5px 5px; border-radius: 3px 3px 1px 1px; }
  .ls-alt-macbook-notch { border-radius: 0 0 5px 5px; }
  .ls-alt-websites-placeholder-notice { font-size: 8px; bottom: 10px; }
}
@media(prefers-reduced-motion: reduce) {
  .ls-alt-websites { --alt-lid-angle: -2deg !important; }
  .ls-alt-websites-slide { transition: none !important; }
  .ls-alt-macbook-lid { will-change: auto; }
}

/* Anchor MacBook lid to rear hinge */
.ls-alt-macbook-lid {
  top: auto;
  bottom: 17.3%;
  transform-origin: 50% 100%;
}
.ls-alt-macbook-lid-back {
  bottom: 0;
}
