/* 1. Reset & Global Styles */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background-color: #0f172a; 
    color: #f1f5f9; 
    line-height: 1.6;
    /* Subtle background image and gradient overlay */
    background: linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)), 
                url('https://images.unsplash.com/photo-1667670778881-537035257bd8?q=80&w=1160&auto=format&fit=crop') no-repeat center center fixed;
    background-size: cover;
}

/* 2. Navigation */
nav { 
    display: flex; 
    justify-content: space-between; 
    padding: 2rem 10%; 
    align-items: center;
    position: relative;
    z-index: 100;
}
nav ul { display: flex; list-style: none; }
nav ul li { margin-left: 20px; }
nav ul li a { color: #94a3b8; text-decoration: none; font-weight: bold; transition: 0.3s; }
nav ul li a:hover { color: #38bdf8; }

/* 3. Hero Section (The Wrapping Fix) */
/* 3. Hero Section (The Vertical Pin Fix) */
header.hero {
    display: flex;
    align-items: flex-end; 
    justify-content: center;
    height: auto;
    min-height: 0vh;
    padding: 40px 10% 0 10%; 
    position: relative;
    overflow: hidden;
}



.hero-content {
    display: flex;
    flex-wrap: wrap; 
    align-items: flex-end; /* CHANGE: Ensures both text and image sit on the same bottom baseline */
    justify-content: center; 
    width: 100%;
    max-width: 1200px;
    gap: 40px; 
    z-index: 5;
    margin-top: 0;
}

.hero-text {
    flex: 1 1 500px; 
    text-align: left;
    position: relative;
    z-index: 50; 
    padding-bottom: 25vh; /* CHANGE: Lifts text slightly so it aligns with your chest/face instead of your feet */

}

.hero-text h1 { 
    font-size: clamp(2.5rem, 6vw, 4.5rem); 
    line-height: 1.1;
    margin-bottom: 15px; 
}

.highlight { color: #38bdf8; }
.hero-text p { font-size: clamp(1rem, 2vw, 1.25rem); color: #94a3b8; margin-bottom: 30px; }

.hero-image-container {
    flex: 1 1 450px; 
    display: flex;
    justify-content: center;
    align-items: flex-end; /* KEEP: This is vital for the cutout effect */
    position: relative;
    z-index: 1; 
}

.hero-cutout {
    max-height: 70vh; /* CHANGE: Slightly reduced from 85vh to leave more "breathing room" at the top */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(10px 10px 40px rgba(0, 0, 0, 0.6));
    display: block;
    margin-bottom: -5px; 
}

/* 4. Buttons & Social Icons */
.btn { 
    background: #38bdf8; 
    color: #0f172a; 
    padding: 12px 24px; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: bold; 
    transition: 0.3s;
    border: none;
    cursor: pointer;
}
.btn:hover { background: #7dd3fc; transform: translateY(-2px); }

.cta-group {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 60;
}
.linkedin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #0077b5;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.4rem;
    transition: 0.3s;
}
.linkedin-btn:hover { background-color: #005582; transform: scale(1.1); }

.github-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #24292e; /* GitHub Dark Gray */
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.6rem;
    transition: 0.3s ease;
}

.github-btn:hover {
    background-color: #404448;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}


/* Dropdown Menu */
.dropdown { position: relative; }
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e293b;
    min-width: 160px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5);
    z-index: 100;
    border-radius: 8px;
    padding-top: 10px;
    margin-top: -5px;
    left: 50%;
    transform: translateX(-50%);
}
.dropdown-content a { color: #f1f5f9; padding: 12px 16px; text-decoration: none; display: block; font-weight: bold; }
.dropdown-content a:hover { background-color: #38bdf8; color: #0f172a; }
.dropdown:hover .dropdown-content { display: block; }

/* 5. About Me (The Cutter) */
#about {
    position: relative;
    z-index: 10;
    background-color: #0f172a; /* Re-applied solid background */
    padding: 100px 10%;
    margin-top: -60px; /* Cut effect */
    box-shadow: 0 -30px 50px rgba(15, 23, 42, 1);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 { font-size: 2.5rem; margin-bottom: 2rem; }

.stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
}

.stat-item span {
    font-size: 2rem;
    color: #38bdf8;
    font-weight: bold;
    display: block;
}

/* 6. Projects Section */
#projects { 
    padding: 80px 10%; 
    /* Removed the forced solid background I added previously */
}

.project-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
}
.project-card { background: #1e293b; padding: 25px; border-radius: 12px; border: 1px solid #334155; }
.tags span { background: #334155; font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; margin-right: 8px; }
.btn-small { color: #38bdf8; text-decoration: none; font-size: 0.9rem; border: 1px solid #38bdf8; padding: 6px 12px; border-radius: 4px; display: inline-block; margin-top: 15px; }

/* 7. Contact Section */
#contact {
    padding: 100px 10%;
    text-align: center;
    background-color: rgba(30, 41, 59, 0.4);
}
#contact h2 { font-size: 2.5rem; margin-bottom: 20px; }
#contact p { color: #94a3b8; max-width: 600px; margin: 0 auto 30px; }

/* 8. RESPONSIVE FIXES (The Wrap Logic) */
@media (max-width: 1237px) { 
    .hero-text {
        padding-bottom: 0; /*Remove padding when picture stacks*/
        
    }
}

@media (max-width: 800px) {
    .hero-text { text-align: center; padding-right: 0; margin-bottom: 20px; }
    .cta-group { justify-content: center; }
    .hero-cutout { max-height: 50vh; margin-bottom: -40px; }
    #about { margin-top: -40px; }
}

@media (max-width: 480px) {
    nav { flex-direction: column; gap: 10px; }
    .stats { flex-direction: column; gap: 30px; }
}