
/* ===== Portfolio Section ===== */

.portfolio-section {
  --portfolio-bg: #0b1020;
  --portfolio-card: #121a2c;
  --portfolio-text: #f8fafc;
  --portfolio-muted: #9ca9be;
  --portfolio-accent: #a5b4fc;

  /*background: var(--portfolio-bg);*/
  color: var(--portfolio-text);
  padding:0 0 30px;
  overflow: hidden;
}

.portfolio-section * {
  box-sizing: border-box;
}

.portfolio-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 35px;
}

.portfolio-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--portfolio-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  background: #7dd3a7;
  border-radius: 50%;
  box-shadow: 0 0 12px #7dd3a755;
}

.portfolio-title {
  font-size: clamp(38px, 5.5vw, 68px);
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -2.5px;
  margin: 0 0 22px;
  color:#000;
}

.portfolio-title span {
  color:#854fee;
}

.portfolio-description {
  max-width: 510px;
  color:#555;
  font-size: 16px;
  line-height: 1.4;
  margin: 0;
}

.portfolio-contact {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
  color: #1c3661;
  font-size: 13px;
  text-decoration: none;
}

.portfolio-contact span {
  color: #000;
  font-size: 19px;
  font-weight: 600;
  transition: color .25s ease;
}

.portfolio-contact:hover span {
  color: var(--portfolio-accent);
}

/* Filters */

.portfolio-filters {
  display: flex;
  display:none;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 35px;
}

.filter-btn {
  border: 1px solid #293349;
  background: transparent;
  color: #b7c1d3;
  border-radius: 30px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  transition: all .25s ease;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
  color: #0b1020;
}

.filter-btn:focus-visible,
.portfolio-section a:focus-visible {
  outline: 2px solid #c7d2fe;
  outline-offset: 4px;
}

/* Project cards */

.portfolio-item {
  transition: opacity .3s ease, transform .3s ease;
  margin-top:40px;
}

.portfolio-item.is-hidden {
  display: none;
}

.project-card {
  height: 100%;
}

.project-image {
  position: relative;
  display: block;
  aspect-ratio: 1.48 / 1;
  overflow: hidden;
  border-radius: 15px;
  background: var(--portfolio-card);
  isolation: isolate;
  cursor:pointer;
}

.project-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1),
              opacity .4s ease;
}

.project-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 12, 25, .05) 25%,
    rgba(8, 12, 25, .68) 100%
  );
  opacity: .65;
  transition: opacity .3s ease;
  pointer-events: none;
}

.project-image:hover img {
  transform: scale(1.055);
}

.project-image:hover::after {
  opacity: 1;
}

.project-view {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -35%);
  background: #f8fafc;
  color: #0b1020;
  border-radius: 30px;
  padding: 13px 20px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  border:solid 1px rgba(0,0,0,0.5);
}

.project-image:hover .project-view,
.project-image:focus-visible .project-view {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.project-number {
  position: absolute;
  z-index: 2;
  bottom: 17px;
  left: 18px;
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 600;
}

.project-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-top:12px;
}

.project-info h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.4px;
  color: #000;
}

.project-info p {
  margin: 0;
  color: #666;
  font-size: 13px;
}

.project-arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 1px solid #303b51;
  border-radius: 50%;
  color: #dbe4f5;
  font-size: 19px;
  transition: all .3s ease;
}

.project-card:hover .project-arrow {
  background: var(--portfolio-accent);
  border-color: var(--portfolio-accent);
  color: #0b1020;
  transform: rotate(45deg);
}

/* Technology tags */

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 15px;
}

.project-tags span {
  padding: 6px 11px;
  border: 1px solid #293349;
  border-radius: 5px;
  color: #aebbd0;
  font-size: 11px;
  letter-spacing: .2px;
}

/* Bottom CTA */

.portfolio-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 1px solid #293349;
  margin-top: 70px;
  padding-top: 30px;
}

.portfolio-bottom p {
  margin: 0;
  color: #393f49;
  font-size: 14px;
}

.portfolio-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #444;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color .25s ease;
}

.portfolio-cta span {
  color: #ab4411;
  font-size: 20px;
}

.portfolio-cta:hover {
  color: var(--portfolio-accent);
}

/* Responsive layout */

@media (max-width: 767px) {
  

  .portfolio-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 25px;
  }

  .portfolio-title {
    font-size: clamp(38px, 9vw, 52px);
    letter-spacing: -1.6px;
  }

  .portfolio-description {
    font-size: 14px;
  }

  .portfolio-filters {
    gap: 8px;
    margin-bottom: 25px;
  }

  .filter-btn {
    padding: 9px 14px;
    font-size: 12px;
  }

  .project-info h3 {
    font-size: 18px;
  }

  .project-image {
    aspect-ratio: 1.2 / 1;
  }

  .portfolio-bottom {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 45px;
  }
}

@media (max-width: 400px) {
  .portfolio-section .container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .portfolio-item {
    width: 100%;
  }

  .project-image {
    aspect-ratio: 1.3 / 1;
  }
}

/* Respect reduced motion preferences */

@media (prefers-reduced-motion: reduce) {
  .portfolio-section *,
  .portfolio-section *::before,
  .portfolio-section *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}






/* ===== Portfolio Lightbox Overlay ===== */

.portfolio-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(5, 8, 18, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: hidden;
}

.portfolio-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox-content {
  width: 100%;
  max-height: 100%;
  margin: auto;
  transform: translateY(15px) scale(0.98);
  transition: transform 0.3s ease;
  overflow:auto;
  padding: 35px 20px;
}

.portfolio-lightbox.is-open .lightbox-content {
  transform: translateY(0) scale(1);
}

.lightbox-content img {
  display: block;
  width: 100%;
  /*max-height: 72vh;
  object-fit: contain;*/
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 25px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 61, 0, 0.5);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease;
}

.lightbox-close:hover {
  background: #a5b4fc;
  color: #0b1020;
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  padding: 0 40px;
  position: fixed;
  left: 0;
  bottom: 10px;
  width:100%;
}

.lightbox-footer p {
  margin: 0;
  color: #777;
  font-size: 18px;
  font-weight: 600;
}

.lightbox-footer a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border-radius: 30px;
  background: #a5b4fc;
  color: #0b1020;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-footer a:hover {
  background: #c7d2fe;
  transform: translateY(-2px);
}

.lightbox-footer a span {
  font-size: 19px;
}

@media (max-width: 576px) {
  /*.portfolio-lightbox {
    padding: 65px 15px 20px;
  }*/

  .lightbox-close {
    top: 12px;
    right: 15px;
    width: 42px;
    height: 42px;
  }

  /*.lightbox-content img {
    max-height: 65vh;
    border-radius: 8px;
  }*/

  .lightbox-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .lightbox-footer a {
    justify-content: center;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-lightbox,
  .lightbox-content,
  .lightbox-footer a {
    transition: none;
  }
}
