/* 
 * -------------------------------------------------------------
 * PREMIUM GLASSMORPHIC PORTFOLIO STYLESHEET
 * -------------------------------------------------------------
 * Estilo ultra-moderno inspirado en interfaces de desarrollo SaaS
 * de alta fidelidad, alejándose de estéticas de juegos retro.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=Fira+Code:wght@400;500&display=swap');

:root {
    --bg-color: #07080c;
    --neon-cyan: #f1f5f9;
    /* Pure Silver White */
    --neon-blue: #64748b;
    /* Slate Gray */
    --neon-purple: #334155;
    /* Dark Slate */
    --neon-green: #10b981;
    /* Emerald Green */
    --neon-red: #ef4444;
    /* Crimson Red */
    --card-w: 190px;
    --card-h: 100px;
    --orbit-radius: 380px;
    --core-size: 140px;
    --body-font: 'Plus Jakarta Sans', 'Outfit', 'Inter', sans-serif;
    --code-font: 'Fira Code', monospace;
    --y-scale: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: #cbd5e1;
    font-family: var(--body-font);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::-webkit-scrollbar {
    display: none;
}

/* -------------------------------------------------------------
 * AMBIENT BACKGROUND GLOW AURA BLOBS
 * ------------------------------------------------------------- */
.glow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.08;
    mix-blend-mode: screen;
    animation: float-glow 25s infinite ease-in-out alternate;
}

.blob-purple {
    width: 550px;
    height: 550px;
    background: #7c3aed;
    /* Deep Purple */
    top: -150px;
    left: -100px;
}

.blob-blue {
    width: 600px;
    height: 600px;
    background: #2563eb;
    /* Royal Blue */
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.blob-cyan {
    width: 400px;
    height: 400px;
    background: #06b6d4;
    /* Ice Cyan */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    animation: pulse-glow 18s infinite ease-in-out alternate;
}

@keyframes float-glow {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, 80px) scale(1.1);
    }

    100% {
        transform: translate(-30px, -50px) scale(0.9);
    }
}

@keyframes pulse-glow {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.04;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.08;
    }
}

/* -------------------------------------------------------------
 * FIXED MODERN HEADER
 * ------------------------------------------------------------- */
header.hud-header {
    width: 100%;
    padding: 20px 45px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: rgba(7, 8, 12, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
}

.hud-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hud-decor-box {
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #ffffff, #64748b);
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

.hud-header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.hud-nav {
    display: flex;
    gap: 30px;
}

.hud-nav-item {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-decoration: none;
    color: #94a3b8;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    padding: 4px 0;
}

.hud-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1.5px;
    background: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.hud-nav-item:hover {
    color: #fff;
}

.hud-nav-item.active {
    color: #fff;
}

.hud-nav-item.active::after {
    width: 70%;
}

.hud-sys-status {
    display: flex;
    align-items: center;
    gap: 25px;
    font-size: 0.8rem;
    letter-spacing: 0.8px;
    color: #94a3b8;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green);
    display: inline-block;
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.hud-clock {
    color: #fff;
    font-weight: 500;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 20px;
    font-family: var(--code-font);
}

/* -------------------------------------------------------------
 * 3D VIEWPORT CONTAINER
 * ------------------------------------------------------------- */
main#viewport {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
    transform-style: preserve-3d;
    width: 100%;
    height: calc(100vh - 120px);
    margin-top: 60px;
    z-index: 2;
}

.orbit-viewport {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    z-index: 5;
}

/* -------------------------------------------------------------
 * CENTRAL ORB CORE (AI/SUPERCOMPUTER ENERGY UNIT)
 * ------------------------------------------------------------- */
.core-wrapper {
    position: absolute;
    /* Siempre lo suficientemente grande para contener el anillo externo */
    width: calc(var(--core-size) * 2.4);
    height: calc(var(--core-size) * 2.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    z-index: 10;
    pointer-events: auto;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.core-interactive {
    cursor: pointer;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
}

/* Elegant Thin Vector Orbit Rings */
.hud-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 11;
    transform: translateZ(25px);
}

.ring-outer {
    width: 250px;
    height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    animation: rotate-cw 35s linear infinite;
}

.ring-inner {
    width: 190px;
    height: 190px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-left: 1.5px solid rgba(107, 124, 150, 0.4);
    border-right: 1.5px solid rgba(107, 124, 150, 0.4);
    animation: rotate-ccw 25s linear infinite;
}

@keyframes rotate-cw {
    from {
        transform: rotate(0deg) translateZ(25px);
    }

    to {
        transform: rotate(360deg) translateZ(25px);
    }
}

@keyframes rotate-ccw {
    from {
        transform: rotate(0deg) translateZ(25px);
    }

    to {
        transform: rotate(-360deg) translateZ(25px);
    }
}

/* Glowing Glass Core Orb */
.core-orb {
    width: var(--core-size);
    height: var(--core-size);
    border-radius: 50%;
    position: relative;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 255, 255, 0.08),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 12;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.5s ease,
        box-shadow 0.5s ease;
    animation: core-pulse 4s ease-in-out infinite;
    /* opacity: .6; */
}

@keyframes core-pulse {

    0%,
    100% {
        transform: scale(1) translateZ(40px);
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(255, 255, 255, 0.08),
            inset 0 0 20px rgba(255, 255, 255, 0.05);
    }

    50% {
        transform: scale(1.04) translateZ(40px);
        box-shadow:
            0 12px 45px rgba(0, 0, 0, 0.55),
            0 0 45px rgba(255, 255, 255, 0.15),
            inset 0 0 25px rgba(255, 255, 255, 0.08);
    }
}

.core-orb-image {
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background-image: url('images/perfil.JPG');
    background-size: cover;
    background-position: center;
    filter: brightness(1.05) contrast(1.05);
    z-index: 1;
}

.core-orb-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, transparent 40%, rgba(255, 255, 255, 0.1) 100%);
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.15);
}

/* Pulsing aura on core hover/diagnostics */
.core-orb::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 0;
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(1.0);
}

.core-wrapper:hover .core-orb {
    border-color: rgba(255, 255, 255, 0.35);
}

.core-wrapper:hover .core-orb::after {
    opacity: 1;
    transform: scale(1.0);
}

/* Diagnostic reboot animation class for the core */
.core-orb.diagnosing {
    animation: core-reboot 1.5s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

@keyframes core-reboot {
    0% {
        transform: scale(1.08) translateZ(40px);
        border-color: var(--neon-cyan);
        box-shadow: 0 0 50px rgba(255, 255, 255, 0.4), inset 0 0 25px rgba(255, 255, 255, 0.15);
    }

    15% {
        transform: scale(1.15) translateZ(40px);
        border-color: #ffffff;
        box-shadow: 0 0 70px rgba(255, 255, 255, 0.6), inset 0 0 35px rgba(255, 255, 255, 0.25);
    }

    50% {
        transform: scale(0.95) translateZ(40px);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.05), inset 0 0 10px rgba(255, 255, 255, 0.02);
    }

    100% {
        transform: scale(1.08) translateZ(40px);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow:
            0 15px 50px rgba(0, 0, 0, 0.6),
            0 0 45px rgba(255, 255, 255, 0.15),
            inset 0 0 25px rgba(255, 255, 255, 0.08);
    }
}

/* Pulsate Animation for the orb glow */
.reactor-sphere {
    display: none;
    /* Removed the old element in favor of .core-orb */
}

/* -------------------------------------------------------------
 * SATELLITE ORBIT TRACKS
 * Dos anillos constantes con iconos satelite girando
 * track-ag: anillo interior, satélite Antigravity (CW)
 * track-cloud: anillo exterior, satélite Cloud (CCW)
 * ------------------------------------------------------------- */

/* Anillo visible — inclinado en X para efecto elipse 3D */
.orbit-track {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
    transform-style: preserve-3d;
}

/* Anillo interno — satélite Antigravity */
.track-ag {
    width: 220px;
    height: 220px;
    margin-top: -110px;
    margin-left: -110px;
    border: 1px solid rgba(203, 213, 225, 0.18);
    box-shadow: 0 0 10px rgba(203, 213, 225, 0.04);
    transform: rotateX(65deg);
}

/* Anillo externo — satélite Cloud */
.track-cloud {
    width: 290px;
    height: 290px;
    margin-top: -145px;
    margin-left: -145px;
    border: 1px solid rgba(100, 116, 139, 0.15);
    transform: rotateX(65deg) rotateY(15deg);
}

/* Rotador: gira en Z, lleva al satélite por el anillo */
.orbit-rotator {
    position: absolute;
    inset: 0;
}

.rot-cw  { animation: sat-cw  14s linear infinite; }
.rot-ccw { animation: sat-ccw 20s linear infinite; }

@keyframes sat-cw  {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes sat-ccw {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* Icono satélite: posicionado en el borde superior del rotador */
.orbit-satellite {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%) rotateX(-65deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Satellite icon images */
.sat-icon {
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Google Antigravity — warm white, sutil glow */
.sat-ag {
    filter:
        brightness(0) invert(1)
        opacity(0.72)
        drop-shadow(0 0 5px rgba(220, 230, 255, 0.5));
}

/* Claude — slate frío, glow cálido */
.sat-claude {
    filter:
        brightness(0) invert(1)
        opacity(0.58)
        drop-shadow(0 0 5px rgba(180, 200, 240, 0.4));
}

/* Core System Stats Overlays */
.core-text-overlay {
    position: absolute;
    bottom: -60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-align: center;
    color: #94a3b8;
    pointer-events: none;
    width: 200px;
}

.core-temp-readout {
    color: #fff;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.core-status-readout {
    font-size: 0.65rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--code-font);
}

/* -------------------------------------------------------------
 * ORBITING CARDS (3D REVOLUTION)
 * ------------------------------------------------------------- */
.card-orbit-wrapper {
    position: absolute;
    transform-style: preserve-3d;
    will-change: transform;
    /* Translate Y offsets dynamically set by JS */
    transform: translateY(calc(var(--y-offset, 0px) * var(--y-scale, 1))) rotateY(calc(var(--start-angle) + var(--orbit-angle, 0deg))) translateZ(var(--orbit-radius)) rotateY(calc(-1 * (var(--start-angle) + var(--orbit-angle, 0deg))));
    transition: opacity 0.8s ease;
}

.card-float-wrapper {
    will-change: transform;
    animation: float-animation 6s ease-in-out infinite alternate;
    animation-delay: var(--delay);
}

@keyframes float-animation {
    0% {
        transform: translateY(-10px) rotateX(0.5deg);
    }

    100% {
        transform: translateY(10px) rotateX(-0.5deg);
    }
}

.card-orbit-wrapper:hover {
    z-index: 100;
    /* Bring hovered card to viewport front */
}

/* Category transition zoom animation wrapper */
.card-zoom-wrapper {
    transform-origin: center center;
    transform: scale(1);
    opacity: 1;
}

.card-zoom-wrapper.zoom-out {
    animation: zoom-out-ani 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card-zoom-wrapper.zoom-in {
    animation: zoom-in-ani 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes zoom-in-ani {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes zoom-out-ani {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* -------------------------------------------------------------
 * GLASSMORPHIC PROJECT CARD DESIGN
 * ------------------------------------------------------------- */
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: var(--card-w);
    min-height: var(--card-h);
    /* Usar min-height para evitar desbordamiento */
    height: auto;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    text-decoration: none;
    color: #cbd5e1;
    font-family: var(--body-font);
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.02);
    transition:
        width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        min-height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s ease,
        filter 0.4s ease;
    transform-origin: center center;
    overflow-wrap: break-word;
    word-break: break-word;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

/* Hover activado por el wrapper padre para estabilidad absoluta y sin parpadeo */
.card-float-wrapper:hover .project-card {
    transform: scale(1.04) translate3d(0, 0, 20px);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: linear-gradient(135deg, rgba(20, 25, 40, 0.5) 0%, rgba(8, 12, 28, 0.7) 100%);
    box-shadow:
        0 20px 45px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 255, 255, 0.1),
        inset 0 0 20px rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

/* Card behind the central core UX treatment */
.card-orbit-wrapper.is-behind:not(.focused) .project-card {
    opacity: 0.25;
    pointer-events: none;
    filter: brightness(0.4) blur(1px) grayscale(0.5);
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.02);
}

/* Card Body elements - Left aligned */
.card-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.card-icon-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.card-float-wrapper:hover .card-icon-wrapper {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
}

.card-icon-wrapper svg {
    stroke: #94a3b8;
    transition: all 0.3s ease;
}

.card-float-wrapper:hover .card-icon-wrapper svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.project-title {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 6px;
    font-family: var(--body-font);
    letter-spacing: -0.02em;
    text-transform: none;
}

.project-desc {
    display: none;
    font-size: 0.70rem;
    color: #94a3b8;
    line-height: 1.45;
    margin-top: 0;
    text-align: left;
    font-family: var(--body-font);
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.card-float-wrapper:hover .project-desc {
    color: #cbd5e1;
}

/* -------------------------------------------------------------
 * PREMIUM FLOATING STATUS LOG PANEL
 * ------------------------------------------------------------- */
footer.hud-alerts-panel {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 580px;
    height: 85px;
    background: rgba(7, 8, 12, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 16px;
    z-index: 100;
    pointer-events: none;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.5),
        inset 0 0 15px rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
}

.alerts-header {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    color: #64748b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alerts-log {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 38px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.01);
    pointer-events: auto;
}

/* Custom scrollbar for alerts-log */
.alerts-log::-webkit-scrollbar {
    width: 4px;
}

.alerts-log::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 2px;
}

.alerts-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.alerts-log::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.alert-line {
    font-family: var(--code-font);
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.95;
    color: #94a3b8;
    /* Medium grey default */
    flex-shrink: 0;
    text-transform: lowercase;
}

.alert-line.success {
    color: #ffffff;
    /* White for success/info */
}

.alert-line.warning {
    color: #cbd5e1;
    /* Light grey for warnings */
}

.alert-line.danger {
    color: #e2e8f0;
    /* Off-white for errors */
}

/* -------------------------------------------------------------
 * 3D ZOOM FOCUS INTERACTION SYSTEM
 * ------------------------------------------------------------- */
.card-orbit-wrapper.transitioning {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease !important;
}

body.has-focused-card .card-orbit-wrapper:not(.focused) {
    opacity: 0.15;
    pointer-events: none;
    transform: translateY(calc(var(--y-offset, 0px) * var(--y-scale, 1))) rotateY(calc(var(--start-angle) + var(--orbit-angle, 0deg))) translateZ(calc(var(--orbit-radius) * 0.4)) rotateY(calc(-1 * (var(--start-angle) + var(--orbit-angle, 0deg)))) scale(0.5) !important;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease !important;
}

body.has-focused-card .core-wrapper {
    opacity: 0.1;
    pointer-events: none;
    transform: scale(0.3) !important;
}

body.has-focused-card .card-orbit-wrapper.focused {
    z-index: 1000;
    transform: translateY(0px) rotateY(calc(var(--start-angle) + var(--orbit-angle, 0deg))) translateZ(0px) rotateY(calc(-1 * (var(--start-angle) + var(--orbit-angle, 0deg)))) !important;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease !important;
}

body.has-focused-card .card-orbit-wrapper.focused .project-card {
    width: 255px;
    min-height: 155px;
    border-color: rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, rgba(20, 25, 40, 0.6) 0%, rgba(8, 12, 28, 0.8) 100%);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(255, 255, 255, 0.15),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    transform: scale(1.4) translate3d(0, 0, 50px);
}

/* Specific styling for the Certificate card list view when focused */
body.has-focused-card .card-orbit-wrapper.focused .project-card[data-id="certificate"] {
    width: 320px;
    min-height: 240px;
}

/* Specific styling for the PDF inline viewer state */
body.has-focused-card .card-orbit-wrapper.focused.showing-pdf .project-card {
    width: 680px;
    min-height: 520px;
    transform: scale(1.0) translate3d(0, 0, 20px) !important;
}

/* PDF list styling inside focused card */
.pdf-list {
    list-style: none;
    padding: 0;
    margin-top: 12px;
    width: 100%;
    max-height: 120px;
    overflow-y: auto;
    pointer-events: auto;
}

/* Scrollbar styling for PDF list */
.pdf-list::-webkit-scrollbar {
    width: 4px;
}

.pdf-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

.pdf-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.pdf-item {
    font-family: var(--code-font);
    font-size: 9px;
    padding: 6px 10px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    transition: all 0.2s ease;
    text-transform: lowercase;
}

.pdf-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding-left: 12px;
}

.pdf-item::before {
    content: "📄";
    font-size: 9px;
    opacity: 0.7;
}

/* PDF inline viewer containers */
.pdf-viewer-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdf-viewer-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 6px;
}

.pdf-viewer-header span {
    font-family: var(--code-font);
    text-transform: lowercase;
}

.pdf-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 9px;
    font-family: var(--body-font);
    transition: all 0.2s ease;
    pointer-events: auto;
}

.pdf-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.pdf-iframe {
    width: 100%;
    height: 380px;
    border: none;
    border-radius: 8px;
    background: #0f172a;
    pointer-events: auto;
}

/* -------------------------------------------------------------
 * RESPONSIVE LAYOUT MECHANICS
 * ------------------------------------------------------------- */
@media (max-width: 1200px) {
    :root {
        --orbit-radius: 300px;
        --card-w: 175px;
        --card-h: 145px;
        --core-size: 120px;
    }

    .track-ag {
        width: 185px;
        height: 185px;
        margin-top: -92px;
        margin-left: -92px;
    }

    .track-cloud {
        width: 248px;
        height: 248px;
        margin-top: -124px;
        margin-left: -124px;
    }
}

@media (max-width: 900px) {
    :root {
        --orbit-radius: 240px;
        --card-w: 155px;
        --card-h: 135px;
        --core-size: 100px;
    }

    .track-ag {
        width: 155px;
        height: 155px;
        margin-top: -77px;
        margin-left: -77px;
    }

    .track-cloud {
        width: 208px;
        height: 208px;
        margin-top: -104px;
        margin-left: -104px;
    }
}

/* Responsive viewer on mobile screens */
@media (max-width: 700px) {
    body.has-focused-card .card-orbit-wrapper.focused.showing-pdf .project-card {
        width: 95vw;
        min-height: 420px;
        transform: scale(1.0) translate3d(0, 0, 10px) !important;
    }

    .pdf-iframe {
        height: 280px;
    }
}

/* Mobile Screens (Under 650px) */
@media (max-width: 650px) {
    :root {
        --orbit-radius: 125px;
        --card-w: 90px;
        --card-h: 75px;
        --core-size: 70px;
        --y-scale: 0.75;
    }

    .track-ag {
        width: 110px;
        height: 110px;
        margin-top: -55px;
        margin-left: -55px;
    }

    .track-cloud {
        width: 148px;
        height: 148px;
        margin-top: -74px;
        margin-left: -74px;
    }

    /* Iconos satélite más pequeños y centrados en mobile */
    .sat-icon {
        width: 14px;
        height: 14px;
    }

    .orbit-satellite {
        top: -8px;
    }

    header.hud-header {
        padding: 12px 16px;
    }

    .hud-header h1 {
        font-size: 0.9rem;
        letter-spacing: 1.5px;
    }

    .hud-sys-status {
        display: none !important;
    }

    .hud-nav {
        gap: 12px;
    }

    .hud-nav-item {
        font-size: 0.72rem;
        letter-spacing: 0.8px;
    }

    .project-card {
        padding: 8px;
        border-radius: 10px;
    }

    .project-title {
        font-size: 0.7rem;
        margin-top: 1px;
        margin-bottom: 1px;
    }

    .card-icon-wrapper {
        width: 22px;
        height: 22px;
        margin-bottom: 4px;
    }

    .project-desc {
        font-size: 0.65rem;
        line-height: 1.35;
        margin-top: 0;
    }

    .core-text-overlay {
        display: none !important;
    }

    footer.hud-alerts-panel {
        width: 92%;
        bottom: 15px;
        padding: 10px 18px;
    }

    /* Precedence: applied after general styling to ensure overrides take effect */
    body.has-focused-card .card-orbit-wrapper.focused .project-card {
        transform: scale(1.1) translate3d(0, 0, 25px) !important;
        width: 220px;
        min-height: 140px;
    }

    body.has-focused-card .card-orbit-wrapper.focused .project-card[data-id="certificate"] {
        width: 290px;
        min-height: 220px;
    }

    .login-satellite-card.expanded {
        width: calc(100vw - 32px) !important;
        max-width: 340px !important;
        padding: 16px !important;
    }

    .login-satellite-container.is-centered {
        top: 35% !important;
        transform: translate(-50%, -50%) scale(1.0) !important;
    }

    .satellite-actions {
        width: 100% !important;
        gap: 12px !important;
    }

    .sat-btn {
        padding: 8px 12px !important;
        font-size: 0.72rem !important;
        flex: 1 !important;
        max-width: 110px !important;
    }

    .typing-text-container {
        font-size: 0.75rem !important;
        min-height: 36px !important;
    }
}

/* Extra Small Mobile Screens (Under 380px) */
@media (max-width: 380px) {
    :root {
        --orbit-radius: 105px;
        --card-w: 80px;
        --card-h: 70px;
        --core-size: 60px;
    }
}

/* -------------------------------------------------------------
 * PORTAL LOGIN SYSTEM (Glassmorphism & HUD Styling)
 * ------------------------------------------------------------- */
#portal-login-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 100;
    animation: login-fade-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes login-fade-in {
    0% { opacity: 0; transform: translate(-50%, -46%); filter: blur(5px); }
    100% { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); }
}

.login-glass-card {
    background: rgba(10, 11, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 35px 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.login-hud-header {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-hud-decor {
    width: 4px;
    height: 18px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.login-hud-header h2 {
    font-size: 1.1rem;
    font-family: var(--body-font);
    font-weight: 700;
    letter-spacing: 2px;
    color: #f1f5f9;
}

.login-input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-input-group label {
    font-size: 0.72rem;
    font-family: var(--code-font);
    color: #64748b;
    letter-spacing: 1.5px;
}

.login-input-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px 14px;
    color: #f1f5f9;
    font-size: 0.85rem;
    font-family: var(--body-font);
    outline: none;
    transition: all 0.3s ease;
}

.login-input-group input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15), 
                inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.login-error-msg {
    color: #ff4646;
    font-size: 0.75rem;
    margin-bottom: 18px;
    min-height: 16px;
    font-family: var(--body-font);
}

.login-submit-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 14px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-submit-btn .btn-text {
    font-size: 0.82rem;
    font-family: var(--body-font);
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #f1f5f9;
}

.login-submit-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

.login-submit-btn:hover .btn-text {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.login-submit-btn:active {
    transform: scale(0.98);
}

.login-footer-links {
    margin-top: 20px;
    text-align: center;
}

.login-footer-links a {
    font-size: 0.7rem;
    font-family: var(--code-font);
    color: #64748b;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.login-footer-links a:hover {
    color: #f1f5f9;
}

/* Ocultar el portal de login tradicional */
#portal-login-container {
    display: none !important;
}

/* -------------------------------------------------------------
 * INTERACTIVE LOGIN SATELLITE STYLING
 * ------------------------------------------------------------- */
.login-orbit-track-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 350px;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.login-orbit-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.login-satellite-container {
    position: absolute;
    z-index: 1001;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}

.login-satellite-container.is-orbiting {
    transition: transform 0.3s ease;
}

.login-satellite-container.is-centered {
    left: 50% !important;
    top: 40% !important;
    transform: translate(-50%, -50%) scale(1.1) !important;
    transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1), top 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.login-satellite-card {
    background: rgba(10, 11, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 6px 14px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    user-select: none;
}

.satellite-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.satellite-handle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.satellite-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.sat-user-icon {
    filter: brightness(0) invert(1) opacity(0.85) drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.satellite-label {
    font-size: 0.6rem;
    font-family: var(--code-font);
    color: #cbd5e1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

/* Hover effects for orbiting satellite */
.login-satellite-container.is-orbiting:hover .satellite-icon-wrap {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.login-satellite-container.is-orbiting:hover .satellite-label {
    color: #fff;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.login-satellite-container.is-orbiting:hover .login-satellite-card {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

/* Expanded Card Mode */
.login-satellite-card.expanded {
    border-radius: 16px;
    padding: 24px;
    width: 360px;
    background: rgba(10, 11, 18, 0.85);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 255, 255, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.login-satellite-card.expanded .satellite-icon-wrap {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    width: 32px;
    height: 32px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    margin-bottom: 8px;
}

.login-satellite-card.expanded .sat-user-icon {
    filter: brightness(0) invert(1) opacity(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
}

.login-satellite-card.expanded .satellite-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #f1f5f9;
}

.satellite-expanded-content {
    display: none;
    margin-top: 16px;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.login-satellite-card.expanded .satellite-expanded-content {
    display: flex;
}

.typing-text-container {
    font-size: 0.82rem;
    font-family: var(--code-font);
    color: #cbd5e1;
    text-align: center;
    line-height: 1.6;
    min-height: 40px;
    letter-spacing: 0.5px;
    width: 100%;
}

.typing-cursor {
    color: #ffffff;
    font-weight: 700;
    margin-left: 2px;
    animation: blink-cursor 0.8s infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.satellite-actions {
    display: flex;
    gap: 16px;
    width: 100%;
    justify-content: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.satellite-actions.show {
    opacity: 1;
    transform: translateY(0);
}

.sat-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 8px 28px;
    font-family: var(--code-font);
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    letter-spacing: 1.5px;
}

.sat-btn.btn-yes:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.sat-btn.btn-no:hover {
    border-color: #ff4646;
    background: rgba(255, 70, 70, 0.08);
    color: #ff4646;
    box-shadow: 0 0 15px rgba(255, 70, 70, 0.2);
}

.login-satellite-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 8, 0.4);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 998;
}

.login-satellite-backdrop.show {
    opacity: 1;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(5, 5, 8, 0.7);
}

/* Auth state toggles */
.lobby-authenticated .unauthenticated-only-element {
    display: none !important;
}

.lobby-unauthenticated .unauthenticated-only-element {
    display: block;
}