/* =============================================================================
   CASE STUDY — Shared Styles (mirrors portfolio design system)
   ============================================================================= */
:root {
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-display: 'Space Grotesk', sans-serif;
  --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --bg: #0a0a0f;
  --surface: #111118;
  --border: rgba(255,255,255,0.06);
  --text: #f0f0f0;
  --text-secondary: #888;
  --text-muted: #555;
  --accent: #00FF41;
  --accent-cyan: #00E5FF;
  --accent-purple: #8B5CF6;
  --accent-gold: #FFD700;
  --accent-pink: #ff6b9d;
  --accent-orange: #ff8800;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #000; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

/* Navigation bar */
.case-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.case-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.case-nav a:hover { color: var(--accent); }
.case-nav .nav-title {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* Article layout */
.case-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

/* Header */
.case-header {
  margin-bottom: 48px;
  text-align: center;
}
.case-category {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  margin-bottom: 16px;
  background: rgba(0,255,65,0.08);
  color: var(--accent);
  border: 1px solid rgba(0,255,65,0.15);
}
.case-header h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.case-tagline {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
.case-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.case-meta span { display: flex; align-items: center; gap: 6px; }

/* Sections */
.case-section {
  margin-bottom: 48px;
}
.case-section h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}
.case-section h2 .section-number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 400;
}
.case-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  margin-top: 24px;
  color: var(--text-secondary);
}
.case-section p {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}
.case-section p strong { color: var(--text); }
.case-section ul, .case-section ol {
  margin: 12px 0 20px 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}
.case-section li { margin-bottom: 8px; }
.case-section li strong { color: var(--text); }

/* Architecture diagram (ASCII art block) */
.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--accent);
  white-space: pre;
}

/* Tech stack table */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.tech-table th {
  text-align: left;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.tech-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
.tech-table td:first-child {
  color: var(--text);
  font-weight: 500;
}
.tech-table tr:hover td {
  background: rgba(0,255,65,0.02);
}

/* Key insights boxes */
.insight-box {
  background: rgba(0,255,65,0.04);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 20px 24px;
  margin: 20px 0;
}
.insight-box .insight-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 700;
}
.insight-box p { margin-bottom: 0; font-size: 14px; }

.insight-box-cyan { border-left-color: var(--accent-cyan); background: rgba(0,229,255,0.04); }
.insight-box-cyan .insight-label { color: var(--accent-cyan); }
.insight-box-purple { border-left-color: var(--accent-purple); background: rgba(139,92,246,0.04); }
.insight-box-purple .insight-label { color: var(--accent-purple); }
.insight-box-gold { border-left-color: var(--accent-gold); background: rgba(255,215,0,0.04); }
.insight-box-gold .insight-label { color: var(--accent-gold); }

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  display: block;
}
.stat-card .stat-value.cyan { color: var(--accent-cyan); }
.stat-card .stat-value.purple { color: var(--accent-purple); }
.stat-card .stat-value.gold { color: var(--accent-gold); }
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* Image placeholder */
.img-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 14px;
  font-family: var(--font-mono);
}
.img-placeholder .img-icon { font-size: 36px; margin-bottom: 12px; display: block; }

/* Footer */
.case-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.case-footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.case-footer .footer-links a {
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.case-footer .footer-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0,255,65,0.08);
  transform: translateY(-2px);
}
.case-footer .footer-links a.primary-btn {
  background: rgba(0,255,65,0.1);
  border-color: rgba(0,255,65,0.3);
  color: var(--accent);
}
.case-footer .footer-links a.primary-btn:hover {
  background: rgba(0,255,65,0.2);
  box-shadow: 0 0 20px rgba(0,255,65,0.1);
}
.case-footer .back-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}
.case-footer .back-link:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 600px) {
  .case-article { padding: 80px 16px 60px; }
  .case-meta { flex-direction: column; align-items: center; gap: 8px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-table { font-size: 12px; }
  .tech-table th, .tech-table td { padding: 8px 10px; }
}
