:root {
    --accent: #00a2ff;
    --bg: #08090a;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text: #e0e0e0;
}

* { margin: 0; padding: 0; box-space: border-box; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mouse Follower */
.glow-follower {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 162, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.portfolio-wrapper {
    display: flex;
    gap: 20px;
    width: 90vw;
    height: 85vh;
    z-index: 1;
}

/* Sidebar */
.glass-sidebar {
    width: 280px;
    background: var(--glass);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.avatar-glow {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 162, 255, 0.3);
}

.avatar-glow img { width: 100%; height: 100%; object-fit: cover; }

.nav-menu { flex-grow: 1; margin-top: 40px; display: flex; flex-direction: column; gap: 10px; }

.nav-btn {
    background: none;
    border: none;
    color: #888;
    padding: 12px 15px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-btn i { width: 20px; }
.nav-btn.active, .nav-btn:hover { background: var(--glass); color: var(--accent); }

/* Main Stage */
.glass-stage {
    flex-grow: 1;
    background: var(--glass);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    overflow-y: auto;
}

/* Terminal */
.terminal-window {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Fira Code', monospace;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.t-header { background: #1a1a1a; padding: 10px 15px; display: flex; justify-content: space-between; align-items: center; }
.t-dots { display: flex; gap: 6px; }
.t-dots span { width: 10px; height: 10px; border-radius: 50%; }
.r { background: #ff5f56; } .y { background: #ffbd2e; } .g { background: #27c93f; }
.t-body { padding: 20px; color: #00ff00; line-height: 1.6; }

/* Pulse Animation */
.pulse {
    width: 8px;
    height: 8px;
    background: #27c93f;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 rgba(39, 201, 63, 0.4);
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(39, 201, 63, 0); }
    100% { box-shadow: 0 0 0 0 rgba(39, 201, 63, 0); }
}

/* Chart Container */
.skills-container { max-width: 500px; margin: 40px auto; }
/* Timeline Styling */
.timeline {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--border);
    margin: 20px 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.time-dot {
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
}

.time-content h3 { color: var(--accent); margin: 5px 0; }
.time-date { font-size: 0.8rem; opacity: 0.6; font-family: 'Fira Code'; }

/* Github Heatmap Styling */
.github-heatmap {
    display: grid;
    grid-template-columns: repeat(25, 1fr); /* Adjust based on preference */
    gap: 4px;
    background: rgba(255,255,255,0.02);
    padding: 15px;
    border-radius: 10px;
}

.heat-sq {
    width: 12px;
    height: 12px;
    background: #161b22;
    border-radius: 2px;
}

.heat-sq.active { background: #39d353; opacity: 0.6; }

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.fab {
    width: 60px;
    height: 60px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(0, 162, 255, 0.4);
    transition: transform 0.3s;
}

.fab:hover { transform: scale(1.1) rotate(5deg); }
/* Ensure all sections are hidden by default EXCEPT the terminal */
.content-section {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.content-section.active {
    display: block;
    opacity: 1;
}

/* Specific styling for the Experience section we added earlier */
#experience {
    padding-bottom: 50px;
}
.contact-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

.contact-form-glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 20px;
}

.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.8rem; color: var(--accent); margin-bottom: 8px; font-family: 'Fira Code'; }

.input-group input, .input-group textarea {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    padding: 12px;
    color: white;
    border-radius: 8px;
    outline: none;
}

.send-btn {
    width: 100%;
    padding: 15px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.send-btn:hover { background: #008ae6; box-shadow: 0 0 20px rgba(0, 162, 255, 0.4); }

/* Social Tiles */
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 20px 0; }
.social-tile {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    transition: 0.3s;
    text-decoration: none;
}

.social-tile:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-5px); }

.info-card { background: var(--glass); padding: 20px; border-radius: 15px; border-left: 3px solid var(--accent); }
.copy-btn { background: transparent; border: 1px solid var(--accent); color: var(--accent); padding: 5px 10px; border-radius: 5px; cursor: pointer; margin-top: 10px; font-size: 0.7rem; }
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    height: 70vh;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid var(--accent);
    border-radius: 20px;
    z-index: 1000;
    padding: 40px;
    box-shadow: 0 0 50px rgba(0,0,0,1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.5rem;
}
/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active { display: flex; opacity: 1; }

.modal-window {
    width: 90%;
    max-width: 850px;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    background: #0f0f0f;
    border: 1px solid var(--accent);
    border-radius: 15px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-window { transform: scale(1); }

.modal-header {
    background: #1a1a1a;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.modal-img {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

#modalName { color: var(--accent); margin-bottom: 15px; }
#modalDesc { color: #bbb; line-height: 1.6; margin-bottom: 20px; font-size: 0.95rem; }

/* Unique Data Log Styling */
.data-log-box {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
.data-log-box h4 { font-size: 0.8rem; color: #888; margin-bottom: 10px; font-family: 'Fira Code', monospace; }
.data-log-box ul { list-style: none; padding: 0; font-family: 'Fira Code', monospace; font-size: 0.75rem; }
.data-log-box li { margin-bottom: 5px; color: var(--accent); }

.modal-footer {
    padding: 20px 30px;
    background: #151515;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
}

.main-action-btn {
    background: var(--accent);
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.main-action-btn:hover { box-shadow: 0 0 20px var(--accent); transform: translateY(-2px); }

@media (max-width: 768px) {
    .modal-window {
        width: 95%;
        max-height: 90vh; /* Keeps it from hitting the very edges */
        margin: 10px;
    }
    .modal-body {
         grid-template-columns: 1fr; 
        padding: 15px;
        gap: 15px;
        overflow-y: auto;
    }
    .modal-img {
        height: 160px; /* Reduced from 250px */
        width: 100%;
    }
    .modal-footer {
        padding: 15px;
        background: #1a1a1a;
        position: sticky; /* Keeps the button stuck to the bottom of the modal */
        bottom: 0;
        display: flex;
        justify-content: center; /* Center the button for easier thumb access */
        border-top: 1px solid var(--border);
    }
    .main-action-btn {
        width: 100%; /* Make button wide for easier clicking */
        text-align: center;
        padding: 10px;
        margin-bottom: 80px;
    }

    /* Add space at the bottom of the text so it doesn't touch the button */
    #modalDesc {
        margin-bottom: 30px;
    }
}
/* Project Grid Layout */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* The Card Container */
.project-card {
    background: rgba(15, 15, 15, 0.6);
    border: 1px solid rgba(0, 162, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensures all cards in a row are same height */
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 162, 255, 0.1);
}

/* The Image Area */
.p-img {
    width: 100%;
    height: 180px; 
    background-color: #080808; /* Slightly lighter than pure black for depth */
    
    /* THE FIX: 'contain' keeps the whole logo visible. 
       90% ensures it doesn't touch the borders (very professional look) */
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    
    position: relative;
    border-bottom: 1px solid rgba(0, 162, 255, 0.1);
    
    /* Subtle inner shadow to make the image "sit" inside the card */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    transition: background-size 0.3s ease;
}


/* Hover Overlay for the Image */
.p-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 162, 255, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.3s;
    font-weight: bold;
    color: white;
}
.p-overlay { opacity: 1; }

.project-card:hover { opacity: 1; }
.project-card:hover .p-img {
    transform: scale(1.05);
}

/* Text Area inside Card */
.p-info {
    padding: 15px;
    flex-grow: 1;
}
.p-info h3 {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 5px;
}
.p-info p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

/* Small tags on the card preview */
.p-tags-preview span {
    font-size: 0.7rem;
    background: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 4px;
    margin-right: 5px;
    color: var(--accent);
}
/* --- MOBILE RESPONSIVENESS --- */

@media (max-width: 992px) {
    body {
        overflow: auto; /* Allow scrolling on mobile */
        height: auto;
        padding: 10px;
        align-items: flex-start;
    }

    /* 1. Transform the Wrapper */
    .portfolio-wrapper {
        flex-direction: column; /* Stack sidebar on top of stage */
        width: 100%;
        height: auto;
        gap: 15px;
        margin-bottom: 80px; /* Space for the bottom nav */
    }

    /* 2. Sidebar becomes a Top Profile Header */
    .glass-sidebar {
        width: auto;
        padding: 20px;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        border-radius: 18px;
    }

    .avatar-glow {
        width: 60px;
        height: 60px;
        margin-bottom: 0;
    }

    /* Hide the sidebar nav menu on mobile because we will use a bottom bar */
    .nav-menu {
        display: none;
    }

    /* 3. Main Stage Adjustments */
    .glass-stage {
        padding: 20px;
        height: auto;
        min-height: 60vh;
        border-radius: 18px;
        overflow-y: visible; /* Let the body handle scrolling */
    }

    /* 4. Project Grid & Contact Forms */
    .project-grid {
        grid-template-columns: 1fr; /* Single column for cards */
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .social-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* 5. Create a Fixed Bottom Navigation Bar */
    /* Add this class to your sidebar buttons via JS or keep the Sidebar hidden and use this bar */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.8);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        justify-content: space-around;
        padding: 12px 0;
        z-index: 9999;
    }

    .mobile-nav .nav-btn {
        flex-direction: column;
        gap: 5px;
        font-size: 0.7rem;
        padding: 5px;
        align-items: center;
        color: #666;
    }

    .mobile-nav .nav-btn i {
        font-size: 1.2rem;
    }

    /* Adjust Modal for Mobile */
    .modal-window {
        width: 95%;
        height: 90vh;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    /* Hide Mouse Glow on Mobile (Performance) */
    .glow-follower {
        display: none;
    }
}

/* Extra small devices (Phones) */
@media (max-width: 480px) {
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .t-header {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
/* Pull to Refresh Styling */
.refresh-container {
    position: fixed;
    top: -60px; /* Hidden by default */
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: rgba(0, 162, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    z-index: 10000;
    transition: top 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.refresh-container.visible {
    top: 0;
}

.refresh-icon {
    font-size: 1.2rem;
}