/* =========================================================
   DAGNIX — PORTFOLIO PAGE
   Header + Footer intentionally excluded.
   Designed to match the DAGNIX futuristic dark homepage.
   ========================================================= */

.dagnix-portfolio {
  --portfolio-bg: #030914;
  --portfolio-panel: #071426;
  --portfolio-panel-2: #091a2f;
  --portfolio-text: #f7f9ff;
  --portfolio-muted: #9eacc1;
  --portfolio-blue: #159cff;
  --portfolio-cyan: #24e7ff;
  --portfolio-violet: #8a4dff;
  --portfolio-line: rgba(110, 160, 220, .22);

  position: relative;
  overflow: hidden;
  padding: 112px 0 90px;
  background:
    radial-gradient(circle at 12% 15%, rgba(0, 130, 255, .08), transparent 27%),
    radial-gradient(circle at 88% 35%, rgba(125, 65, 255, .07), transparent 28%),
    #030914;
  color: var(--portfolio-text);
}

.dagnix-portfolio::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background-image:
    linear-gradient(rgba(90, 145, 190, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 145, 190, .025) 1px, transparent 1px);
  background-size: 70px 70px;
}

.dagnix-portfolio::after {
  content: "";
  position: absolute;
  width: 650px;
  height: 220px;
  left: 50%;
  top: -130px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(0, 115, 255, .08);
  filter: blur(100px);
  pointer-events: none;
}

.portfolio-container {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

/* =========================================================
   HERO
   ========================================================= */

.portfolio-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 60px;
  margin-bottom: 42px;
}

.portfolio-hero-copy {
  max-width: 720px;
}

.portfolio-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #9bb1cf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
}

.eyebrow-line {
  display: block;
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, var(--portfolio-cyan), var(--portfolio-violet));
}

.portfolio-hero h1 {
  margin: 0;
  max-width: 720px;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: clamp(46px, 5vw, 68px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -2.8px;
}

.portfolio-hero h1 span {
  background: linear-gradient(
    90deg,
    #1ebdff 0%,
    #5d8bff 48%,
    #a84cff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portfolio-hero-copy > p {
  max-width: 650px;
  margin: 20px 0 0;
  color: #aebbd0;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

/* =========================================================
   STATS
   ========================================================= */

.portfolio-stats {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
}

.portfolio-stat {
  min-width: 120px;
  padding: 0 27px;
  border-left: 1px solid rgba(150, 180, 220, .20);
}

.portfolio-stat:first-child {
  border-left: 0;
  padding-left: 0;
}

.portfolio-stat:last-child {
  padding-right: 0;
}

.portfolio-stat strong {
  display: block;
  margin-bottom: 5px;
  color: #f7f9ff;
  font-family: "Space Grotesk", "DM Sans", sans-serif;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -1px;
}

.portfolio-stat span {
  display: block;
  color: #9eacc1;
  font-family: "DM Sans", sans-serif;
  font-size: 12px;
  line-height: 1.45;
}

/* =========================================================
   FILTERS
   ========================================================= */

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
}

.portfolio-filter {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(110, 155, 205, .28);
  border-radius: 24px;
  outline: none;
  background: rgba(5, 17, 33, .72);
  color: #c8d4e5;
  font: 600 12px/1 "DM Sans", sans-serif;
  cursor: pointer;
  transition:
    background .25s ease,
    border-color .25s ease,
    color .25s ease,
    transform .25s ease,
    box-shadow .25s ease;
}

.portfolio-filter:hover {
  border-color: rgba(45, 190, 255, .55);
  color: #fff;
  transform: translateY(-1px);
}

.portfolio-filter.active {
  border-color: transparent;
  background: linear-gradient(110deg, #096cff, #18cfff 55%, #a23bff);
  color: #fff;
  box-shadow: 0 10px 28px rgba(21, 156, 255, .20);
}

/* =========================================================
   PROJECT GRID
   ========================================================= */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.portfolio-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(90, 140, 190, .28);
  border-radius: 17px;
  background:
    linear-gradient(
      145deg,
      rgba(9, 29, 52, .96),
      rgba(3, 15, 29, .98)
    );
  box-shadow: 0 16px 42px rgba(0, 0, 0, .18);
  transition:
    transform .35s ease,
    border-color .35s ease,
    box-shadow .35s ease,
    opacity .25s ease;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 190, 255, .55);
  box-shadow:
    0 22px 48px rgba(0, 0, 0, .30),
    0 0 30px rgba(0, 140, 255, .08);
}

.portfolio-card.is-hidden {
  display: none;
}

/* =========================================================
   PROJECT IMAGE
   ========================================================= */

.portfolio-image {
  position: relative;
  display: block;
  width: 100%;
  height: 218px;
  overflow: hidden;
  background: #071426;
}

.portfolio-image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      to bottom,
      rgba(1, 10, 22, .02) 35%,
      rgba(2, 12, 25, .20) 70%,
      rgba(2, 11, 23, .70) 100%
    );
}

.portfolio-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.055);
}

/* =========================================================
   PLACEHOLDER ART FOR PROJECTS WITHOUT FINAL SCREENSHOTS
   ========================================================= */

.portfolio-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(circle at 50% 25%, rgba(25, 140, 255, .22), transparent 35%),
    linear-gradient(145deg, #0c2441, #050d1b);
}

.portfolio-image-placeholder::after {
  background:
    linear-gradient(
      135deg,
      rgba(10, 80, 180, .10),
      rgba(130, 55, 255, .14)
    );
}

.placeholder-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(50, 190, 255, .42);
  border-radius: 20px;
  background: rgba(8, 28, 52, .82);
  box-shadow:
    inset 0 0 30px rgba(0, 170, 255, .08),
    0 0 35px rgba(0, 120, 255, .10);
  color: #46ccff;
  font: 700 16px/1 "Space Grotesk", sans-serif;
  letter-spacing: 1px;
}

.portfolio-image-placeholder > span {
  position: relative;
  z-index: 1;
  color: #9db0c9;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* =========================================================
   CONTENT
   ========================================================= */

.portfolio-content {
  padding: 17px 17px 18px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.portfolio-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(150, 180, 210, .22);
  border-radius: 14px;
  background: rgba(15, 31, 49, .85);
  color: #cbd7e7;
  font: 600 10px/1 "DM Sans", sans-serif;
  white-space: nowrap;
}

.portfolio-content h2 {
  margin: 0 0 7px;
  color: #fff;
  font: 700 18px/1.25 "Space Grotesk", "DM Sans", sans-serif;
  letter-spacing: -.3px;
}

.portfolio-content > p {
  min-height: 49px;
  margin: 0;
  color: #a8b8cd;
  font: 400 12px/1.55 "DM Sans", sans-serif;
}

.portfolio-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 17px;
}

.portfolio-case-link {
  color: #27c8ff;
  font: 700 12px/1 "DM Sans", sans-serif;
  transition: color .25s ease;
}

.portfolio-case-link span {
  display: inline-block;
  margin-left: 4px;
  transition: transform .25s ease;
}

.portfolio-case-link:hover {
  color: #fff;
}

.portfolio-case-link:hover span {
  transform: translateX(3px);
}

.portfolio-arrow {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(170, 190, 220, .48);
  border-radius: 50%;
  background: rgba(5, 20, 36, .72);
  color: #fff;
  font-size: 16px;
  transition:
    background .25s ease,
    border-color .25s ease,
    transform .25s ease;
}

.portfolio-arrow:hover {
  border-color: #00c8ff;
  background: rgba(0, 155, 255, .14);
  transform: translate(2px, -2px);
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) {
  .dagnix-portfolio {
    padding-top: 100px;
  }

  .portfolio-container {
    width: min(1050px, calc(100% - 40px));
  }

  .portfolio-hero {
    gap: 35px;
  }

  .portfolio-hero h1 {
    font-size: clamp(43px, 5vw, 58px);
  }

  .portfolio-stat {
    min-width: 100px;
    padding: 0 17px;
  }

  .portfolio-stat strong {
    font-size: 26px;
  }

  .portfolio-grid {
    gap: 16px;
  }

  .portfolio-image {
    height: 195px;
  }

  .portfolio-content {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 900px) {
  .portfolio-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 30px;
  }

  .portfolio-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .portfolio-stat {
    min-width: 135px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-image {
    height: 220px;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 650px) {
  .dagnix-portfolio {
    padding: 82px 0 65px;
  }

  .dagnix-portfolio::after {
    width: 450px;
    height: 180px;
  }

  .portfolio-container {
    width: calc(100% - 28px);
  }

  .portfolio-eyebrow {
    margin-bottom: 16px;
    font-size: 10px;
    letter-spacing: 2.5px;
  }

  .portfolio-hero h1 {
    font-size: 40px;
    line-height: 1.06;
    letter-spacing: -1.8px;
  }

  .portfolio-hero-copy > p {
    margin-top: 17px;
    font-size: 14px;
    line-height: 1.6;
  }

  .portfolio-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-stat {
    min-width: 0;
    padding: 0 12px;
  }

  .portfolio-stat:first-child {
    padding-left: 0;
  }

  .portfolio-stat:last-child {
    padding-right: 0;
  }

  .portfolio-stat strong {
    font-size: 23px;
  }

  .portfolio-stat span {
    font-size: 10px;
  }

  .portfolio-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -14px;
    padding-bottom: 5px;
    scrollbar-width: none;
  }

  .portfolio-filters::-webkit-scrollbar {
    display: none;
  }

  .portfolio-filter {
    flex: 0 0 auto;
    min-height: 41px;
    padding: 0 16px;
    font-size: 11px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .portfolio-image {
    height: 235px;
  }

  .portfolio-content > p {
    min-height: auto;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {
  .dagnix-portfolio {
    padding-top: 75px;
  }

  .portfolio-hero h1 {
    font-size: 35px;
  }

  .portfolio-stats {
    gap: 0;
  }

  .portfolio-stat {
    padding: 0 9px;
  }

  .portfolio-stat strong {
    font-size: 21px;
  }

  .portfolio-stat span {
    font-size: 9px;
  }

  .portfolio-image {
    height: 210px;
  }

  .portfolio-content h2 {
    font-size: 17px;
  }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.portfolio-filter:focus-visible,
.portfolio-case-link:focus-visible,
.portfolio-arrow:focus-visible,
.portfolio-image:focus-visible {
  outline: 2px solid #24e7ff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .dagnix-portfolio,
  .dagnix-portfolio *,
  .dagnix-portfolio *::before,
  .dagnix-portfolio *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
