/* ========================================
   CYBER PORTFOLIO - MAIN STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00f0ff;
    --secondary: #ff00ff;
    --accent: #00ff88;
    --dark: #0a0a0f;
    --darker: #050508;
    --text: #e0e0e0;
    --text-dim: #666;
    --glow-primary: 0 0 20px rgba(0, 240, 255, 0.5);
    --glow-secondary: 0 0 20px rgba(255, 0, 255, 0.5);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--darker);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   CYBER GRID BACKGROUND
   ======================================== */

.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: -2;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }

    100% {
        transform: perspective(500px) rotateX(60deg) translateY(50px);
    }
}

/* ========================================
   SCANLINES EFFECT
   ======================================== */

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 1000;
}

/* ========================================
   PARTICLES
   ======================================== */

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: var(--glow-primary);
    animation: float 15s infinite;
}

@keyframes float {

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

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px 120px;
    text-align: center;
}

/* ========================================
   AVATAR
   ======================================== */

.avatar-container {
    position: relative;
    margin-bottom: 30px;
}

.avatar {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.4),
        inset 0 0 30px rgba(255, 0, 255, 0.2);
}

.avatar-text {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    border-top-color: transparent;
    border-right-color: transparent;
    animation: spin 3s linear infinite;
}

.ring-2 {
    width: 160px;
    height: 160px;
    border-color: var(--secondary);
    border-top-color: transparent;
    border-left-color: transparent;
    animation-direction: reverse;
    animation-duration: 4s;
}

@keyframes spin {
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.status-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 3px solid var(--darker);
    box-shadow: 0 0 15px var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 15px var(--accent);
    }

    50% {
        box-shadow: 0 0 30px var(--accent), 0 0 60px var(--accent);
    }
}

/* ========================================
   GLITCH TEXT
   ======================================== */

.glitch {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 900;
    color: var(--text);
    text-transform: uppercase;
    position: relative;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-2 2s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }

    20% {
        clip: rect(62px, 9999px, 42px, 0);
    }

    40% {
        clip: rect(16px, 9999px, 78px, 0);
    }

    60% {
        clip: rect(43px, 9999px, 27px, 0);
    }

    80% {
        clip: rect(71px, 9999px, 63px, 0);
    }

    100% {
        clip: rect(22px, 9999px, 89px, 0);
    }
}

@keyframes glitch-2 {
    0% {
        clip: rect(65px, 9999px, 38px, 0);
    }

    20% {
        clip: rect(12px, 9999px, 85px, 0);
    }

    40% {
        clip: rect(48px, 9999px, 52px, 0);
    }

    60% {
        clip: rect(76px, 9999px, 19px, 0);
    }

    80% {
        clip: rect(29px, 9999px, 67px, 0);
    }

    100% {
        clip: rect(54px, 9999px, 45px, 0);
    }
}

/* ========================================
   TYPING ANIMATION
   ======================================== */

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.title-prefix {
    color: var(--accent);
}

.typing-text {
    color: var(--primary);
}

.cursor {
    color: var(--primary);
    animation: blink 0.7s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* ========================================
   BIO
   ======================================== */

.bio {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.bracket {
    color: var(--secondary);
    font-weight: bold;
}

/* ========================================
   STATS
   ======================================== */

.stats-container {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px 40px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: var(--glow-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 2px;
    margin-top: 5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
}

/* ========================================
   TERMINAL BOX
   ======================================== */

.terminal-box {
    width: 100%;
    max-width: 500px;
    background: rgba(10, 10, 15, 0.9);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    text-align: left;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(0, 240, 255, 0.1);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red {
    background: #ff5f56;
}

.terminal-dot.yellow {
    background: #ffbd2e;
}

.terminal-dot.green {
    background: #27ca40;
}

.terminal-title {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.terminal-body p {
    margin-bottom: 8px;
}

.prompt {
    color: var(--accent);
}

.output {
    color: var(--primary);
    padding-left: 10px;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(to top, rgba(5, 5, 8, 0.98), rgba(5, 5, 8, 0.8), transparent);
    z-index: 100;
}

.nav-btn {
    position: relative;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border: 2px solid var(--primary);
    border-radius: 15px;
    color: var(--primary);
    font-size: 1.3rem;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--dark);
    border: 1px solid var(--primary);
    border-radius: 5px;
    font-size: 0.75rem;
    font-family: 'Orbitron', monospace;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.nav-btn:hover::before {
    opacity: 1;
    visibility: visible;
}

.nav-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-5px);
    box-shadow: var(--glow-primary);
}

.nav-btn.primary {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.3),
        0 0 40px rgba(255, 0, 255, 0.2);
}

.nav-btn.primary:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.5),
        0 0 60px rgba(255, 0, 255, 0.4);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.4), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.nav-btn:hover .btn-glow {
    width: 150%;
    height: 150%;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 600px) {
    .stats-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .bottom-nav {
        gap: 10px;
        padding: 15px 10px;
    }

    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .nav-btn.primary {
        width: 58px;
        height: 58px;
    }
}

/* ========================================
   CHAT FLOATING BUTTON
   ======================================== */

.chat-fab {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    box-shadow:
        0 4px 20px rgba(0, 240, 255, 0.4),
        0 0 40px rgba(255, 0, 255, 0.2);
    transition: all 0.3s ease;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow:
        0 6px 30px rgba(0, 240, 255, 0.6),
        0 0 60px rgba(255, 0, 255, 0.4);
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   CHAT MODAL
   ======================================== */

.chat-modal {
    position: fixed;
    bottom: 170px;
    right: 25px;
    width: 380px;
    max-height: 500px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chat-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-container {
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 240, 255, 0.2);
}

/* Chat Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(255, 0, 255, 0.1));
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 1.1rem;
}

.chat-header-text {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--accent);
}

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

.chat-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 0, 0, 0.3);
    color: #ff5555;
}

/* Chat Messages */
.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 240, 255, 0.05);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 3px;
}

.message {
    display: flex;
    max-width: 85%;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.message.bot .message-content {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-bottom-left-radius: 5px;
    color: var(--text);
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--dark);
    border-bottom-right-radius: 5px;
}

.message-content p {
    margin: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(0, 240, 255, 0.05);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 25px;
    color: var(--text);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input::placeholder {
    color: var(--text-dim);
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.chat-send {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: var(--dark);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

.chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 450px) {
    .chat-modal {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 150px;
    }

    .chat-fab {
        right: 15px;
        bottom: 90px;
        width: 55px;
        height: 55px;
    }
}