/* CyberNandi Tech Hub - Global Styles */

/* CSS Variables for theming */
:root {
    --cyber-dark: #0a0a0f;
    --cyber-panel: #12121a;
    --cyber-accent: #00ff41;
    --cyber-accent-dim: #00cc33;
    --cyber-secondary: #0080ff;
    --cyber-secondary-dim: #0066cc;
    --cyber-danger: #ff3366;
    --cyber-warning: #ffcc00;
    --cyber-text: #e0e0e0;
    --cyber-muted: #6b7280;
}

/* Reset and base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cyber-dark);
    color: var(--cyber-text);
    font-family: 'Fira Code', 'JetBrains Mono', monospace;
    line-height: 1.6;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cyber-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--cyber-accent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--cyber-accent-dim);
}

/* Selection */
::selection {
    background: var(--cyber-accent);
    color: var(--cyber-dark);
}

/* Glitch text effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

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

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyber-danger);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -2px 0 var(--cyber-secondary);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 85px, 0);
    }
    20% {
        clip: rect(65px, 9999px, 99px, 0);
    }
    40% {
        clip: rect(15px, 9999px, 135px, 0);
    }
    60% {
        clip: rect(80px, 9999px, 5px, 0);
    }
    80% {
        clip: rect(40px, 9999px, 110px, 0);
    }
    100% {
        clip: rect(95px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
    }
    20% {
        clip: rect(20px, 9999px, 25px, 0);
    }
    40% {
        clip: rect(95px, 9999px, 10px, 0);
    }
    60% {
        clip: rect(35px, 9999px, 120px, 0);
    }
    80% {
        clip: rect(75px, 9999px, 40px, 0);
    }
    100% {
        clip: rect(10px, 9999px, 85px, 0);
    }
}

/* Cyber buttons */
.cyber-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--cyber-accent) 0%, var(--cyber-accent-dim) 100%);
    color: var(--cyber-dark);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.cyber-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.cyber-btn-primary:hover::before {
    left: 100%;
}

.cyber-btn-primary:hover {
    box-shadow: 0 0 30px var(--cyber-accent);
    transform: translateY(-2px);
}

.cyber-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    color: var(--cyber-accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid var(--cyber-accent);
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cyber-btn-outline:hover {
    background: var(--cyber-accent);
    color: var(--cyber-dark);
    box-shadow: 0 0 30px var(--cyber-accent);
}

/* Cyber terminal */
.cyber-terminal {
    background: var(--cyber-panel);
    border-radius: 0.5rem;
    border: 1px solid var(--cyber-accent);
    box-shadow: 0 0 40px var(--cyber-accent);
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--cyber-dark);
    border-bottom: 1px solid var(--cyber-accent);
}

.terminal-body {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.terminal-line {
    margin-bottom: 0.25rem;
}

.typing-effect {
    animation: typing 3s steps(40, end);
    white-space: nowrap;
    overflow: hidden;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

.cursor-blink {
    animation: blink 1s infinite;
}

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

/* Cyber stat cards */
.cyber-stat {
    padding: 1.5rem;
    background: var(--cyber-panel);
    border: 1px solid var(--cyber-accent)/20;
    border-radius: 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.cyber-stat:hover {
    border-color: var(--cyber-accent);
    box-shadow: 0 0 20px var(--cyber-accent)/20;
}

/* Service cards */
.cyber-service-card {
    padding: 1.5rem;
    background: var(--cyber-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cyber-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s;
}

.cyber-service-card:hover::before {
    left: 100%;
}

.cyber-service-card:hover {
    border-color: var(--cyber-accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Team cards */
.cyber-team-card {
    background: var(--cyber-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.cyber-team-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    padding: 1px;
    background: linear-gradient(135deg, var(--cyber-accent), var(--cyber-secondary));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
}

.cyber-team-card:hover::after {
    opacity: 1;
}

.cyber-team-card:hover {
    transform: translateY(-8px);
}

/* Panels */
.cyber-panel {
    background: var(--cyber-panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--cyber-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Info boxes */
.cyber-info-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--cyber-panel);
    border-left: 3px solid var(--cyber-accent);
    border-radius: 0 0.5rem 0.5rem 0;
    transition: all 0.3s ease;
}

.cyber-info-box:hover {
    background: var(--cyber-dark);
    border-left-width: 5px;
}

/* Form elements */
.cyber-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--cyber-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    color: var(--cyber-text);
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--cyber-accent);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.1);
}

.cyber-input::placeholder {
    color: var(--cyber-muted);
}

.cyber-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: var(--cyber-accent);
    cursor: pointer;
}

select.cyber-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Threat stats */
.threat-stat {
    padding: 0.75rem 1rem;
    background: var(--cyber-dark);
    border-radius: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient background animation */
.bg-300\% {
    background-size: 300% 300%;
}

.animate-gradient {
    animation: gradient 8s ease infinite;
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Grid pattern overlay */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Scanlines */
.scanlines::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .glitch-text::before,
    .glitch-text::after {
        animation: none;
    }
    
    .cyber-terminal {
        margin: 0 -1rem;
        border-radius: 0;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}