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

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #111111;
    height: 100vh;
    overflow-x: hidden;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5%;
    width: 100%;
    position: sticky;
    top: 0;
    background-color: #ffffff;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 400; /* Regular weight matches reference */
    letter-spacing: -0.5px;
}

.nav-links a {
    text-decoration: none;
    color: #111111;
    margin-left: 2rem;
    font-size: 1rem;
    position: relative;
    padding-bottom: 2px;
}

/* Underline for 'Home' */
.nav-links a.active {
    border-bottom: 1.5px solid black;
}

.nav-links a:hover {
    opacity: 0.7;
}

/* Main Layout */
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: calc(100vh - 100px); /* Full height minus nav */
    max-width: 1440px;
    margin: 0 auto;
}

/* Left Side (Text) */
.content-left {
    flex: 1;
    padding-right: 50px;
}

h1 {
    font-size: 4rem; /* Large headline */
    font-weight: 400; /* Regular base weight */
    line-height: 1.2;
    margin-bottom: 8rem; /* Large gap before paragraph */
    letter-spacing: -1px;
}

h1 strong {
    font-weight: 600; /* Bold User/Experiences */
}

.content-left p {
    font-size: 1.125rem;
    line-height: 1.6;
    max-width: 520px; /* Limits width to match reference */
    color: #111;
}

/* --- TEXT JUSTIFICATION UTILITY --- */
/* Apply to any paragraph: class="text-justify" */
.text-justify {
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

/* Right Side (Image) */
.content-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.image-wrapper {
    width: 450px; 
    height: 580px; 
    overflow: hidden;
    /* This creates the oval shape */
    border-radius: 50%; 
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures photo fills oval without stretching */
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }
    .image-wrapper {
        width: 350px;
        height: 450px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column-reverse; /* Image on top, or remove reverse for bottom */
        height: auto;
        padding-bottom: 50px;
    }
    
    .content-left {
        padding-right: 0;
        text-align: left;
        margin-top: 40px;
    }

    h1 {
        margin-bottom: 2rem;
        font-size: 2.5rem;
    }

    .content-right {
        justify-content: center;
        width: 100%;
    }

    .image-wrapper {
        width: 100%;
        max-width: 350px;
        height: 450px;
    }
}

/* --- PROJECT SECTION STYLES --- */

#projects {
    max-width: 1440px;
    margin: 0 auto;
    padding: 100px 5%; /* Top/Bottom padding for the whole section */
    padding-bottom: 150px;
}

.section-heading {
    text-align: center;
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 100px; /* Space between "Project" title and first card */
}

/* Individual Project Container */
.project-item {
    display: flex;
    align-items: center; /* Vertically centers text with image */
    justify-content: space-between;
    gap: 80px; /* Space between image and text */
    margin-bottom: 120px; /* Space between each project */
}

/* To alternate layout (Image right, Text left) for the 2nd project */
/* Remove this block if you want them all aligned the same way */
.project-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* Image Styling */
.project-image {
    flex: 1.3; /* Image takes up slightly more width than text */
    height: auto;
    border-radius: 30px; /* Matches the rounded corners in reference */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); /* Soft shadow like reference */
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: translateY(-5px); /* Subtle lift effect on hover */
}

.project-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Text Content Styling */
.project-content {
    flex: 1;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 700; /* Bold Company Name */
    margin-bottom: 5px;
}

.project-content h4 {
    font-size: 1.5rem;
    font-weight: 400; /* Regular weight for Project Title */
    margin-bottom: 30px;
    color: #333;
}

.project-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 40px;
    max-width: 450px;
}

/* Button Styling */
.btn-case-study {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    padding: 18px 35px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-case-study:hover {
    background-color: #333333;
}

/* Mobile Responsiveness for Projects */
@media (max-width: 1024px) {
    .project-item {
        flex-direction: column;
        gap: 40px;
        margin-bottom: 80px;
    }
    
    /* Ensure 2nd project doesn't reverse on tablet/mobile */
    .project-item:nth-child(even) {
        flex-direction: column;
    }

    .project-image {
        width: 100%;
        max-width: 600px; /* Prevents image from getting too huge on tablet */
    }

    .project-content {
        width: 100%;
        text-align: left;
    }
}

/* --- HAMBURGER MENU STYLES --- */

/* 1. Default: Hide Hamburger on Desktop */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: #111;
}

/* --- MOBILE RESPONSIVENESS & HAMBURGER --- */
@media (max-width: 768px) {
    
    /* 1. Show the hamburger icon */
    .hamburger {
        display: block;
        z-index: 2000; /* Ensure it stays on TOP of the white menu */
    }

    /* 2. Style the Menu Sidebar */
    .nav-links {
        /* Essential for vertical stacking */
        display: flex; 
        flex-direction: column; 
        
        /* Positioning */
        position: fixed;
        top: 0;
        right: -100%; /* Hidden by default */
        height: 100vh;
        width: 100%; /* Full width looks better on mobile than 70% */
        background-color: #ffffff;
        
        /* Centering the text */
        justify-content: center;
        align-items: center;
        
        /* Styling */
        gap: 50px; /* Space between the links */
        transition: 0.4s ease;
        z-index: 1000;
    }

    /* 3. Style the Links inside the menu */
    .nav-links a {
        font-size: 2rem; /* Make text bigger */
        margin-left: 0;  /* Remove desktop margin */
        color: #000;
        font-weight: 600;
    }

    /* 4. Slide in class (Added by JS) */
    .nav-links.active {
        right: 0;
    }

    /* --- Hamburger to 'X' Animation --- */
    /* This turns the 3 lines into an X when clicked */
    
    /* Rotate top bar */
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    /* Hide middle bar */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    /* Rotate bottom bar */
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}