/* =========================================================
   DOTS MEDIA
   PORTFOLIO / SELECTED WORK
   ========================================================= */

.portfolio-wrap {
  position: relative;
  background: #0a0705;
  padding: 10px 60px 70px;
  overflow: hidden;
}

.portfolio {
  position: relative;
  z-index: 2;

  max-width: 1400px;
  margin: 0 auto;
}


/* =========================================================
   PORTFOLIO HEADER
   ========================================================= */

.portfolio-tag {
  display: flex;
  align-items: center;
  gap: 10px;

  color: #cfcfcf;

  font-size: 13px;
  font-weight: 600;

  letter-spacing: 2px;
  text-transform: uppercase;

  margin-bottom: 20px;

  /* Scroll reveal — fades/slides up first. */
  opacity: 1;
  transform: translateY(14px);

  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}

.portfolio-title {
  font-size: 38px;
  font-weight: 800;

  margin-bottom: 60px;

  /* Scroll reveal — starts ~0.12s after the tag. */
  opacity: 1;
  transform: translateY(14px);

  transition:
    opacity 0.5s ease 0.12s,
    transform 0.5s ease 0.12s;
}

/* Toggled by animations.js the moment the section scrolls into view. */
.portfolio-wrap.in-view .portfolio-tag,
.portfolio-wrap.in-view .portfolio-title {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================================
   PORTFOLIO GRID
   ========================================================= */

.portfolio-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 24px;

  align-items: start;
}


/* =========================================================
   PORTFOLIO CARD
   ========================================================= */

.portfolio-card {
  position: relative;

  border-radius: 16px;
  overflow: hidden;

  background: #111111;

  text-decoration: none;
  color: inherit;

  display: block;

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);

  box-shadow:
    0 25px 50px rgba(0, 0, 0, 0.5);
}

.portfolio-card.offset {
  margin-top: 40px;
}


/* =========================================================
   CARD IMAGE
   ========================================================= */

.card-image {
  position: relative;

  height: 210px;

  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.5s ease;
}

.portfolio-card:hover
.card-image img {
  transform: scale(1.08);
}

.card-image::after {
  content: '';

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      transparent 55%,
      rgba(10, 7, 5, 0.95) 100%
    );
}


/* =========================================================
   CARD BODY
   ========================================================= */

.card-body {
  padding: 18px 20px 24px;

  background: #100c09;
}

.card-category {
  color: #ff7a1a;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 1.5px;
  text-transform: uppercase;

  margin-bottom: 10px;
}

.card-title {
  color: #ffffff;

  font-size: 19px;
  font-weight: 700;

  margin-bottom: 8px;
}

.card-meta {
  color: #8a8a8a;

  font-size: 12.5px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .portfolio-tag,
  .portfolio-title {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

}

/* =========================================================
   HIGHLIGHTED CARDS — taller photos, lit edge, orange glow
   ========================================================= */

.portfolio-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #15100c 0%, #0d0907 100%);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

/* Orange light line along the top edge */
.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 2px;
  z-index: 3;
  background: linear-gradient(90deg, transparent, #ff7a1a, transparent);
  opacity: 0.55;
  transition: opacity 0.35s ease, left 0.35s ease, right 0.35s ease;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 122, 26, 0.45);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 122, 26, 0.15),
    0 0 40px rgba(255, 122, 26, 0.18);
}

.portfolio-card:hover::before {
  opacity: 1;
  left: 0;
  right: 0;
}

.portfolio-card:focus-visible {
  outline: 2px solid #ff7a1a;
  outline-offset: 3px;
}

.card-image {
  height: 300px;
}

.card-image::after {
  background: linear-gradient(to bottom, transparent 50%, rgba(13, 9, 7, 0.9) 100%);
}

.card-body {
  background: transparent;
  padding: 20px 22px 24px;
}

.card-title {
  font-size: 21px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: #9a9a9a;
}

.card-arrow {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 122, 26, 0.35);
  color: #ff7a1a;
  font-size: 15px;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover .card-arrow {
  background: #ff7a1a;
  color: #0a0705;
  transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card,
  .portfolio-card:hover,
  .card-arrow {
    transition: none;
    transform: none;
  }
}


/* =========================================================
   CARD SLIDESHOW — booth photos + names cross-fade
   ========================================================= */

.card-image .card-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.1s ease, transform 0.5s ease;
}

.card-image .card-slide.is-active {
  opacity: 1;
}

.card-image .card-slide:first-child {
  position: relative;
}

.card-title {
  display: grid;
}

.card-title-slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.card-title-slide.is-active {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}

@media (prefers-reduced-motion: reduce) {
  .card-image .card-slide,
  .card-title-slide {
    transition: none;
  }
}


/* =========================================================
   Moved from responsive.css (this page's rules only; same values,
   same @media wrappers).
   ========================================================= */
@media (max-width: 1100px) {
    .portfolio-wrap {
        padding-left: 40px;
        padding-right: 40px;
    }
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .portfolio-card.offset {
        margin-top: 0;
    }}@media (max-width: 768px) {
    .portfolio-wrap {
        padding: 70px 20px 90px;
    }
    .portfolio-title {
        font-size: 32px;
        line-height: 1.08;

        margin-bottom: 40px;
    }
    .portfolio-grid {
        display: grid;
        grid-template-columns: 1fr;

        gap: 24px;
    }
    .portfolio-card.offset {
        margin-top: 0;
    }}@media (max-width: 480px) {
    .portfolio-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }
    .portfolio-title {
        font-size: 28px;
    }}@media (max-width: 360px) {
    .portfolio-title {
        font-size: 26px;
    }}

body.home .portfolio-title {
    font-size: var(--home-title-size);
    line-height: 1.1;
    letter-spacing: -1px;
}

body.home .portfolio-wrap {
    padding-top: var(--home-section-space);
    padding-bottom: var(--home-section-space);
}

body.home .portfolio-title {
    margin-bottom: 32px;
}
