/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', monospace;
    background: #0a0a0a;
    color: #00ff41;
    overflow: hidden;
    height: 100vh;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 4s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="%2300ff41" opacity="0.3"/><circle cx="80" cy="40" r="1" fill="%2300ff41" opacity="0.5"/><circle cx="40" cy="80" r="1" fill="%2300ff41" opacity="0.2"/></svg>') repeat;
    animation: float 20s linear infinite;
}

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

/* Container */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.8s ease-out 0.3s forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Terminal Window */
.terminal {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid #00ff41;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 65, 0.3),
        inset 0 0 20px rgba(0, 255, 65, 0.1);
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(10px);
    animation: terminalGlow 3s ease-in-out infinite alternate;
}

@keyframes terminalGlow {
    0% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.3), inset 0 0 20px rgba(0, 255, 65, 0.1); }
    100% { box-shadow: 0 0 30px rgba(0, 255, 65, 0.5), inset 0 0 30px rgba(0, 255, 65, 0.2); }
}

.terminal-header {
    background: rgba(0, 255, 65, 0.1);
    padding: 10px 15px;
    border-bottom: 1px solid #00ff41;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.btn.close { background: #ff5f56; }
.btn.minimize { background: #ffbd2e; }
.btn.maximize { background: #27ca3f; }

.terminal-title {
    color: #00ff41;
    font-size: 14px;
    font-weight: 500;
}

.terminal-body {
    padding: 20px;
    font-size: 16px;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.prompt {
    color: #00ff41;
    margin-right: 10px;
    font-weight: 700;
}

.command {
    color: #ffffff;
    font-weight: 500;
}

.terminal-output {
    color: #00ff41;
    margin-left: 20px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.terminal-line.active {
    animation: blink 1s infinite;
}

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

.cursor {
    color: #00ff41;
    animation: blink 1s infinite;
}


/* Project Links */
.project-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.project-link {
    color: #00ff41;
    text-decoration: none;
    padding: 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: linkSlide 0.5s ease-out;
}

.project-link:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: #00ff41;
    transform: translateX(10px);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

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

.icon {
    font-size: 18px;
}

/* Floating Code Elements */
.floating-code {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.code-snippet {
    position: absolute;
    color: rgba(0, 255, 65, 0.3);
    font-size: 24px;
    font-weight: 700;
    animation: floatCode 15s linear infinite;
    opacity: 0.6;
}

.code-snippet:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.code-snippet:nth-child(2) {
    top: 40%;
    right: 15%;
    animation-delay: 3s;
}

.code-snippet:nth-child(3) {
    top: 60%;
    left: 20%;
    animation-delay: 6s;
}

.code-snippet:nth-child(4) {
    top: 80%;
    right: 20%;
    animation-delay: 9s;
}

.code-snippet:nth-child(5) {
    top: 30%;
    left: 50%;
    animation-delay: 12s;
}

@keyframes floatCode {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Matrix Rain Effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .terminal {
        margin: 10px;
        font-size: 14px;
    }
    
    .terminal-body {
        padding: 15px;
    }
    
    .floating-code .code-snippet {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .terminal {
        font-size: 12px;
    }
    
    .terminal-body {
        padding: 10px;
    }
    
}
