/* ============================================================================
   PORTFOLIO PAGE STYLES — LIGHT-TONED VARIANT
   Hero uses light accent wash; titles use portfolio primary + Instrument Serif.
   Tiles graduate from pale accent → full accent.
   Deep-dive & Highlighted Builds use light bg.
   ============================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@500;600&family=Instrument+Serif:ital@0;1&display=swap");

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */
:root {
  --portfolio-text-color: var(--text-primary, #1e293b);
  --portfolio-card-width: 200px;
  --portfolio-card-height: 300px;
  --portfolio-card-gap: 40px;
  --portfolio-number-size: 50px;
  --portfolio-accent-color: #ecad29;
  --portfolio-primary-color: #4379ff;
  --portfolio-primary-light: #6b9aff;
}

/* ============================================================================
   PORTFOLIO HERO — LIGHT TONED
   Start white; JS immediately sets the correct light accent wash
   ============================================================================ */
.portfolio-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #ffffff;
  color: var(--portfolio-text-color);
  font-family: "Inter", sans-serif;
}

.portfolio-indicator {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 0px;
  z-index: 110;
  background-color: var(--portfolio-primary-color, #4379ff);
  transform: translateX(-100%);
}

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

.portfolio-bg-base {
  position: absolute;
  inset: 0;
  opacity: 1;
  transition: none;
  background-color: #ffffff;
}
.portfolio-bg-base.animated {
  transition: background-color 0.5s ease;
}

.portfolio-bg-tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(6, 1fr);
  opacity: 1;
}
@media (max-width: 991.98px) {
  .portfolio-bg-tiles {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}
@media (max-width: 767.98px) {
  .portfolio-bg-tiles {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}
@media (max-width: 575.98px) {
  .portfolio-bg-tiles {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

.portfolio-bg-tile {
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.portfolio-bg-tile.visible {
  opacity: 1;
  transform: scale(1);
}

/* Cover — starts white so there's no color flash */
.portfolio-cover {
  position: absolute;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: #ffffff;
  z-index: 200;
}

/* ============================================================================
   HERO TEXT — dark text on light bg, Instrument Serif titles
   ============================================================================ */
.portfolio-details {
  position: absolute;
  top: 200px;
  left: 60px;
  z-index: 22;
  opacity: 0;
}
.portfolio-details-inner {
  max-width: 550px;
}

.portfolio-place-box {
  height: 46px;
  overflow: hidden;
}
.portfolio-place-text {
  padding-top: 16px;
  font-size: 20px;
  position: relative;
  color: var(--portfolio-primary-color, #4379ff);
  font-weight: 600;
}
.portfolio-place-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 4px;
  border-radius: 99px;
  background-color: var(--portfolio-primary-color, #4379ff);
}

.portfolio-title-box-1 {
  margin-top: 2px;
  height: 80px;
  overflow: hidden;
}
.portfolio-title-box-2 {
  margin-top: 0;
  height: 80px;
  overflow: hidden;
}

.portfolio-title-1,
.portfolio-title-2 {
  font-weight: 700;
  font-size: 68px;
  font-family: "Instrument Serif", serif;
  text-transform: none;
  color: var(--portfolio-primary-color, #4379ff);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.portfolio-desc {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.65);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

/* ============================================================================
   VIEW PORTFOLIO BUTTON — Glassmorphic, portfolio lighter colour
   ============================================================================ */
.portfolio-view-btn.glass-btn {
  height: auto;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 50px;
  text-transform: none;
  color: var(--portfolio-primary-color, #4379ff);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.45) 100%
  );
  border: 1.5px solid transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  --glass-glow-purple: var(--portfolio-primary-light, #6b9aff);
  --glass-glow-cyan: var(--portfolio-primary-color, #4379ff);
  --glass-glow-pink: var(--portfolio-primary-light, #6b9aff);
}
.portfolio-view-btn.glass-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.65) 100%
  );
  color: var(--portfolio-primary-color, #4379ff);
  transform: translateY(-2px);
}

.portfolio-start-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--portfolio-primary-color, #4379ff);
  color: #fff !important;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: all 0.2s ease;
}
.portfolio-start-btn:hover {
  transform: scale(1.1);
}
.portfolio-start-btn i {
  font-size: 15px;
}

/* ============================================================================
   HERO SVG ILLUSTRATION — Pen / Bezier  (right side, above thumbnails)
   ============================================================================ */
.hero-illustration {
  position: absolute;
  right: 120px;
  top: 160px;
  width: 44%;
  max-width: 580px;
  z-index: 20;
  pointer-events: none;
}
.hero-illustration svg {
  width: 100%;
  height: auto;
  overflow: visible;
  visibility: hidden;
}
.hero-illustration .illu-stroke {
  stroke: var(--portfolio-primary-light, #6b9aff);
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
}
.hero-illustration .illu-stroke-attr {
  stroke: var(--portfolio-primary-light, #6b9aff);
}
.hero-illustration .illu-fill {
  fill: var(--portfolio-primary-light, #6b9aff);
}
.hero-illustration .heroMainLineStart {
  stroke: var(--portfolio-primary-light, #6b9aff);
  opacity: 0;
}
.hero-illustration .illu-text-main {
  fill: var(--portfolio-primary-color, #4379ff);
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 42px;
  text-anchor: middle;
  letter-spacing: -0.5px;
}
.hero-illustration .illu-text-accent {
  fill: var(--portfolio-primary-light, #6b9aff);
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 42px;
  text-anchor: middle;
  letter-spacing: -0.5px;
}
.hero-illustration .illu-pen-body {
  fill: var(--text-primary, #1e293b);
  stroke: var(--text-muted, #9ca3af);
}
.hero-illustration .illu-pen-detail {
  stroke: var(--text-muted, #9ca3af);
  fill: none;
}
.hero-illustration .illu-pen-dot {
  fill: var(--text-muted, #9ca3af);
}

@media (max-width: 1199.98px) {
  .hero-illustration {
    width: 38%;
    right: 80px;
    top: 170px;
  }
}
@media (max-width: 991.98px) {
  .hero-illustration {
    display: none;
  }
}

/* ── Dark Mode Hero — always dark regardless of portfolio colors ── */
[data-theme="dark"] .portfolio-hero {
  background: #0f1117 !important;
}
[data-theme="dark"] .portfolio-bg-base {
  background: #0f1117 !important;
}
[data-theme="dark"] .portfolio-cover {
  background: #0f1117 !important;
}
[data-theme="dark"] .portfolio-hero .portfolio-details {
  color: #e2e8f0;
}
[data-theme="dark"] .portfolio-hero .portfolio-title-1,
[data-theme="dark"] .portfolio-hero .portfolio-title-2 {
  color: #f1f5f9;
}
[data-theme="dark"] .portfolio-hero .portfolio-desc {
  color: #94a3b8;
}
[data-theme="dark"] .portfolio-hero .portfolio-place-text {
  color: #94a3b8;
}
[data-theme="dark"] .portfolio-hero .portfolio-view-btn {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.04)
  ) !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}
[data-theme="dark"] .portfolio-hero .portfolio-view-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.08)
  ) !important;
}
[data-theme="dark"] .portfolio-arrow {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .portfolio-arrow svg {
  color: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .portfolio-arrow:hover {
  border-color: #5783fc;
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .portfolio-arrow:hover svg {
  color: #5783fc;
}
[data-theme="dark"] .portfolio-progress-bg {
  background-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .portfolio-card-image {
  filter: brightness(0.55) saturate(0.85);
}
[data-theme="dark"] .portfolio-card-content {
  background: #1a1f2e;
}
[data-theme="dark"] .portfolio-card-title {
  color: #e2e8f0;
}
[data-theme="dark"] .portfolio-card-place {
  color: #94a3b8;
}
[data-theme="dark"] .portfolio-card-excerpt {
  color: #64748b;
}
[data-theme="dark"] .portfolio-card {
  box-shadow:
    0px 18px 36px -18px rgba(0, 0, 0, 0.5),
    0px 30px 45px -30px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .hero-illustration .illu-stroke {
  stroke: #5783fc;
}
[data-theme="dark"] .hero-illustration .illu-stroke-attr {
  stroke: #5783fc;
}
[data-theme="dark"] .hero-illustration .heroMainLineStart {
  stroke: #5783fc;
}
[data-theme="dark"] .hero-illustration .illu-fill {
  fill: #5783fc;
}
[data-theme="dark"] .hero-illustration .illu-text-main {
  fill: #e2e8f0;
}
[data-theme="dark"] .hero-illustration .illu-text-accent {
  fill: #5783fc;
}
[data-theme="dark"] .hero-illustration .illu-pen-body {
  fill: #1d1d1d;
  stroke: #ededed;
}
[data-theme="dark"] .hero-illustration .illu-pen-detail {
  stroke: #ededed;
}
[data-theme="dark"] .hero-illustration .illu-pen-dot {
  fill: #ededed;
}
[data-theme="dark"] .hero-code-block {
  color: #c9d1d9;
}
[data-theme="dark"] .hero-code-block .ck {
  color: #ff7b72;
}
[data-theme="dark"] .hero-code-block .cf {
  color: #79c0ff;
}
[data-theme="dark"] .hero-code-block .cv {
  color: #d2a8ff;
}
[data-theme="dark"] .hero-code-block .cn {
  color: #a5d6ff;
}
[data-theme="dark"] .hero-code-block .cs {
  color: #7ee787;
}

/* ── Code Typing Block ── */
.hero-code-block {
  position: absolute;
  left: 62%;
  top: 76%;
  transform: translateX(-50%);
  width: 72%;
  max-width: 440px;
  opacity: 0;
  transition: opacity 0.6s ease;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 11.5px;
  line-height: 1.65;
  color: #475569;
  pointer-events: none;
  z-index: 5;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0.5) 65%,
    rgba(0, 0, 0, 0.15) 85%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 40%,
    rgba(0, 0, 0, 0.5) 65%,
    rgba(0, 0, 0, 0.15) 85%,
    rgba(0, 0, 0, 0) 100%
  );
}
.hero-code-block .code-line {
  white-space: pre;
  min-height: 1.65em;
  overflow: hidden;
}
.hero-code-block s {
  text-decoration: none;
  font-style: normal;
}
/* Syntax highlight tokens — light mode */
.hero-code-block .ck {
  color: #8250df;
} /* keywords: const, let, return, function, => */
.hero-code-block .cf {
  color: #0550ae;
} /* functions: Array, forEach, tint, gsap */
.hero-code-block .cv {
  color: #953800;
} /* variables */
.hero-code-block .cn {
  color: #0a3069;
} /* numbers */
.hero-code-block .cs {
  color: #116329;
} /* strings */
.hero-code-block .cursor {
  color: var(--portfolio-primary-light, #6b9aff);
  animation: cursorBlink 0.8s step-end infinite;
  font-weight: 300;
}
@keyframes cursorBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ============================================================================
   SKELETON LOADER — Card thumbnails (1000 ms then fade)
   ============================================================================ */
.portfolio-card-skeleton {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.skeleton-image {
  height: 50%;
  background: linear-gradient(90deg, #eeeeee 25%, #e0e0e0 50%, #eeeeee 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
.skeleton-content {
  height: 50%;
  padding: 14px 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skeleton-line {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eeeeee 25%, #e0e0e0 50%, #eeeeee 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}
.skeleton-line.short {
  width: 35%;
}
.skeleton-line.medium {
  width: 65%;
}
.skeleton-line.long {
  width: 90%;
}
.portfolio-card-skeleton.fade-out {
  opacity: 0;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================================================
   PORTFOLIO CARDS
   ============================================================================ */
.portfolio-cards-container {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.portfolio-card {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--portfolio-card-width);
  height: var(--portfolio-card-height);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0px 18px 36px -18px rgba(0, 0, 0, 0.2),
    0px 30px 45px -30px rgba(50, 50, 93, 0.15);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.portfolio-card:hover {
  box-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.portfolio-card-image {
  width: 100%;
  height: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.portfolio-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portfolio-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio-card-image-placeholder i {
  font-size: 32px;
  color: rgba(255, 255, 255, 0.3);
}

.portfolio-card-content {
  width: 100%;
  height: 50%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: var(--bg-card, rgba(255, 255, 255, 0.95));
}
.portfolio-card-start {
  width: 24px;
  height: 3px;
  border-radius: 99px;
  background-color: var(--portfolio-accent-color, #ecad29);
  margin-bottom: 6px;
}
.portfolio-card-place {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #64748b);
  margin-bottom: 4px;
}
.portfolio-card-title {
  font-weight: 600;
  font-size: 14px;
  font-family: "Oswald", sans-serif;
  line-height: 1.2;
  color: var(--text-primary, #1e293b);
  margin-bottom: 6px;
}
.portfolio-card-excerpt {
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-secondary, #64748b);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================================
   PAGINATION — dark on light
   ============================================================================ */
.portfolio-pagination {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  z-index: 60;
  opacity: 0;
  transform: translateY(200px);
}
.portfolio-arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.18);
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.portfolio-arrow:hover {
  border-color: var(--portfolio-primary-color, #4379ff);
  background: rgba(255, 255, 255, 0.4);
}
.portfolio-arrow svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  color: rgba(0, 0, 0, 0.45);
}
.portfolio-arrow:hover svg {
  color: var(--portfolio-primary-color, #4379ff);
}
.portfolio-arrow-right {
  margin-left: 20px;
}

.portfolio-progress-container {
  margin-left: 24px;
  width: 500px;
  height: 50px;
  display: flex;
  align-items: center;
}
.portfolio-progress-bg {
  width: 100%;
  height: 3px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.portfolio-progress-bar {
  height: 100%;
  background-color: var(--portfolio-primary-color, #4379ff);
  width: 0;
  transition: width 0.3s ease;
}
.portfolio-slide-numbers {
  width: 50px;
  height: 50px;
  overflow: hidden;
  position: relative;
  margin-left: 16px;
}
.portfolio-slide-number {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: bold;
  color: var(--portfolio-primary-color, #4379ff);
}

/* ============================================================================
   CONTENT SECTIONS COMMON
   ============================================================================ */
.portfolio-section {
  padding: 6rem 0;
  position: relative;
}
.portfolio-section:nth-child(odd) {
  background: var(--bg-surface, #f8fafc);
}
.portfolio-section:nth-child(even) {
  background: var(--bg-card, #fff);
}
[data-theme="dark"] .portfolio-section:nth-child(odd) {
  background: #0f1419;
}
[data-theme="dark"] .portfolio-section:nth-child(even) {
  background: #1a1f26;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  background: rgba(67, 121, 255, 0.1);
  color: var(--color-primary, #4379ff);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 1rem;
  line-height: 1.2;
}
[data-theme="dark"] .section-title {
  color: #f1f5f9;
}
.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.7;
  margin: 0;
}
.section-cta {
  text-align: center;
  margin-top: 3rem;
}
.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: transparent;
  border: 2px solid var(--color-primary, #4379ff);
  color: var(--color-primary, #4379ff);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-outline-light:hover {
  background: var(--color-primary, #4379ff);
  color: #fff;
}

/* ============================================================================
   CASE STUDIES — LIGHT TONED
   ============================================================================ */
.portfolio-case-studies {
  background: var(--bg-surface-secondary, #f9fafb) !important;
}
.portfolio-case-studies .section-title {
  color: var(--text-primary, #1e293b);
}
.portfolio-case-studies .section-description {
  color: var(--text-secondary, #64748b);
}

.case-study-challenge-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: stretch;
}
.case-study-visual-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.case-study-browser {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.browser-dots {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: var(--text-secondary, #64748b);
  border-bottom: 1px solid var(--text-secondary, #64748b);
}
.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color-dark, #d1d5db);
}
.browser-dots span:first-child {
  background: #ef4444;
}
.browser-dots span:nth-child(2) {
  background: #eab308;
}
.browser-dots span:nth-child(3) {
  background: #22c55e;
}
.browser-content img {
  width: 100%;
  height: auto;
  display: block;
}

.case-study-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.stat-item {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-secondary, #64748b);
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  margin-top: 0.25rem;
}

.case-study-challenge-side {
  display: flex;
  flex-direction: column;
}
.challenge-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 1.5rem;
}
.challenge-quote {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.challenge-quote-text {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-primary, #1e293b);
  font-style: italic;
  margin: 0;
  padding-left: 2rem;
  border-left: 4px solid var(--portfolio-primary-color, #4379ff);
}
.challenge-quote-text .word {
  display: inline;
}

/* ============================================================================
   OUR SOLUTION — Scroll-Triggered Slider (dark section kept as-is)
   ============================================================================ */
.portfolio-our-solution {
  padding: 0 !important;
  background: #0a0a0a !important;
  overflow: hidden;
  position: relative;
  min-height: 100vh;
}
.solution-shared-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.solution-shared-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.solution-shared-bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.solution-shared-bg-layer.active {
  opacity: 1;
}
.solution-header {
  position: relative;
  z-index: 2;
  padding: 4rem 0 2rem;
  text-align: center;
}
.solution-header .section-badge {
  background: rgba(236, 173, 41, 0.2);
  color: #fcd34d;
}
.solution-header .section-title {
  color: #fff;
}
.solution-header .section-description {
  color: rgba(255, 255, 255, 0.7);
}
.solution-slider-container {
  width: 100%;
  height: 70vh;
  min-height: 500px;
  display: flex;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.solution-column {
  width: 25%;
  height: 100%;
  position: relative;
  border-right: 2px solid rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.5s ease;
  cursor: pointer;
}
.solution-column:last-child {
  border-right: none;
}
.solution-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.solution-content h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
  margin: 0;
  padding: 40px 0;
  color: rgba(255, 255, 255, 0.2);
  font-size: 10em;
  font-weight: 700;
  font-family: "Oswald", sans-serif;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
  z-index: 1;
}
.solution-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 90%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s ease;
  z-index: 10;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}
.solution-column.revealed .solution-box {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}
.solution-column.revealed .solution-content h1 {
  color: rgba(255, 255, 255, 0.08);
}
.solution-icon {
  width: 64px;
  height: 64px;
  background: var(--text-secondary, #64748b);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.solution-icon i {
  font-size: 1.5rem;
  color: #fff;
}
.solution-box h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.875rem;
}
.solution-box p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}
.solution-tech-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.solution-tech-tags span {
  padding: 0.25rem 0.625rem;
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
  font-size: 0.6875rem;
  font-weight: 500;
  border-radius: 4px;
}

@media (max-width: 991.98px) {
  .portfolio-our-solution {
    min-height: auto;
    padding: 3rem 0 !important;
  }
  .solution-header {
    padding: 2rem 1rem;
  }
  .solution-slider-container {
    flex-direction: column;
    height: auto;
    min-height: auto;
    gap: 1.5rem;
    padding: 0 1rem 2rem;
  }
  .solution-column {
    width: 100% !important;
    height: auto !important;
    min-height: 350px;
    border-right: none;
    border-radius: 16px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  .solution-column .solution-box {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    opacity: 1;
    visibility: visible;
    margin: 0 auto;
    max-width: 100%;
    width: calc(100% - 2rem);
    box-shadow: none;
    background: transparent;
    padding: 1.5rem;
  }
  .solution-column .solution-box h2 {
    color: #f1f5f9;
  }
  .solution-column .solution-box p {
    color: rgba(255, 255, 255, 0.8);
  }
  .solution-column .solution-tech-tags span {
    background: rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
  }
  .solution-content {
    height: auto;
    padding: 1.5rem 0;
  }
  .solution-content h1 {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    font-size: 4em;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border: none;
    color: rgba(255, 255, 255, 0.15);
  }
  .solution-shared-bg {
    display: none;
  }
  .solution-column::before {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    z-index: 0;
    border-radius: 16px;
  }
  .solution-column[data-index="0"]::before {
    background-image: url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?w=800&h=600&fit=crop");
  }
  .solution-column[data-index="1"]::before {
    background-image: url("https://images.unsplash.com/photo-1563013544-824ae1b704d3?w=800&h=600&fit=crop");
  }
  .solution-column[data-index="2"]::before {
    background-image: url("https://images.unsplash.com/photo-1550751827-4bd374c3f58b?w=800&h=600&fit=crop");
  }
  .solution-column[data-index="3"]::before {
    background-image: url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?w=800&h=600&fit=crop");
  }
  .solution-column::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.7) 0%,
      rgba(10, 10, 10, 0.9) 100%
    );
    z-index: 0;
    border-radius: 16px;
  }
  .solution-content {
    position: relative;
    z-index: 1;
  }
}

/* ============================================================================
   CLIENT STORIES
   ============================================================================ */
.client-stories-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.client-story-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}
[data-theme="dark"] .client-story-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}
.client-story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.client-story-card.featured {
  grid-column: span 2;
  background: var(--text-secondary, #64748b);
  border: none;
  color: #fff;
}
.story-quote {
  margin-bottom: 1rem;
}
.story-quote i {
  font-size: 2rem;
  color: var(--color-primary, #4379ff);
  opacity: 0.3;
}
.client-story-card.featured .story-quote i {
  color: #fff;
  opacity: 0.4;
}
.story-content p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-primary, #1e293b);
  margin: 0;
}
[data-theme="dark"] .story-content p {
  color: #e2e8f0;
}
.client-story-card.featured .story-content p {
  color: #fff;
  font-size: 1.25rem;
}
.story-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder-story {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary, #4379ff), #6366f1);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
}
.author-name {
  display: block;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}
[data-theme="dark"] .author-name {
  color: #f1f5f9;
}
.client-story-card.featured .author-name {
  color: #fff;
}
.author-title {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
}
.client-story-card.featured .author-title {
  color: rgba(255, 255, 255, 0.8);
}
.story-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.metric {
  text-align: center;
}
.metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}
.metric-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================================
   HIGHLIGHTED BUILDS / FEATURED PROJECTS — LIGHT TONED
   ============================================================================ */
.portfolio-featured-projects {
  background: var(--bg-surface-secondary, #f9fafb) !important;
}
.portfolio-featured-projects .section-title {
  color: var(--text-primary, #1e293b);
}
.portfolio-featured-projects .section-description {
  color: var(--text-secondary, #64748b);
}

.featured-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.featured-project-card {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.3s ease;
}
.featured-project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
.project-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.featured-project-card:hover .project-image img {
  transform: scale(1.05);
}
.project-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary, #4379ff), #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-image-placeholder i {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.3);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.featured-project-card:hover .project-overlay {
  opacity: 1;
}
.view-project {
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.view-project i {
  transition: transform 0.2s ease;
}
.featured-project-card:hover .view-project i {
  transform: translateX(4px);
}
.project-info {
  padding: 1.5rem;
}
.project-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--card-accent, var(--color-primary, #4379ff));
  margin-bottom: 0.5rem;
}
.project-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0 0 0.5rem;
}
.project-excerpt {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.5;
  margin: 0 0 1rem;
}
.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.project-tech span {
  padding: 0.25rem 0.625rem;
  background: rgba(67, 121, 255, 0.08);
  color: var(--color-primary, #4379ff);
  font-size: 0.6875rem;
  border-radius: 4px;
}

/* ============================================================================
   CTA SECTION
   ============================================================================ */
.portfolio-cta-section {
  background: linear-gradient(
    135deg,
    var(--color-primary, #4379ff) 0%,
    #6366f1 100%
  ) !important;
  padding: 5rem 0;
}
.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
}
.cta-content p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 2rem;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--color-primary, #4379ff);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-primary-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.btn-outline-lg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-outline-lg:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 1199.98px) {
  .case-study-challenge-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .featured-projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 991.98px) {
  .portfolio-details {
    top: 160px;
    left: 40px;
    right: 40px;
  }
  .portfolio-title-1,
  .portfolio-title-2 {
    font-size: 52px;
  }
  .portfolio-title-box-1,
  .portfolio-title-box-2 {
    height: 62px;
  }
  .portfolio-progress-container {
    width: 300px;
  }
  .client-stories-grid {
    grid-template-columns: 1fr;
  }
  .client-story-card.featured {
    grid-column: span 1;
  }
}
@media (max-width: 767.98px) {
  .portfolio-hero {
    height: 100svh;
  }
  .portfolio-details {
    top: 120px;
    left: 20px;
    right: 20px;
  }
  .portfolio-details-inner {
    max-width: 100%;
  }
  .portfolio-place-box {
    height: 40px;
  }
  .portfolio-place-text {
    font-size: 16px;
    padding-top: 14px;
  }
  .portfolio-place-text::before {
    width: 28px;
    height: 3px;
  }
  .portfolio-title-1,
  .portfolio-title-2 {
    font-size: 40px;
  }
  .portfolio-title-box-1,
  .portfolio-title-box-2 {
    height: 50px;
  }
  .portfolio-desc {
    font-size: 0.9375rem;
    -webkit-line-clamp: 3;
    margin-top: 14px;
    line-height: 1.5;
  }
  .portfolio-cta {
    margin-top: 20px;
  }
  .portfolio-view-btn.glass-btn {
    padding: 12px 22px;
    font-size: 13px;
  }
  .portfolio-start-btn {
    width: 40px;
    height: 40px;
  }
  .portfolio-pagination {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0 20px;
    width: calc(100% - 40px);
  }
  .portfolio-arrow {
    width: 44px;
    height: 44px;
  }
  .portfolio-arrow svg {
    width: 20px;
    height: 20px;
  }
  .portfolio-arrow-right {
    margin-left: 12px;
  }
  .portfolio-progress-container {
    width: 100%;
    order: 3;
    margin-left: 0;
    margin-top: 0.5rem;
  }
  .portfolio-slide-numbers {
    margin-left: auto;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .section-description {
    font-size: 1rem;
  }
  .section-header {
    margin-bottom: 2.5rem;
    padding: 0 1rem;
  }
  .portfolio-section {
    padding: 4rem 0;
  }
  .challenge-title {
    font-size: 1.5rem;
  }
  .challenge-quote-text {
    font-size: 1rem;
    padding-left: 1rem;
  }
  .featured-projects-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  .cta-buttons {
    flex-direction: column;
  }
  .btn-primary-lg,
  .btn-outline-lg {
    width: 100%;
    justify-content: center;
  }
}
@media (max-width: 575.98px) {
  .portfolio-hero {
    height: 100svh;
  }
  .portfolio-details {
    top: 100px;
    left: 16px;
    right: 16px;
  }
  .portfolio-title-1,
  .portfolio-title-2 {
    font-size: 34px;
  }
  .portfolio-title-box-1,
  .portfolio-title-box-2 {
    height: 42px;
  }
  .portfolio-place-text {
    font-size: 14px;
  }
  .portfolio-desc {
    font-size: 0.875rem;
  }
  .portfolio-view-btn.glass-btn {
    padding: 10px 20px;
    font-size: 12px;
  }
  .portfolio-start-btn {
    width: 38px;
    height: 38px;
  }
  .portfolio-arrow {
    width: 40px;
    height: 40px;
  }
  .portfolio-arrow svg {
    width: 18px;
    height: 18px;
  }
  .cta-content h2 {
    font-size: 1.75rem;
  }
  .case-study-stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .stat-value {
    font-size: 1.5rem;
  }
  .story-metrics {
    flex-direction: column;
    gap: 1rem;
  }
  .metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }
}
@media (max-height: 700px) and (max-width: 767.98px) {
  .portfolio-details {
    top: 80px;
  }
  .portfolio-title-box-1,
  .portfolio-title-box-2 {
    height: 38px;
    margin-top: 0;
  }
  .portfolio-title-1,
  .portfolio-title-2 {
    font-size: 30px;
  }
  .portfolio-desc {
    font-size: 0.8125rem;
    -webkit-line-clamp: 2;
    margin-top: 10px;
  }
  .portfolio-view-btn.glass-btn {
    padding: 8px 16px;
    font-size: 11px;
  }
}
@media (max-height: 600px) and (max-width: 767.98px) {
  .portfolio-details {
    top: 60px;
  }
  .portfolio-title-box-1,
  .portfolio-title-box-2 {
    height: 30px;
  }
  .portfolio-title-1,
  .portfolio-title-2 {
    font-size: 24px;
  }
  .portfolio-desc {
    display: none;
  }
}
@media (max-height: 500px) {
  .portfolio-details {
    top: 50px;
    left: 16px;
    right: auto;
    max-width: 50%;
  }
  .portfolio-title-box-2 {
    display: none;
  }
  .portfolio-title-1 {
    font-size: 20px;
  }
  .portfolio-title-box-1 {
    height: 26px;
  }
  .portfolio-desc {
    display: none;
  }
  .portfolio-pagination {
    bottom: 10px;
    top: auto !important;
  }
  .portfolio-arrow {
    width: 36px;
    height: 36px;
  }
  .portfolio-progress-container {
    width: 120px;
  }
}

@media (max-width: 400px) and (max-height: 700px) {
  .portfolio-details {
    top: 70px;
  }
  .portfolio-title-1,
  .portfolio-title-2 {
    font-size: 28px;
  }
  .portfolio-title-box-1,
  .portfolio-title-box-2 {
    height: 34px;
  }
  .portfolio-desc {
    -webkit-line-clamp: 2;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-cover,
  .portfolio-indicator,
  .portfolio-card,
  .portfolio-details,
  .portfolio-bg-tile,
  .solution-box,
  .solution-shared-bg,
  .solution-column,
  .portfolio-card-skeleton,
  .skeleton-image,
  .skeleton-line {
    transition: none !important;
    animation: none !important;
  }
}
