.portfolio-page {
    padding-top: 100px;
    padding-bottom: 100px;
}

.portfolio-heading {
    font-size: var(--text-6xl);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 20px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    justify-items: center;
}

.portfolio-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    width: 250px;
    position: relative;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.portfolio-page:not(.project-detail) .portfolio-card:hover {
    transform: scale(1.03);
}

.portfolio-card::after {
    content: "MORE";
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 70px;
    height: 70px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.portfolio-page:not(.project-detail) .portfolio-card:hover::after {
    opacity: 1;
}

.portfolio-card img {
    width: 100%;
    display: block;
}

.portfolio-card h3 {
    font-size: var(--text-2xl);
    padding: var(--space-md);
    margin: 0;
    color: var(--color-secondary);
    font-family: var(--font-primary);
}

.portfolio-card-image {
    position: relative;
}

.portfolio-card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #18BC9C;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.portfolio-grid a {
    text-decoration: none;
    color: inherit;
}


/* ================================
   PROJECT DETAIL PAGE ONLY
   ================================ */

/*   --color-secondary: #18BC9C; */
/*   --bg-color: #fff; */

.detail-page {
    padding-top: 100px;
    padding-bottom: 100px;
    min-height: 80vh;
    box-sizing: border-box;
}

.detail-heading {
    font-size: var(--text-6xl);
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 20px;
}

.detail-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;

    margin-top: 10px;
    margin-bottom: 10px;
}


.detail-nav-button {
    display: inline-block;
    padding: 10px 20px;
    border: 1px solid var(--color-secondary);
    text-decoration: none;
    font-size: var(--text-md);
    font-weight: 400;
    font-family: system-ui, sans-serif;
    transition: all 0.2s ease;
    color: var(--color-secondary);
    border-radius: 5px;
}

.detail-nav-button:hover {
    background-color: var(--color-secondary);
    color: white;
    border-color: white;
}


.detail-grid {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

.detail-card {
    display: flex;
    flex-direction: column;
    align-items: center;

    background: white;
    border-radius: 8px;
    overflow: hidden;

    width: fit-content;
    position: relative;
}

.detail-card-image {
    width: 400px;
    flex: 0 0 400px;
}

.detail-card-image img {
    width: 100%;
    display: block;
    padding-bottom: 10px;
}

.detail-description {
    width: 700px;
    box-sizing: border-box;

    line-height: 1.6;
    font-size: var(--text-md);

    text-align: justify;
    hyphens: auto;

    border: 3px solid black;
    border-radius: 12px;

    padding: 10px 15px;

    margin-top: 15px;

    align-self: center;
}

.detail-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid white;
    border-radius: 50%;

    text-decoration: none;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);

    font-size: 24px;
    line-height: 1;

    transition: all 0.2s ease;
    z-index: 2;
}

.detail-image-nav.previous {
    left: 10px;
}

.detail-image-nav.next {
    right: 10px;
}

.detail-image-nav:hover {
    background-color: var(--color-secondary);
    border-color: white;
    color: white;
}

@media (max-width: 800px) {

    .detail-card-image {
        width: 400px;
        flex: 0 0 400px;
    }

    .detail-description {
        width: 90%;
    }

}


@media (max-width: 400px) {

    .detail-card-image {
        width: 100%;
        flex: 0 0 auto;
    }

    .detail-description {
        width: 90%;
    }

}