/**
 * davito.dev - Cyber-Minimalist Theme
 * Inspirado en la estética técnica, limpia y reactiva de xs10.dev
 */

:root {
  /* Paleta Oscura (Default) */
  --c-bg: #060607;
  --c-bg-alt: #0b0b0e;
  --c-surface: #0f0f14;
  --c-surface-hover: #15151c;
  --c-line: #1c1c24;
  --c-line-hi: #2e2e3a;
  --c-text: #ededed;
  --c-dim: #9090a0;
  --c-faint: #505060;
  
  /* Acentos cibernéticos */
  --c-accent: #8a7fff;
  --c-accent-glow: rgba(138, 127, 255, 0.25);
  --c-emerald: #23a55a;
  --c-amber: #f0b232;
  --c-rose: #f23f43;
  --c-cyan: #00d2ff;
  --c-lobster: #ff5252;

  /* Discord Status Colors */
  --st: #6b6f78;

  /* Tipografías */
  --mono: "IBM Plex Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Variables 3D Dinámicas */
  --pointer-x: 50%;
  --pointer-y: 50%;
  --rotate-x: 0deg;
  --rotate-y: 0deg;
  --shift-x: 0px;
  --shift-y: 0px;

  /* Layout */
  --radius: 8px;
  --radius-sm: 4px;
  --container-max: 1040px;
}

/* Modo Claro */
html[data-theme="light"] {
  --c-bg: #f4f4f2;
  --c-bg-alt: #eaeaea;
  --c-surface: #ffffff;
  --c-surface-hover: #f9f9fa;
  --c-line: #dfdfe4;
  --c-line-hi: #bcbcc4;
  --c-text: #111113;
  --c-dim: #60606e;
  --c-faint: #90909c;
  --c-accent: #6556e8;
  --c-accent-glow: rgba(101, 86, 232, 0.15);
}

/* Reseteo básico */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--c-bg);
}

/* Canvas del grid de fondo */
#cyber-grid-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* HUD Corner Brackets (Marcos angulares cyberpunk en esquinas) */
.gs-fcorner {
  position: fixed;
  width: 14px;
  height: 14px;
  border-color: var(--c-line-hi);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
  opacity: 0.7;
}
.gs-fcorner.tl { top: 16px; left: 16px; border-width: 1px 0 0 1px; }
.gs-fcorner.tr { top: 16px; right: 16px; border-width: 1px 1px 0 0; }
.gs-fcorner.bl { bottom: 16px; left: 16px; border-width: 0 0 1px 1px; }
.gs-fcorner.br { bottom: 16px; right: 16px; border-width: 0 1px 1px 0; }

/* Contenedor central */
.app-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 72px 24px 140px;
  position: relative;
  z-index: 1;
}

/* Enlaces por defecto */
a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
 * Top Bar / Header de Estado
 * -------------------------------------------------------------------------- */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--mono);
  font-size: 12px;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--c-accent);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  color: var(--c-dim);
  font-size: 11px;
  transition: all 0.2s ease;
}

.top-chip:hover {
  border-color: var(--c-line-hi);
  color: var(--c-text);
}

.top-chip.is-active {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

/* --------------------------------------------------------------------------
 * Hero Section & Tarjeta 3D de Identidad (idx-shell)
 * -------------------------------------------------------------------------- */
.hero-section {
  margin-bottom: 84px;
}

.hero-kicker {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: lowercase;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-title {
  font-size: clamp(32px, 6vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--c-dim);
  max-width: 640px;
  line-height: 1.55;
  margin-bottom: 36px;
}

/* Envoltorio de la tarjeta 3D */
.idx-wrap {
  perspective: 1000px;
  width: 100%;
  margin-bottom: 40px;
}

.idx-shell {
  width: 100%;
  transform: translate3d(var(--shift-x, 0px), var(--shift-y, 0px), 0)
             rotateX(var(--rotate-x, 0deg))
             rotateY(var(--rotate-y, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.15s ease-out;
}

.idx {
  background: rgba(12, 12, 16, 0.75);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.8);
  transition: border-color 0.3s, box-shadow 0.3s;
}

html[data-theme="light"] .idx {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.12);
}

/* Foco radial sobre la tarjeta */
.idx::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(460px circle at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.05), transparent 65%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.idx-shell.active .idx::before {
  opacity: 1;
}

/* Borde iluminado con máscara */
.idx::after {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(320px circle at var(--pointer-x) var(--pointer-y), rgba(138, 127, 255, 0.4), transparent 70%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.idx-shell.active .idx::after {
  opacity: 1;
}

/* Estados de presencia de Discord */
.idx.s-online { --st: var(--c-emerald); }
.idx.s-idle   { --st: var(--c-amber); }
.idx.s-dnd    { --st: var(--c-rose); }
.idx.s-offline{ --st: var(--c-faint); }

.idx-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--c-dim);
}

.idx-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.idx-window-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-line-hi);
}

.idx-content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 24px;
}

@media (max-width: 768px) {
  .idx-content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px;
  }
}

/* Columna izquierda de la tarjeta: Avatar e identidad */
.idx-user-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-right: 20px;
  border-right: 1px solid var(--c-line);
}

@media (max-width: 768px) {
  .idx-user-col {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--c-line);
    padding-bottom: 20px;
  }
}

.idx-avatar-box {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
}

.idx-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--c-line-hi);
}

.idx-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--st);
  border: 3px solid var(--c-surface);
  box-shadow: 0 0 10px var(--st);
}

.idx-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.idx-handle {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--c-accent);
  margin-bottom: 8px;
}

.idx-badge-row {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.pill-badge {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--c-line);
  color: var(--c-dim);
  font-weight: 600;
}

/* Actividad en vivo (Spotify o Discord) */
.idx-activity-wrap {
  width: 100%;
  margin-top: auto;
}

.idx-act-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  text-align: left;
  font-family: var(--mono);
}

html[data-theme="light"] .idx-act-box {
  background: rgba(0, 0, 0, 0.03);
}

.idx-act-indicator {
  display: flex;
  align-items: center;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--st);
}

.live-dot.pulse {
  animation: stPulse 1.8s infinite;
}

@keyframes stPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--st); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px transparent; }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 transparent; }
}

.idx-act-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.idx-act-kicker {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-faint);
}

.idx-act-main {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idx-act-sub {
  font-size: 10px;
  color: var(--c-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idx-act-art {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Ecualizador animado para Spotify */
.idx-act-box.is-spotify .idx-act-indicator {
  display: flex;
  gap: 2px;
  align-items: flex-end;
  height: 16px;
}

.eq-bar {
  width: 3px;
  background: #1db954;
  border-radius: 1px;
  animation: eqBounce 1s ease-in-out infinite alternate;
}
.eq-bar.bar-1 { height: 14px; animation-delay: 0s; }
.eq-bar.bar-2 { height: 8px;  animation-delay: 0.3s; }
.eq-bar.bar-3 { height: 12px; animation-delay: 0.6s; }

@keyframes eqBounce {
  0% { height: 4px; }
  100% { height: 15px; }
}

/* Columna derecha: Bio y Readout del sistema */
.idx-info-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.idx-bio-text {
  font-size: 13.5px;
  color: var(--c-dim);
  line-height: 1.6;
  margin-bottom: 20px;
}

.idx-readout-table {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  background: rgba(0, 0, 0, 0.18);
  padding: 14px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

html[data-theme="light"] .idx-readout-table {
  background: rgba(0, 0, 0, 0.02);
}

.readout-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.readout-key {
  color: var(--c-faint);
  min-width: 60px;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.readout-val {
  color: var(--c-text);
  font-weight: 500;
}

.idx-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
  font-family: var(--mono);
  font-size: 11px;
}

.idx-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--c-dim);
}

.clock-sec {
  color: var(--c-accent);
}

.clock-dot {
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  border-radius: 50%;
  animation: clockBlink 1s step-start infinite;
}

@keyframes clockBlink {
  50% { opacity: 0; }
}

.idx-quick-actions {
  display: flex;
  gap: 8px;
}

.btn-cyber-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--c-dim);
  transition: all 0.2s ease;
}

.btn-cyber-ghost:hover {
  border-color: var(--c-line-hi);
  color: var(--c-text);
}

/* --------------------------------------------------------------------------
 * Sección de Proyectos & Portfolio
 * -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 32px;
}

.section-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--c-faint);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section-sub {
  color: var(--c-dim);
  font-size: 14px;
  max-width: 540px;
  margin-top: 8px;
}

/* Filtros de proyectos */
.filters-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  font-family: var(--mono);
}

.filter-btn {
  padding: 7px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  color: var(--c-dim);
  font-size: 11.5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--c-line-hi);
  color: var(--c-text);
}

.filter-btn.is-active {
  background: var(--c-text);
  color: var(--c-bg);
  border-color: var(--c-text);
  font-weight: 600;
}

/* Grid de proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
  margin-bottom: 90px;
}

.project-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.project-card:hover {
  border-color: var(--c-line-hi);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.6);
}

.card-cover-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #000;
}

.card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.4s ease;
  opacity: 0.85;
}

.project-card:hover .card-cover-img {
  transform: scale(1.04);
  opacity: 1;
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.status-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

.status-badge.badge-prod {
  background: rgba(35, 165, 90, 0.2);
  border: 1px solid rgba(35, 165, 90, 0.4);
  color: #57f287;
}

.status-badge.badge-vpn {
  background: rgba(138, 127, 255, 0.2);
  border: 1px solid rgba(138, 127, 255, 0.4);
  color: #8a7fff;
}

.status-badge.badge-arch {
  background: rgba(100, 100, 110, 0.25);
  border: 1px solid rgba(100, 100, 110, 0.4);
  color: #a0a0b0;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #57f287;
  border-radius: 50%;
  box-shadow: 0 0 6px #57f287;
}

.year-badge {
  font-family: var(--mono);
  font-size: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
}

.card-mini-avatar {
  position: absolute;
  bottom: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--c-surface);
  background: var(--c-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--c-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-lede {
  font-size: 13px;
  color: var(--c-dim);
  line-height: 1.5;
  margin-bottom: 16px;
  flex: 1;
}

.card-stack {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.stack-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  color: var(--c-dim);
}

html[data-theme="light"] .stack-tag {
  background: rgba(0, 0, 0, 0.04);
}

.card-actions {
  display: flex;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
  font-family: var(--mono);
  font-size: 11px;
}

.btn-card-details {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--c-line);
  border: 1px solid var(--c-line-hi);
  border-radius: var(--radius-sm);
  color: var(--c-text);
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-card-details:hover {
  background: var(--c-line-hi);
  border-color: var(--c-accent);
}

.btn-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  color: var(--c-dim);
  transition: all 0.2s ease;
}

.btn-card-link:hover {
  border-color: var(--c-line-hi);
  color: var(--c-text);
}

/* --------------------------------------------------------------------------
 * Sección de Homelab & Arquitectura VPS
 * -------------------------------------------------------------------------- */
.homelab-section {
  margin-bottom: 90px;
}

.vps-diagram-box {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.vps-diagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--mono);
}

.vps-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.vps-status-pill {
  font-size: 11px;
  color: var(--c-emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

.vps-layer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.vps-node-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 16px;
}

html[data-theme="light"] .vps-node-card {
  background: rgba(0, 0, 0, 0.02);
}

.node-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--c-accent);
  margin-bottom: 10px;
}

.node-items-list {
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--c-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.node-items-list li {
  display: flex;
  justify-content: space-between;
}

.node-subtag {
  color: var(--c-faint);
  font-size: 10px;
}

/* --------------------------------------------------------------------------
 * Sección Sobre Mí / Bio
 * -------------------------------------------------------------------------- */
.bio-section {
  margin-bottom: 90px;
}

.bio-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 768px) {
  .bio-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }
}

.bio-column h3 {
  font-size: 17px;
  margin-bottom: 14px;
  font-weight: 700;
}

.bio-column p {
  color: var(--c-dim);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 16px;
}

.bio-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.bio-stat-box {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--mono);
}

html[data-theme="light"] .bio-stat-box {
  background: rgba(0, 0, 0, 0.03);
}

.bio-stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-accent);
  display: block;
  line-height: 1.2;
}

.bio-stat-lbl {
  font-size: 11px;
  color: var(--c-dim);
}

/* --------------------------------------------------------------------------
 * Floating Cyber Dock (Navegación inferior flotante estilo xs10.dev)
 * -------------------------------------------------------------------------- */
.cyber-dock-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.cyber-dock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--c-line-hi);
  border-radius: 999px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

html[data-theme="light"] .cyber-dock {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--c-line);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.15);
}

.dock-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--c-dim);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dock-link:hover {
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.05);
}

.dock-link.is-active {
  color: var(--c-text);
  background: var(--c-line);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

.dock-divider {
  width: 1px;
  height: 18px;
  background: var(--c-line);
  margin: 0 4px;
}

.dock-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--c-dim);
  transition: all 0.2s ease;
}

.dock-tool-btn:hover {
  color: var(--c-text);
  background: rgba(255, 255, 255, 0.08);
}

.dock-tool-btn.is-active {
  color: var(--c-accent);
}

@media (max-width: 680px) {
  .dock-link span.dock-text {
    display: none;
  }
  .dock-link {
    padding: 7px 10px;
  }
}

/* --------------------------------------------------------------------------
 * Modal de Ficha Técnica de Proyecto
 * -------------------------------------------------------------------------- */
.project-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.project-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-modal-container {
  background: var(--c-surface);
  border: 1px solid var(--c-line-hi);
  border-radius: var(--radius);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
}

.pmodal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  background: var(--c-surface);
  z-index: 10;
}

.pmodal-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 4px;
}

.pmodal-title {
  font-size: 22px;
  font-weight: 800;
}

.pmodal-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--c-dim);
}

.pmodal-close-btn {
  font-family: var(--mono);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--c-line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.pmodal-close-btn:hover {
  background: var(--c-line-hi);
  color: var(--c-rose);
}

.pmodal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.pmodal-media-wrap {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--c-line);
}

.pmodal-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pmodal-subhead {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-faint);
  margin-bottom: 8px;
}

.pmodal-desc {
  font-size: 14px;
  color: var(--c-dim);
  line-height: 1.6;
}

.pmodal-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--c-dim);
}

.li-bullet {
  color: var(--c-accent);
  font-family: var(--mono);
}

.pmodal-stack-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-stack-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(138, 127, 255, 0.1);
  border: 1px solid rgba(138, 127, 255, 0.25);
  color: var(--c-accent);
  border-radius: var(--radius-sm);
}

.pmodal-specs-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-line);
  font-family: var(--mono);
  font-size: 11px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-k {
  color: var(--c-faint);
}

.spec-v {
  color: var(--c-text);
  font-weight: 500;
}

.pmodal-footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--c-text);
  color: var(--c-bg);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--c-line);
  color: var(--c-text);
  border: 1px solid var(--c-line-hi);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--c-accent);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  color: var(--c-dim);
  border: 1px dashed var(--c-line-hi);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  transition: all 0.2s;
}

.btn-ghost:hover {
  color: var(--c-text);
  border-color: var(--c-accent);
}

/* --------------------------------------------------------------------------
 * Modal de Terminal Retro (term.exe)
 * -------------------------------------------------------------------------- */
.terminal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.terminal-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.terminal-window {
  width: 100%;
  max-width: 720px;
  height: 480px;
  background: #09090c;
  border: 1px solid var(--c-line-hi);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
}

.term-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #101015;
  padding: 8px 14px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-dim);
}

.term-controls {
  display: flex;
  gap: 6px;
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.term-dot.red { background: #ff5f56; }
.term-dot.yellow { background: #ffbd2e; }
.term-dot.green { background: #27c93f; }

.term-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.term-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.term-line {
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-welcome {
  color: var(--c-dim);
}

.term-prompt {
  color: var(--c-accent);
  font-weight: 600;
}

.term-user-text {
  color: var(--c-text);
}

.cmd-hi {
  color: var(--c-text);
  font-weight: 600;
}

.cmd-accent {
  color: var(--c-accent);
}

.cmd-err {
  color: var(--c-rose);
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #0c0c10;
  border-top: 1px solid var(--c-line);
}

.terminal-cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  outline: none;
}

/* --------------------------------------------------------------------------
 * Footer y Aviso de Redirección a davito.es
 * -------------------------------------------------------------------------- */
.footer-section {
  padding-top: 48px;
  border-top: 1px solid var(--c-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--c-dim);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-hub-link {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-hub-link:hover {
  color: var(--c-text);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.copied-badge {
  color: var(--c-emerald);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
 * Estilos mejorados de Presencia Lanyard (Spotify + Juegos Simultáneos)
 * -------------------------------------------------------------------------- */
.idx-activity-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idx-act-box.is-game {
  border-left: 3px solid #23a55a;
  background: rgba(35, 165, 90, 0.08);
}

.game-controller-icon {
  color: #23a55a;
}

.game-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.game-elapsed {
  font-size: 9px;
  color: var(--c-faint);
  font-family: var(--mono);
}

.idx-act-state {
  font-size: 10px;
  color: var(--c-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.idx-act-art.game-art {
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.status-custom-emoji {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  display: inline-block;
}

/* Barra de progreso de Spotify */
.sp-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}

.sp-progress-fill {
  height: 100%;
  background: #1db954;
  border-radius: 99px;
  transition: width 0.8s linear;
}

/* --------------------------------------------------------------------------
 * Capa de Fondo Mejorada: Scanlines CRT y Resplandor Ambiental
 * -------------------------------------------------------------------------- */
.cyber-ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 15%, rgba(138, 127, 255, 0.07) 0%, transparent 60%),
              radial-gradient(circle at 85% 70%, rgba(35, 165, 90, 0.04) 0%, transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(0, 210, 255, 0.04) 0%, transparent 50%);
  opacity: 0.9;
}

html[data-theme="light"] .cyber-ambient-glow {
  background: radial-gradient(circle at 50% 15%, rgba(101, 86, 232, 0.06) 0%, transparent 60%);
}

.crt-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(rgba(18, 16, 26, 0) 50%, rgba(0, 0, 0, 0.22) 50%);
  background-size: 100% 4px;
  opacity: 0.6;
}

html[data-theme="light"] .crt-scanlines {
  opacity: 0.15;
}
