/* Portfolio page refinement layer */
.page-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(167, 139, 250, 0.14), transparent 26rem),
    radial-gradient(circle at 12% 0%, rgba(59, 130, 246, 0.14), transparent 28rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 64%);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 6rem 2.5rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 38%),
    rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .reveal {
  max-width: 100%;
}

.page-hero h1 {
  font-size: clamp(3rem, 5.5vw, 5.2rem) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.035em !important;
  max-width: 700px;
}

.ph-stats {
  margin-top: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.page-hero p {
  max-width: 650px !important;
  font-size: 1.12rem !important;
  color: rgba(240, 244, 255, 0.68) !important;
}

.portfolio-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  position: relative;
  z-index: 3;
  margin-top: -2.4rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.portfolio-proof div {
  padding: 1.35rem 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent),
    rgba(8, 12, 24, 0.86);
}

.portfolio-proof strong {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
  margin-bottom: 0.35rem;
  background: linear-gradient(135deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.portfolio-proof span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(240, 244, 255, 0.42);
  text-transform: uppercase;
}

.portfolio-work {
  padding-top: 5rem !important;
}

.filter-row {
  justify-content: center;
  padding: 0.75rem;
  margin: 0 auto 3.25rem !important;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.ftab {
  min-height: 42px;
  border-radius: 10px !important;
}

.ftab.active {
  background: linear-gradient(135deg, var(--blue), var(--cyan)) !important;
  color: #fff !important;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.24);
}

.port-grid {
  gap: 1.5rem !important;
}

.port-section-intro {
  margin-bottom: 2.75rem;
}

.port-sec-title {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem) !important;
  margin-bottom: 0.5rem;
}

.port-sec-sub {
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 0;
}

.port-card {
  border-radius: 18px !important;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.port-card[hidden] {
  display: none !important;
}

.port-img {
  height: 280px;
  font-size: 5.4rem !important;
}

.port-img--gallery {
  height: clamp(360px, 44vw, 580px);
}

.port-img::before {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 45%),
    radial-gradient(circle at 50% 12%, rgba(34, 211, 238, 0.22), transparent 48%) !important;
}

.port-cat {
  border-radius: 999px !important;
  border-color: rgba(125, 211, 252, 0.2) !important;
  background: rgba(7, 13, 29, 0.76) !important;
}

.port-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.85rem !important;
}

.port-title {
  font-size: 1.25rem !important;
}

.port-desc {
  color: rgba(240, 244, 255, 0.66) !important;
}

.port-tags {
  margin-top: auto;
}

.ptag {
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.04);
}

.port-link {
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.68rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ongoing-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.1), transparent 24rem),
    var(--bg) !important;
}

.ow-list {
  border-radius: 18px !important;
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.34);
}

.ow-row {
  min-height: 150px;
}

.ow-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.2), transparent 70%),
    rgba(255, 255, 255, 0.045);
  font-size: 2rem !important;
}

.ow-title {
  font-size: 1.12rem !important;
}

.ow-desc {
  color: rgba(240, 244, 255, 0.64) !important;
}

.ow-bar {
  width: 170px !important;
  height: 5px !important;
}

.cta-section {
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.12), transparent 26rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--bg2) !important;
}

.cta-inner {
  max-width: 760px !important;
}

.cta-inner h2 {
  font-size: clamp(2.5rem, 5vw, 4.2rem) !important;
  line-height: 1 !important;
}

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

@media (max-width: 760px) {
  .page-hero {
    min-height: auto;
    padding-top: 8rem !important;
  }

  .page-hero::before {
    inset: 5.2rem 0.8rem 1.2rem;
    border-radius: 20px;
  }

  .page-hero h1 {
    font-size: clamp(2.7rem, 14vw, 4.2rem) !important;
  }

  .portfolio-proof {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }

  .portfolio-work {
    padding-top: 4rem !important;
  }

  .filter-row {
    width: 100%;
    justify-content: flex-start;
  }

  .ftab {
    flex: 1 1 auto;
  }

  .port-img {
    height: 220px !important;
  }

  .port-img--gallery {
    height: clamp(220px, 48vw, 340px);
  }

  .ow-right {
    width: 100%;
    text-align: left !important;
  }

  .ow-bar {
    width: 100% !important;
  }
}

/* ═══════════════════════════════════════════════════
   CLEAN MINIMAL REDESIGN — overrides everything above
   ═══════════════════════════════════════════════════ */

/* — Body: quieter background — */
body {
  background: radial-gradient(ellipse 70% 40% at -4% -6%, rgba(88,28,235,.15), transparent),
              radial-gradient(ellipse 50% 36% at 106% 102%, rgba(22,193,255,.08), transparent),
              #020817 !important;
}
body::before { opacity: .4; }
body::after  { display: none; }

/* — Page hero — */
.page-hero {
  min-height: 58vh !important;
  padding: 10rem 0 4.5rem !important;
  background: none !important;
}
.page-hero::before {
  inset: 5rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(255,255,255,.03), transparent 46%),
              rgba(255,255,255,.014) !important;
  border-color: rgba(255,255,255,.055) !important;
}
.page-hero h1 {
  font-size: clamp(3rem, 5.2vw, 4.8rem) !important;
  max-width: 680px;
}
.page-hero p {
  font-size: 1.05rem !important;
  color: rgba(241,245,249,.52) !important;
  max-width: 520px !important;
}

/* stat cards in hero — minimal */
.ph-stat {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 14px !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
  padding: 1.1rem 1.3rem !important;
}
.ph-stat strong {
  font-size: 1.75rem !important;
}
.ph-stats {
  border-top: 1px solid rgba(255,255,255,.06) !important;
  padding-top: 1.75rem !important;
}

/* — Section intro — */
.port-section-intro {
  margin-bottom: 2.25rem;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.port-sec-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem) !important;
  font-weight: 700 !important;
  letter-spacing: -.025em;
  margin-bottom: .35rem;
}
.port-sec-sub {
  color: rgba(241,245,249,.45) !important;
  font-size: .9rem !important;
}

/* — Filter row — */
.filter-row {
  background: rgba(6,9,18,.7) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  box-shadow: none !important;
  padding: 4px !important;
  border-radius: 12px !important;
  gap: .25rem !important;
  margin-bottom: 2.25rem !important;
}
.ftab {
  font-size: .69rem !important;
  letter-spacing: .06em !important;
  padding: .42rem 1rem !important;
  min-height: 36px !important;
  color: rgba(241,245,249,.38) !important;
  border-radius: 8px !important;
}
.ftab:hover { color: rgba(241,245,249,.72) !important; }
.ftab.active {
  background: rgba(255,255,255,.08) !important;
  color: rgba(241,245,249,.92) !important;
  box-shadow: none !important;
  border-color: transparent !important;
}

/* — Cards — */
.port-card {
  background: #08111f !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  backdrop-filter: none !important;
  box-shadow: none;
  transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease !important;
}
.port-card:hover {
  border-color: rgba(255,255,255,.16) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.45) !important;
}
.port-body {
  padding: 1.35rem 1.5rem 1.6rem !important;
  border-top: 1px solid rgba(255,255,255,.06);
}
.port-title {
  font-size: 1.08rem !important;
  font-weight: 700 !important;
  letter-spacing: -.012em !important;
  color: rgba(255,255,255,.93) !important;
  margin-bottom: .3rem;
}
.port-desc {
  font-size: .81rem !important;
  line-height: 1.72 !important;
  color: rgba(241,245,249,.44) !important;
  margin-bottom: .9rem;
}

/* — Card image area (stack diagram cards) — */
.port-img {
  height: 260px !important;
  background: linear-gradient(158deg, #0d1628 0%, #06111f 100%) !important;
}
.port-img::after { display: none !important; }

/* Stack layer diagram — cleaned up */
.port-stack-vis {
  padding: 2.2rem 1.4rem 1.4rem !important;
  gap: .48rem !important;
}
.psv-layer {
  background: transparent !important;
  border: none !important;
  border-left: 2px solid rgba(255,255,255,.07) !important;
  border-radius: 0 5px 5px 0 !important;
  padding: .3rem .7rem !important;
  backdrop-filter: none !important;
  gap: .65rem !important;
}
.psv-layer:hover { border-left-color: rgba(255,255,255,.16) !important; }
.psv-tier {
  font-size: .55rem !important;
  min-width: 58px !important;
  color: rgba(255,255,255,.28) !important;
}
.psv-chip {
  font-size: .58rem !important;
  padding: .12rem .42rem !important;
}

/* — Stat chips — */
.port-stats-row { gap: .7rem !important; margin-bottom: .85rem !important; }
.port-stat-chip {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-size: .64rem !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
}
.port-stat-chip.green { color: rgba(34,211,238,.9) !important; }
.port-stat-chip.gold  { color: rgba(251,191,36,.9) !important; }

/* — Tech tags — */
.ptag {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  color: rgba(255,255,255,.35) !important;
  font-size: .58rem !important;
  padding: .16rem .48rem !important;
  border-radius: 4px !important;
  letter-spacing: .04em !important;
}

/* — Case toggle — */
.port-case-toggle {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  color: rgba(241,245,249,.38) !important;
}
.port-case-toggle:hover {
  background: transparent !important;
  border-color: rgba(255,255,255,.14) !important;
  color: rgba(241,245,249,.65) !important;
}
.port-case-toggle[aria-expanded="true"] {
  background: transparent !important;
  border-color: rgba(255,255,255,.14) !important;
}
.pct-arrow { color: rgba(241,245,249,.38) !important; }

/* — Gallery / wide cards — */
.port-img--gallery {
  height: clamp(360px, 44vw, 580px) !important;
  cursor: pointer !important;
}
.port-img--gallery::after { display: none !important; }
.port-img--gallery .port-img::after { display: none !important; }
.pg-slide { object-fit: cover !important; object-position: top !important; }

/* cursor hint on gallery */
.port-img:hover::after { display: none !important; }

/* gallery prev/next buttons */
.pg-btn {
  background: rgba(8,17,31,.82) !important;
  border-color: rgba(255,255,255,.1) !important;
}
.pg-btn:hover {
  background: rgba(8,17,31,.96) !important;
  border-color: rgba(255,255,255,.24) !important;
}

/* — Wide card body — */
.port-body--wide {
  border-top: 1px solid rgba(255,255,255,.06);
  background: #08111f;
}

/* — Port link — */
.port-link {
  color: rgba(241,245,249,.55) !important;
  font-size: .7rem !important;
  letter-spacing: .06em !important;
}
.port-card:hover .port-link { color: rgba(241,245,249,.85) !important; }

/* — Category badge on card — */
.port-cat {
  background: rgba(6,9,18,.82) !important;
  border-color: rgba(255,255,255,.09) !important;
  color: rgba(241,245,249,.62) !important;
  font-size: .6rem !important;
}
.port-year { color: rgba(241,245,249,.28) !important; }

/* — Portfolio grid gap — */
.port-grid { gap: 1.25rem !important; }

/* — Wide card outcome numbers — */
.po-val {
  font-size: 1.65rem !important;
  background: linear-gradient(135deg, #fff, rgba(167,139,250,.9)) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
.po-lbl { color: rgba(241,245,249,.35) !important; }

/* mobile */
@media (max-width: 760px) {
  .port-img--gallery { height: clamp(220px, 48vw, 340px) !important; }
  .ph-stats { border-top: none !important; padding-top: 0 !important; }
}
