/* ═══════════════════════════════════════════════════
   portfolio.css — Case Study page styles
   All colours via CSS variables from active theme.
   ═══════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.pf-page {
  padding: 28px 24px 60px;
}

/* ── Loading state ── */
.pf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 48px;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}
.pf-spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid var(--bg-secondary);
  border-top-color: var(--brand);
  animation: pf-spin 0.8s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ── Hero ── */
.pf-hero {
  background: linear-gradient(135deg, #1d1d1f 0%, #2d2d30 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}
.pf-hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.05) 0%, transparent 70%);
  pointer-events: none;
}
.pf-hero-inner {
  position: relative; z-index: 1;
  padding: 36px 40px;
}
.pf-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: color .15s;
  margin-bottom: 16px;
}
.pf-back:hover { color: #fff; }
.pf-back svg { flex-shrink: 0; }

.pf-eyebrow {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.45);
  margin-bottom: 8px;
}
.pf-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: var(--font-weight-display);
  font-style: var(--font-style-display);
  color: #fff;
  line-height: 1.1;
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 10px;
}
.pf-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
  max-width: 560px;
}

/* ── Body ── */
/* ── Two-column body ── */
.pf-two-col {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
  margin-bottom: 24px;
}
.pf-col-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}
.pf-col-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Image slider ── */
.pf-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--text-primary);
  border: 1px solid var(--border);
}
.pf-slides {
  display: flex;
  transition: transform .46s cubic-bezier(.2,0,0,1);
}
.pf-slide {
  flex: 0 0 100%;
}
.pf-slide img {
  width: 100%; height: 340px;
  object-fit: cover; display: block;
  opacity: .92;
}
.pf-slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  background: rgba(255,255,255,.9);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(0,0,0,.18);
  transition: all .15s;
  z-index: 10;
}
.pf-slide-btn:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.pf-slide-prev { left: 14px; }
.pf-slide-next { right: 14px; }
.pf-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 10;
}
.pf-dot {
  width: 6px; height: 6px; border-radius: 50%;
  border: none; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.45);
  transition: all .25s;
}
.pf-dot.active { background: #fff; width: 18px; border-radius: 4px; }

/* ── Main column ── */
.pf-main {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 28px;
}
.pf-section-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: var(--font-weight-display);
  font-style: var(--font-style-display);
  color: var(--text-primary);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 14px;
}
.pf-main p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}
.pf-main p:last-of-type { margin-bottom: 0; }

/* ── Highlight stats ── */
.pf-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pf-highlight-card {
  flex: 1; min-width: 80px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  border: 1px solid var(--border);
}
.pf-highlight-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #0071e3;
  line-height: 1;
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 4px;
}
.pf-highlight-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.pf-info-box,
.pf-tags-box {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
}
.pf-info-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.pf-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 18px;
}
.pf-info-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.pf-info-list li:last-child { border-bottom: none; }
.pf-info-key {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}
.pf-info-val {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}
.pf-info-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Buttons */
.pf-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px 16px;
  background: var(--brand); color: var(--brand-text);
  border-radius: var(--radius-btn);
  font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: background .15s, opacity .15s;
  font-family: var(--font-body);
}
.pf-btn-primary:hover { background: var(--brand-dk); }

.pf-btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; padding: 9px 16px;
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 12.5px; font-weight: 500;
  text-decoration: none; transition: all .15s;
  font-family: var(--font-body);
}
.pf-btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-lt); }

/* ── Technology tags ── */
.pf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.pf-tag {
  font-size: 11px; font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 11px;
}

/* ── Prev / Next nav ── */
.pf-project-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pf-project-nav-btn {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-primary);
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all .2s;
  flex: 1; max-width: 48%;
}
.pf-project-nav-btn:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.pf-project-nav-btn span {
  display: flex; flex-direction: column; gap: 2px;
}
.pf-project-nav-btn small {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted);
}
.pf-project-nav-btn strong {
  font-size: 12.5px; font-weight: 500;
  color: var(--text-primary);
}
.pf-project-nav-btn--right {
  justify-content: flex-end;
  text-align: right;
}

/* ── Footer ── */
.sitefooter {
  text-align: center;
  padding: 20px 0 0;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.sitefooter a {
  color: #0071e3;
  font-weight: 500;
}

/* ── Responsive ── */
/* ── Responsive ── */
@media (max-width: 860px) {
  .pf-page { padding: 16px 14px 40px; }
  .pf-hero-inner { padding: 24px 20px; }
  .pf-title { font-size: clamp(1.3rem, 5vw, 1.8rem); }
  .pf-subtitle { font-size: 13px; }

  /* Stack two columns */
  .pf-two-col { grid-template-columns: 1fr; gap: 14px; }
  .pf-col-left { position: static; }

  /* Slide image height */
  .pf-slide img { height: 240px; }

  /* Sidebar items full width */
  .pf-info-box, .pf-tags-box, .pf-main { padding: 16px; }
}

@media (max-width: 580px) {
  .pf-page { padding: 12px 12px 32px; }
  .pf-hero-inner { padding: 20px 16px; }
  .pf-slide img { height: 190px; }

  /* Highlight cards — 2 per row */
  .pf-highlights { gap: 8px; }
  .pf-highlight-card { min-width: calc(50% - 4px); }
  .pf-highlight-val { font-size: 1.15rem; }

  /* Project nav — stack vertically */
  .pf-project-nav { flex-direction: column; gap: 8px; }
  .pf-project-nav-btn { max-width: 100%; }
  .pf-project-nav-btn--right { justify-content: flex-start; text-align: left; }

  /* Info list compact */
  .pf-info-list li { font-size: 11.5px; }
  .pf-section-heading { font-size: 1rem; }
  .pf-main p { font-size: 12.5px; }
}

@media (max-width: 380px) {
  .pf-slide img { height: 160px; }
  .pf-btn-primary, .pf-btn-outline { font-size: 12px; padding: 8px 12px; }
}