/* Cyberpunk Portfolio Styles */
:root {
    --primary-cyan: #00ffff;
    --primary-pink: #ff006e;
    --secondary-green: #00ff41;
    --secondary-purple: #8b5cf6;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --light-gray: #333333;
    --text-light: #ffffff;
    --text-muted: #cccccc;
    --border-glow: #00ffff;
    --shadow-glow: 0 0 20px rgba(0, 255, 255, 0.5);
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Rajdhani', sans-serif;
}

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

body {
    font-family: var(--font-secondary);
    background: var(--dark-bg);
    color: var(--text-light);
    overflow-x: hidden;
    position: relative;
}

/* Matrix Background */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, var(--darker-bg) 0%, var(--dark-bg) 50%, var(--darker-bg) 100%);
    opacity: 0.9;
}

#matrix-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,255,0.03) 2px, rgba(0,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,255,255,0.03) 2px, rgba(0,255,255,0.03) 4px);
    animation: matrixScroll 20s linear infinite;
}

@keyframes matrixScroll {
    0% { transform: translateY(0px); }
    100% { transform: translateY(100px); }
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
.cyber-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-cyan);
    z-index: 1000;
    box-shadow: var(--shadow-glow);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-family: var(--font-primary);
    font-weight: 900;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
}

.logo-img:hover {
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.6));
    transform: scale(1.05);
}

.logo-text {
    font-size: 2rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px var(--primary-cyan);
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    letter-spacing: 3px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    position: relative;
    background: transparent;
    border: 2px solid var(--primary-cyan);
    color: var(--text-light);
    padding: 0.8rem 1.5rem;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    overflow: hidden;
}

.nav-btn:hover {
    color: var(--dark-bg);
    background: var(--primary-cyan);
    box-shadow: 0 0 20px var(--primary-cyan);
    transform: translateY(-2px);
}

.nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 0 10px var(--primary-cyan);
}

.btn-glitch {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-btn:hover .btn-glitch {
    left: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-cyan);
    transition: all 0.3s ease;
}

/* Main Content */
.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.section {
    display: none;
    min-height: 100vh;
    padding: 4rem 0;
}

.section.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero-content {
    text-align: center;
    padding: 6rem 0;
    animation: fadeInUp 1s ease;
}

.cyber-title {
    font-family: var(--font-primary);
    margin-bottom: 2rem;
}

.title-line {
    display: block;
    font-size: 1.5rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.title-main {
    display: block;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-cyan), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    margin-bottom: 1rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.title-sub {
    display: block;
    font-size: 1.2rem;
    color: var(--secondary-green);
    letter-spacing: 2px;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(0, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(0, 255, 255, 0.8), 0 0 40px rgba(255, 0, 110, 0.3); }
}

.hero-description {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 4rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    border: 2px solid var(--secondary-green);
    background: rgba(0, 255, 65, 0.1);
    clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-family: var(--font-primary);
    font-weight: 900;
    color: var(--secondary-green);
    text-shadow: 0 0 10px var(--secondary-green);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

.cyber-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
    border: 2px solid var(--primary-cyan);
    border-radius: 0;
    clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
    box-shadow: 
        0 0 50px rgba(0, 255, 255, 0.3),
        inset 0 0 50px rgba(0, 255, 255, 0.1);
    z-index: 2001;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.cyber-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.modal-header h2 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--primary-cyan);
    text-shadow: 0 0 10px var(--primary-cyan);
    letter-spacing: 2px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--primary-pink);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-light);
    background: var(--primary-pink);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-pink);
}

.modal-content {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 255, 255, 0.3);
    border-top: 3px solid var(--primary-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: var(--text-muted);
    font-family: var(--font-primary);
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Terminal */
.cyber-terminal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--secondary-green);
    border-radius: 0;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    z-index: 1500;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--secondary-green);
    color: var(--dark-bg);
    font-weight: bold;
    font-size: 0.9rem;
}

.terminal-toggle {
    background: none;
    border: none;
    color: var(--dark-bg);
    font-size: 1.2rem;
    cursor: pointer;
    font-weight: bold;
}

.terminal-body {
    padding: 1rem;
    height: 200px;
    overflow-y: auto;
}

.terminal-line {
    color: var(--secondary-green);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.prompt {
    color: var(--primary-cyan);
}

.cursor {
    animation: blink 1s infinite;
}

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

/* Footer */
.cyber-footer {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
    border-top: 2px solid var(--primary-cyan);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.footer-section h3 {
    font-family: var(--font-primary);
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-shadow: 0 0 10px var(--primary-cyan);
}

.footer-section p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    color: var(--secondary-green);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-green);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.social-link:hover {
    background: var(--secondary-green);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

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

.glitch:before {
    animation: glitchTop 1s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
    transform: translate(-0.04em, -0.03em);
    opacity: 0.75;
    color: var(--primary-pink);
}

.glitch:after {
    animation: glitchBott 1.5s infinite;
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
    transform: translate(0.04em, 0.03em);
    opacity: 0.75;
    color: var(--secondary-green);
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitchTop {
    0%, 100% { transform: translate(-0.04em, -0.03em); }
    10% { transform: translate(0.04em, 0.03em); }
}

@keyframes glitchBott {
    0%, 100% { transform: translate(0.04em, 0.03em); }
    50% { transform: translate(-0.04em, -0.03em); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid var(--primary-cyan);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .title-main {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .cyber-terminal {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }

    .cyber-modal {
        width: 95%;
        max-height: 90vh;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .logo-img {
        height: 40px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .title-main {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .stat {
        padding: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-pink);
}

/* Selection */
::selection {
    background: var(--primary-cyan);
    color: var(--dark-bg);
}

::-moz-selection {
    background: var(--primary-cyan);
    color: var(--dark-bg);
}