/* Léyo portfolio — extends main site tokens (loaded after base vars in index) */

.portfolio-hero {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.portfolio-hero::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, var(--yellow), var(--orange), var(--pale));
}
.portfolio-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 500;
  line-height: 1.08;
  color: var(--pale);
  margin-bottom: 20px;
}
.portfolio-hero h1 em { font-style: normal; color: var(--orange); }
.portfolio-lead {
  font-size: 0.98rem;
  line-height: 1.85;
  color: var(--mid);
  max-width: 560px;
  margin-bottom: 28px;
}

.client-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.client-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
  text-decoration: none;
  color: var(--pale);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: border-color 0.2s, background 0.2s;
}
.client-pill:hover { border-color: var(--orange); background: var(--stone); }
.client-pill-icon,
.work-filter-pill img,
.work-filter-pill-icon,
.filter-pill img,
.pill-icon {
  width: 22px;
  height: 22px;
  max-width: 22px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.client-pill-label { line-height: 1.2; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .work-grid { grid-template-columns: 1fr; }
}
.work-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: var(--olive);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
  cursor: pointer;
}
.work-card:hover,
.work-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(237, 148, 51, 0.45);
}
.work-card:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}
.work-card-live {
  position: relative;
  z-index: 5;
  display: inline-block;
  margin-top: 6px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  text-decoration: none;
  padding: 2px 0;
}
.work-card-live:hover {
  color: var(--yellow);
  text-decoration: underline;
}
.work-card-demo {
  position: relative;
  z-index: 5;
  display: inline-block;
  margin-top: 6px;
  margin-right: 10px;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(243, 196, 132, 0.85);
  text-decoration: none;
}
.work-card-demo:hover {
  color: var(--yellow);
  text-decoration: underline;
}
.portfolio-modal-footer .portfolio-modal-demo {
  margin-right: 8px;
}
.work-card-visual {
  aspect-ratio: 16 / 10;
  min-height: 200px;
  position: relative;
  display: block;
  overflow: hidden;
}
.work-card-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.work-card-tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.72);
  padding: 6px 10px;
  max-width: calc(100% - 24px);
}

/* Carousel — CSS-driven slide rotation */
.card-carousel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
}
.card-carousel:hover .carousel-slide {
  animation-play-state: paused;
}
.card-carousel--case {
  position: relative;
  min-height: 320px;
  border-radius: 0;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  animation: portfolioSlideFade var(--slide-duration, 13.5s) infinite;
  animation-timing-function: ease-in-out;
}
.carousel-slide-visual {
  position: relative;
  flex: 1 1 auto;
  min-height: 72%;
  overflow: hidden;
  background: #1e1f1c;
}
.work-card-visual .card-carousel {
  min-height: 100%;
}
.work-card-visual .carousel-slide-visual {
  min-height: 150px;
}
@keyframes portfolioSlideFade {
  0%, 26% { opacity: 1; visibility: visible; z-index: 1; pointer-events: auto; }
  33%, 100% { opacity: 0; visibility: hidden; z-index: 0; pointer-events: none; }
}
.carousel-caption {
  position: relative;
  flex: 0 0 auto;
  z-index: 3;
  margin: 0;
  padding: 8px 12px 10px;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--pale);
  background: rgba(0, 0, 0, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.work-card-visual .carousel-caption {
  padding-bottom: 10px;
}
.card-carousel--case .carousel-slide-visual {
  min-height: 260px;
}
.card-carousel--case .carousel-caption {
  padding: 10px 16px 12px;
}
.carousel-dots {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 4;
  display: flex;
  gap: 5px;
}
.carousel-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  animation: portfolioDotPulse var(--slide-duration, 13.5s) infinite;
}
@keyframes portfolioDotPulse {
  0%, 26% { background: var(--orange); transform: scale(1.15); }
  33%, 100% { background: rgba(255, 255, 255, 0.25); transform: scale(1); }
}
.work-card-site {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--orange);
  margin-top: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .carousel-slide { animation: none; opacity: 1; visibility: visible; position: relative; pointer-events: auto; z-index: 1; }
  .carousel-slide:not(:first-child) { display: none; }
  .card-carousel--case .carousel-slide:not(:first-child) { display: none; }
  .carousel-dots { display: none; }
  .card-carousel--case { min-height: 240px; }
}
.work-card-body { padding: 22px 24px 26px; }
.work-card-body h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--pale);
  margin-bottom: 8px;
}
.work-card-body p {
  font-size: 0.84rem;
  color: var(--mid);
  line-height: 1.7;
  margin-bottom: 12px;
}
.work-card-link {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
}

.case-carousel-wrap {
  border: 1px solid var(--border);
  background: var(--stone);
  overflow: hidden;
  min-height: 300px;
}
.case-carousel-wrap .card-carousel--case {
  min-height: 300px;
}

.case-study { scroll-margin-top: 88px; }
.case-header {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .case-header { grid-template-columns: 1fr; gap: 28px; }
}
.case-meta { margin-bottom: 16px; }
.case-sector {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 10px;
}
.case-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 500;
  color: var(--pale);
  line-height: 1.1;
  margin-bottom: 14px;
}
.case-intro {
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.85;
}
.case-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}
@media (max-width: 600px) {
  .case-stats { grid-template-columns: 1fr; }
}
.case-stat {
  padding: 16px 14px;
  background: var(--stone);
  border: 1px solid var(--border);
}
.case-stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--orange);
  font-weight: 500;
  line-height: 1;
  margin-bottom: 6px;
}
.case-stat span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--mid);
}

.media-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .media-grid { grid-template-columns: 1fr; }
}
.media-slot {
  position: relative;
  min-height: 200px;
  border: 1px dashed rgba(243, 196, 132, 0.35);
  background: var(--stone);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.media-slot--hero { min-height: 320px; grid-row: span 2; }
.media-slot--tall { min-height: 280px; }
.media-slot img,
.media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.media-label {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 20px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(243, 196, 132, 0.55);
  max-width: 220px;
  line-height: 1.6;
}
.media-slot.has-media .media-label { display: none; }

.deliverables {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 28px;
}
.deliverable {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  color: var(--pale);
  background: rgba(0, 0, 0, 0.08);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 40px;
}
@media (max-width: 900px) {
  .process-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .process-steps { grid-template-columns: 1fr; }
}
.process-step {
  background: var(--olive);
  padding: 32px 24px;
}
.process-step-num {
  font-family: var(--serif);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  margin-bottom: 12px;
}
.process-step h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--pale);
  margin-bottom: 8px;
  font-weight: 500;
}
.process-step p {
  font-size: 0.8rem;
  color: var(--mid);
  line-height: 1.7;
}

.results-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .results-row { grid-template-columns: 1fr; }
}
.result-card {
  padding: 28px 22px;
  border: 1px solid var(--border);
  background: var(--stone);
  text-align: center;
}
.result-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--yellow);
  margin-bottom: 8px;
  font-weight: 500;
}
.result-card span {
  font-size: 0.78rem;
  color: var(--mid);
  line-height: 1.6;
}

.portfolio-cta {
  text-align: center;
  padding: 72px 0;
}
.portfolio-cta h2 {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--pale);
  margin-bottom: 12px;
}
.portfolio-cta p {
  color: var(--mid);
  margin-bottom: 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.75;
}

.leyo-nav-drawer .nav-links a.nav-active { color: var(--pale); }

.portfolio-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
@media (max-width: 900px) {
  .portfolio-services-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .portfolio-services-grid { grid-template-columns: 1fr; }
}

/* Adobe Portfolio — encapsulated iframe */
.adobe-gallery { scroll-margin-top: 88px; }
.adobe-gallery-lead {
  color: var(--mid);
  max-width: 640px;
  line-height: 1.85;
  margin: -12px 0 28px;
  font-size: 0.92rem;
}
.adobe-embed-shell {
  border: 1px solid var(--border);
  background: var(--stone);
  overflow: hidden;
}
.adobe-embed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
}
.adobe-embed-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--orange);
}
.adobe-embed-external {
  padding: 10px 18px;
  font-size: 0.65rem;
}
.adobe-embed-frame {
  position: relative;
  min-height: min(var(--adobe-embed-height, 720px), 72vh);
  background: #2a2b28;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adobe-embed-frame.is-loaded {
  min-height: var(--adobe-embed-height, 720px);
  max-height: min(var(--adobe-embed-height, 720px), 85vh);
}
.adobe-embed-load {
  margin: 24px;
}
.adobe-embed-frame iframe {
  width: 100%;
  height: var(--adobe-embed-height, 720px);
  max-height: min(var(--adobe-embed-height, 720px), 85vh);
  border: 0;
  display: block;
  background: #fff;
}
.adobe-embed-note {
  font-size: 0.75rem;
  color: var(--light);
  line-height: 1.6;
  padding: 14px 18px 18px;
  margin: 0;
}
.adobe-embed-placeholder {
  padding: 28px 24px;
  border: 1px dashed rgba(243, 196, 132, 0.35);
  background: rgba(0, 0, 0, 0.08);
}
.adobe-embed-placeholder p {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.75;
  margin-bottom: 10px;
}
.adobe-embed-placeholder p:last-child { margin-bottom: 0; }
.adobe-embed-placeholder code {
  font-size: 0.82em;
  color: var(--pale);
  word-break: break-all;
}

/* UCL — rolling work carousel */
.ucl-partner { scroll-margin-top: 88px; }
.ucl-partner-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 32px;
}
@media (max-width: 768px) {
  .ucl-partner-header { grid-template-columns: 1fr; }
}
.ucl-partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-self: end;
}
@media (max-width: 768px) {
  .ucl-partner-actions { justify-content: flex-start; }
}
.ucl-partner-role {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 10px;
}
.ucl-partner-intro {
  font-size: 0.92rem;
  color: var(--mid);
  line-height: 1.85;
  max-width: 640px;
  margin-top: 12px;
}
.ucl-attribution {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--light);
  margin-top: 14px;
}
.ucl-attribution a {
  color: var(--pale);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ucl-attribution a:hover { color: var(--orange); }

.ucl-stage {
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.14);
  padding: 22px 24px 26px;
  margin-bottom: 20px;
  min-height: 120px;
}
.ucl-stage-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--pale);
  font-weight: 500;
  margin-bottom: 8px;
  transition: opacity 0.35s;
}
.ucl-stage-title.is-fading { opacity: 0.35; }
.ucl-stage-narration {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.75;
  max-width: 720px;
  transition: opacity 0.35s;
}
.ucl-stage-narration.is-fading { opacity: 0.35; }
.ucl-stage-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.ucl-stage-tag {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  color: var(--pale);
}
.ucl-stage-link {
  margin-left: auto;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--orange);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 6px 0;
}
.ucl-stage-link:hover { color: var(--yellow); }

.ucl-roll-viewport {
  overflow: hidden;
  border: 1px solid var(--border);
  background: #2a2b28;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ucl-roll-track {
  display: flex;
  align-items: stretch;
  gap: 14px;
  width: max-content;
  animation: uclRoll var(--ucl-roll-duration, 78s) linear infinite;
}
.ucl-roll-track:hover { animation-play-state: paused; }
@keyframes uclRoll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ucl-piece {
  flex: 0 0 auto;
  width: 220px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  background: var(--stone);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.ucl-piece:hover,
.ucl-piece.is-active {
  border-color: rgba(201, 168, 108, 0.65);
  transform: translateY(-2px);
}
.ucl-piece img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #1e1f1c;
}
.ucl-piece-cap {
  padding: 10px 12px 12px;
}
.ucl-piece-cap strong {
  display: block;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--pale);
  line-height: 1.25;
  margin-bottom: 4px;
}
.ucl-piece-cap span {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--light);
}

.work-card-visual--ucl::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 45%);
  pointer-events: none;
  z-index: 2;
}
.work-card-visual.has-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 1;
  filter: none;
  z-index: 1;
}

/* Full-bleed live screenshots in carousels */
.slide-preview {
  position: absolute;
  inset: 0;
  background: #1a1a18;
}
.slide-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.slide-preview--missing {
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.25) 100%);
}
.slide-preview--missing::after {
  content: 'Preview loading…';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.slide-preview--ipad {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a1a1a 0%, #2d2d2d 100%);
  padding: 5% 8%;
}
.slide-preview--ipad img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow:
    0 0 0 8px #0a0a0a,
    0 0 0 10px #333,
    0 16px 36px rgba(0, 0, 0, 0.5);
}

/* Portfolio project lightbox — nav (z-index 900) stays above backdrop */
body.portfolio-modal-open {
  overflow: hidden;
}
.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 880;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 24px);
  box-sizing: border-box;
  isolation: isolate;
}
.portfolio-modal[hidden] {
  display: none !important;
}
.portfolio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 31, 28, 0.72);
  backdrop-filter: blur(4px);
}
.portfolio-modal-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: center;
  flex-shrink: 0;
  width: min(92vw, 960px);
  max-width: 100%;
  max-height: min(92vh, calc(100vh - 24px));
  margin: 0 auto;
  background: var(--olive);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
@media (max-width: 768px) {
  .portfolio-modal-panel {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
}
.portfolio-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--pale);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.portfolio-modal-close:hover {
  background: var(--stone);
  border-color: var(--orange);
}
.portfolio-modal-header {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 22px 56px 14px 24px;
  border-bottom: 1px solid var(--border);
}
.portfolio-modal-sector {
  font-size: 0.63rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 6px;
}
.portfolio-modal-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 500;
  color: var(--pale);
  line-height: 1.15;
  margin-bottom: 10px;
}
.portfolio-modal-summary,
.portfolio-modal-results {
  font-size: 0.88rem;
  color: var(--mid);
  line-height: 1.7;
  max-width: 100%;
  width: 100%;
}
.portfolio-modal-results {
  margin-top: 8px;
  font-size: 0.82rem;
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}
.portfolio-modal-tabs {
  display: flex;
  gap: 0;
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.06);
}
.portfolio-modal-tab {
  border: 0;
  background: transparent;
  color: var(--light);
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.portfolio-modal-tab.is-active {
  color: var(--pale);
  border-bottom-color: var(--orange);
}
.portfolio-modal-tab[hidden] {
  display: none;
}
.portfolio-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.portfolio-modal-tab-panel {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.portfolio-modal-tab-panel[hidden] {
  display: none !important;
}
.portfolio-modal-embed {
  flex: 1 1 auto;
  width: 100%;
  min-height: 480px;
  background: #2a2b28;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 16px 20px 20px;
  gap: 12px;
  box-sizing: border-box;
}
.portfolio-modal-embed.is-loading iframe {
  opacity: 0.35;
}
.portfolio-modal-embed-status {
  flex: 0 0 auto;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--light);
  text-align: center;
  padding: 4px 0;
}
.portfolio-modal-embed-status[hidden] {
  display: none;
}
.portfolio-modal-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 480px;
  height: min(56vh, 560px);
  border: 0;
  background: #1e1f1c;
  align-self: stretch;
}
.portfolio-modal-embed-load {
  flex: 0 0 auto;
}
.portfolio-modal-embed-note {
  font-size: 0.86rem;
  color: var(--mid);
  line-height: 1.7;
  text-align: center;
  max-width: 28em;
}
.portfolio-modal-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #1e1f1c;
}
.portfolio-modal-carousel {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 280px;
  overflow: hidden;
}
@media (min-width: 769px) {
  .portfolio-modal-carousel {
    min-height: min(52vh, 420px);
  }
}
.portfolio-modal-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.portfolio-modal-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.portfolio-modal-slide-img {
  flex: 1 1 auto;
  min-height: 240px;
  width: 100%;
  background: #1a1a18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.portfolio-modal-slide-img img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 240px;
  margin: 0 auto;
  object-fit: cover;
  object-position: top center;
}
.portfolio-modal-slide-img--missing {
  background: linear-gradient(145deg, #1a1a18 0%, #2a2b28 55%, #1e1f1c 100%);
}
.portfolio-modal-slide-img--missing::after {
  content: 'Screenshot unavailable — use Demo embed or open the demo in a new tab.';
  display: block;
  padding: 24px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--mid);
  text-align: center;
  max-width: 28em;
  margin: 0 auto;
}
.portfolio-modal-slide-mock {
  flex: 1 1 auto;
  width: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a18;
  padding: 24px;
  box-sizing: border-box;
}
.portfolio-modal-mock-label {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--mid);
  text-align: center;
  max-width: 28em;
}
.portfolio-modal-slide-img--ipad {
  align-items: center;
  padding: 5% 8%;
  background: linear-gradient(160deg, #1a1a1a 0%, #2d2d2d 100%);
}
.portfolio-modal-slide-img--ipad img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 0 0 6px #0a0a0a, 0 12px 28px rgba(0, 0, 0, 0.45);
}
.portfolio-modal--ucl .portfolio-modal-slide-img img {
  object-fit: contain;
  object-position: center;
}
.portfolio-modal-caption {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
  padding: 10px 20px 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--pale);
  text-align: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.88);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.portfolio-modal-prev,
.portfolio-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 40px;
  height: 48px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.55);
  color: var(--pale);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.portfolio-modal-prev { left: 8px; }
.portfolio-modal-next { right: 8px; }
.portfolio-modal-prev:hover:not(:disabled),
.portfolio-modal-next:hover:not(:disabled) {
  background: var(--stone);
}
.portfolio-modal-prev:disabled,
.portfolio-modal-next:disabled {
  opacity: 0.35;
  cursor: default;
}
.portfolio-modal-dots {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px 14px;
  background: rgba(0, 0, 0, 0.35);
}
.portfolio-modal-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}
.portfolio-modal-dot.is-active {
  background: var(--orange);
  transform: scale(1.15);
}
.portfolio-modal-footer {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.08);
}
.portfolio-modal-footer .btn {
  margin: 0;
}
.work-card[data-portfolio-open] {
  cursor: pointer;
}
.ucl-piece[href="#ucl"] {
  cursor: pointer;
}
