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

body {
    font-family: "DM Sans", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* Navbar Styling */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5rem 10rem;
    background-color: #ffffff;
}

.navbar .logo a {
    color: #000000;
    font-size: 3rem;
    text-decoration: none;
    font-weight: 500;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin-left: 10rem;
    font-weight: 800;
}

.nav-links li a {
    color: #000000;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #555;
}

/* Intro Section */
.intro {
    display: flex;
    align-items: center;
    padding: 7rem 10rem;
}

.intro-left h2 {
    font-size: 3rem;
    color: #000000;
}

.intro-right h3 {
    font-size: 2rem;
    color: #7a7a7a;
    margin-top: 0;
    margin-left: 20rem;
    font-weight: 300;
}

/* Arrow */
.arrow-down {
    font-size: 3rem;
    color: #333;
    margin-top: 1rem;
    cursor: pointer;
    margin-left: 10rem;
}

/* Categories Grid (Homepage) */
.categories {
    display: flex;
    gap: 2rem;
    padding: 4rem 10rem;
}

.category-card {
    flex: 1;
    overflow: hidden;
}

.category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.category-card img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.category-card img:hover {
    transform: scale(1.03);
}

.category-placeholder {
    background-color: #e8e8e8;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.category-placeholder span {
    font-size: 1.5rem;
    font-weight: 600;
    color: #555;
}

.category-placeholder:hover {
    background-color: #d0d0d0;
}

/* Project Section */
.project-section {
    display: flex;
    align-items: flex-start;
    padding: 2rem;
    padding-top: 5rem;
    gap: 2rem;
}

.project-text {
    flex: 1;
    max-width: 50%;
    padding-left: 8rem;
}

.project-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.project-text p {
    font-size: 1rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.project-text small {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.project-link {
    font-size: 1rem;
    text-decoration: none;
    color: #000;
    border-bottom: 1px solid #000;
    display: inline-block;
    margin-top: 8rem;
}

.project-link:hover {
    color: #555;
    border-color: #555;
}

.project-image {
    flex: 1;
    max-width: 50%;
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

hr {
    background-color: #000000;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-left: 8rem;
}

/* Image Placeholder (shared) */
.image-placeholder {
    background-color: #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
}

.image-placeholder.landscape {
    aspect-ratio: 16 / 9;
}

.image-placeholder.portrait {
    aspect-ratio: 3 / 4;
}

.image-placeholder.tall {
    aspect-ratio: 2 / 3;
}

/* Gallery Header */
.gallery-header {
    padding: 5rem 10rem 2rem;
}

.gallery-header h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.gallery-header p {
    font-size: 1.25rem;
    color: #7a7a7a;
    font-weight: 300;
}

/* Gallery Grid (shared) */
.gallery {
    padding: 1rem 10rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gallery-row {
    display: flex;
    gap: 1.5rem;
}

.gallery-row.centered {
    justify-content: center;
}

.gallery-item.full {
    width: 100%;
}

.gallery-item.half {
    width: 50%;
}

.gallery-item.one-third {
    width: 33.333%;
}

.gallery-item.two-thirds {
    width: 66.666%;
}

.gallery-item.narrow {
    width: 50%;
}

/* Single rule for all gallery images */
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Footer */
.footer-content {
    text-align: center;
    padding: 3rem 2rem;
    color: #999;
    font-size: 0.875rem;
}

.footer-content a {
    color: #000;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 500;
    border-bottom: 1px solid #000;
}

.footer-content a:hover {
    color: #555;
    border-color: #555;
}

/* =====================
   Mobile Responsiveness
   ===================== */
@media (max-width: 768px) {

    /* Navbar */
    .navbar {
        padding: 1.5rem 2rem;
        flex-direction: column;
        gap: 1rem;
    }

    .navbar .logo a {
        font-size: 2rem;
    }

    .nav-links {
        margin-left: 0;
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Intro */
    .intro {
        flex-direction: column;
        padding: 3rem 2rem;
    }

    .intro-left h2 {
        font-size: 2rem;
    }

    .intro-right h3 {
        margin-left: 0;
        margin-top: 1.5rem;
        font-size: 1.1rem;
    }

    /* Categories (Homepage) */
    .categories {
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
    }

    /* Gallery */
    .gallery {
        padding: 1rem 1.5rem 3rem;
        gap: 1rem;
    }

    .gallery-row {
        flex-direction: column;
        gap: 1rem;
    }

    .gallery-item.full,
    .gallery-item.half,
    .gallery-item.one-third,
    .gallery-item.two-thirds,
    .gallery-item.narrow {
        width: 100%;
    }

    /* Gallery Header */
    .gallery-header {
        padding: 3rem 2rem 1rem;
    }

    .gallery-header h2 {
        font-size: 2rem;
    }

    .gallery-header p {
        font-size: 1rem;
    }
}
