/* =========================================================
   Edwin Santos · Project detail dark template
   Matches the main portfolio at ../Portfolio/styles.css
   ========================================================= */

:root {
  --bg-0: #0a0a0f;
  --bg-1: #0f0f17;
  --bg-2: #14141d;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #e9e9f0;
  --text-muted: #9499a8;
  --text-dim: #6a6f7e;
  --accent: #6366f1;
  --accent-2: #0ea5e9;
  --accent-3: #a855f7;
  --gold: #fbbf24;
  --success: #10b981;
  --warning: #f59e0b;
  --grad: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.15) 0%, rgba(168,85,247,.10) 100%);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --container: 1080px;
  --shadow-1: 0 4px 24px rgba(0,0,0,.25);
  --shadow-2: 0 16px 60px rgba(0,0,0,.35);
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; }
::selection { background: var(--accent); color: white; }

/* Background mesh */
.bg-mesh {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
}
.bg-mesh .mesh {
  position: absolute; border-radius: 50%; filter: blur(120px); opacity: .3;
}
.bg-mesh .mesh-1 { width: 500px; height: 500px; background: #6366f1; top: -180px; left: -120px; }
.bg-mesh .mesh-2 { width: 460px; height: 460px; background: #a855f7; top: 40%; right: -160px; opacity: .22; }
.bg-mesh .mesh-3 { width: 540px; height: 540px; background: #0ea5e9; bottom: -200px; left: 30%; opacity: .15; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Navigation
   ========================================================= */
.nav-wrapper {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: var(--container); margin: 0 auto;
}
.logo {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-weight: 700; font-size: 18px; letter-spacing: 1px;
}
.logo-mark {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(99,102,241,.35);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(.85); }
}
.back-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
  transition: all .2s var(--ease);
}
.back-link:hover {
  border-color: var(--accent); color: var(--text);
  transform: translateX(-2px);
}

/* =========================================================
   Project hero
   ========================================================= */
.project-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}
.crumbs {
  display: flex; gap: 8px; align-items: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  margin-bottom: 24px; flex-wrap: wrap;
}
.crumbs a { color: var(--accent); }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { opacity: .4; }

.project-tag-row {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px;
}
.tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  padding: 5px 12px; border-radius: 4px; letter-spacing: 1px; text-transform: uppercase;
}
.tag-accent { background: rgba(99,102,241,.12); color: var(--accent); }
.tag-purple { background: rgba(168,85,247,.12); color: var(--accent-3); }
.tag-green  { background: rgba(16,185,129,.12); color: var(--success); }
.tag-orange { background: rgba(245,158,11,.12); color: var(--warning); }
.tag-gold   { background: rgba(251,191,36,.14); color: var(--gold); }

.project-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800; letter-spacing: -1.5px; line-height: 1.05;
  margin: 0 0 18px;
}
.project-title .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.project-lede {
  font-size: 1.15rem; color: var(--text-muted); max-width: 720px; margin: 0 0 28px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px; margin-top: 32px;
}
.meta-item {
  padding: 16px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.meta-key {
  display: block; font-size: 11px; text-transform: uppercase;
  color: var(--text-dim); letter-spacing: 1.2px; margin-bottom: 4px;
}
.meta-val {
  font-weight: 600; font-size: 14.5px; color: var(--text);
}
.meta-val a { color: var(--accent); }
.meta-val a:hover { color: var(--text); }

.stack-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px;
}
.stack-row li {
  font-family: var(--font-mono); font-size: 12px; list-style: none;
  padding: 5px 10px; background: rgba(255,255,255,.04);
  border: 1px solid var(--border); border-radius: 5px; color: var(--text-muted);
}

/* Hero image */
.hero-image {
  margin-top: 40px; border-radius: var(--r-lg);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
}
.hero-image img { width: 100%; height: auto; display: block; }

/* =========================================================
   Content sections
   ========================================================= */
.content {
  padding: 60px 0 80px;
}
.section-block {
  margin-bottom: 60px;
}
.section-num {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--accent); letter-spacing: 2px; margin-bottom: 12px;
}
.section-block h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700;
  letter-spacing: -.5px; margin: 0 0 20px;
}
.section-block h3 {
  font-size: 1.2rem; font-weight: 600; margin: 28px 0 12px;
  color: var(--text);
}
.section-block p {
  color: var(--text-muted); margin: 0 0 16px; max-width: 800px;
}
.section-block strong { color: var(--text); font-weight: 600; }
.section-block em { color: var(--accent-2); font-style: normal; }

.section-block ul, .section-block ol {
  margin: 0 0 22px; padding-left: 0;
}
.section-block ul li, .section-block ol li {
  position: relative; padding: 4px 0 4px 28px;
  color: var(--text-muted); list-style: none;
  margin-bottom: 4px;
}
.section-block ul li::before {
  content: ''; position: absolute; left: 8px; top: 17px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.section-block ol { counter-reset: ol-counter; }
.section-block ol li {
  counter-increment: ol-counter;
}
.section-block ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute; left: 0; top: 4px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  color: var(--accent);
}

/* Highlight callouts */
.callout {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 22px; margin: 20px 0;
  background: var(--grad-soft);
  border: 1px solid rgba(99,102,241,.2); border-radius: var(--r-md);
}
.callout-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(99,102,241,.18); color: var(--accent);
  display: grid; place-items: center; flex-shrink: 0;
}
.callout p { margin: 0; color: var(--text); font-style: italic; }

/* Highlight for award */
.callout-gold {
  background: linear-gradient(135deg, rgba(251,191,36,.10) 0%, rgba(245,158,11,.04) 100%);
  border-color: rgba(251,191,36,.28);
}
.callout-gold .callout-icon { background: rgba(251,191,36,.16); color: var(--gold); }

/* Image gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin: 28px 0;
}
.gallery figure {
  margin: 0; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-2);
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.gallery figure:hover {
  transform: translateY(-3px); border-color: var(--border-strong);
}
.gallery img { width: 100%; height: auto; display: block; }
.gallery figcaption {
  padding: 12px 16px; font-size: 12.5px; color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* Big single image */
.single-img {
  margin: 28px 0; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--border);
}
.single-img img { width: 100%; }

/* Phase cards */
.phase-grid {
  display: grid; gap: 14px; margin: 24px 0;
}
.phase-card {
  padding: 20px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
}
.phase-card:hover { border-color: var(--border-strong); }
.phase-num {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--grad-soft); color: var(--accent);
  display: grid; place-items: center; font-family: var(--font-mono);
  font-size: 13px; font-weight: 700;
}
.phase-card h4 { margin: 0 0 6px; font-size: 15.5px; color: var(--text); }
.phase-card p { margin: 0; font-size: 14px; color: var(--text-muted); }

/* Workflow steps (numbered with arrows) */
.workflow {
  display: grid; gap: 12px; margin: 28px 0;
  counter-reset: wf;
}
.workflow li {
  position: relative; counter-increment: wf;
  padding: 16px 18px 16px 56px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14.5px; color: var(--text-muted);
  list-style: none;
}
.workflow li::before {
  content: counter(wf, decimal-leading-zero);
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--grad); color: white;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
}
.workflow li strong { color: var(--text); }

/* CTA back */
.cta-back {
  margin-top: 60px; padding: 28px;
  background: var(--surface); border: 1px dashed var(--border-strong);
  border-radius: var(--r-md); text-align: center;
}
.cta-back p { margin: 0 0 16px; color: var(--text); font-weight: 500; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
  cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: var(--grad); color: white;
  box-shadow: 0 0 0 1px rgba(99,102,241,.25), 0 12px 40px rgba(99,102,241,.15);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(99,102,241,.4), 0 18px 50px rgba(99,102,241,.3);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0; background: rgba(10,10,15,.5);
  font-size: 13px; color: var(--text-dim);
}
.site-footer .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .logo-dot { animation: none; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 10px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }
