/* =========================================
   1. VARIABLES & RESET
   ========================================= */
   :root {
    --primary-color: #2563EB; /* Professional Blue */
    --secondary-color: #1E293B; /* Dark Slate */
    --accent-color: #3B82F6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg-light: #f3f4f6;
    --max-width: 1200px;
    --font-main: 'Poppins', sans-serif;
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden; /* Prevents horizontal scrollbar */
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   2. TYPOGRAPHY & BUTTONS
   ========================================= */
h1, h2, h3 {
    color: var(--secondary-color);
    line-height: 1.2;
}

p { color: var(--text-light); margin-bottom: 15px; }

/* Responsive Typography */
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    transition: 0.3s;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 10px;
    background: transparent;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 50px; }

/* =========================================
   3. NAVBAR
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { font-size: 1.5rem; font-weight: 700; }
.logo span { color: var(--primary-color); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); }

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-dark); }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    position: relative;
    padding: 50px 0; /* Add padding to prevent cut-off on small screens */
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-text { flex: 1; }

.hero-text .tagline {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 15px;
}

.hero-text h1 { margin-bottom: 20px; }
.hero-text p { font-size: 1.1rem; margin-bottom: 30px; max-width: 90%; }

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-img {
    width: 100%;
    max-width: 400px; /* Limits size on desktop */
    height: auto;     /* Maintains aspect ratio */
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--white);
    /* Shadow removed as requested */
}

/* =========================================
   5. GRIDS (About, Skills, Services)
   ========================================= */
.about-grid, .services-grid, .skills-wrapper, .mini-projects-grid {
    display: grid;
    /* This makes columns strictly responsive */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.about-card, .service-box, .mini-project {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: 0.3s;
}

.about-card { text-align: center; }
.about-card:hover, .service-box:hover { transform: translateY(-5px); border-color: var(--primary-color); }
.about-card i, .service-box i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 20px; }

/* Skills Specifics */
.skill-category h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 5px;
}

.skill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-list span {
    background: var(--white);
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.skill-list span i { color: var(--primary-color); }

/* =========================================
   6. PORTFOLIO
   ========================================= */
.featured-project {
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 50px;
    flex-wrap: wrap; /* Allows stacking on mobile */
}

.project-info { flex: 1; padding: 40px; min-width: 300px; }
.project-img-wrapper {
    flex: 1;
    background: #e2e8f0;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 300px;
}

.badge {
    background: #dbeafe; color: var(--primary-color);
    padding: 5px 15px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 700;
    text-transform: uppercase; display: inline-block; margin-bottom: 15px;
}

.tech-stack { display: flex; gap: 15px; margin: 20px 0 30px; flex-wrap: wrap; }
.tech-stack li { font-size: 0.9rem; font-weight: 600; }
.text-link { color: var(--primary-color); font-weight: 600; margin-top: 15px; display: inline-block; }

.browser-mockup {
    width: 80%; background: var(--white);
    border-radius: 8px; box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    overflow: hidden;
}
.browser-header { background: #f1f5f9; padding: 10px 15px; display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ef4444; } .yellow { background: #f59e0b; } .green { background: #10b981; }
.browser-content { padding: 40px; text-align: center; color: var(--secondary-color); }

/* =========================================
   7. CONTACT SECTION
   ========================================= */
.contact-container { display: flex; flex-wrap: wrap; gap: 40px; }
.contact-text, .contact-form { flex: 1; min-width: 300px; }

.contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.social-links { display: flex; gap: 20px; margin-top: 20px; }
.social-links a { font-size: 1.5rem; transition: 0.3s; }
.social-links a:hover { color: var(--primary-color); }

.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); }

footer { background: var(--secondary-color); color: var(--white); text-align: center; padding: 25px 0; margin-top: 50px; }

/* =========================================
   8. MEDIA QUERIES (The Fixes)
   ========================================= */

/* Tablet & Smaller Laptops (1024px and down) */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    .hero-content { gap: 20px; }
    .profile-img { max-width: 350px; }
}

/* Tablets & Large Phones (768px and down) */
@media (max-width: 768px) {
    /* Navbar Mobile Logic */
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 30px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        border-top: 1px solid #eee;
    }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    
    /* Hero Fixes */
    .hero { height: auto; padding-top: 40px; }
    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero-text { padding-right: 0; }
    .hero-btns { justify-content: center; }
    
    /* Image resizing for tablet/mobile */
    .profile-img { 
        max-width: 280px; 
        margin-bottom: 20px; 
    }

    /* Contact Form Fix */
    .contact-container { flex-direction: column; }
    .contact-text, .contact-form { width: 100%; }
    
    /* Typography Adjustments */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

/* Small Phones (480px and down) */
@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    p { font-size: 1rem; }
    
    .btn-primary, .btn-secondary {
        width: 100%; /* Full width buttons on small phones */
        margin: 5px 0;
        margin-left: 0;
    }
    
    .section { padding: 50px 0; }
    
    .project-info { padding: 25px; }
    .project-img-wrapper { min-height: 200px; }
}