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

:root {
    --primary: #00ff41;
    --secondary: #0d1421;
    --accent: #ff6b35;
    --text: #e0e6ed;
    --bg: #0a0e1a;
    --card-bg: rgba(13, 20, 33, 0.8);
    --glow: 0 0 20px rgba(0, 255, 65, 0.3);
}

body {
    font-family: 'Courier New', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(45deg, #0a0e1a, #1a0e2e);
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    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="10" cy="10" r="1" fill="%2300ff41" opacity="0.3"><animate attributeName="opacity" values="0.3;1;0.3" dur="2s" repeatCount="indefinite"/></circle><circle cx="90" cy="20" r="1" fill="%23ff6b35" opacity="0.5"><animate attributeName="opacity" values="0.5;1;0.5" dur="3s" repeatCount="indefinite"/></circle><circle cx="20" cy="80" r="1" fill="%2300ff41" opacity="0.4"><animate attributeName="opacity" values="0.4;1;0.4" dur="2.5s" repeatCount="indefinite"/></circle></svg>') repeat;
    animation: float 20s infinite linear;
}

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

/* UFO Styles */
.ufo {
    position: fixed;
    width: 40px;
    height: 20px;
    pointer-events: none;
    z-index: -1;
    opacity: 0.8;
}

.ufo-body {
    width: 100%;
    height: 12px;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    animation: ufo-glow 2s ease-in-out infinite alternate;
}

.ufo-dome {
    width: 20px;
    height: 10px;
    background: rgba(0, 255, 65, 0.3);
    border-radius: 50% 50% 0 0;
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid var(--primary);
}

.ufo-beam {
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(0, 255, 65, 0.3));
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
}

@keyframes ufo-glow {
    from { box-shadow: 0 0 10px rgba(0, 255, 65, 0.5); }
    to { box-shadow: 0 0 20px rgba(0, 255, 65, 0.8), 0 0 30px rgba(255, 107, 53, 0.4); }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 2rem;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

nav a:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--glow);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-content {
    z-index: 10;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 30px rgba(0, 255, 65, 0.5); }
    to { text-shadow: 0 0 40px rgba(0, 255, 65, 0.8), 0 0 50px rgba(0, 255, 65, 0.6); }
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--accent);
}

.terminal {
    background: var(--card-bg);
    border: 1px solid var(--primary);
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    font-family: 'Courier New', monospace;
    position: relative;
    box-shadow: var(--glow);
    text-align: left; /* Force left alignment */
    max-width: 600px; /* Limit width for better readability */
    margin: 2rem auto; /* Center the terminal box itself */
}

.terminal::before {
    content: '● ● ●';
    position: absolute;
    top: -10px;
    left: 10px;
    background: var(--card-bg);
    padding: 0 10px;
    color: var(--primary);
}

.terminal-text {
    color: var(--primary);
    text-align: left; /* Force left alignment */
    width: auto; /* Remove fixed width */
    /* REMOVED: animation: typewriter 3s steps(40) infinite; - This was causing the centering issue */
}

.terminal-text div {
    text-align: left; /* Ensure each line stays left-aligned */
    margin: 0; /* Remove any margins */
    padding: 0; /* Remove any padding */
}

/* Remove the problematic typewriter animation */
/* @keyframes typewriter {
    0%, 50% { width: 0; }
    100% { width: 100%; }
} */

/* Section Styles */
section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary);
    text-align: center;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-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 ease;
}

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

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow);
    border-color: var(--primary);
}

.skill-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-bar {
    background: rgba(0, 255, 65, 0.2);
    height: 8px;
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    animation: loadSkill 2s ease-out;
}

@keyframes loadSkill {
    from { width: 0; }
}

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
    border-color: var(--accent);
}

.project-card h3 {
    color: var(--accent);
    margin-bottom: 1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: rgba(0, 255, 65, 0.2);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--primary);
}

/* Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

input, textarea {
    width: 100%;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid rgba(0, 255, 65, 0.3);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.btn {
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: var(--bg);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 255, 65, 0.3);
}

/* Footer */
footer {
    background: var(--secondary);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 255, 65, 0.2);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
}

.social-links a {
    color: var(--text);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.2rem; }
    nav ul { flex-direction: column; gap: 1rem; }
    section { padding: 3rem 1rem; }
    .terminal { max-width: 90%; } /* Make terminal responsive */
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

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

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