/* ===================================================
   PROJECT DETAIL PAGES — shared styles
=================================================== */
:root {
  --bg:          #0A0A0F;
  --bg-card:     #111118;
  --bg-nav:      rgba(10, 10, 15, 0.92);
  --teal:        #1D9E75;
  --teal-light:  #23B888;
  --teal-dim:    rgba(29, 158, 117, 0.12);
  --text:        #E6E6F0;
  --text-muted:  #7A7A9A;
  --border:      rgba(255, 255, 255, 0.07);
  --font:        'Inter', sans-serif;
  --mono:        'JetBrains Mono', monospace;
  --nav-h:       64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--teal); border-radius: 2px; }

/* ===== NAV ===== */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--nav-h);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px) saturate(1.4);
}

.nav-logo {
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
}
.nav-logo .logo-k { color: #fff;        transition: color 0.25s ease; }
.nav-logo .logo-n { color: var(--teal); transition: color 0.25s ease; }
.nav-logo:hover .logo-k { color: var(--teal); }
.nav-logo:hover .logo-n { color: #fff; }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-back:hover {
  color: var(--teal);
  background: var(--teal-dim);
}
.nav-back svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

.nav-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-sw {
  display: flex;
  align-items: center;
  background: var(--teal-dim);
  border: 1px solid rgba(29, 158, 117, 0.25);
  border-radius: 20px;
  padding: 3px;
  cursor: pointer;
  gap: 1px;
}
.lang-sw button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 14px;
  transition: all 0.2s;
  line-height: 1;
}
.lang-sw button.active {
  background: var(--teal);
  color: #fff;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.nav-icon:hover {
  color: var(--teal);
  border-color: rgba(29,158,117,0.4);
  background: var(--teal-dim);
}
.nav-icon svg { width: 16px; height: 16px; fill: currentColor; }

/* ===== PROJECT HERO ===== */
.proj-hero {
  position: relative;
  padding: calc(var(--nav-h) + 3.5rem) 2rem 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.proj-hero::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 360px;
  background: radial-gradient(ellipse, rgba(29,158,117,0.08) 0%, transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.proj-cat {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--teal);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.proj-h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 0.85rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.proj-lede {
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  color: #C9CCD8;
  line-height: 1.75;
  max-width: 700px;
  margin: 0 auto 1.25rem;
}
.proj-tagline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}
.proj-tagline .badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid;
}
.bg-python { background: rgba(55,118,171,0.15);  color: #7BB8E8; border-color: rgba(55,118,171,0.35); }
.bg-r      { background: rgba(39,109,195,0.15);  color: #85ACE0; border-color: rgba(39,109,195,0.35); }
.bg-ml     { background: rgba(139,92,246,0.15);  color: #C4B5FD; border-color: rgba(139,92,246,0.35); }
.bg-nlp    { background: rgba(245,158,11,0.15);  color: #FCD34D; border-color: rgba(245,158,11,0.35); }
.bg-econ   { background: rgba(16,185,129,0.15);  color: #6EE7B7; border-color: rgba(16,185,129,0.35); }
.bg-tool   { background: rgba(99,102,241,0.15);  color: #A5B4FC; border-color: rgba(99,102,241,0.35); }
.bg-gray   { background: rgba(100,116,139,0.15); color: #94A3B8; border-color: rgba(100,116,139,0.35); }

.proj-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 4px 14px rgba(29,158,117,0.25);
}
.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29,158,117,0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: rgba(29,158,117,0.5);
  color: var(--teal-light);
  transform: translateY(-2px);
  background: var(--teal-dim);
}
.btn svg { flex-shrink: 0; width: 15px; height: 15px; }

/* ===== HERO IMAGE ===== */
.proj-cover {
  max-width: 1100px;
  margin: 0 auto 4rem;
  padding: 0 2rem;
}
.proj-cover img {
  width: 100%;
  height: clamp(220px, 38vw, 420px);
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ===== CONTENT SECTIONS ===== */
.proj-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.proj-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.375rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.proj-section h2::before {
  content: '';
  width: 3px;
  height: 1.4em;
  background: var(--teal);
  border-radius: 2px;
  flex-shrink: 0;
}
.proj-section p {
  font-size: 0.9375rem;
  color: #D4D4D8;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.proj-section p:last-child { margin-bottom: 0; }

/* ===== PIPELINE STEPS ===== */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.pipeline-step {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.pipeline-step:hover {
  border-color: rgba(29,158,117,0.4);
  transform: translateX(3px);
}
.pipeline-step + .pipeline-step::before {
  content: '↓';
  position: absolute;
  top: -1.2rem;
  left: 1.25rem;
  color: var(--teal);
  font-size: 0.95rem;
  opacity: 0.6;
}
.pipeline-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--teal-dim);
  border: 1px solid rgba(29,158,117,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--teal);
}
.pipeline-content h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.pipeline-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ===== RESULTS GRID ===== */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}
.result-card:hover {
  border-color: rgba(29,158,117,0.4);
  transform: translateY(-2px);
}
.result-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}
.result-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== BULLET LISTS ===== */
.proj-list {
  list-style: none;
  padding: 0;
  margin-top: 0.85rem;
}
.proj-list li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #D4D4D8;
}
.proj-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--teal);
  font-size: 0.875rem;
}
.proj-list li:last-child { margin-bottom: 0; }

/* ===== EMBED PLACEHOLDER ===== */
.embed-wrapper {
  margin-top: 0.85rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.embed-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  height: 300px;
  background: var(--bg-card);
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}
.embed-placeholder svg {
  width: 40px;
  height: 40px;
  opacity: 0.35;
}
.embed-placeholder p {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
  margin: 0;
}
.embed-fallback {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.embed-fallback a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.embed-fallback a:hover { color: var(--teal-light); }

/* ===== FOOTER ===== */
hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
footer {
  background: #08080C;
  border-top: 1px solid var(--border);
  padding: 22px 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #9CA3AF;
}
footer p { margin: 0; }
footer .accent { color: var(--teal); }

/* ===== BACK-TO-TOP ===== */
.back-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  box-shadow: 0 6px 18px rgba(29,158,117,0.35);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
}
.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-top:hover {
  background: var(--teal-light);
  transform: translateY(-3px);
}
.back-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
}

/* ===== FADE-UP ===== */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== COMING SOON (placeholders) ===== */
.coming-soon {
  min-height: calc(100vh - var(--nav-h) - 70px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  gap: 1rem;
}
.coming-soon-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--teal);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.coming-soon h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  max-width: 560px;
}
.coming-soon p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ===== RESPONSIVE — Tablet (760px) ===== */
@media (max-width: 760px) {
  nav { padding: 0 1.25rem; }
  .nav-back span { display: none; }
  .proj-hero {
    padding-top: calc(var(--nav-h) + 2rem);
    padding-bottom: 2rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
  .proj-h1 { font-size: clamp(1.25rem, 5.5vw, 1.75rem); }
  .proj-lede { font-size: 0.875rem; }
  .proj-section { padding: 2rem 1.25rem; }
  .proj-section h2 { font-size: 1.125rem; }
  .proj-section p { font-size: 0.9rem; }
  .proj-list li { font-size: 0.9rem; }
  .pipeline-content h3 { font-size: 0.875rem; }
  .pipeline-content p { font-size: 0.8125rem; }
  .proj-cover { padding: 0 1.25rem; margin-bottom: 2.5rem; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .result-num { font-size: 1.625rem; }
  .result-label { font-size: 0.75rem; }
}

/* ===== RESPONSIVE — Mobile (480px) ===== */
@media (max-width: 480px) {
  .proj-hero { padding-left: 1rem; padding-right: 1rem; }
  .proj-h1 { font-size: clamp(1.125rem, 6.5vw, 1.5rem); }
  .proj-lede { font-size: 0.8125rem; }
  .proj-section { padding: 1.75rem 1rem; }
  .proj-section h2 { font-size: 1rem; }
  .proj-section p { font-size: 0.875rem; }
  .proj-list li { font-size: 0.875rem; }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .result-num { font-size: 1.5rem; }
  .pipeline-step { padding: 0.85rem 1rem; gap: 0.75rem; }
  .btn { font-size: 0.8125rem; padding: 0.55rem 1rem; }
}
