/* ============================================================
   style_projects.css
   Projects page - requires style.css and style_publications.css
   Typography scale aligned with style_publications.css.
   ============================================================ */

/* ============================================================
   BASE OVERRIDES
   ============================================================ */

body {
    height: fit-content;
    overflow-x: clip;
}

/* ============================================================
   PROJECT LAYOUT
   ============================================================ */

.project_cover {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: min(95vw, 1100px);
    margin: 0 auto;
}

.project_cover .project_title {
    color: var(--title-color);
    text-align: center;
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.35;
    margin-bottom: 1rem;
}

.project {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    margin-bottom: 2rem;
    gap: 1.25rem;
}

.last_project {
    margin-bottom: 0;
}

/* ============================================================
   PROJECT DESCRIPTION
   ============================================================ */

.project_description {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.project_description .highlight {
    color: var(--title-color);
    font-weight: lighter;
    font-size: 1rem;
}

.project_description p {
    color: var(--paper_color);
    font-weight: lighter;
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: left;
    overflow-wrap: anywhere;
}

.project_description a {
    color: var(--blueBC);
}

.project_description a:hover {
    color: var(--halycon);
}

/* ============================================================
   PROJECT IMAGE AND CAROUSEL
   ============================================================ */

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

.project_image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.6rem;
}

.project_image img,
.project_image iframe {
    display: block;
    width: 100%;
    max-width: 340px;
    border-radius: 0.3rem;
}

.project_image img {
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.project_image iframe {
    aspect-ratio: 16 / 9;
    border: 0;
}

.project_image p,
.project_image figcaption {
    color: var(--blueBC);
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.5;
    font-style: italic;
}

.project_image img:hover,
.project_image iframe:hover {
    cursor: pointer;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background-color: rgba(3, 18, 43, 0.76);
    color: var(--title-color);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    z-index: 0;
    opacity: 0.88;
}

.carousel-button.left {
    left: 0.4rem;
}

.carousel-button.right {
    right: 0.4rem;
}

.carousel-button:hover {
    opacity: 1;
    border-color: rgba(0, 238, 182, 0.5);
}

.carousel-button:focus-visible {
    outline: 2px solid var(--halycon);
    outline-offset: 2px;
}

/* ============================================================
   RESPONSIVE - max-width: 799px (Mobile and tablet)
   ============================================================ */

@media only screen and (max-width: 799px) {
    .project_cover {
        width: min(95vw, 700px);
    }

    .project_cover .project_title {
        font-size: 1.25rem;
    }

    .carousel-wrapper {
        max-width: min(90vw, 340px);
    }
}

/* ============================================================
   RESPONSIVE - min-width: 800px (Desktop)
   ============================================================ */

@media only screen and (min-width: 800px) {
    .project {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 2rem;
        margin: 2rem 0;
    }

    .carousel-wrapper {
        flex: 0 0 min(40%, 360px);
        max-width: 360px;
    }

    .project_description {
        flex: 1;
    }

    .project_description p {
        font-size: 1rem;
    }

    .project_image p,
    .project_image figcaption {
        font-size: 1rem;
    }
}

/* ============================================================
   RESPONSIVE - min-width: 1500px (Large desktops)
   Keep scale coherent with style_publications.css large-screen rules.
   ============================================================ */

@media only screen and (min-width: 1500px) {
    .project_cover .project_title {
        font-size: 2.5rem;
    }

    .project_description p {
        font-size: 1.5rem;
    }

    .project_image p,
    .project_image figcaption {
        font-size: 1.25rem;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .carousel-button,
    .project_image img,
    .project_image iframe {
        transition: none;
    }
}


