:root {
    --bg-color: #0B0C10;
    --surface-color: rgba(31, 40, 51, 0.85);
    --accent-color: #66FCF1;
    --text-main: #C5C6C7;
    --text-bright: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; overflow-x: hidden; }
/* ========================================= */
/* --- CUSTOM SCROLLBAR --- */
/* ========================================= */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #333; /* Dark gray scrollbar */
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color); /* Glows neon blue when hovered! */
}
h1, h2, h3 { color: var(--text-bright); }
.accent { color: var(--accent-color); }

nav { position: fixed; top: 0; width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 10%; background: rgba(11, 12, 16, 0.9); backdrop-filter: blur(10px); z-index: 1000; }
.logo { font-size: 1.5rem; font-weight: 600; color: var(--accent-color); }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-main); transition: 0.3s; }
.nav-links a:hover { color: var(--accent-color); }

/* --- HERO SECTION --- */
#home { position: relative; height: 100vh; display: flex; align-items: center; padding: 0 10%; overflow: hidden; }
.bg-video { position: absolute; top: 50%; left: 50%; min-width: 100%; min-height: 100%; transform: translate(-50%, -50%); z-index: -2; }
.video-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11, 12, 16, 0.85); z-index: -1; }

/* THE SMOOTH FADE TRANSITION */
.hero-bottom-fade {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to bottom, rgba(11, 12, 16, 0) 0%, rgba(11, 12, 16, 1) 100%);
    z-index: 5;
    pointer-events: none;
}

.hero-content { z-index: 10; position: relative; }
.hero-content h1 { font-size: 4rem; }
.hero-content h2 { font-size: 2rem; margin-bottom: 20px; }
/* Adds breathing room between the paragraph and the buttons */
.hero-content p { 
    font-size: 1.1rem; 
    margin-bottom: 35px; 
    max-width: 800px; /* Keeps the text from stretching too wide on huge monitors */
}
.cursor { animation: blink 1s infinite; color: var(--accent-color); }
@keyframes blink { 50% { opacity: 0; } }

.btn { padding: 12px 24px; border-radius: 5px; text-decoration: none; font-weight: 600; transition: 0.3s; display: inline-block; margin-right: 15px; }
.primary { background: var(--accent-color); color: var(--bg-color); border: 2px solid var(--accent-color); }
.primary:hover { box-shadow: 0 0 15px var(--accent-color); transform: scale(1.05); }
.secondary { border: 2px solid var(--accent-color); color: var(--accent-color); background: transparent; }
.secondary:hover { background: rgba(102, 252, 241, 0.1); }

/* --- 3D BACKGROUND WRAPPER --- */
#vanta-bg { position: relative; min-height: 100vh; width: 100%; z-index: 1; }
.glass-panel { background: var(--surface-color); backdrop-filter: blur(8px); border: 1px solid rgba(102, 252, 241, 0.1); border-radius: 10px; }

section { padding: 100px 10%; position: relative; z-index: 2; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 50px; color: #fff; }

/* ABOUT & TERMINAL */
.about-container { display: flex; gap: 50px; align-items: center; padding: 40px; }
.about-text { flex: 1; font-size: 1.1rem; }
.about-text p { margin-bottom: 15px; }

/* Terminal Game */
.terminal { flex: 1; background: rgba(0,0,0,0.8); border-radius: 8px; border: 1px solid #333; font-family: 'Fira Code', monospace; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.terminal-header { background: #222; padding: 10px; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }
.terminal-header p { color: #888; font-size: 0.8rem; margin-left: 10px; }
.terminal-body { padding: 20px; color: #0f0; min-height: 250px; max-height: 300px; overflow-y: auto; }
.terminal-input-line { display: flex; padding: 0 20px 20px 20px; gap: 10px; color: #0f0; align-items: center; }

/* Makes the ">" symbol pulse to catch the user's attention */
.terminal-input-line span:first-child {
    animation: terminal-pulse 1.5s infinite;
}

@keyframes terminal-pulse {
    0% { opacity: 1; color: #0f0; }
    50% { opacity: 0.4; color: var(--accent-color); }
    100% { opacity: 1; color: #0f0; }
}

/* Ghost Auto-Complete Styling */
.input-wrapper { position: relative; flex: 1; display: flex; align-items: center; }
.ghost-text { position: absolute; color: #555; pointer-events: none; white-space: pre; font-family: 'Fira Code', monospace; font-size: 1rem; }
#term-input { background: transparent; border: none; color: #0f0; font-family: 'Fira Code', monospace; width: 100%; outline: none; font-size: 1rem; position: relative; z-index: 2; }

/* --- EXPERIENCE TIMELINE --- */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background: var(--accent-color); top: 0; bottom: 0; left: 20px; margin-left: -1px; }
.timeline-item { position: relative; padding-left: 60px; margin-bottom: 40px; }
.timeline-dot { position: absolute; left: 10px; top: 5px; width: 20px; height: 20px; background: var(--bg-color); border: 4px solid var(--accent-color); border-radius: 50%; z-index: 1; }
.timeline-content { padding: 25px; transition: 0.3s; }
.timeline-content:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(102, 252, 241, 0.2); }
.timeline-content h4 { color: var(--accent-color); margin-bottom: 10px; font-weight: 400; }

/* --- PORTFOLIO --- */
/* --- 3D WIDE FLIP CARD PORTFOLIO --- */
.portfolio-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px; 
    max-width: 1400px; /* FIX: Stops it from stretching forever on wide screens */
    margin: 0 auto;    /* FIX: Centers the entire grid perfectly */
    padding: 0 20px;   /* FIX: Guarantees a safe zone so it never touches the glass */
}

/* Adjusts to 2 cards per row on medium screens (laptops) */
@media (max-width: 1200px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); max-width: 1000px; }
}

/* Adjusts to 1 card per row on mobile phones */
@media (max-width: 768px) {
    .portfolio-grid { grid-template-columns: 1fr; max-width: 500px; }
}
.flip-card { background-color: transparent; width: 100%; height: 400px; perspective: 1000px; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1); transform-style: preserve-3d; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 10px; overflow: hidden; }

.flip-card-front { background-color: #111; background-size: contain; background-repeat: no-repeat; background-position: center; color: white; transition: background-image 0.5s ease-in-out; }
.contain-bg { background-size: contain !important; background-color: #111 !important; }
.front-overlay { position: absolute; bottom: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.4), transparent); text-align: left; }

.flip-card-back { background-color: #111; color: var(--text-main); transform: rotateY(180deg); padding: 30px 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 2px solid var(--accent-color); }
.flip-card-back h3 { margin-bottom: 15px; color: var(--text-bright); }
.flip-card-back p { font-size: 1rem; margin-bottom: 25px; text-align: center; }
.tech-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 25px; }
.tech-tags span { background: rgba(102, 252, 241, 0.1); color: var(--accent-color); padding: 5px 12px; font-size: 0.9rem; border-radius: 20px; border: 1px solid var(--accent-color); }
.card-links a { color: var(--bg-color); background: var(--accent-color); padding: 10px 20px; border-radius: 5px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.card-links a:hover { box-shadow: 0 0 15px var(--accent-color); }

/* --- CONTACT --- */
.contact-container { display: flex; gap: 50px; padding: 40px; }
.contact-info { flex: 1; }
.contact-info p { margin-bottom: 30px; }
.info-item { margin-bottom: 15px; font-size: 1.1rem; }
.info-item i { color: var(--accent-color); margin-right: 10px; }
.social-links a { color: var(--text-main); font-size: 1.8rem; margin-right: 15px; transition: 0.3s; }
.social-links a:hover { color: var(--accent-color); transform: scale(1.1); display: inline-block; }
.contact-form { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; background: rgba(0,0,0,0.5); border: 1px solid #333; border-radius: 5px; color: var(--text-bright); outline: none; transition: 0.3s; font-family: inherit;}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent-color); }

footer { text-align: center; padding: 20px; background: rgba(11,12,16,0.9); z-index: 2; position: relative;}
.hidden { opacity: 0; transform: translateY(50px); transition: all 0.8s ease-out; }
.show { opacity: 1; transform: translateY(0); }

/* --- FLOATING MUSIC BTN --- */
.floating-btn { position: fixed; bottom: 30px; right: 30px; background: #111; color: var(--accent-color); border: 2px solid var(--accent-color); padding: 10px 20px; border-radius: 30px; cursor: pointer; z-index: 9999; font-family: 'Poppins', sans-serif; font-weight: 600; box-shadow: 0 0 15px rgba(102, 252, 241, 0.2); transition: 0.3s; display: flex; align-items: center; gap: 10px; }
.floating-btn:hover { background: var(--accent-color); color: var(--bg-color); box-shadow: 0 0 20px var(--accent-color); }

/* --- MOBILE RESPONSIVENESS FIXES --- */
@media (max-width: 768px) {
    /* Stack the navigation bar neatly */
    nav { 
        flex-direction: column; 
        padding: 15px; 
        gap: 10px; 
    }
    .nav-links { 
        gap: 15px; 
        font-size: 0.9rem; 
        flex-wrap: wrap; 
        justify-content: center; 
    }
    
    /* Scale down Hero Text */
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content h2 { font-size: 1.3rem; }
    .hero-buttons { display: flex; flex-direction: column; gap: 15px; align-items: center; }
    .btn { margin-right: 0; width: 80%; text-align: center; }

    /* Fix Layout Overlaps */
    .about-container, .contact-container { 
        flex-direction: column; 
        padding: 20px; 
    }

    /* Fix the Cards (Make them taller and reduce text size) */
    .portfolio-grid { grid-template-columns: 1fr; }
    .flip-card { height: 480px; } /* Gives more vertical room */
    .flip-card-back { padding: 20px 15px; }
    .flip-card-back h3 { font-size: 1.2rem; margin-bottom: 10px; }
    .flip-card-back p { font-size: 0.85rem; margin-bottom: 15px; }
    .tech-tags span { padding: 4px 8px; font-size: 0.75rem; }

    /* Shrink the floating music button so it doesn't block text */
    .floating-btn { 
        bottom: 15px; 
        right: 15px; 
        padding: 8px 15px; 
        font-size: 0.8rem; 
    }
        .hero-content { 
        margin-top: 100px; 
    }
}
