/* ==========================================================
   AIKCU — Portfolio
   Стили отдельной страницы каталога проектов.
   ========================================================== */

.portfolio-hero {
  position: relative;
  min-height: 23.5rem;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.portfolio-hero::before,
.portfolio-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}

.portfolio-hero::before {
  width: min(52rem, 72vw);
  height: 24rem;
  left: 42%;
  top: -8rem;
  background: radial-gradient(
    ellipse,
    rgba(75, 184, 226, .13),
    rgba(30, 104, 139, .045) 48%,
    transparent 74%
  );
  filter: blur(16px);
}

.portfolio-hero::after {
  width: 24rem;
  height: 17rem;
  right: -7rem;
  bottom: -8rem;
  background: radial-gradient(
    ellipse,
    rgba(255, 116, 28, .09),
    transparent 70%
  );
  filter: blur(14px);
}

.portfolio-hero__inner {
  padding-block: 6.2rem 2.8rem;
}

.portfolio-hero__eyebrow {
  margin-bottom: .95rem;
}

.portfolio-hero h1 {
  max-width: 52rem;
  margin: 0 0 1.15rem;
  color: var(--text);
  font-size: clamp(3rem, 5.4vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.05em;
  font-weight: 520;
}

.portfolio-hero h1 strong {
  color: var(--orange);
  font-weight: 680;
}

.portfolio-hero__lead {
  max-width: 45rem;
  margin: 0;
  color: var(--secondary);
  font-size: clamp(.98rem, 1.4vw, 1.08rem);
  line-height: 1.68;
}

.portfolio-hero__note {
  margin: 1.25rem 0 0;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #93aab5;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .75rem;
  line-height: 1.5;
}

.portfolio-hero__note::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  flex: 0 0 auto;
  background: linear-gradient(90deg, var(--orange), rgba(255, 116, 28, .12));
}

.portfolio-section {
  position: relative;
  padding-block: 4.8rem 7rem;
}

.portfolio-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(58rem, 76vw);
  height: 28rem;
  left: 50%;
  top: 2rem;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse,
    rgba(61, 164, 204, .07),
    transparent 70%
  );
  filter: blur(18px);
}

.portfolio-section__header {
  max-width: 47rem;
  margin-bottom: 2.4rem;
}

.portfolio-section__eyebrow {
  margin-bottom: .85rem;
}

.portfolio-section__header h2 {
  margin: 0 0 .95rem;
  color: var(--text);
  font-size: clamp(2.25rem, 4vw, 3.35rem);
  line-height: 1.03;
  letter-spacing: -.045em;
  font-weight: 520;
}

.portfolio-section__header > p:not(.portfolio-section__eyebrow) {
  max-width: 43rem;
  margin: 0;
  color: var(--secondary);
  font-size: .96rem;
  line-height: 1.65;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.35rem;
}

.portfolio-card {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    linear-gradient(145deg, rgba(31, 78, 98, .34), rgba(4, 25, 39, .70)),
    rgba(5, 27, 42, .62);
  border: 1px solid rgba(133, 213, 244, .29);
  border-radius: .95rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .025),
    0 18px 42px rgba(0, 0, 0, .11);
  backdrop-filter: blur(14px);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.portfolio-card::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 1.25rem;
  right: 1.25rem;
  top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(101, 210, 248, .58),
    rgba(255, 126, 34, .28),
    transparent
  );
}

.portfolio-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex: 0 0 auto;
  background: #071522;
  border-bottom: 1px solid rgba(133, 213, 244, .16);
}

.portfolio-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: filter 180ms ease;
}

.portfolio-card__media--contain img {
  object-fit: contain;
}

.portfolio-card__media--deal {
  position: relative;
  aspect-ratio: 16 / 9;
}

.portfolio-card__media--deal img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center bottom;
}

.portfolio-card__media--deal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/projects/deal-calculator.webp") center / cover no-repeat;
  filter: blur(10px) brightness(.45);
  transform: scale(1.05);
  opacity: .30;
}

.portfolio-card__body {
  min-width: 0;
  padding: 1.2rem 1.25rem 1.3rem;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.portfolio-card__status {
  width: max-content;
  max-width: 100%;
  margin: 0 0 .65rem;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .67rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .025em;
}

.portfolio-status--live,
.portfolio-status--done {
  color: #5be093;
}

.portfolio-status--mvp {
  color: var(--cyan);
}

.portfolio-status--prototype {
  color: #7dd6fc;
}

.portfolio-card h3 {
  margin: 0 0 .7rem;
  color: var(--text);
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  line-height: 1.17;
  letter-spacing: -.025em;
  font-weight: 690;
}

.portfolio-card__description {
  margin: 0;
  color: var(--secondary);
  font-size: .86rem;
  line-height: 1.62;
}

.portfolio-card__tech {
  margin: 1rem 0 0;
  color: #8eabb8;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .67rem;
  line-height: 1.5;
}

.portfolio-card__actions {
  margin-top: auto;
  padding-top: 1.2rem;
  display: flex;
  align-items: center;
}

.portfolio-card__link {
  min-height: 2.8rem;
  padding-inline: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  color: var(--cyan);
  background: rgba(5, 27, 42, .38);
  border: 1px solid rgba(105, 205, 247, .30);
  border-radius: .65rem;
  text-decoration: none;
  font-size: .76rem;
  font-weight: 700;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.portfolio-card__link:hover {
  color: #f8fbfc;
  background: rgba(16, 57, 76, .50);
  border-color: rgba(105, 205, 247, .58);
  box-shadow: 0 0 22px rgba(105, 205, 247, .08);
}

.portfolio-card__link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.portfolio-card__note {
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  color: #83a5b4;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: .72rem;
  font-weight: 650;
}

@media (hover: hover) and (pointer: fine) {
  .portfolio-card:hover {
    transform: translateY(-3px);
    border-color: rgba(133, 213, 244, .48);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .035),
      0 20px 46px rgba(0, 0, 0, .14),
      0 0 28px rgba(92, 200, 240, .055);
  }

  .portfolio-card:hover .portfolio-card__media img {
    filter: brightness(1.035) saturate(1.025);
  }
}

@media (max-width: 1024px) {
  .portfolio-section {
    padding-top: 4.2rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .portfolio-hero {
    min-height: 0;
  }

  .portfolio-hero::before {
    width: 32rem;
    height: 21rem;
    left: 12%;
    top: -8rem;
  }

  .portfolio-hero::after {
    width: 18rem;
    height: 12rem;
    right: -8rem;
    bottom: -5rem;
  }

  .portfolio-hero__inner {
    padding-block: 8.35rem 3.2rem;
  }

  .portfolio-hero h1 {
    max-width: 100%;
    margin-bottom: 1rem;
    font-size: clamp(2.45rem, 12vw, 3.25rem);
    line-height: 1.02;
  }

  .portfolio-hero__lead {
    font-size: .93rem;
    line-height: 1.62;
  }

  .portfolio-hero__note {
    align-items: flex-start;
    font-size: .69rem;
  }

  .portfolio-hero__note::before {
    margin-top: .52rem;
  }

  .portfolio-section {
    padding-block: 3.6rem 5rem;
  }

  .portfolio-section__header {
    margin-bottom: 1.8rem;
  }

  .portfolio-section__header h2 {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }

  .portfolio-section__header > p:not(.portfolio-section__eyebrow) {
    font-size: .91rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .portfolio-card__media--deal {
    aspect-ratio: 3 / 1;
  }

  .portfolio-card__body {
    padding: 1.1rem 1.05rem 1.15rem;
  }

  .portfolio-card h3 {
    font-size: 1.35rem;
  }

  .portfolio-card__link {
    width: 100%;
    min-height: 3.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card,
  .portfolio-card__media img,
  .portfolio-card__link {
    transition: none;
  }
}
