/* ===================================================================
   depth.css — Sistema de diseño dark compartido
   Usado por todas las páginas internas del portafolio
   =================================================================== */

/* ── Reset & tokens ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #06080f;
  --bg-2:     #0a1020;
  --surface:  rgba(18,24,44,.72);
  --surface-2:rgba(10,14,28,.70);
  --text:     #eaf1ff;
  --muted:    #8fa0c8;
  --accent:   #56e0ff;
  --accent-2: #9a7bff;
  --ok:       #67f0b2;
  --line:     rgba(144,170,255,.22);
  --ring:     0 0 0 1px rgba(86,224,255,.45), 0 0 22px rgba(86,224,255,.20);
  --radius:   16px;
  --ease:     cubic-bezier(.22,.9,.28,1);
}

html { scroll-behavior: smooth; }

body {
  font-family: Inter, Poppins, ui-sans-serif, system-ui, sans-serif;
  background:
    radial-gradient(1200px 700px at 20% 10%, #122148 0%, transparent 60%),
    radial-gradient(1000px 600px at 85% 90%, #201243 0%, transparent 60%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Fondo ambiental ── */
.dp-stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 66% 48%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.2px 1.2px at 42% 78%, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 88% 16%, rgba(255,255,255,.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 28% 64%, rgba(255,255,255,.5), transparent 60%);
  opacity: .28;
  animation: dp-drift 14s linear infinite alternate;
}
.dp-scanline {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.015) 0px, rgba(255,255,255,.015) 1px,
    transparent 2px, transparent 4px
  );
  mix-blend-mode: screen; opacity: .18;
}
@keyframes dp-drift {
  from { transform: translateX(-8px) translateY(-5px); }
  to   { transform: translateX(10px)  translateY(6px);  }
}

/* ── Topbar ── */
.dp-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 24px;
  background: rgba(6,8,15,.80);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  gap: 12px;
  min-height: 54px;
}

/* Breadcrumb */
.dp-crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--muted);
  flex: 1; min-width: 0; overflow: hidden;
}
.dp-crumb a {
  color: #d4e2ff; text-decoration: none; white-space: nowrap;
  padding: 3px 8px; border-radius: 8px;
  transition: background .18s ease, color .18s ease;
}
.dp-crumb a:hover { background: rgba(87,142,255,.18); color: var(--accent); }
.dp-crumb .dp-sep { opacity: .4; flex-shrink: 0; }
.dp-crumb .dp-cur {
  color: var(--accent); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

/* Nav links desktop */
.dp-nav {
  display: flex; gap: 4px; align-items: center; flex-shrink: 0;
}
.dp-nav-link {
  color: var(--muted); text-decoration: none;
  font-size: .78rem; padding: 6px 11px; border-radius: 10px;
  border: 1px solid transparent;
  transition: all .18s ease; white-space: nowrap;
}
.dp-nav-link:hover  { color: var(--text); border-color: var(--line); background: rgba(18,24,44,.5); }
.dp-nav-link.active { color: var(--accent); border-color: rgba(86,224,255,.35); background: rgba(86,224,255,.08); }

/* Botón volver */
.dp-back {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(130,170,245,.3);
  background: rgba(10,15,28,.68); color: var(--text);
  border-radius: 10px; padding: 7px 14px;
  cursor: pointer; font-size: .82rem; font-family: inherit;
  text-decoration: none; flex-shrink: 0;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.dp-back:hover  { transform: translateY(-2px); border-color: rgba(124,216,255,.68); box-shadow: var(--ring); }
.dp-back:active { transform: scale(.96); }

/* Hamburger */
.dp-hamburger {
  display: none;
  background: none; border: 1px solid var(--line);
  color: var(--text); border-radius: 8px;
  padding: 6px 10px; cursor: pointer; font-size: 1.1rem;
  flex-shrink: 0; font-family: inherit;
  transition: background .18s ease;
}
.dp-hamburger:hover { background: rgba(18,24,44,.5); }

/* ── Contenido principal ── */
.dp-main {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  padding: 82px 24px 60px;
}

/* Encabezado de página */
.dp-page-header {
  margin-bottom: 36px;
  animation: dp-up .55s var(--ease) both;
}
.dp-eyebrow {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.dp-page-title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700; line-height: 1.1; color: var(--text);
}
.dp-page-title .dp-accent { color: var(--accent); }
.dp-page-desc {
  margin-top: 12px; color: #bdd0ff;
  font-size: .97rem; line-height: 1.6; max-width: 62ch;
}

/* ── Tarjeta glass ── */
.dp-glass {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ── Tarjeta de contenido genérica ── */
.dp-card {
  padding: 24px; border-radius: 14px;
  border: 1px solid rgba(130,169,246,.22);
  background: linear-gradient(165deg, rgba(22,34,66,.65), rgba(8,13,26,.70));
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .25s ease;
  position: relative; overflow: hidden;
}
.dp-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.dp-card:hover::before { transform: scaleX(1); }
.dp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(86,224,255,.4);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}

/* ── Sección de contacto ── */
.dp-contact { padding: 28px; }
.dp-contact-title {
  font-size: 1.15rem; font-weight: 700; color: var(--text);
  text-align: center; margin-bottom: 22px;
}
.dp-contact-title .dp-accent { color: var(--accent); }
.dp-contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.dp-contact-card {
  border-radius: 12px;
  border: 1px solid rgba(130,169,246,.22);
  background: rgba(11,16,30,.5);
  padding: 20px; text-align: center;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.dp-contact-card:hover {
  border-color: rgba(86,224,255,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.dp-contact-card h3 {
  font-size: .88rem; font-weight: 600; color: var(--muted);
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: .08em;
}
.dp-contact-icons { display: flex; gap: 14px; justify-content: center; }
.dp-contact-icons a {
  display: flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 50%;
  border: 1px solid rgba(130,169,246,.3);
  background: rgba(18,24,44,.6);
  transition: transform .18s var(--ease), border-color .2s ease, box-shadow .2s ease;
}
.dp-contact-icons a:hover {
  transform: translateY(-3px) scale(1.08);
  border-color: rgba(86,224,255,.6);
  box-shadow: 0 0 16px rgba(86,224,255,.2);
}
.dp-contact-icons img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ── Footer ── */
.dp-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 22px 24px;
  color: var(--muted); font-size: .8rem;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.dp-footer a { color: var(--accent); text-decoration: none; }
.dp-footer a:hover { text-decoration: underline; }

/* ── Animaciones ── */
@keyframes dp-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dp-a0 { animation: dp-up .55s var(--ease) both; }
.dp-a1 { animation: dp-up .55s var(--ease) .08s both; }
.dp-a2 { animation: dp-up .55s var(--ease) .16s both; }
.dp-a3 { animation: dp-up .55s var(--ease) .24s both; }
.dp-a4 { animation: dp-up .55s var(--ease) .32s both; }
.dp-a5 { animation: dp-up .55s var(--ease) .40s both; }

/* Transición de entrada/salida entre páginas */
body.dp-entering { animation: dp-enter .5s var(--ease) both; }
body.dp-exiting  { animation: dp-exit  .32s var(--ease) both; pointer-events: none; }

@keyframes dp-enter {
  from { opacity: 0; transform: scale(.97) translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);    filter: blur(0);   }
}
@keyframes dp-exit {
  from { opacity: 1; transform: scale(1)    translateY(0);     filter: blur(0);   }
  to   { opacity: 0; transform: scale(1.03) translateY(-14px); filter: blur(4px); }
}

/* ── Estilos de artículo ── */
.dp-article-body { color: #c8d8f0; font-size: .97rem; line-height: 1.75; }
.dp-article-body h2 {
  font-size: 1.25rem; font-weight: 700; color: var(--accent);
  margin: 2rem 0 .8rem; padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.dp-article-body h3 {
  font-size: 1.05rem; font-weight: 600; color: var(--text);
  margin: 1.4rem 0 .6rem;
}
.dp-article-body p { margin-bottom: 1rem; }
.dp-article-body ul, .dp-article-body ol {
  padding-left: 1.4rem; margin-bottom: 1rem;
}
.dp-article-body li { margin-bottom: .5rem; }
.dp-article-body strong { color: var(--text); }
.dp-article-body .dp-tip {
  display: flex; gap: 14px; align-items: flex-start;
  background: rgba(86,224,255,.07);
  border: 1px solid rgba(86,224,255,.25);
  border-radius: 12px; padding: 16px 18px; margin: 1.5rem 0;
}
.dp-article-body .dp-tip-icon { font-size: 1.4rem; flex-shrink: 0; }
.dp-article-meta {
  font-size: .8rem; color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px; margin-top: 2rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .dp-nav { display: none; }
  .dp-nav.dp-open {
    display: flex; flex-direction: column;
    position: fixed; top: 54px; left: 0; right: 0;
    background: rgba(6,8,15,.97);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px; gap: 2px;
    backdrop-filter: blur(14px); z-index: 99;
  }
  .dp-nav-link { font-size: .9rem; padding: 10px 14px; }
  .dp-hamburger { display: block; }
}

@media (max-width: 700px) {
  .dp-topbar { padding: 9px 14px; }
  .dp-back span { display: none; }
  .dp-main { padding: 72px 14px 48px; }
  .dp-contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .dp-crumb .dp-cur { display: none; }
  .dp-main { padding: 66px 10px 40px; }
  .dp-card { padding: 16px; }
  .dp-contact { padding: 18px; }
  .dp-page-title { font-size: 1.55rem; }
}

/* ── Indicador de nivel (depth pill en topbar) ── */
.dp-level-pill {
  font-size: .7rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(116,233,185,.4);
  color: var(--ok);
  background: rgba(30,91,72,.22);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: .06em;
}
/* Nivel 2 (artículos) usa color accent-2 */
.dp-level-pill.l2 {
  border-color: rgba(154,123,255,.4);
  color: var(--accent-2);
  background: rgba(60,30,100,.22);
}
