/* Portfolio Showcase Theme */
:root {
  --background-color: #f5f9fc;
  --surface-color: #ffffff;
  --surface-contrast: rgba(30, 74, 121, 0.08);
  --default-color: #212529;
  --muted-color: rgba(92, 112, 133, 0.78);
  --heading-color: #1e3552;
  --accent-color: #428bca;
  --accent-alt: #2f6db5;
  --accent-warm: #1e4e79;
  --gradient-primary: linear-gradient(135deg, #428bca, #63a4ff);
  --gradient-secondary: linear-gradient(135deg, #1e4e79, #428bca);
  --surface-gradient: linear-gradient(160deg, rgba(255, 255, 255, 0.97) 0%, rgba(245, 249, 252, 0.9) 100%);
  --surface-tint: rgba(255, 255, 255, 0.78);
  --card-glow: 0 24px 60px rgba(30, 74, 121, 0.18);
  --card-border-active: rgba(66, 139, 202, 0.45);
  --card-blur: blur(14px);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body.portfolio-page {
  font-family: "Roboto", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--default-color);
  background: radial-gradient(circle at top left, rgba(66, 139, 202, 0.14), transparent 46%),
    radial-gradient(circle at 80% 20%, rgba(136, 180, 224, 0.16), transparent 52%),
    var(--background-color);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-alt);
}

.section {
  position: relative;
  padding: 100px 0;
  background: transparent;
}

.section-title {
  margin-bottom: 48px;
}

.section-title span.eyebrow {
  display: inline-block;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-size: 13px;
  color: color-mix(in srgb, var(--muted-color), white 25%);
  margin-bottom: 12px;
}

.section-title h2 {
  color: var(--heading-color);
  font-family: "Raleway", "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  margin-bottom: 16px;
}

.section-title p {
  color: var(--muted-color);
  max-width: 600px;
  margin: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(24px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(30, 74, 121, 0.08);
  padding: 16px 0;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  padding: 12px 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 32px rgba(30, 74, 121, 0.08);
}

.logo-mark {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
  color: var(--heading-color);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.logo-mark span.badge {
  background: var(--gradient-secondary);
  border: none;
  font-size: 0.7rem;
  padding: 4px 10px;
}

.navmenu ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.navmenu a {
  color: var(--muted-color);
  font-weight: 500;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 4px;
}

.navmenu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
  background: var(--accent-alt);
}

.navmenu a:hover,
.navmenu a.active {
  color: var(--heading-color);
}

.navmenu a:hover::after,
.navmenu a.active::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 32px rgba(30, 74, 121, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta i {
  font-size: 1.1rem;
}

.nav-cta:hover {
  transform: translateY(-3px);
  color: #fff;
  box-shadow: 0 22px 48px rgba(30, 74, 121, 0.24);
}

/* Hero */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02) brightness(0.92);
  z-index: -2;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 249, 252, 0.92) 40%, rgba(245, 249, 252, 0.88) 100%);
  z-index: -1;
}

.hero .hero-copy {
  max-width: 620px;
}

.hero .hero-copy .eyebrow {
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--muted-color);
}

.hero .hero-copy h1 {
  font-family: "Raleway", "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin: 18px 0;
  color: var(--heading-color);
}

.hero .hero-copy p {
  color: color-mix(in srgb, var(--default-color), black 8%);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 999px;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 18px 32px rgba(30, 74, 121, 0.2);
}

.btn-gradient:hover {
  transform: translateY(-3px);
  color: #fff;
  box-shadow: 0 22px 44px rgba(30, 74, 121, 0.28);
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid rgba(30, 74, 121, 0.22);
  color: var(--heading-color);
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn-outline-light:hover {
  background: rgba(66, 139, 202, 0.12);
  color: var(--heading-color);
}

.muted-caption {
  font-size: 0.9rem;
  color: var(--muted-color);
  margin-top: 18px;
}

/* Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
}

.metric-card {
  padding: 28px;
  border-radius: 24px;
  background: var(--surface-color);
  border: 1px solid var(--surface-contrast);
  box-shadow: 0 12px 28px rgba(30, 74, 121, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-6px);
  border-color: rgba(66, 139, 202, 0.4);
  box-shadow: 0 16px 36px rgba(30, 74, 121, 0.14);
}

.metric-card span.label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted-color);
  margin-bottom: 8px;
}

.metric-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--heading-color);
}

/* Showcases */
.showcase-grid {
  display: grid;
  gap: 28px;
}

.showcase-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface-color);
  border: 1px solid var(--surface-contrast);
  box-shadow: 0 16px 32px rgba(30, 74, 121, 0.08);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.showcase-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 26px 60px rgba(30, 74, 121, 0.16);
  border-color: rgba(66, 139, 202, 0.32);
}

.showcase-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.showcase-card .card-body {
  padding: 28px;
}

.showcase-card h3 {
  font-family: "Raleway", sans-serif;
  font-size: 1.65rem;
  margin-bottom: 12px;
  color: var(--heading-color);
}

.showcase-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.showcase-meta span {
  font-size: 0.85rem;
  color: var(--muted-color);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

/* Filtered gallery */
.portfolio-filter {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.portfolio-filter button {
  border: 1px solid rgba(30, 74, 121, 0.18);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted-color);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.portfolio-filter button.active,
.portfolio-filter button:hover {
  background: var(--gradient-primary);
  color: #fff;
  transform: translateY(-3px);
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.portfolio-loader,
.portfolio-empty,
.portfolio-error {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  border-radius: 24px;
  border: 1px dashed rgba(30, 74, 121, 0.2);
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted-color);
  font-weight: 500;
}

.portfolio-error {
  border-color: rgba(214, 80, 118, 0.28);
  color: rgba(214, 80, 118, 0.92);
}

.portfolio-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(30, 74, 121, 0.12);
  background: var(--surface-color);
  box-shadow: 0 20px 38px rgba(30, 74, 121, 0.1);
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.45s ease;
  isolation: isolate;
}

.portfolio-item::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(66, 139, 202, 0.24), rgba(30, 78, 121, 0.12) 52%, rgba(255, 255, 255, 0) 88%);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -1;
}

.portfolio-item::after {
  content: "";
  position: absolute;
  inset: -24px;
  border-radius: inherit;
  background: radial-gradient(circle at top, rgba(99, 164, 255, 0.24), transparent 55%);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -2;
}

.media-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 42px rgba(30, 74, 121, 0.16);
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.portfolio-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.55s ease;
}

.media-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 24, 48, 0) 40%, rgba(10, 24, 48, 0.35) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.badge-strip {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 2;
}

.badge-chip {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.85);
  color: var(--heading-color);
  box-shadow: 0 4px 14px rgba(30, 74, 121, 0.12);
}

.badge-live {
  background: rgba(66, 139, 202, 0.85);
  color: #fff;
}

.badge-case {
  background: rgba(255, 174, 94, 0.86);
  color: #663b00;
}

.badge-interactive {
  background: rgba(111, 207, 151, 0.85);
  color: #0f5132;
}

.badge-showreel {
  background: rgba(155, 126, 255, 0.88);
  color: #2e1b74;
}

.badge-default {
  background: rgba(255, 255, 255, 0.9);
  color: var(--heading-color);
}

.portfolio-item .item-body {
  display: grid;
  gap: 14px;
}

.portfolio-item h4 {
  font-size: 1.35rem;
  margin: 0;
}

.portfolio-item .item-body p {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), black 7%);
  line-height: 1.6;
}

.portfolio-item .tag-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.portfolio-item .tag-list span {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(66, 139, 202, 0.1);
  color: color-mix(in srgb, var(--muted-color), black 4%);
  border: 1px solid rgba(66, 139, 202, 0.2);
}

.item-meta {
  padding: 18px 20px 22px;
  border-top: 1px solid rgba(30, 74, 121, 0.12);
  display: grid;
  gap: 18px;
  background: rgba(245, 249, 252, 0.88);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.item-meta .meta-title {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted-color), black 8%);
}

.tech-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tech-list li {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(66, 139, 202, 0.14);
  color: color-mix(in srgb, var(--heading-color), white 18%);
  border: 1px solid rgba(66, 139, 202, 0.22);
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.item-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(30, 74, 121, 0.18);
  color: var(--heading-color);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  width: fit-content;
}

.item-link:hover {
  transform: translateY(-2px);
  border-color: rgba(66, 139, 202, 0.4);
  box-shadow: 0 12px 28px rgba(30, 74, 121, 0.14);
}

.item-link--live {
  border-color: rgba(66, 139, 202, 0.32);
  background: rgba(66, 139, 202, 0.12);
}

.item-link--case {
  border-color: rgba(255, 174, 94, 0.4);
  background: rgba(255, 174, 94, 0.16);
}

.item-link--interactive {
  border-color: rgba(111, 207, 151, 0.38);
  background: rgba(111, 207, 151, 0.16);
}

.item-link--showreel {
  border-color: rgba(155, 126, 255, 0.4);
  background: rgba(155, 126, 255, 0.16);
}

.item-link--default {
  border-color: rgba(30, 74, 121, 0.18);
}

.portfolio-item:hover {
  transform: translateY(-14px);
  box-shadow: 0 32px 70px rgba(30, 74, 121, 0.24);
}

.portfolio-item:hover::before,
.portfolio-item:hover::after {
  opacity: 1;
}

.portfolio-item:hover .media-wrapper {
  transform: translateY(-6px);
}

.portfolio-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.06) contrast(1.05);
}

.portfolio-item:hover .media-wrapper::before {
  opacity: 1;
}

.portfolio-item .overlay-action {
  position: absolute;
  right: 22px;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 2;
}

.portfolio-item:hover .overlay-action {
  opacity: 1;
  transform: translateY(0);
}

.overlay-action a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(10, 24, 48, 0.76);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: 0 18px 28px rgba(10, 24, 48, 0.32);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.overlay-action a:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(10, 24, 48, 0.36);
  background: rgba(10, 24, 48, 0.86);
}

.glightbox-inline {
  display: none;
}

.inline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.inline-visual img,
.inline-visual .inline-video {
  border-radius: 24px;
  box-shadow: 0 16px 38px rgba(30, 74, 121, 0.18);
  overflow: hidden;
}

.inline-visual img {
  width: 100%;
  height: auto;
}

.inline-details {
  display: grid;
  gap: 18px;
}

.inline-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: color-mix(in srgb, var(--muted-color), black 8%);
}

.inline-meta-block {
  display: grid;
  gap: 12px;
}

.inline-meta-block .meta-title {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: color-mix(in srgb, var(--muted-color), black 6%);
}

.bullet-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: color-mix(in srgb, var(--default-color), black 8%);
}

.bullet-list li {
  line-height: 1.5;
}

/* Video slider */
.video-showreel {
  border-radius: 32px;
  padding: 40px;
  background: var(--surface-color);
  border: 1px solid var(--surface-contrast);
  box-shadow: 0 18px 40px rgba(30, 74, 121, 0.12);
}

.showreel-slide {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
}

.showreel-thumb {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.play-button {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-button span {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showreel-slide:hover .play-button span {
  transform: scale(1.08);
  box-shadow: 0 16px 32px rgba(30, 74, 121, 0.24);
}

.swiper-nav-control {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.swiper-nav-control button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(30, 74, 121, 0.22);
  background: rgba(255, 255, 255, 0.86);
  color: var(--heading-color);
  transition: background 0.3s ease, color 0.3s ease;
}

.swiper-nav-control button:hover {
  background: rgba(66, 139, 202, 0.14);
  color: var(--heading-color);
}

/* Case studies */
.case-study-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.case-study-card {
  padding: 32px;
  border-radius: 28px;
  background: var(--surface-color);
  border: 1px solid var(--surface-contrast);
  box-shadow: 0 16px 32px rgba(30, 74, 121, 0.1);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.case-study-card h3 {
  font-size: 1.5rem;
}

.case-study-card ul {
  padding-left: 18px;
  margin: 0;
  color: var(--muted-color);
  display: grid;
  gap: 10px;
}

/* Testimonials */
.testimonial-slider {
  border-radius: 28px;
  padding: 40px;
  background: var(--surface-color);
  border: 1px solid var(--surface-contrast);
  box-shadow: 0 18px 38px rgba(30, 74, 121, 0.12);
}

.testimonial {
  display: grid;
  gap: 18px;
  text-align: left;
}

.testimonial p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: color-mix(in srgb, var(--default-color), black 6%);
}

.testimonial .author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial .author img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(66, 139, 202, 0.25);
}

.testimonial .author span {
  display: block;
  color: var(--heading-color);
  font-weight: 600;
}

.testimonial .author small {
  color: var(--muted-color);
}

/* CTA */
.cta-panel {
  border-radius: 32px;
  padding: 48px;
  background: var(--gradient-primary);
  display: grid;
  gap: 24px;
  align-items: center;
  box-shadow: 0 28px 64px rgba(30, 74, 121, 0.25);
  color: #fff;
}

.cta-panel h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-actions .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.65);
  color: #ffffff;
}

.cta-actions .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(30, 74, 121, 0.16);
  background: rgba(255, 255, 255, 0.92);
  text-align: center;
  color: var(--muted-color);
  font-size: 0.9rem;
}

/* Media queries */
@media (max-width: 992px) {
  .header {
    position: sticky;
  }

  .navmenu ul {
    gap: 18px;
  }

  .showcase-card img {
    height: 220px;
  }

  .inline-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 12px 0;
  }

  .navmenu {
    display: none;
  }

  .hero {
    min-height: 80vh;
  }

  .section {
    padding: 80px 0;
  }

  .video-showreel {
    padding: 28px;
  }

  .testimonial-slider {
    padding: 32px;
  }

  .cta-panel {
    padding: 36px;
  }
}

@media (max-width: 576px) {
  .hero .hero-copy h1 {
    font-size: 2.2rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .metric-card {
    padding: 24px;
  }

  .showcase-card .card-body {
    padding: 24px;
  }

  .video-showreel {
    padding: 22px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
