/* Executed projects — portfolio grid + lightbox */

.executed-page {
  padding-bottom: clamp(72px, 10vh, 96px);
}

.executed-portfolio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

.executed-portfolio__card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(221, 232, 198, 0.14);
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0e0d0b;
  cursor: pointer;
  text-align: inherit;
  text-decoration: none;
  color: inherit;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: translateZ(0) scale(1);
  transition:
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease,
    z-index 0s;
  will-change: transform;
}

.executed-portfolio__card--wide {
  grid-column: span 1;
}

.executed-portfolio__card:hover,
.executed-portfolio__card:focus-visible {
  z-index: 3;
  transform: translate3d(0, -4px, 0);
  border-color: rgba(200, 164, 93, 0.42);
  box-shadow:
    0 32px 72px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(200, 164, 93, 0.18) inset,
    0 0 40px rgba(200, 164, 93, 0.12);
}

.executed-portfolio__card:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 4px;
}

.executed-portfolio__media,
.executed-portfolio__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.executed-portfolio__media img {
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.executed-portfolio__card:hover .executed-portfolio__media img,
.executed-portfolio__card:focus-visible .executed-portfolio__media img {
  transform: scale(1.045);
}

.executed-portfolio__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 36%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 64%
  );
  transform: translateX(-120%);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.executed-portfolio__card:hover .executed-portfolio__shine,
.executed-portfolio__card:focus-visible .executed-portfolio__shine {
  transform: translateX(120%);
}

.executed-portfolio__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(180deg, transparent 18%, rgba(6, 6, 4, 0.88) 100%);
  color: #fff;
  pointer-events: none;
}

.executed-portfolio__title {
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  font-weight: 600;
  line-height: 1.35;
}

.executed-portfolio__meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.executed-portfolio__cta {
  margin-top: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.executed-portfolio__cta span {
  color: var(--accent-gold);
}

.executed-portfolio__card:hover .executed-portfolio__cta,
.executed-portfolio__card:focus-visible .executed-portfolio__cta {
  opacity: 1;
  transform: translateY(0);
}

.executed-portfolio__pagination {
  position: relative;
  z-index: 2;
  margin-top: clamp(40px, 5vw, 56px);
  padding-bottom: 8px;
}

.executed-portfolio__pagination .pagination-fargah__list {
  gap: 4px;
}

/* Executed project detail */

.executed-detail {
  padding: clamp(88px, 11vw, 132px) 0 clamp(76px, 10vw, 116px);
}

.executed-detail__shell {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.76fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: stretch;
}

.executed-detail__media-panel,
.executed-detail__story-panel,
.executed-detail__note,
.executed-detail__spec-card {
  border: 1px solid rgba(221, 232, 198, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.024)),
    rgba(8, 8, 6, 0.54);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.26);
}

.executed-detail__media-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
}

.executed-detail__side {
  position: sticky;
  top: calc(var(--header-height, 88px) + 22px);
  display: grid;
  gap: clamp(16px, 2vw, 22px);
  align-self: start;
}

.executed-detail__hero-image {
  position: relative;
  flex: 1 1 auto;
  aspect-ratio: 16 / 10;
  min-height: 0;
  background: #0b0a08;
  overflow: hidden;
}

.executed-detail__hero-image img,
.executed-detail__hero-image video,
.executed-detail__thumb img,
.executed-detail__thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.executed-detail__hero-image video,
.executed-detail__thumb video {
  display: block;
}

.executed-detail__hero-badge {
  position: absolute;
  inset-inline-start: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid rgba(228, 196, 122, 0.34);
  border-radius: 999px;
  background: rgba(5, 5, 8, 0.62);
  color: #f8f5f0;
  font-size: 0.76rem;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.executed-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.executed-detail__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(221, 232, 198, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0a08;
  cursor: pointer;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease,
    transform 0.22s ease;
}

.executed-detail__thumb img,
.executed-detail__thumb video {
  display: block;
  transition: transform 0.35s ease, opacity 0.22s ease;
}

.executed-detail__thumb:not(.is-active) img,
.executed-detail__thumb:not(.is-active) video {
  opacity: 0.74;
}

.executed-detail__thumb:hover,
.executed-detail__thumb:focus-visible,
.executed-detail__thumb.is-active {
  border-color: rgba(228, 196, 122, 0.72);
  box-shadow:
    0 0 0 1px rgba(228, 196, 122, 0.22) inset,
    0 14px 28px rgba(0, 0, 0, 0.2);
}

.executed-detail__thumb:hover img,
.executed-detail__thumb:hover video,
.executed-detail__thumb:focus-visible img,
.executed-detail__thumb:focus-visible video {
  opacity: 1;
  transform: scale(1.04);
}

.executed-detail__thumb-play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.72);
  color: var(--accent-gold-text);
  font-size: 0.78rem;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.executed-detail__story-panel {
  border-radius: 24px;
  padding: clamp(22px, 3vw, 34px);
}

.executed-detail__eyebrow {
  margin: 0 0 12px;
  color: var(--accent-gold-text);
  font-size: 0.78rem;
  font-weight: 900;
}

.executed-detail__title {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  font-weight: 900;
  line-height: 1.3;
  text-wrap: balance;
}

.executed-detail__lead {
  position: relative;
  margin: 22px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(228, 196, 122, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(228, 196, 122, 0.1), transparent 34%),
    rgba(255, 255, 255, 0.035);
  color: rgba(244, 239, 230, 0.78);
  font-size: 0.95rem;
  line-height: 2.05;
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.executed-detail__lead::before {
  content: '';
  position: absolute;
  inset-block: 22px;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(228, 196, 122, 0.95), rgba(228, 196, 122, 0.16));
}

.executed-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.executed-detail__chips span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(200, 164, 93, 0.32);
  border-radius: 999px;
  background: rgba(200, 164, 93, 0.1);
  color: var(--accent-gold-text);
  font-size: 0.74rem;
  font-weight: 900;
}

.executed-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.executed-detail__body {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(28px, 4vw, 48px);
}

.executed-detail__note,
.executed-detail__spec-card {
  border-radius: 22px;
  padding: clamp(22px, 3vw, 32px);
}

.executed-detail__note {
  width: min(440px, 100%);
}

.executed-detail__spec-card {
  width: 100%;
}

.executed-detail__note h2,
.executed-detail__spec-card h2 {
  margin: 0 0 14px;
  color: var(--text-primary);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 900;
}

.executed-detail__note p {
  margin: 0 0 16px;
  color: var(--text-secondary);
  line-height: 2;
}

.executed-detail__note p:last-child {
  margin-bottom: 0;
}

.executed-detail__spec-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.executed-detail__spec-list div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(221, 232, 198, 0.12);
}

.executed-detail__spec-list div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.executed-detail__spec-list dt {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.executed-detail__spec-list dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: 900;
}

[data-theme="light"] .executed-detail__media-panel,
[data-theme="light"] .executed-detail__story-panel,
[data-theme="light"] .executed-detail__note,
[data-theme="light"] .executed-detail__spec-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(23, 20, 15, 0.12);
  box-shadow: 0 20px 54px rgba(23, 20, 15, 0.1);
}

[data-theme="light"] .executed-detail__lead {
  background:
    linear-gradient(135deg, rgba(176, 130, 45, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.78);
  border-color: rgba(176, 130, 45, 0.2);
  color: rgba(31, 28, 23, 0.76);
  box-shadow:
    0 16px 38px rgba(90, 72, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Lightbox modal */

.executed-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 32px);
  pointer-events: none;
}

.executed-modal[hidden] {
  display: none !important;
}

.executed-modal.is-open {
  pointer-events: auto;
}

.executed-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 3, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.executed-modal.is-open .executed-modal__backdrop {
  opacity: 1;
}

.executed-modal__dialog {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(221, 232, 198, 0.16);
  background:
    linear-gradient(180deg, rgba(28, 26, 22, 0.98), rgba(12, 11, 9, 0.98));
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  transform: scale(0.92) translateY(18px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.executed-modal.is-open .executed-modal__dialog {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.executed-modal__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 232, 198, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #f2ece2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.executed-modal__close:hover {
  background: rgba(200, 164, 93, 0.22);
  border-color: rgba(200, 164, 93, 0.5);
  transform: scale(1.05);
}

.executed-modal__layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
}

.executed-modal__gallery {
  padding: clamp(18px, 2.4vw, 28px);
  border-inline-end: 1px solid rgba(221, 232, 198, 0.1);
}

.executed-modal__hero {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0a0908;
}

.executed-modal__hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.executed-modal__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.executed-modal__thumbs[hidden] {
  display: none !important;
}

.executed-modal__thumb {
  width: 72px;
  height: 54px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.executed-modal__thumb:hover,
.executed-modal__thumb.is-active {
  opacity: 1;
  border-color: var(--accent-gold);
}

.executed-modal__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.executed-modal__body {
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.executed-modal__divider {
  margin-bottom: 18px;
}

.executed-modal__title {
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 600;
  color: #f4efe6;
  line-height: 1.35;
}

.executed-modal__meta {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: rgba(232, 226, 214, 0.72);
}

.executed-modal__desc {
  margin: 0 0 24px;
  font-size: 0.92rem;
  line-height: 1.75;
  color: rgba(232, 226, 214, 0.86);
}

.executed-modal__desc:empty {
  display: none;
}

.executed-modal__link {
  margin-top: auto;
}

body.executed-modal-open {
  overflow: hidden;
}

@media (max-width: 992px) {
  .executed-portfolio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executed-portfolio__card--wide {
    grid-column: span 1;
  }

  .executed-modal__layout {
    grid-template-columns: 1fr;
  }

  .executed-modal__gallery {
    border-inline-end: 0;
    border-bottom: 1px solid rgba(221, 232, 198, 0.1);
  }

  .executed-detail__shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .executed-detail__media-panel {
    height: auto;
  }

  .executed-detail__hero-image {
    flex: initial;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .executed-detail__body {
    justify-content: stretch;
  }

  .executed-detail__side {
    position: relative;
    top: auto;
  }
}

@media (max-width: 576px) {
  .executed-portfolio {
    grid-template-columns: 1fr;
  }

  .executed-portfolio__cta {
    opacity: 1;
    transform: none;
  }

  .executed-detail {
    padding-top: 64px;
  }

  .executed-detail__thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executed-detail__spec-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .executed-portfolio__card,
  .executed-portfolio__media img,
  .executed-portfolio__shine,
  .executed-portfolio__cta,
  .executed-modal__backdrop,
  .executed-modal__dialog {
    transition: none;
  }

  .executed-portfolio__card:hover,
  .executed-portfolio__card:focus-visible {
    transform: none;
  }
}
