/* =====================================================================
   Portafolio · capa moderna
   Tema oscuro con auroras, vidrio, puntero propio, apariciones al hacer
   scroll y microinteracciones. Va después de bootstrap.min.css y site.css.
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --bg: #07060f;
    --bg-2: #0d0b1d;
    --surface: rgba(255, 255, 255, .045);
    --surface-2: rgba(255, 255, 255, .08);
    --border: rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .18);
    --text: #eeecff;
    --muted: #a7a3c9;
    --violet: #8b5cf6;
    --indigo: #6366f1;
    --cyan: #22d3ee;
    --pink: #ec4899;
    --green: #34d399;
    --grad: linear-gradient(120deg, #a78bfa 0%, #6366f1 35%, #22d3ee 70%, #a78bfa 100%);
    --radius: 22px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

/* ---------- base oscura (Bootstrap 5.3 data-bs-theme="dark") ---------- */
[data-bs-theme="dark"] {
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--border);
    --bs-emphasis-color: #fff;
    --bs-link-color: #c4b5fd;
    --bs-link-hover-color: #fff;
    --bs-link-color-rgb: 196, 181, 253;
    --bs-link-hover-color-rgb: 255, 255, 255;
    --bs-tertiary-bg: var(--bg-2);
}
html { scroll-padding-top: 90px; }
body.moderno {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.moderno ::selection { background: rgba(139, 92, 246, .45); color: #fff; }
body.moderno h1, body.moderno h2, body.moderno h3, body.moderno h4, body.moderno h5, body.moderno h6 {
    font-family: var(--font-head);
    letter-spacing: -.02em;
    color: #fff;
}
body.moderno .text-muted { color: var(--muted) !important; }
body.moderno .bg-light, body.moderno .bg-white { background: transparent !important; }
body.moderno section { position: relative; }

/* barra de desplazamiento */
body.moderno::-webkit-scrollbar { width: 10px; }
body.moderno::-webkit-scrollbar-track { background: var(--bg); }
body.moderno::-webkit-scrollbar-thumb { background: linear-gradient(var(--violet), var(--indigo)); border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- fondo: auroras que se mueven + grano ---------- */
.aurora {
    position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
    background: radial-gradient(1200px 800px at 50% -10%, #1a1240 0%, transparent 60%), var(--bg);
}
.aurora span {
    position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; mix-blend-mode: screen;
    animation: deriva 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: #6d28d9; }
.aurora span:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; top: 10vh; background: #2563eb; animation-duration: 26s; animation-delay: -6s; }
.aurora span:nth-child(3) { width: 34vmax; height: 34vmax; left: 30vw; bottom: -18vmax; background: #0891b2; animation-duration: 30s; animation-delay: -12s; opacity: .4; }
.aurora span:nth-child(4) { width: 22vmax; height: 22vmax; right: 18vw; bottom: 8vh; background: #db2777; animation-duration: 24s; animation-delay: -3s; opacity: .28; }
@keyframes deriva {
    0%   { transform: translate(0, 0) scale(1) rotate(0deg); }
    33%  { transform: translate(6vw, 4vh) scale(1.12) rotate(25deg); }
    66%  { transform: translate(-4vw, 8vh) scale(.92) rotate(-15deg); }
    100% { transform: translate(3vw, -5vh) scale(1.05) rotate(10deg); }
}
.grano {
    position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: .06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    animation: grano 1.2s steps(6) infinite;
}
@keyframes grano {
    0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
    60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.cuadricula {
    position: absolute; inset: 0; pointer-events: none; z-index: 0;
    background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}

/* ---------- barra de progreso de lectura ---------- */
.progreso-scroll {
    position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 2000; pointer-events: none;
    background: var(--grad); background-size: 200% 100%; transform-origin: 0 50%; transform: scaleX(0);
    box-shadow: 0 0 12px rgba(139, 92, 246, .8);
    animation: fluir 4s linear infinite;
}
@keyframes fluir { to { background-position: 200% 0; } }

/* ---------- navegación de vidrio ---------- */
body.moderno .navbar {
    background: rgba(9, 8, 20, .45) !important;
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--border) !important;
    box-shadow: none !important;
    transition: padding .4s var(--ease), background .4s, box-shadow .4s;
    padding: 18px 0;
}
body.moderno .navbar.compacta { padding: 8px 0; background: rgba(9, 8, 20, .75) !important; box-shadow: 0 10px 40px rgba(0,0,0,.35) !important; }
body.moderno .navbar-brand {
    font-family: var(--font-head); letter-spacing: .12em; font-weight: 700 !important;
    background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent !important; animation: brillo 6s linear infinite;
    display: inline-flex; align-items: center; gap: 10px;
}
.logo-punto {
    width: 10px; height: 10px; border-radius: 50%; background: var(--violet); display: inline-block;
    box-shadow: 0 0 0 0 rgba(139,92,246,.7); animation: latido 2.2s infinite;
}
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(139,92,246,.7); } 70% { box-shadow: 0 0 0 12px rgba(139,92,246,0); } 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0); } }
body.moderno .navbar-nav { position: relative; gap: 4px; }
body.moderno .navbar .nav-link {
    color: var(--muted) !important; font-weight: 500; position: relative; z-index: 1;
    padding: 8px 16px !important; border-radius: 999px; transition: color .3s;
}
body.moderno .navbar .nav-link:hover, body.moderno .navbar .nav-link.activo { color: #fff !important; }
.nav-indicador {
    position: absolute; top: 0; left: 0; height: 100%; border-radius: 999px; z-index: 0; pointer-events: none;
    background: rgba(139, 92, 246, .18); border: 1px solid rgba(139, 92, 246, .35);
    transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s; opacity: 0;
}
body.moderno .navbar-toggler { border: 1px solid var(--border-strong); }
body.moderno .navbar-toggler-icon { filter: invert(1); }
@media (max-width: 575.98px) {
    body.moderno .navbar-collapse { background: rgba(9,8,20,.92); border: 1px solid var(--border); border-radius: 18px; margin-top: 10px; padding: 8px; }
    .nav-indicador { display: none; }
}

/* ---------- hero ---------- */
#inicio.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden;
    padding: 120px 0 80px !important; background: transparent !important; border: 0 !important;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero .container { position: relative; z-index: 2; }
.hero-chip {
    display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .9rem;
    backdrop-filter: blur(10px);
}
.hero-chip .dot-verde { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: latido-v 2s infinite; }
@keyframes latido-v { 50% { opacity: .35; } }
.super-title {
    font-size: clamp(2.6rem, 8vw, 6.2rem) !important; line-height: 1.02; font-weight: 700 !important;
    margin: 26px 0 18px; letter-spacing: -.04em;
}
.super-title .letra {
    display: inline-block; background: var(--grad); background-size: 300% auto;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
    animation: entra-letra .9s var(--ease) backwards, brillo 8s linear infinite;
    transition: transform .35s var(--ease);
}
.super-title .letra:hover { transform: translateY(-10px) rotate(-6deg) scale(1.12); }
.super-title .espacio { display: inline-block; width: .28em; }
@keyframes entra-letra { from { opacity: 0; transform: translateY(70%) rotate(8deg); filter: blur(10px); } }
@keyframes brillo { to { background-position: 300% center; } }
.hero-rol { font-size: clamp(1.05rem, 2.4vw, 1.45rem); color: #d6d2ff; min-height: 1.6em; font-family: var(--font-head); }
.hero-rol .fijo { color: var(--muted); }
.hero-rol .tipeo { color: #fff; }
.hero-rol .cursor-tipeo { display: inline-block; width: 2px; height: 1.1em; background: var(--cyan); vertical-align: -3px; margin-left: 3px; animation: parpadeo 1s steps(1) infinite; }
@keyframes parpadeo { 50% { opacity: 0; } }
.hero-intro { color: var(--muted); max-width: 720px; margin: 22px auto 0; font-size: 1.05rem; line-height: 1.7; }
.hero-botones { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.indicador-scroll {
    position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2;
    width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: 14px; display: block;
}
.indicador-scroll::after {
    content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
    background: #fff; animation: rueda 1.8s var(--ease) infinite;
}
@keyframes rueda { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- botones ---------- */
body.moderno .btn { border-radius: 999px; font-weight: 600; position: relative; overflow: hidden; isolation: isolate; transition: transform .35s var(--ease), box-shadow .35s, background-color .3s, color .3s, border-color .3s; }
body.moderno .btn-primary {
    background: linear-gradient(120deg, #7c3aed, #4f46e5 55%, #0891b2); border: 0; color: #fff;
    box-shadow: 0 10px 30px -8px rgba(124, 58, 237, .65);
}
body.moderno .btn-primary:hover { box-shadow: 0 16px 40px -8px rgba(124, 58, 237, .9); color: #fff; }
body.moderno .btn::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .8s var(--ease);
}
body.moderno .btn:hover::after { transform: translateX(120%); }
body.moderno .btn-outline-primary, body.moderno .btn-outline-dark {
    color: #e9e5ff; border: 1px solid var(--border-strong); background: var(--surface); backdrop-filter: blur(8px);
}
body.moderno .btn-outline-primary:hover, body.moderno .btn-outline-dark:hover { background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.6); color: #fff; }
body.moderno .btn-secondary { background: var(--surface-2); border: 1px solid var(--border); color: #fff; }
body.moderno .btn-success { background: linear-gradient(120deg, #059669, #10b981); border: 0; box-shadow: 0 10px 30px -10px rgba(16,185,129,.7); }
body.moderno .btn-danger { background: linear-gradient(120deg, #db2777, #f43f5e); border: 0; box-shadow: 0 10px 30px -10px rgba(244,63,94,.7); }
.btn-fantasma { color: #e9e5ff; border: 1px solid var(--border-strong) !important; background: var(--surface); }
.btn-fantasma:hover { color: #fff; border-color: rgba(139,92,246,.6) !important; background: rgba(139,92,246,.15); }
.ondita { position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,.45); transform: scale(0); animation: ondita .7s var(--ease) forwards; z-index: 0; }
@keyframes ondita { to { transform: scale(4); opacity: 0; } }

/* ---------- cinta de tecnologías ---------- */
.cinta { padding: 26px 0 !important; overflow: hidden; border-block: 1px solid var(--border); background: rgba(255,255,255,.015); }
.cinta-fila { display: flex; gap: 14px; width: max-content; animation: cinta 40s linear infinite; }
.cinta-fila.reversa { animation-direction: reverse; animation-duration: 46s; margin-top: 14px; }
.cinta:hover .cinta-fila { animation-play-state: paused; }
.cinta-item {
    display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; white-space: nowrap;
    background: var(--surface); border: 1px solid var(--border); color: #d9d5ff; font-family: var(--font-head); font-weight: 500;
    transition: background .3s, border-color .3s, transform .3s var(--ease);
}
.cinta-item i { color: #a78bfa; }
.cinta-item:hover { background: rgba(139,92,246,.18); border-color: rgba(139,92,246,.5); transform: translateY(-3px); }
@keyframes cinta { to { transform: translateX(-50%); } }
.cinta { mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }

/* ---------- encabezados de sección ---------- */
.kicker {
    display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: .85rem;
    letter-spacing: .25em; text-transform: uppercase; color: #a78bfa; margin-bottom: 14px;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, #a78bfa); }
.kicker::after { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, #a78bfa, transparent); }
body.moderno section h2.fw-bold { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.titulo-grad { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: brillo 10s linear infinite; }

/* ---------- tarjetas de vidrio con brillo que sigue al mouse ---------- */
body.moderno .card {
    --mx: 50%; --my: 50%;
    background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02)) !important;
    border: 1px solid var(--border) !important; border-radius: var(--radius) !important;
    color: var(--text); box-shadow: 0 20px 50px -25px rgba(0,0,0,.6) !important;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    transition: transform .5s var(--ease), border-color .4s, box-shadow .5s;
    transform-style: preserve-3d; will-change: transform; position: relative; overflow: hidden;
}
body.moderno .card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(139, 92, 246, .22), transparent 45%);
    transition: opacity .4s;
}
body.moderno .card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; opacity: 0;
    background: radial-gradient(300px circle at var(--mx) var(--my), rgba(196, 181, 253, .9), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    transition: opacity .4s;
}
body.moderno .card:hover { border-color: rgba(139, 92, 246, .35) !important; box-shadow: 0 30px 70px -25px rgba(109, 40, 217, .55) !important; }
body.moderno .card:hover::before, body.moderno .card:hover::after { opacity: 1; }
body.moderno .card > * { position: relative; z-index: 1; }
body.moderno .card-title { color: #fff; }
.icon-circle {
    width: 56px !important; height: 56px !important; border-radius: 16px !important; display: grid !important; place-items: center;
    background: linear-gradient(140deg, rgba(139,92,246,.35), rgba(34,211,238,.15)) !important; border: 1px solid rgba(139,92,246,.4);
    font-size: 1.5rem; transition: transform .5s var(--ease);
}
.icon-circle i { color: #ddd6fe !important; }
body.moderno .card:hover .icon-circle { transform: rotate(-8deg) scale(1.1) translateZ(30px); }

/* insignias */
body.moderno .badge {
    font-weight: 500; font-size: .78rem; padding: .5em .85em; border-radius: 999px;
    transition: transform .3s var(--ease), box-shadow .3s; letter-spacing: .01em;
}
body.moderno .badge:hover { transform: translateY(-2px) scale(1.06); }
body.moderno .badge.bg-primary { background: rgba(139, 92, 246, .2) !important; color: #ddd6fe; border: 1px solid rgba(139, 92, 246, .45); }
body.moderno .badge.bg-secondary { background: rgba(99, 102, 241, .14) !important; color: #c7d2fe; border: 1px solid rgba(99, 102, 241, .35); }
body.moderno .badge.bg-success { background: rgba(52, 211, 153, .14) !important; color: #a7f3d0; border: 1px solid rgba(52, 211, 153, .4); }
body.moderno .badge.bg-light { background: rgba(255,255,255,.06) !important; color: #e5e7eb !important; border: 1px solid var(--border) !important; }
body.moderno .badge.bg-dark { background: rgba(34, 211, 238, .1) !important; color: #a5f3fc; border: 1px solid rgba(34, 211, 238, .3); }
body.moderno .badge:empty { display: none; }

/* barras de idioma */
body.moderno .progress { background: rgba(255,255,255,.08); border-radius: 999px; overflow: visible; }
body.moderno .progress-bar {
    border-radius: 999px; position: relative; transition: width 1.6s var(--ease);
    background: var(--grad) !important; background-size: 200% 100% !important; animation: fluir 4s linear infinite;
    box-shadow: 0 0 16px rgba(139,92,246,.55);
}
body.moderno .progress-bar.bg-success { background: linear-gradient(90deg, #10b981, #34d399, #22d3ee, #10b981) !important; background-size: 200% 100% !important; box-shadow: 0 0 16px rgba(52,211,153,.5); }
body.moderno .border-top { border-color: var(--border) !important; }

/* ---------- proyectos ---------- */
.segmento {
    position: relative; display: inline-flex; gap: 4px; padding: 6px; border-radius: 999px; margin: 0 auto 40px;
    background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(10px);
}
.segmento-envoltura { display: flex; justify-content: center; }
body.moderno .segmento { flex-wrap: nowrap; max-width: 100%; }
@media (max-width: 575.98px) {
    body.moderno .segmento .nav-link { padding: 9px 12px; font-size: .8rem; white-space: nowrap; }
    body.moderno .segmento .nav-link .bi { display: none; }
    .hero-chip { font-size: .8rem; }
}
body.moderno .segmento .nav-link {
    border: 0 !important; background: transparent !important; color: var(--muted) !important; border-radius: 999px !important;
    padding: 10px 22px; font-weight: 600; position: relative; z-index: 1; transition: color .35s;
}
body.moderno .segmento .nav-link.active { color: #fff !important; }
.segmento-indicador {
    position: absolute; top: 0; left: 0; border-radius: 999px; z-index: 0;
    background: linear-gradient(120deg, #7c3aed, #4f46e5); box-shadow: 0 8px 24px -6px rgba(124,58,237,.8);
    transition: transform .55s var(--ease), width .55s var(--ease), height .55s var(--ease);
}
body.moderno .project-card .img-envoltura { overflow: hidden; position: relative; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--border); }
body.moderno .project-card .img-envoltura::after {
    content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(7,6,15,.75)); pointer-events: none;
}
body.moderno .project-card .card-img-top {
    width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; transition: transform 1s var(--ease), filter .6s;
    filter: saturate(.85) brightness(.9);
}
body.moderno .project-card:hover .card-img-top { transform: scale(1.09) rotate(.6deg); filter: saturate(1.1) brightness(1); }
body.moderno .project-card .card-body { padding: 22px; }
body.moderno .project-card .badge.bg-secondary.align-self-start { background: rgba(236, 72, 153, .14) !important; color: #fbcfe8; border-color: rgba(236,72,153,.4); }
.tab-pane .row > * { transition: none; }
.tab-pane.show .entra-tarjeta { animation: entra-tarjeta .7s var(--ease) backwards; }
@keyframes entra-tarjeta { from { opacity: 0; transform: translateY(40px) scale(.95); filter: blur(6px); } }

/* "en construcción" */
.construccion {
    max-width: 720px; margin: 0 auto; padding: 48px 32px; border-radius: 28px; position: relative; overflow: hidden;
    background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015)); border: 1px dashed rgba(167, 139, 250, .45);
}
.construccion img { animation: flotar 3.2s ease-in-out infinite; filter: drop-shadow(0 20px 30px rgba(250, 204, 21, .25)); }
@keyframes flotar { 50% { transform: translateY(-12px) rotate(-4deg); } }
.construccion .cinta-peligro {
    position: absolute; left: -10%; right: -10%; height: 16px; opacity: .55;
    background: repeating-linear-gradient(-45deg, #facc15 0 16px, #111 16px 32px); background-size: 45px 45px; animation: peligro 2s linear infinite;
}
.construccion .cinta-peligro.arriba { top: 0; } .construccion .cinta-peligro.abajo { bottom: 0; animation-direction: reverse; }
@keyframes peligro { to { background-position: 45px 0; } }

/* ---------- ventanas de detalle (modales) ---------- */
body.moderno .modal-backdrop.show { opacity: 1; background: rgba(5, 4, 12, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.moderno .modal-content {
    background: linear-gradient(160deg, rgba(26, 22, 52, .92), rgba(12, 10, 26, .95)); border: 1px solid var(--border-strong);
    border-radius: 26px; box-shadow: 0 40px 120px -20px rgba(109, 40, 217, .55); color: var(--text); overflow: hidden;
}
body.moderno .modal.fade .modal-dialog { transform: translateY(40px) scale(.94); opacity: 0; transition: transform .55s var(--ease), opacity .4s; }
body.moderno .modal.show .modal-dialog { transform: none; opacity: 1; }
body.moderno .modal-header, body.moderno .modal-footer { border-color: var(--border); }
body.moderno .modal-title { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: brillo 8s linear infinite; }
body.moderno .modal-body img { border: 1px solid var(--border); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
body.moderno .modal-body li { padding: 3px 0; }
body.moderno .blockquote { border-left: 3px solid var(--violet); padding-left: 14px; color: #d4d0f5; font-style: italic; }

/* ---------- contacto y formulario ---------- */
.contacto-card { padding: 34px 24px !important; }
.contacto-card > i { font-size: 2.4rem !important; display: inline-block; transition: transform .6s var(--ease); }
.contacto-card:hover > i { transform: scale(1.2) rotate(-10deg); }
body.moderno .form-control {
    background: rgba(255,255,255,.04); border: 1px solid var(--border); color: #fff; border-radius: 16px;
    transition: border-color .3s, box-shadow .3s, background .3s;
}
body.moderno .form-control:focus { background: rgba(139,92,246,.07); border-color: rgba(139,92,246,.7); box-shadow: 0 0 0 4px rgba(139,92,246,.18); color: #fff; }
body.moderno .form-floating > label { color: var(--muted); }
body.moderno .form-floating > .form-control:focus ~ label, body.moderno .form-floating > .form-control:not(:placeholder-shown) ~ label { color: #c4b5fd; }
body.moderno .form-floating > .form-control:focus ~ label::after, body.moderno .form-floating > .form-control:not(:placeholder-shown) ~ label::after { background: transparent !important; }
body.moderno hr { border-color: var(--border); opacity: 1; }

/* ---------- pie ---------- */
body.moderno footer.footer {
    position: relative !important; background: rgba(6,5,14,.6) !important; border-top: 1px solid var(--border) !important;
    line-height: 1.6 !important; white-space: normal !important;
}
body.moderno footer.footer::before { content: ""; position: absolute; top: -1px; left: 10%; right: 10%; height: 1px; background: var(--grad); background-size: 200% 100%; animation: fluir 6s linear infinite; }
body.moderno footer a[href] { transition: color .3s; }
body.moderno footer a[href]:hover { color: #c4b5fd !important; }

/* ---------- apariciones al hacer scroll ---------- */
.revela { opacity: 0; transform: translateY(46px) scale(.97); filter: blur(8px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: var(--retraso, 0s); }
.revela.visible { opacity: 1; transform: none; filter: none; }
.revela-izq { transform: translateX(-60px); } .revela-der { transform: translateX(60px); }

/* ---------- botón volver arriba con anillo de progreso ---------- */
.arriba {
    position: fixed; right: 24px; bottom: 24px; width: 54px; height: 54px; border-radius: 50%; z-index: 1500;
    display: grid; place-items: center; color: #fff; background: rgba(15, 12, 32, .75); border: 1px solid var(--border);
    backdrop-filter: blur(10px); cursor: pointer; opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none;
    transition: opacity .4s, transform .5s var(--ease);
}
.arriba.mostrar { opacity: 1; transform: none; pointer-events: auto; }
.arriba svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.arriba circle { fill: none; stroke-width: 3; }
.arriba .pista { stroke: rgba(255,255,255,.1); }
.arriba .anillo { stroke: url(#grad-anillo); stroke-linecap: round; transition: stroke-dashoffset .15s; }
.arriba i { font-size: 1.2rem; transition: transform .4s var(--ease); }
.arriba:hover i { transform: translateY(-4px); }

/* ---------- círculo "VER" sobre las tarjetas de proyectos (sólo con mouse) ---------- */
.cursor-ver { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; width: 0; height: 0; }
.cursor-ver span {
    position: absolute; left: -42px; top: -42px; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
    font: 700 12px/1 var(--font-head); letter-spacing: .14em; color: #fff;
    background: radial-gradient(circle at 30% 25%, rgba(167, 139, 250, .95), rgba(109, 40, 217, .92));
    box-shadow: 0 12px 40px -6px rgba(124, 58, 237, .8), inset 0 0 0 1px rgba(255,255,255,.25);
    transform: scale(0); opacity: 0; transition: transform .45s var(--ease), opacity .3s;
}
.cursor-ver.activo span { transform: scale(1); opacity: 1; }
.cursor-ver.activo.presionado span { transform: scale(.82); }
@media (pointer: fine) { body.ver-activo:not(.puntero-anillo) .project-card, body.ver-activo:not(.puntero-anillo) [data-ver] { cursor: none; } }

/* puntero 2 · anillo: punto que va justo con el mouse + anillo que lo sigue y reacciona */
.cursor-punto, .cursor-anillo { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; opacity: 0; transition: opacity .3s; display: none; }
body.puntero-anillo .cursor-punto, body.puntero-anillo .cursor-anillo { display: grid; }
.cursor-punto { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #fff; mix-blend-mode: difference; }
.cursor-anillo {
    width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1.5px solid rgba(196, 181, 253, .8); place-items: center;
    font: 700 12px/1 var(--font-head); letter-spacing: .14em; color: #fff;
    transition: opacity .3s, width .4s var(--ease), height .4s var(--ease), margin .4s var(--ease), background .4s, border-color .4s, border-radius .4s;
}
body.puntero-anillo.cursor-on .cursor-punto, body.puntero-anillo.cursor-on .cursor-anillo { opacity: 1; }
.cursor-anillo.encima { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(139, 92, 246, .16); border-color: #c4b5fd; }
.cursor-anillo.ver { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: rgba(124, 58, 237, .88); border-color: transparent; }
.cursor-anillo.presionado { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.cursor-anillo.texto { width: 4px; height: 30px; margin: -15px 0 0 -2px; border-radius: 2px; background: #c4b5fd; border-color: transparent; }
@media (pointer: fine) {
    body.puntero-anillo.cursor-on, body.puntero-anillo.cursor-on a, body.puntero-anillo.cursor-on button, body.puntero-anillo.cursor-on .btn,
    body.puntero-anillo.cursor-on [role="button"], body.puntero-anillo.cursor-on label, body.puntero-anillo.cursor-on [data-ver] { cursor: none !important; }
}

/* puntero 3 · estela de luz: rastro de color + foco suave que ilumina el fondo */
.cursor-estela { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9997; display: none; }
.cursor-foco {
    position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none; z-index: 1; display: none;
}
.cursor-foco::before {
    content: ""; position: absolute; left: -260px; top: -260px; width: 520px; height: 520px; border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, .22), rgba(34, 211, 238, .08) 40%, transparent 70%); mix-blend-mode: screen;
}
body.puntero-estela .cursor-estela, body.puntero-estela .cursor-foco { display: block; }
#lienzo-clics { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9998; pointer-events: none; }

/* ---------- transición entre páginas ---------- */
.telon {
    position: fixed; inset: 0; z-index: 10000; pointer-events: none; display: grid; place-items: center;
    background: radial-gradient(circle at 50% 50%, #1d1250, var(--bg) 70%);
    clip-path: circle(0% at 50% 50%); animation: abrir-telon 1s var(--ease) .12s backwards;
}
@keyframes abrir-telon { from { clip-path: circle(150% at 50% 50%); } }
.telon.cerrando { animation: none; clip-path: circle(150% at var(--tx, 50%) var(--ty, 50%)); transition: clip-path .7s var(--ease); }
.telon-logo { font: 700 1.1rem var(--font-head); letter-spacing: .4em; color: #c4b5fd; opacity: .8; }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .revela { opacity: 1; transform: none; filter: none; }
    .aurora span, .grano { animation: none; }
}

/* puntero 4 · gota líquida: invierte los colores bajo ella y se estira con la velocidad */
.cursor-gota { position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none; display: none; width: 0; height: 0; }
.cursor-gota::before {
    content: ""; position: absolute; left: -17px; top: -17px; width: 34px; height: 34px; border-radius: 50%;
    background: #fff; mix-blend-mode: difference; transition: transform .45s var(--ease);
}
.cursor-gota.grande::before { transform: scale(1.9); }
body.puntero-gota .cursor-gota { display: block; }
body.puntero-gota .cursor-gota { mix-blend-mode: difference; }

/* puntero 5 · mira técnica: líneas finas, coordenadas y esquinas que encuadran lo que apuntas */
.cursor-mira { position: fixed; inset: 0; z-index: 9998; pointer-events: none; display: none; }
body.puntero-mira.cursor-on .cursor-mira { display: block; }
.cursor-mira > span { position: absolute; top: 0; left: 0; }
.mira-h { width: 100%; height: 1px; background: linear-gradient(90deg, transparent, rgba(167,139,250,.28) 20%, rgba(34,211,238,.28) 80%, transparent); }
.mira-v { width: 1px; height: 100%; background: linear-gradient(180deg, transparent, rgba(167,139,250,.28) 20%, rgba(34,211,238,.28) 80%, transparent); }
.mira-centro::before { content: ""; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; background: #22d3ee; box-shadow: 0 0 10px #22d3ee; }
.mira-esq::before { content: ""; position: absolute; width: 12px; height: 12px; border: 2px solid #c4b5fd; }
.mira-esq.a::before { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.mira-esq.b::before { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.mira-esq.c::before { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.mira-esq.d::before { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.cursor-mira.fija .mira-esq::before { border-color: #22d3ee; width: 16px; height: 16px; }
.mira-dato {
    font: 600 10.5px/1 'Space Grotesk', monospace; letter-spacing: .12em; color: #a5f3fc; white-space: nowrap;
    padding: 4px 7px; border-radius: 6px; background: rgba(8, 12, 28, .75); border: 1px solid rgba(34,211,238,.35);
}
@media (pointer: fine) {
    body.puntero-mira.cursor-on, body.puntero-mira.cursor-on a, body.puntero-mira.cursor-on button, body.puntero-mira.cursor-on .btn,
    body.puntero-mira.cursor-on [role="button"], body.puntero-mira.cursor-on label, body.puntero-mira.cursor-on [data-ver], body.puntero-mira.cursor-on .project-card { cursor: none !important; }
}
