/* ==========================================================================
   Portfolio Page
   Page-specific styles for page-portfolio.php. Kept out of main.css/style.css
   so this page's styles ship only where they're used.
   ========================================================================== */

/* ---- Hero ----
   Full-bleed `about-bg` photo with copy locked to the left column only —
   the right side is left empty on purpose so the photo stays fully
   visible. The dark gradient is horizontal (strong at the left, fading out
   before the midpoint) rather than a flat scrim over the whole image, so
   it never dims the right half. */

.portfolio-hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #04070d;
}

.portfolio-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.portfolio-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.12);
  transform-origin: top right;
  will-change: transform;
}

.portfolio-hero-glow {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  animation: portfolioHeroDrift 18s ease-in-out infinite;
}

.portfolio-hero-glow--cyan {
  top: -14%;
  left: -10%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 194, 255, 0.24) 0%, transparent 70%);
}

.portfolio-hero-glow--violet {
  bottom: -18%;
  left: 12%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18) 0%, transparent 70%);
  animation-delay: -9s;
}

@keyframes portfolioHeroDrift {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(24px, -16px) scale(1.06);
  }
}

.portfolio-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(4, 7, 13, 0.97) 0%, rgba(4, 7, 13, 0.86) 32%, rgba(4, 7, 13, 0.46) 58%, rgba(4, 7, 13, 0.1) 78%, rgba(4, 7, 13, 0) 92%),
    linear-gradient(180deg, rgba(4, 7, 13, 0.5) 0%, rgba(4, 7, 13, 0) 26%, rgba(4, 7, 13, 0) 72%, rgba(4, 7, 13, 0.6) 100%);
}

.portfolio-hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 140px 0 64px;
}

.portfolio-hero-content {
  max-width: 700px;
  text-align: left;
}

.portfolio-hero-title {
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -.25px;
  margin-bottom: 1.5rem;
  margin-top: 0;
  position: relative;
  z-index: 2;
  font-size: clamp(3.5rem, 3rem + 1.25vw, 3.5rem);
  color: #ffffff;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}

.portfolio-hero-highlight {
  font-weight: 800;
  color: #ffffff;
  /* font-style: italic; */
}

.portfolio-hero-description {
  max-width: 620px;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.75;
  color: #ffffff;
  font-weight: 600;
}

.portfolio-hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.portfolio-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 49px;
  min-width: 200px;
  padding: 0 30px;
  border-radius: 999px;
  background: #00c2ff;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 18px 44px rgba(0, 194, 255, 0.26);
  transition: transform 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.portfolio-hero-btn:hover {
  background: #28d0ff;
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(0, 194, 255, 0.38);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .portfolio-hero-content {
    max-width: 560px;
  }
}

@media (max-width: 768px) {
  .portfolio-hero {
    min-height: 100svh;
    align-items: flex-end;
  }

  .portfolio-hero-inner {
    padding: 140px 0 56px;
  }

  .portfolio-hero-overlay {
    background:
      linear-gradient(180deg, rgba(4, 7, 13, 0.25) 0%, rgba(4, 7, 13, 0.55) 45%, rgba(4, 7, 13, 0.94) 100%),
      linear-gradient(90deg, rgba(4, 7, 13, 0.85) 0%, rgba(4, 7, 13, 0.5) 65%, rgba(4, 7, 13, 0.15) 100%);
  }

  .portfolio-hero-content,
  .portfolio-hero-description {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .portfolio-hero-inner {
    padding: 128px 0 48px;
  }

  .portfolio-hero-title {
    font-size: clamp(1.875rem, 8vw, 2.5rem);
  }

  .portfolio-hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .portfolio-hero-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-hero-glow {
    animation: none;
  }
}

/* ==========================================================================
   Project List
   Dark section continuing straight off the hero: category filter tabs,
   then a single-column list of horizontal, alternating-side project
   cards. Filtering is client-side (see initPortfolioFilters() in
   portfolio.js) — this file only styles the resting/hover/active visuals;
   card entrance (fade-up/slide-in from alternating sides) rides the
   sitewide per-element `.scroll-reveal` system (main.js), driven by each
   card's own `data-direction` (see project-list.php).
   ========================================================================== */

.portfolio-projects {
  position: relative;
  padding: 80px 0 80px;
  background: #04070d;
}

/* ---- Filter tabs ---- */

.portfolio-filters-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 48px;
}

.portfolio-filters-label {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.5);
}

.portfolio-filters-label svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.portfolio-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  overflow-x: auto;
  padding-bottom: 2px;
}

.portfolio-filter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.75);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  transition: border-color 220ms ease, background-color 220ms ease, color 220ms ease, transform 220ms ease;
}

.portfolio-filter:hover {
  border-color: rgba(0, 194, 255, 0.4);
  color: #ffffff;
}

.portfolio-filter.is-active {
  background: linear-gradient(120deg, #00c2ff 0%, #7c3aed 100%);
  border-color: transparent;
  color: #ffffff;
  border: none;
}

.portfolio-filter-count {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 800;
}

.portfolio-filter.is-active .portfolio-filter-count {
  background: rgba(255, 255, 255, 0.24);
}

/* ---- Card list: horizontal, alternating media/content sides ----
   `.portfolio-card--reverse` (odd cards, 0-based index) flips to
   `row-reverse` so content/media visually swap sides while the media
   stays first in DOM order — which is what keeps mobile's forced
   `flex-direction: column` putting the image on top for every card
   regardless of which side it was on at desktop. */

.portfolio-list {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.portfolio-card {
  display: flex;
  align-items: stretch;
  border-radius: 32px;
  overflow: hidden;
  background-color: hsla(0, 0%, 100%, .05);
  border: 1px solid hsla(0, 0%, 100%, .1);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.65);
  transition: transform 380ms ease, box-shadow 380ms ease, border-color 380ms ease;
}

.portfolio-card--reverse {
  flex-direction: row-reverse;
}

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

.portfolio-card-media {
  position: relative;
  flex: 0 0 50%;
  display: block;
  overflow: hidden;
  padding: 40px;
  background: #ffffff;
}

/* `object-fit: contain` (not `cover`) so the full screenshot/mockup is
   always visible, never cropped — the padding above plus this box's own
   aspect ratio just letterbox around it. `object-position: center` keeps
   it centered on both axes regardless of how the source image's own
   aspect ratio compares to the container's. */
.portfolio-card-media img {
  width: 100%;
  height: auto;
  /* object-fit: contain; */
  object-position: center;
  display: block;
  border-radius: 18px;
  /* box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.55); */
  transition: transform 600ms ease;
}

.portfolio-card:hover .portfolio-card-media img {
  transform: scale(1.05);
}

/* Stand-in for a product whose screenshot has not been supplied yet. The 3:2
   box keeps the card roughly the height it will be once a real image lands, so
   the row does not visibly reflow when one is dropped in. */
.portfolio-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  background: linear-gradient(150deg, #eef2f7 0%, #dde5ef 100%);
  color: #94a3b8;
}

.portfolio-card-placeholder svg {
  width: 54px;
  height: 54px;
  stroke-width: 1.4;
}

.portfolio-card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(4, 7, 13, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
}

.portfolio-card-badge-value {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
}

.portfolio-card-badge-label {
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.6);
  text-align: center;
}

.portfolio-card-body {
  display: flex;
  flex: 1 1 55%;
  flex-direction: column;
  gap: 14px;
  padding: 48px;
}

.portfolio-card-category {
  align-self: flex-start;
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(120deg, #00c2ff 0%, #7c3aed 100%);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.portfolio-card-title {
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.portfolio-card-title a {
  color: #ffffff;
  text-decoration: none;
  transition: color 200ms ease;
}

.portfolio-card-title a:hover {
  color: #00c2ff;
}

.portfolio-card-tagline {
  margin-top: -8px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.55);
}

.portfolio-card-desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.68);
}

/* Key features — the card's headline capabilities, shown where the tech stack
   used to sit. The `.portfolio-card-tech` rules below are kept because the
   `tech` data is still carried in briskcovey_get_projects(); nothing renders
   it on this page at the moment. */

.portfolio-card-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.portfolio-card-features-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.4);
}

.portfolio-card-feature-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portfolio-card-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.8);
}

/* Fixed box so a wrapping label stays aligned to the tick rather than
   centring against two lines of text. */
.portfolio-card-feature svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 194, 255, 0.12);
  color: #00c2ff;
  align-self: flex-start;
  margin-top: 1px;
}

.portfolio-card-tech {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.portfolio-card-tech-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.4);
}

.portfolio-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-card-tag {
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: rgba(226, 232, 240, 0.75);
  font-size: 12px;
  font-weight: 600;
}

.portfolio-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portfolio-card-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}

.portfolio-card-stat strong {
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
}

.portfolio-card-stat span {
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(226, 232, 240, 0.55);
}

.portfolio-card-btn {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: #00c2ff;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 36px -16px rgba(0, 194, 255, 0.5);
  transition: transform 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.portfolio-card-btn:hover {
  background: #28d0ff;
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -16px rgba(0, 194, 255, 0.6);
}

.portfolio-card-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 220ms ease;
}

.portfolio-card-btn:hover svg {
  transform: translateX(4px);
}

/* ---- Responsive ---- */

@media (max-width: 1100px) {
  .portfolio-card-body {
    padding: 36px;
  }
}

@media (max-width: 900px) {
  .portfolio-list {
    gap: 40px;
  }

  .portfolio-card,
  .portfolio-card--reverse {
    flex-direction: column;
  }

  .portfolio-card-media {
    flex-basis: auto;
    aspect-ratio: 16 / 10;
    padding: 28px;
  }

  .portfolio-card-body {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .portfolio-projects {
    padding: 60px 0 60px;
  }

  .portfolio-filters-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
  }

  .portfolio-filters {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .portfolio-card-media {
    padding: 20px;
  }

  .portfolio-card-media img {
    border-radius: 14px;
  }

  .portfolio-card-body {
    padding: 26px 22px;
  }

  .portfolio-card-stats {
    gap: 12px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-card,
  .portfolio-card-media img,
  .portfolio-card-btn,
  .portfolio-card-btn svg,
  .portfolio-filter {
    transition: none;
  }
}
