/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
    background-color: #050505; /* Pitch Black */
    color: #e0e0e0; /* Off-White text */
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Typography & Colors */
h1, h2, h3, .logo, .terminal-box {
    font-family: 'Fira Code', monospace;
}

.accent { color: #58a6ff; } /* Blue Accent */
.green { color: #00ff41; }

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Navigation - STICKY & RESPONSIVE */
nav {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 2rem;
    align-items: center;
    position: sticky; /* Sticky Header */
    top: 0;
    background: rgba(5, 5, 5, 0.9); /* Translucent background */
    backdrop-filter: blur(10px); /* Blur effect */
    z-index: 1000;
    border-bottom: 1px solid #1f1f1f;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: #58a6ff;
}

.links a {
    margin-left: 20px;
    font-size: 0.9rem;
    color: #888;
    position: relative;
}

.links a:hover { color: #58a6ff; }

/* Hero Section */
.hero {
    min-height: 90vh; /* Changed from height to min-height for mobile */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 2px solid #333;
    object-fit: cover;
}

.hero h1 { font-size: 3rem; margin-bottom: 10px; line-height: 1.2; }
.tagline { color: #888; margin-bottom: 30px; font-size: 1.1rem; }

.terminal-box {
    background: #111;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #58a6ff;
    text-align: left;
    display: inline-block;
    width: 100%;
    max-width: 500px;
    font-size: 0.9rem;
    color: #bbb;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: #58a6ff;
}

@keyframes blink { 50% { opacity: 0; } }

/* Sections */
.section { padding: 80px 20px; }
.container { max-width: 900px; margin: 0 auto; }
.section-title {
    font-size: 1.8rem;
    margin-bottom: 40px;
    color: #58a6ff;
    border-bottom: 1px solid #222;
    padding-bottom: 10px;
    display: inline-block;
}

/* Content Text */
.content-text p { margin-bottom: 1.5rem; color: #ccc; }

/* About Skills */
.skills { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.skills span {
    background: #1a1a1a;
    padding: 8px 15px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    border: 1px solid #333;
    transition: 0.3s;
}
.skills span:hover { border-color: #58a6ff; color: #fff; }

/* Projects Grid - IMPROVED */
.project-grid {
    display: grid;
    /* Better minmax for mobile to avoid squishing */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px;
}

.project-card {
    background: #0f0f0f;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #222;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-7px);
    border-color: #58a6ff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.project-card h3 { font-size: 1.3rem; margin-bottom: 10px; color: #fff; }
.project-card p { font-size: 0.95rem; color: #aaa; margin-bottom: 20px; flex-grow: 1; }

.tech-stack { margin-bottom: 20px; font-size: 0.75rem; font-family: 'Fira Code'; color: #666; display: flex; flex-wrap: wrap; gap: 8px; }
.tech-stack span { background: #181818; padding: 4px 8px; border-radius: 4px; }

.btn-small {
    font-size: 0.9rem;
    color: #58a6ff;
    font-family: 'Fira Code';
    font-weight: bold;
    align-self: flex-start;
}
.btn-small:hover { text-decoration: underline; }

/* Contact Button */
.center { text-align: center; }
.btn-main {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 35px;
    border: 1px solid #58a6ff;
    color: #58a6ff;
    border-radius: 5px;
    font-family: 'Fira Code';
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-main:hover {
    background: rgba(88, 166, 255, 0.1);
    box-shadow: 0 0 15px rgba(88, 166, 255, 0.2);
}

footer {
    text-align: center;
    padding: 40px;
    color: #444;
    font-size: 0.9rem;
    font-family: 'Fira Code';
    border-top: 1px solid #111;
    margin-top: 40px;
}

/* ANIMATIONS */
.hidden {
    opacity: 0;
    filter: blur(5px);
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.show {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* --- MOBILE RESPONSIVE UPDATES --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 15px;
        padding: 1rem;
    }

    .links {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .links a { margin-left: 0; }

    .hero h1 { font-size: 2.2rem; }
    
    .terminal-box {
        font-size: 0.8rem;
        padding: 15px;
    }

    .section { padding: 60px 20px; }
    
    .project-grid {
        grid-template-columns: 1fr; /* 1 column on tablets/phones */
    }
}