@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Plus+Jakarta+Sans:wght@300;400;600;800&display=swap');

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #020617;
    overflow-x: hidden; /* Prevents horizontal scrolling on mobile */
}

.mono { font-family: 'Fira Code', monospace; }

/* --- Navbar Design --- */
.navbar {
    position: fixed;
    width: 100%;
    z-index: 100;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-text { 
    font-family: 'Fira Code', monospace; 
    color: #10b981; 
    font-weight: 700; 
    font-size: 1.1rem; 
}

.nav-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-link { color: #64748b; transition: all 0.3s ease; }
.nav-link:hover { color: #fff; transform: translateY(-1px); }

.contact-pill {
    padding: 0.4rem 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
    border-radius: 9999px;
    transition: all 0.3s ease;
}
.contact-pill:hover { background: #10b981; color: #020617; border-color: #10b981; }

/* --- Navbar Mobile Logic (FIXED) --- */
@media (max-width: 768px) {
    .nav-container {
        position: fixed; /* Fixed covers the whole screen regardless of scroll */
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform: translateY(-100%);
        z-index: 40;
        gap: 2.5rem;
    }

    #menu-toggle:checked ~ .nav-container {
        transform: translateY(0);
    }

    #menu-toggle:checked ~ label #open-icon { display: none; }
    #menu-toggle:checked ~ label #close-icon { display: inline-block; }

    .nav-link { 
        font-size: 1.5rem; 
        color: #fff !important; 
    }

    /* Stack Header Elements on Mobile */
    header .grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    header h1 { font-size: 3rem !important; }
    
    .terminal-window {
        margin-top: 2rem;
        width: 100%;
    }
}

/* --- UI Components --- */
.glass { background: rgba(255, 255, 255, 0.02); backdrop-filter: blur(10px); }

.project-glass {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 28px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.project-glass:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}

.gradient-text {
    background: linear-gradient(to right, #10b981, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Terminal Styles --- */
.terminal-window { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); }
.terminal-header { background: rgba(30, 41, 59, 0.7); padding: 10px 16px; display: flex; gap: 8px; align-items: center; position: relative; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.red { background: #ff5f56; } .yellow { background: #ffbd2e; } .green { background: #27c93f; }

.img-container {
    transition: all 0.5s ease 0.3s;
    transform: translateX(100px);
    opacity: 0;
}
.img-container.visible {
    transform: translateX(0);
    opacity: 1;
}

/* --- Buttons & Tags --- */
.btn-solid {
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn-solid:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.4); }

@media (max-width: 480px) {
    .btn-solid { width: 100%; } /* Full width buttons for small phones */
}

.cursor {
    display: inline-block;
    background: #10b981;
    width: 8px; height: 16px;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- Sections --- */
.section-title { font-size: 2.2rem; font-weight: 800; color: white; margin-bottom: 3rem; }
.section-title span { color: #10b981; font-family: 'Fira Code', monospace; margin-right: 1.5rem; font-size: 1.2rem; }

.tag {
    padding: 4px 14px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
}

/* --- Scroll to Top --- */
#scrollToTopBtn {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

#scrollToTopBtn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- Refined, Smoother Button Hovers --- */

/* Make sure the transition is smooth */
.btn-solid {
    transition: all 0.3s ease-in-out !important;
}

/* GitHub Button: Subtle lighten instead of a harsh white flash */
.btn-solid[href*="github.com"]:hover {
    background: #334155 !important; /* Lighter slate gray */
    color: #ffffff !important;      /* Keep text white */
    border-color: #475569 !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15); /* Very soft silver glow */
}

/* LinkedIn Button: Rich brand blue glow */
.btn-solid[href*="linkedin"]:hover {
    background: #2563eb !important; /* Slightly darker/richer blue */
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Resume Button: Rich emerald glow */
.btn-solid[href*=".pdf"]:hover {
    background: #059669 !important; /* Slightly deeper emerald */
    color: #ffffff !important;
    border-color: #059669 !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

/* LeetCode Button: Keep the subtle orange */
.btn-solid[href*="leetcode"]:hover {
    background: rgba(255, 161, 22, 0.2) !important; /* Transparent orange fill */
    color: #FFA116 !important;
    border-color: #FFA116 !important;
    box-shadow: 0 0 15px rgba(255, 161, 22, 0.3);
}

.btn-solid i {
    font-size: 1rem;
}

@media (max-width: 480px) {
    .flex.justify-center.gap-10 {
        gap: 2rem !important;
    }
}

/* --- Force Terminal Text to Stay Left-Aligned on All Screens --- */
.terminal-window, 
.terminal-body {
    text-align: left !important;
}

/* Ensure the log lines wrap correctly but stay aligned */
.log-lines {
    text-align: left !important;
    white-space: normal; /* Allows long text to wrap to the next line naturally */
}

/* --- ASCII Art Line-Height Fix --- */
.whitespace-pre {
    line-height: 1.1 !important;
    letter-spacing: 0px !important;
}