:root {
  --bg: #050810;
  --bg2: #0a0f1c;
  --bg3: #0f1626;
  --line: rgba(255,255,255,0.09);
  --line-soft: rgba(255,255,255,0.05);
  --text: #f2f4f8;
  --muted: #8b93a7;
  --muted2: #5b6478;
  --accent: #00ffb2;
  --accent-dim: rgba(0,255,178,0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 500; opacity: 0.5;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

/* ---------- Nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1.1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(5,8,16,0.72); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-logo { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; text-decoration: none; }
.nav-logo span { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.nav-link, .nav-contact {
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px;
  transition: color .2s, border-color .2s;
}
.nav-link { border-color: transparent; }
.nav-link:hover, .nav-contact:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ---------- Botones ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; text-decoration: none; font-size: 14px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.btn-primary { background: var(--accent); color: #04120c; font-weight: 600; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -6px rgba(0,255,178,0.4); }
.btn-secondary { color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.03); }

/* ---------- Chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--muted);
  padding: 4px 11px; border-radius: 99px;
  background: rgba(5,8,16,0.65); border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c, var(--accent)); }
.tool {
  font-size: 11.5px; padding: 3px 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 6px; color: var(--muted); white-space: nowrap;
}

/* ---------- Etiquetas ---------- */
.tag { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; backdrop-filter: blur(10px); }
.tag-propio { color: #04120c; background: var(--accent); }
.tag-arch { color: var(--muted); background: rgba(5,8,16,0.75); border: 1px solid var(--line); }
.tag-dev { color: #fbbf24; background: rgba(5,8,16,0.75); border: 1px solid rgba(251,191,36,0.4); }
.tag-int { color: #a78bfa; background: rgba(5,8,16,0.75); border: 1px solid rgba(167,139,250,0.4); }

/* ---------- Placeholder sin imagen ---------- */
.ph {
  position: absolute; inset: 0; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--c) 34%, transparent), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--c) 16%, transparent), transparent 65%),
    linear-gradient(160deg, #0d1424, #070b14);
}
.ph::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 75%);
}
.ph-word {
  position: absolute; left: 1.4rem; bottom: 1.1rem; right: 1.4rem;
  font-family: 'Sora', sans-serif; font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 0.95;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--c) 55%, transparent);
  z-index: 1; word-break: break-word;
}

/* ---------- Lightbox ---------- */
.lb {
  position: fixed; inset: 0; z-index: 1000; display: none;
  background: rgba(3,5,10,0.94); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; flex-direction: column; gap: 1rem;
  padding: 4rem 4.5rem 2rem;
}
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: calc(100vh - 9rem); border-radius: 10px; box-shadow: 0 30px 80px -20px #000; }
.lb-cap { color: var(--muted); font-size: 14px; text-align: center; max-width: 700px; min-height: 1.2em; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  color: var(--text); width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  font-size: 20px; display: grid; place-items: center; transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,0.12); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

footer { border-top: 1px solid var(--line); padding: 2rem; text-align: center; color: var(--muted2); font-size: 13px; }
footer span { color: var(--accent); }

@media (max-width: 768px) {
  nav { padding: 0.9rem 1.1rem; }
  .nav-contact { display: none; }
  .lb { padding: 4rem 0.75rem 1.5rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
