/* ============================================================
   portfolio.css — Bento Grid Portfolio Layout
   TM Studio / Antigravity Brand
   ============================================================ */

/* ── Section & Header ─────────────────────────────────────── */
.portfolio-page .portfolio.section {
  padding: 60px 0 80px;
}

.portfolio-page .section-title h2 {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--heading-color);
}

.portfolio-page .section-title h2::after {
  background: var(--accent-color);
}

.portfolio-page .section-title p {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Bento Grid Container ─────────────────────────────────── */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto;
  gap: 18px;
}

/* ── Individual Bento Card ────────────────────────────────── */
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.35s ease,
              border-color 0.3s ease;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 20px 50px rgba(19, 135, 193, 0.18),
              0 0 0 1px color-mix(in srgb, var(--accent-color), transparent 60%);
  border-color: color-mix(in srgb, var(--accent-color), transparent 50%);
}

/* ── Featured Card (Hero — takes 2 columns × 2 rows) ─────── */
.bento-card.bento-featured {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 480px;
}

/* ── Card Image ───────────────────────────────────────────── */
.bento-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.55s ease;
  filter: brightness(0.72) saturate(0.9);
}

.bento-card:hover .bento-card-img {
  transform: scale(1.07);
  filter: brightness(0.5) saturate(1.1);
}

/* ── Dark Gradient Overlay ────────────────────────────────── */
.bento-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 18, 24, 0.96) 0%,
    rgba(10, 18, 24, 0.45) 50%,
    rgba(10, 18, 24, 0.0) 100%
  );
  transition: opacity 0.35s ease;
}

/* ── Card Content (bottom-anchored) ──────────────────────── */
.bento-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 26px;
  z-index: 2;
  transform: translateY(6px);
  transition: transform 0.35s ease;
}

.bento-card:hover .bento-card-content {
  transform: translateY(0);
}

.bento-card-content .card-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--accent-color);
  margin-bottom: 8px;
  opacity: 0.9;
}

.bento-card-content h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 0 10px;
  line-height: 1.3;
}

.bento-featured .bento-card-content h4 {
  font-size: 1.65rem;
}

.bento-card-content .card-client {
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
  margin: 0 0 14px;
}

/* ── Tags ─────────────────────────────────────────────────── */
.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.bento-tags span {
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent-color), transparent 82%);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 60%);
  color: color-mix(in srgb, var(--accent-color), white 40%);
  letter-spacing: 0.4px;
}

/* ── CTA Arrow Link ───────────────────────────────────────── */
.bento-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease 0.05s,
              transform 0.3s ease 0.05s,
              color 0.2s ease;
}

.bento-card:hover .bento-card-link {
  opacity: 1;
  transform: translateX(0);
}

.bento-card-link:hover {
  color: color-mix(in srgb, var(--accent-color), white 30%);
}

.bento-card-link i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.bento-card-link:hover i {
  transform: translateX(4px);
}

/* ── Accent glow pulse on featured card ───────────────────── */
.bento-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-color), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}

.bento-featured:hover::before {
  opacity: 0.12;
}

/* ── "View All" CTA row ───────────────────────────────────── */
.portfolio-cta-row {
  margin-top: 42px;
  text-align: center;
}

.portfolio-cta-row p {
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.btn-portfolio-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 50px;
  background: var(--accent-color);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: background 0.25s ease,
              transform 0.25s ease,
              box-shadow 0.25s ease;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--accent-color), transparent 55%);
}

.btn-portfolio-contact:hover {
  background: color-mix(in srgb, var(--accent-color), white 18%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px color-mix(in srgb, var(--accent-color), transparent 40%);
  color: #fff;
}

/* ── Responsive: Tablet (≤ 991px) ────────────────────────── */
@media (max-width: 991px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .bento-card.bento-featured {
    grid-column: span 2;
    grid-row: span 1;
    min-height: 340px;
  }
}

/* ── Responsive: Mobile (≤ 575px) ────────────────────────── */
@media (max-width: 575px) {
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bento-card.bento-featured {
    grid-column: span 1;
    min-height: 300px;
  }

  .bento-card {
    min-height: 240px;
  }

  .bento-featured .bento-card-content h4 {
    font-size: 1.3rem;
  }
}
