/* ==========================================================================
   Case Study Pages - Styles
   ========================================================================== */

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Page Setup */
.case-study-page {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Navigation */
.case-study-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.back-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

.nav-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Hero Section */
.case-study-hero {
  padding: 10rem 3rem 4rem;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.case-study-hero .hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.case-study-hero .company {
  color: var(--accent);
  font-weight: 500;
}

.case-study-hero .separator {
  color: var(--text-muted);
}

.case-study-hero .duration,
.case-study-hero .role {
  color: var(--text-secondary);
}

.case-study-hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-summary {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: 3rem;
}

.hero-metrics {
  display: flex;
  gap: 3rem;
}

.case-study-hero .metric {
  text-align: left;
}

.case-study-hero .metric-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.case-study-hero .metric-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero Image */
.hero-image {
  padding: 0 3rem 4rem;
  margin: 0;
}

.hero-image img {
  display: block;
  max-width: 1100px;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.hero-image figcaption,
.hero-caption {
  max-width: 1100px;
  margin: 1rem auto 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.hero-image .image-placeholder {
  max-width: 1100px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.image-placeholder span {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.image-placeholder p {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Content Sections */
.content-section {
  padding: 5rem 3rem;
}

.content-section.alt-bg {
  background: var(--bg-secondary);
}

.section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 4rem;
}

.section-label-wrapper {
  padding-top: 0.5rem;
}

.content-section .section-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  position: sticky;
  top: 6rem;
}

.section-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.section-content > p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

/* Challenge Grid */
.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

.challenge-block h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.challenge-block p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.challenge-block ul {
  list-style: none;
  padding: 0;
}

.challenge-block li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.challenge-block li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Role Responsibilities */
.role-responsibilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.responsibility {
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.responsibility h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.responsibility p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* HR  */
.hr {
  height: 1px;
  margin: 3rem 0;
  border: none;
  border-bottom: 1px solid var(--border);
}

/* Process Phases */
.process-phase {
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.process-phase.no-border {
  margin-bottom: 1rem;
  padding-bottom: 0;
  border-bottom: none;
}

.process-phase:last-of-type {
  border-bottom: none;
}

.process-phase:last-of-type.nopadding {
  padding-bottom: 0;
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.phase-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.phase-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.phase-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 650px;
}

.phase-image {
  margin: 2rem 0;
}

.phase-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.phase-image figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.phase-image .image-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.phase-outcomes {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--accent);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
}

.phase-outcomes h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.phase-outcomes p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Decision Points */
.decision-point {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.08) 0%, rgba(74, 158, 255, 0.02) 100%);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
  margin: 2.5rem 0;
}

.decision-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.decision-icon {
  font-size: 1.25rem;
}

.decision-header h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.decision-content h5 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.decision-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.decision-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-tertiary);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  color: var(--accent);
}

.decision-outcome {
  display: flex;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.outcome-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

.outcome-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Outcomes Section */
.outcomes-section {
  background: var(--bg-primary);
}

.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2.5rem;
}

.outcome-category h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.outcome-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.outcome-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.outcome-card .outcome-value {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.outcome-card .outcome-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.outcome-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Reflections */
.reflections-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.reflection {
  padding: 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.reflection h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.reflection p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Case Study Navigation */
/* Case Study Navigation */
.case-study-navigation {
  position: static;
  padding: 4rem 3rem;
  border-top: 1px solid var(--border);
  display: block;
  width: 100%;
  background: transparent;
  backdrop-filter: none;
}

.case-study-navigation .section-container {
  max-width: 1100px;
  margin: 0 auto;
}

.nav-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}

.next-case-study {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 1.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.next-case-study:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.next-case-study .nav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.next-case-study .nav-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Links within phase content and outcomes */
.phase-content a,
.phase-outcomes a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.phase-content a:hover,
.phase-outcomes a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* External link icon styling (if not already present) */
.phase-content .external-link-icon,
.phase-outcomes .external-link-icon {
  display: inline-block;
  margin-left: 0.25rem;
  font-size: 0.85em;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.phase-content a:hover .external-link-icon,
.phase-outcomes a:hover .external-link-icon {
  opacity: 1;
}

/* Recruiter mode overrides */
body.recruiter-mode .phase-content a,
body.recruiter-mode .phase-outcomes a {
  color: var(--accent);
}

body.recruiter-mode .phase-content a:hover,
body.recruiter-mode .phase-outcomes a:hover {
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .content-section .section-label {
    position: static;
  }
  
  .challenge-grid,
  .role-responsibilities,
  .outcomes-grid {
    grid-template-columns: 1fr;
  }
  
  .reflections-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-metrics {
    flex-wrap: wrap;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .case-study-nav {
    padding: 1rem 1.5rem;
  }
  
  .case-study-hero {
    padding: 8rem 1.5rem 3rem;
  }
  
  .hero-image {
    padding: 0 1.5rem 3rem;
  }
  
  .content-section {
    padding: 3rem 1.5rem;
  }
  
  .case-study-hero h1 {
    font-size: 2rem;
  }
  
  .hero-summary {
    font-size: 1.1rem;
  }
  
  .decision-point {
    padding: 1.5rem;
  }
}

/* ==========================================================================
   RECRUITER MODE - LIGHT THEME FOR CASE STUDIES
   ========================================================================== */

/* Light theme colour overrides for case study pages */
body.recruiter-mode,
html.recruiter-mode body {
  --bg-primary: #fafafa;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #eeeeee;
  --bg-card: #ffffff;
  --bg-card-solid: #ffffff;
  
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  
  --accent: #4a9eff;
  --accent-secondary: #3d8be6;
  --accent-dim: rgba(74, 158, 255, 0.1);
  --accent-glow: rgba(74, 158, 255, 0.2);
  
  --border: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.05);
  
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Navigation */
body.recruiter-mode .case-study-nav {
  background: rgba(250, 250, 250, 0.95);
  border-bottom-color: var(--border);
}

body.recruiter-mode .back-link {
  color: var(--text-secondary);
}

body.recruiter-mode .back-link:hover {
  color: var(--accent);
}

body.recruiter-mode .nav-title {
  color: var(--text-muted);
}

/* Hero */
body.recruiter-mode .case-study-hero {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

body.recruiter-mode .case-study-hero .company {
  color: var(--accent);
}

body.recruiter-mode .case-study-hero .separator {
  color: var(--text-muted);
}

body.recruiter-mode .case-study-hero .duration,
body.recruiter-mode .case-study-hero .role {
  color: var(--text-secondary);
}

body.recruiter-mode .case-study-hero h1 {
  color: var(--text-primary);
}

body.recruiter-mode .hero-summary {
  color: var(--text-secondary);
}

body.recruiter-mode .case-study-hero .metric-value {
  color: var(--accent);
}

body.recruiter-mode .case-study-hero .metric-label {
  color: var(--text-muted);
}

/* Hero Image */
body.recruiter-mode .hero-image .image-placeholder {
  background: var(--bg-tertiary);
  border-color: var(--border);
}

/* Content Sections */
body.recruiter-mode .content-section {
  background: var(--bg-primary);
}

body.recruiter-mode .content-section.alt-bg {
  background: var(--bg-secondary);
}

body.recruiter-mode .content-section .section-label {
  color: var(--accent);
}

body.recruiter-mode .section-content h2 {
  color: var(--text-primary);
}

body.recruiter-mode .section-content > p {
  color: var(--text-secondary);
}

/* Challenge Grid */
body.recruiter-mode .challenge-block h3 {
  color: var(--text-primary);
}

body.recruiter-mode .challenge-block p {
  color: var(--text-secondary);
}

body.recruiter-mode .challenge-block li {
  color: var(--text-muted);
}

body.recruiter-mode .challenge-block li::before {
  color: var(--accent);
}

/* Responsibilities */
body.recruiter-mode .responsibility {
  background: var(--bg-card);
  border-color: var(--border);
}

body.recruiter-mode .responsibility h4 {
  color: var(--text-primary);
}

body.recruiter-mode .responsibility p {
  color: var(--text-muted);
}

/* Process Phases */
body.recruiter-mode .process-phase {
  border-bottom-color: var(--border);
}

body.recruiter-mode .phase-number {
  color: var(--accent);
  background: var(--accent-dim);
}

body.recruiter-mode .phase-header h3 {
  color: var(--text-primary);
}

body.recruiter-mode .phase-content p {
  color: var(--text-secondary);
}

body.recruiter-mode .phase-image .image-placeholder {
  background: var(--bg-tertiary);
  border-color: var(--border);
}

body.recruiter-mode .phase-outcomes {
  background: var(--bg-card);
  border-left-color: var(--accent);
}

body.recruiter-mode .phase-outcomes h4 {
  color: var(--accent);
}

body.recruiter-mode .phase-outcomes p {
  color: var(--text-secondary);
}

/* Decision Points */
body.recruiter-mode .decision-point {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.08) 0%, rgba(74, 158, 255, 0.02) 100%);
  border-color: rgba(74, 158, 255, 0.2);
}

body.recruiter-mode .decision-header h4 {
  color: var(--accent);
}

body.recruiter-mode .decision-content h5 {
  color: var(--text-primary);
}

body.recruiter-mode .decision-content p {
  color: var(--text-secondary);
}

body.recruiter-mode .decision-content code {
  background: var(--bg-tertiary);
  color: var(--accent);
}

body.recruiter-mode .decision-outcome {
  border-top-color: var(--border);
}

/* Outcomes */
body.recruiter-mode .outcome-category h3 {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

body.recruiter-mode .outcome-card {
  background: var(--bg-card);
  border-color: var(--border);
}

body.recruiter-mode .outcome-card .outcome-value {
  color: var(--accent);
}

body.recruiter-mode .outcome-card .outcome-label {
  color: var(--text-primary);
}

body.recruiter-mode .outcome-card p {
  color: var(--text-muted);
}

/* Reflections */
body.recruiter-mode .reflection {
  background: var(--bg-card);
  border-color: var(--border);
}

body.recruiter-mode .reflection h4 {
  color: var(--text-primary);
}

body.recruiter-mode .reflection p {
  color: var(--text-muted);
}

/* Case Study Navigation */
body.recruiter-mode .case-study-navigation {
  border-top-color: var(--border);
}

body.recruiter-mode .next-case-study {
  background: var(--bg-card);
  border-color: var(--border);
}

body.recruiter-mode .next-case-study:hover {
  border-color: var(--accent);
}

body.recruiter-mode .next-case-study .nav-label {
  color: var(--text-muted);
}

body.recruiter-mode .next-case-study .nav-title {
  color: var(--text-primary);
}

/* Footer */
body.recruiter-mode .footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

body.recruiter-mode .footer-content {
  color: var(--text-muted);
}
