/* ==========================================================================
   CSS Variables & Reset
   ========================================================================== */
:root {
    --primary-blue: #3060FF;
    --primary-yellow: #F9C324;
    --text-dark: #111111;
    --text-muted: #333333;
    --bg-light: #F4F4F0;
    --white: #FFFFFF;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --border-width: 3px;
    --transition: all 0.2s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Typography & Utilities
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-white { color: var(--white); }
.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(48, 96, 255, 0.3);
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */
.navbar {
    padding: 24px 0;
    position: sticky;
    top: 0;
    background-color: rgba(244, 244, 240, 0.9);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 24px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 80px 0 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #E8E6DF;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
    padding: 40px 0;
}

.about-card {
    background-color: var(--primary-yellow);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 0 auto 40px;
    max-width: 800px;
    margin-top: -32px; /* Pulls it up by half of the 64px (4rem) h3 height */
    position: relative;
    z-index: 10;
    text-align: center;
}

.stat-item h3 {
    font-size: 4rem;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 8px;
}

.stat-item p {
    font-weight: 600;
    font-size: 1rem;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.skill-pill {
    background-color: rgba(0,0,0,0.05);
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(0,0,0,0.1);
}

/* ==========================================================================
   Projects Section
   ========================================================================== */
.projects {
    padding: 80px 0;
    position: relative;
    overflow-x: hidden;
    z-index: 1; /* Establish stacking context for the background */
}

.projects-blue-bg {
    position: absolute;
    top: 60px; /* Pushed down to reduce the gap above the text */
    left: 0;
    width: 40%; /* Reverted to 40% per user feedback */
    height: 340px; /* Slightly increased to add more space at the bottom */
    background-color: var(--primary-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    z-index: -1;
}

.projects-header {
    position: relative;
    display: block; /* No longer inline-block since background is separate */
    padding: 40px 0 20px; /* Adjust padding for visual alignment */
    margin-bottom: 40px;
}

.projects-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-top: 4px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.project-card {
    background: var(--white);
    border: var(--border-width) solid var(--text-dark);
    border-radius: var(--radius-md);
    padding: 32px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.category {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.number {
    font-size: 5rem;
    font-weight: 900;
    line-height: 0.8;
    color: var(--text-dark);
}

.card-content {
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.tech-stack span {
    background-color: var(--bg-light);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.visit-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 20px;
    background: var(--bg-light);
    border-radius: 100px;
    align-self: flex-start;
    transition: var(--transition);
}

.project-card:hover .visit-link {
    background: var(--primary-blue);
    color: var(--white);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    background-color: var(--primary-yellow);
    padding: 80px 0;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-content {
    max-width: 500px;
}

.contact-content p {
    font-size: 1.1rem;
    margin: 16px 0 32px;
    font-weight: 500;
}

.contact-socials {
    display: flex;
    gap: 24px;
}

.contact-socials a {
    font-size: 2.5rem;
    color: var(--text-dark);
    transition: var(--transition);
}

.contact-socials a:hover {
    transform: translateY(-4px);
    color: var(--primary-blue);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--primary-blue);
    padding: 32px 0;
    font-weight: 500;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-top: 40px;
    }
    
    .contact-container {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        padding: 0 16px;
        font-size: 1.1rem;
    }
    
    .projects-blue-bg {
        width: 90%; /* Take up most of the screen on mobile */
        height: 600px; /* Taller to cover the first stacked card nicely */
    }
}
