/* ============================================================
   KKRF TECH — Portfolio Overview & Single Pages
   ============================================================ */

/* ---- Page Hero ---- */
.pf-hero {
  background: #000;
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}
.pf-hero::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21,116,255,.14), transparent 65%);
  pointer-events: none;
}
.pf-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.035) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}
.pf-hero__inner { position: relative; z-index: 1; }
.pf-hero__eye {
  font-size: 12px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue, #1574FF);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.pf-hero__eye::before {
  content: ""; width: 28px; height: 1.5px;
  background: var(--blue, #1574FF);
}
.pf-hero__title {
  font-size: clamp(36px, 5.5vw, 72px);
  font-weight: 800; line-height: 1.02;
  letter-spacing: -.04em; color: #fff;
  margin: 0 0 20px; max-width: 820px;
}
.pf-hero__sub {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.65;
  color: rgba(255,255,255,.5);
  max-width: 540px;
  margin: 0 0 48px;
}
.pf-hero__stats {
  display: flex; gap: 40px; flex-wrap: wrap;
}
.pf-hero__stat { display: flex; flex-direction: column; gap: 4px; }
.pf-hero__stat-n {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800; color: #fff; letter-spacing: -.03em;
}
.pf-hero__stat-l {
  font-size: 12px; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
}
.pf-hero__stat-div {
  width: 1px; background: rgba(255,255,255,.12);
  align-self: stretch; margin: 4px 0;
}

/* ---- Filter Bar ---- */
.pf-filters {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding: 24px 0;
  position: sticky;
  top: 64px;
  z-index: 90;
}
.pf-filters__inner {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.pf-filter-pill {
  padding: 8px 20px;
  border-radius: 100px;
  border: 1.5px solid rgba(0,0,0,.12);
  background: transparent;
  font-size: 13px; font-weight: 500;
  color: #444;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.pf-filter-pill:hover { border-color: #1574FF; color: #1574FF; }
.pf-filter-pill.active {
  background: #1574FF; border-color: #1574FF; color: #fff;
}

/* ---- Portfolio Grid ---- */
.pf-listing {
  padding: clamp(64px, 8vw, 100px) 0;
  background: #fff;
}
.pf-listing__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 40px; flex-wrap: wrap; gap: 12px;
}
.pf-listing__title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700; color: #0a0a0a;
  letter-spacing: -.02em;
}
.pf-listing__count {
  font-size: 13px; color: #999; font-weight: 500;
}

.pf-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

/* Featured card — spans 8 cols */
.pf-card {
  background: #f7f8fa;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  display: flex; flex-direction: column;
  transition: border-color .25s, transform .25s, box-shadow .25s;
  grid-column: span 4;
}
.pf-card--featured { grid-column: span 8; flex-direction: row; }
.pf-card:hover {
  border-color: #1574FF;
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(21,116,255,.1);
}

/* Card image */
.pf-card__img {
  position: relative;
  overflow: hidden;
  background: #0a1a2e;
}
.pf-card--featured .pf-card__img { flex: 0 0 46%; min-height: 360px; }
.pf-card:not(.pf-card--featured) .pf-card__img { height: 220px; }

.pf-card__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform .6s ease;
}
.pf-card:hover .pf-card__bg { transform: scale(1.04); }
.pf-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.7) 100%);
}
.pf-card__sector {
  position: absolute;
  top: 18px; left: 18px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  padding: 5px 14px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
}

/* Card body */
.pf-card__body {
  padding: clamp(24px, 3vw, 36px);
  display: flex; flex-direction: column;
  gap: 14px;
  flex: 1;
}
.pf-card__tag {
  font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: #1574FF;
}
.pf-card__title {
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 800; color: #0a0a0a;
  line-height: 1.2; letter-spacing: -.02em;
  margin: 0;
}
.pf-card__desc {
  font-size: 14px; line-height: 1.65;
  color: #555; margin: 0;
}
.pf-card__metrics {
  display: flex; gap: 24px; flex-wrap: wrap;
  padding-top: 4px;
}
.pf-card__metric { display: flex; flex-direction: column; gap: 2px; }
.pf-card__metric strong {
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 800; color: #0a0a0a;
  letter-spacing: -.02em; line-height: 1;
}
.pf-card__metric span {
  font-size: 11px; color: #888;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}
.pf-card__cta {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: #1574FF;
  text-decoration: none;
  border-bottom: 1px solid rgba(21,116,255,.3);
  padding-bottom: 2px;
  width: fit-content;
  transition: gap .2s, border-color .2s;
}
.pf-card__cta:hover { gap: 12px; border-color: #1574FF; }

/* ---- CTA Band ---- */
.pf-cta {
  background: #000;
  padding: clamp(64px, 8vw, 100px) 0;
  position: relative; overflow: hidden;
}
.pf-cta::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.035) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}
.pf-cta__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr auto;
  gap: 60px; align-items: center;
}
.pf-cta__eye {
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue, #1574FF);
  margin-bottom: 16px;
}
.pf-cta__title {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 800; color: #fff;
  letter-spacing: -.03em; line-height: 1.1;
  margin: 0 0 16px;
}
.pf-cta__sub { font-size: 16px; color: rgba(255,255,255,.5); line-height: 1.65; margin: 0; }
.pf-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }

/* ═══════════════════════════════
   SINGLE CASE STUDY PAGE
   ═══════════════════════════════ */

/* Back nav */
.cs-back {
  background: #000;
  padding: 100px 0 0;
}
.cs-back__link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  letter-spacing: .04em;
  transition: color .2s;
}
.cs-back__link:hover { color: #fff; }

/* Hero */
.cs-hero {
  background: #000;
  padding: 40px 0 80px;
  position: relative; overflow: hidden;
}
.cs-hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.03) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
}
.cs-hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: end;
}
.cs-hero__left {}
.cs-hero__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.45);
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 100px;
  margin-bottom: 24px;
}
.cs-hero__title {
  font-size: clamp(32px, 4.5vw, 60px);
  font-weight: 800; color: #fff;
  line-height: 1.05; letter-spacing: -.04em;
  margin: 0 0 20px;
}
.cs-hero__sub {
  font-size: clamp(15px, 1.3vw, 18px);
  color: rgba(255,255,255,.5);
  line-height: 1.65; margin: 0 0 40px;
}
.cs-hero__meta {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.cs-hero__meta-item { display: flex; flex-direction: column; gap: 4px; }
.cs-hero__meta-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.3);
}
.cs-hero__meta-val {
  font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85);
}

/* Metrics row */
.cs-hero__metrics {
  display: flex; flex-direction: column; gap: 20px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: 36px;
}
.cs-hero__metrics-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: 4px;
}
.cs-metric-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cs-metric {
  display: flex; flex-direction: column; gap: 4px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.cs-metric:last-child { border-bottom: none; padding-bottom: 0; }
.cs-metric strong {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 800; color: #fff;
  letter-spacing: -.03em; line-height: 1;
}
.cs-metric span {
  font-size: 12px; color: rgba(255,255,255,.4);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}

/* Hero image */
.cs-hero-img {
  background: #0a1a2e;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  min-height: 480px;
}
.cs-hero-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.cs-hero-img__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(21,116,255,.3), transparent 60%);
}

/* Body content */
.cs-body {
  padding: clamp(64px, 8vw, 100px) 0;
  background: #fff;
}
.cs-body__layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 80px;
  align-items: start;
}
.cs-body__main {}

.cs-section-title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800; color: #0a0a0a;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}
.cs-body__section {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(0,0,0,.07);
}
.cs-body__section:last-child { border-bottom: none; margin-bottom: 0; }

.cs-body__text {
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.75; color: #333;
  margin: 0 0 20px;
}
.cs-body__text:last-child { margin-bottom: 0; }

.cs-challenge-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 14px;
}
.cs-challenge-list li {
  display: flex; gap: 14px; align-items: flex-start;
  font-size: 15px; line-height: 1.65; color: #333;
}
.cs-challenge-list li::before {
  content: "→";
  color: #1574FF; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

.cs-tech-chips {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
}
.cs-tech-chip {
  padding: 7px 16px;
  background: #f0f4ff;
  border: 1px solid rgba(21,116,255,.2);
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  color: #1574FF; letter-spacing: .02em;
}

/* Quote / Testimonial */
.cs-quote {
  background: #f7f8fa;
  border-left: 3px solid #1574FF;
  padding: 28px 32px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
}
.cs-quote p {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 500; line-height: 1.6;
  color: #0a0a0a; font-style: italic;
  margin: 0 0 12px;
}
.cs-quote cite {
  font-size: 13px; color: #888; font-style: normal; font-weight: 600;
}

/* Results grid */
.cs-results-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 8px;
}
.cs-result-card {
  background: #f7f8fa;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
}
.cs-result-card strong {
  display: block;
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 800; color: #0a0a0a;
  letter-spacing: -.03em; margin-bottom: 6px;
}
.cs-result-card span {
  font-size: 12px; color: #888;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 500;
}

/* Timeline */
.cs-timeline {
  position: relative;
  margin-top: 8px;
  padding-left: 28px;
}
.cs-timeline::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 1.5px; background: rgba(0,0,0,.1);
}
.cs-timeline-item {
  position: relative;
  margin-bottom: 32px;
}
.cs-timeline-item:last-child { margin-bottom: 0; }
.cs-timeline-item::before {
  content: "";
  position: absolute; left: -25px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%; background: #1574FF;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #1574FF;
}
.cs-timeline-item h4 {
  font-size: 15px; font-weight: 700; color: #0a0a0a;
  margin: 0 0 6px; letter-spacing: -.01em;
}
.cs-timeline-item p {
  font-size: 14px; line-height: 1.65; color: #555; margin: 0;
}

/* Sidebar */
.cs-sidebar {}
.cs-sidebar-card {
  background: #f7f8fa;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
}
.cs-sidebar-card h4 {
  font-size: 13px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #888; margin: 0 0 18px;
}
.cs-sidebar-row {
  display: flex; flex-direction: column; gap: 14px;
}
.cs-sidebar-item {
  display: flex; flex-direction: column; gap: 3px;
}
.cs-sidebar-item .label {
  font-size: 11px; color: #aaa; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
}
.cs-sidebar-item .val {
  font-size: 14px; color: #0a0a0a; font-weight: 600;
}
.cs-sidebar-cta {
  background: #1574FF;
  border-radius: 20px;
  padding: 32px 28px;
  margin-bottom: 24px;
}
.cs-sidebar-cta h4 {
  font-size: 20px; font-weight: 800; color: #fff;
  letter-spacing: -.02em; margin: 0 0 10px;
}
.cs-sidebar-cta p {
  font-size: 14px; color: rgba(255,255,255,.7);
  line-height: 1.6; margin: 0 0 20px;
}
.cs-sidebar-cta a {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #1574FF;
  padding: 12px 20px; border-radius: 100px;
  font-size: 14px; font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}
.cs-sidebar-cta a:hover { opacity: .9; }

/* Related projects */
.cs-related {
  padding: clamp(64px, 8vw, 80px) 0;
  background: #f7f8fa;
  border-top: 1px solid rgba(0,0,0,.07);
}
.cs-related__head { margin-bottom: 36px; }
.cs-related__eye {
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #1574FF; margin-bottom: 8px;
}
.cs-related__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800; color: #0a0a0a;
  letter-spacing: -.03em; margin: 0;
}
.cs-related__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .pf-card--featured { flex-direction: column; grid-column: span 12; }
  .pf-card--featured .pf-card__img { flex: none; height: 280px; }
  .pf-card { grid-column: span 6; }
  .cs-hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .cs-hero-img { min-height: 320px; }
  .cs-body__layout { grid-template-columns: 1fr; gap: 48px; }
  .cs-results-grid { grid-template-columns: repeat(2, 1fr); }
  .pf-cta__inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-card { grid-column: span 1 !important; }
  .pf-card--featured .pf-card__img { height: 240px; }
  .cs-metric-row { grid-template-columns: repeat(2, 1fr); }
  .cs-results-grid { grid-template-columns: 1fr 1fr; }
  .cs-related__grid { grid-template-columns: 1fr; }
  .pf-hero__stats { gap: 24px; }
}
@media (max-width: 480px) {
  .cs-metric-row { grid-template-columns: 1fr 1fr; }
  .cs-results-grid { grid-template-columns: 1fr; }
}
