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

body {
    font-family: Arial, sans-serif;
    overflow-x: hidden;
}

header {
    background-color: black;
    padding: 10px 20px;
}

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

nav .logo {
    color: white;
    font-size: 24px;
}

nav ul {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

main {
    background: linear-gradient(to bottom right, #97ff7a, #ff8f57);
}

.content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70vh;
    width: 80%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

.image-container {
    flex: 1;
    padding: 20px;
    max-width: 50%;
}

.image-container .image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 10px;
    transition: background-position 0.3s ease;
    background-position: 50% 70%;
}

.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    overflow: hidden;
}

.text-container {
    flex: 1;
    text-align: center;
    padding: 20px;
}

.text-container h1 {
    font-size: 48px;
    color: white;
}

.text-container p {
    font-size: 24px;
    color: white;
    margin: 20px 0;
}

.text-container button {
    background-color: #ff66b2;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.text-container button:hover {
    background-color: #ff3385;
}

.portfolio-section {
    text-align: center;
    padding: 40px 20px;
    background-color: black;
    color: white;
}

.portfolio-section h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.portfolio-section p {
    font-size: 18px;
    margin-bottom: 20px;
}

.portfolio-grid {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.portfolio-item {
    position: relative;
    margin: 10px;
    overflow: hidden;
    width: 300px;
    height: 400px;
    flex: 1;
}

.portfolio-item .image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 10px;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: .5s ease;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.overlay .text {
    color: white;
    font-size: 20px;
}

/* Media Queries for iPhone */
@media (max-width: 768px) {
    header {
        padding: 10px 10px; /* Adjust padding for smaller screens */
    }

    nav ul {
        flex-direction: column; /* Stack menu items vertically */
        align-items: center;
    }

    nav ul li {
        margin: 5px 0; /* Reduce margin for menu items */
    }

    .content {
        flex-direction: column;
        height: auto;
        padding: 20px;
    }

    .text-container h1 {
        font-size: 24px;
    }

    .text-container p {
        font-size: 16px;
    }

    .portfolio-section h2 {
        font-size: 24px;
    }

    .portfolio-section p {
        font-size: 16px;
    }

    .portfolio-grid {
        flex-direction: column;
        align-items: center;
    }

    .portfolio-item {
        width: calc(100% - 20px);
        max-width: none;
        height: auto;
        margin-bottom: 20px; /* Ensure some spacing between items */
    }

    .portfolio-item .image {
        width: 100%;
        height: 200px; /* Adjust height as needed */
        background-size: cover;
        background-repeat: no-repeat;
        border-radius: 10px;
    }

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 10px;
    }

    .image {
        background-position: 100% 77%;
    }
}
