/*
============================================================
PROJECT DETAIL PAGE STYLES
============================================================

File:
    project-detail.css

Purpose:
    Provides reusable styles for individual engineering
    project pages.

Examples:
    projects/cpu.html
    projects/cnn-accelerator.html
    projects/power-monitor.html
    projects/capstone.html

Project-specific pages should reuse these styles whenever
possible instead of creating separate CSS files.
*/


/*
============================================================
PROJECT DETAIL SECTION
============================================================
*/

.project-detail-section {
    padding: 2rem 0 4rem;
}


/*
============================================================
PROJECT HEADER
============================================================
*/

.project-detail-header {
    max-width: 950px;

    margin-bottom: 3rem;
}


.project-number {
    margin-bottom: 0.65rem;

    color: var(--projects-color);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.14rem;
    text-transform: uppercase;
}


.project-detail-header h2 {
    max-width: 900px;

    margin-bottom: 1rem;

    color: var(--text-primary);

    font-size: clamp(2.2rem, 6vw, 4rem);

    line-height: 1.05;
    letter-spacing: -0.045em;
}


.project-summary {
    max-width: 850px;

    color: var(--text-secondary);

    font-size: 1.1rem;
    line-height: 1.75;
}


/*
============================================================
PROJECT TAGS
============================================================
*/

.project-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 0.6rem;

    margin-top: 1.5rem;
}


.project-tags span {
    padding: 0.45rem 0.75rem;

    color: var(--projects-color);

    background-color:
        rgba(22, 14, 165, 0.06);

    border:
        1px solid rgba(22, 14, 165, 0.16);

    border-radius: 999px;

    font-size: 0.8rem;
    font-weight: 700;
}


/*
============================================================
PROJECT CONTENT
============================================================
*/

.project-content {
    overflow: hidden;

    background-color: var(--surface-color);

    border: 1px solid var(--border-color);
    border-top: 6px solid var(--projects-color);

    border-radius: var(--border-radius);

    box-shadow:
        0 6px 22px rgba(23, 32, 51, 0.06);
}


/*
============================================================
PROJECT SUBSECTION
============================================================
*/

.project-subsection {
    padding: 2.25rem;

    border-bottom: 1px solid var(--border-color);
}


.project-subsection:last-child {
    border-bottom: none;
}


.project-section-label {
    margin-bottom: 0.55rem;

    color: var(--projects-color);

    font-size: 0.75rem;
    font-weight: 700;

    letter-spacing: 0.13rem;
    text-transform: uppercase;
}


.project-subsection h3 {
    max-width: 850px;

    margin-bottom: 1rem;

    color: var(--text-primary);

    font-size: clamp(1.4rem, 3vw, 1.9rem);

    line-height: 1.25;
}


.project-subsection > p:not(.project-section-label) {
    max-width: 850px;

    margin-bottom: 1rem;

    color: var(--text-secondary);

    line-height: 1.75;
}


.project-subsection > p:last-of-type {
    margin-bottom: 0;
}


/*
============================================================
PIPELINE FLOW
============================================================
*/

.pipeline-flow {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 0.6rem;

    margin-top: 2rem;
}


.pipeline-stage {
    min-height: 105px;

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

    padding: 1rem;

    text-align: center;

    background-color: var(--background-color);

    border: 1px solid var(--border-color);
    border-top: 4px solid var(--projects-color);

    border-radius: 10px;
}


.pipeline-stage strong {
    margin-bottom: 0.3rem;

    color: var(--projects-color);

    font-size: 1.2rem;
}


.pipeline-stage span {
    color: var(--text-secondary);

    font-size: 0.8rem;
    line-height: 1.35;
}


.pipeline-arrow {
    color: var(--projects-color);

    font-size: 1.4rem;
    font-weight: 700;
}


/*
============================================================
VERIFICATION FIGURES
============================================================

Used for simulation waveforms, hardware photographs,
architecture diagrams, screenshots, and other project
evidence.

Images are displayed without cropping so important technical
information remains visible.
*/

.verification-figure {
    overflow: hidden;

    margin-top: 1.75rem;

    background-color: var(--background-color);

    border: 1px solid var(--border-color);
    border-radius: 12px;
}


.verification-figure > a {
    display: block;

    overflow: hidden;

    background-color: #000000;
}


.verification-figure img {
    display: block;

    width: 100%;
    height: auto;

    transition:
        transform var(--transition-speed) ease,
        opacity var(--transition-speed) ease;
}


.verification-figure > a:hover img {
    transform: scale(1.01);

    opacity: 0.95;
}


/*
============================================================
FIGURE CAPTION
============================================================
*/

.verification-figure figcaption {
    padding: 1rem 1.2rem;

    color: var(--text-secondary);

    font-size: 0.9rem;
    line-height: 1.6;
}


.verification-figure figcaption strong {
    display: block;

    margin-bottom: 0.3rem;

    color: var(--text-primary);

    font-size: 0.95rem;
}


.image-hint {
    display: block;

    margin-top: 0.45rem;

    color: var(--projects-color);

    font-size: 0.8rem;
    font-weight: 700;
}


/*
============================================================
IMAGE COMPARISON
============================================================

Allows two related verification results to be displayed
side-by-side.
*/

.verification-comparison {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1rem;

    margin-top: 1.75rem;
}


.verification-comparison .verification-figure {
    margin-top: 0;
}


/*
============================================================
LEARNING SECTION
============================================================
*/

.learning-section {
    background-color:
        rgba(22, 14, 165, 0.025);
}


.learning-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 1rem;

    margin-top: 1.5rem;
}


/*
============================================================
LEARNING CARD
============================================================
*/

.learning-card {
    padding: 1.4rem;

    background-color: var(--surface-color);

    border: 1px solid var(--border-color);
    border-left: 4px solid var(--projects-color);

    border-radius: 10px;
}


.learning-card h4 {
    margin-bottom: 0.5rem;

    color: var(--text-primary);

    font-size: 1rem;
}


.learning-card p {
    color: var(--text-secondary);

    font-size: 0.92rem;
    line-height: 1.65;
}


/*
============================================================
REPOSITORY SECTION
============================================================
*/

.repository-section {
    background-color: var(--background-color);
}


/*
============================================================
REPOSITORY BUTTON
============================================================
*/

.repository-button {
    display: inline-flex;

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

    margin-top: 1.25rem;

    padding: 0.8rem 1.15rem;

    background-color: var(--projects-color);
    color: #ffffff;

    border: 2px solid var(--projects-color);
    border-radius: 8px;

    font-size: 0.9rem;
    font-weight: 700;

    transition:
        background-color var(--transition-speed) ease,
        color var(--transition-speed) ease,
        transform var(--transition-speed) ease;
}


.repository-button:hover {
    background-color: transparent;

    color: var(--projects-color);

    transform: translateY(-2px);
}


/*
============================================================
BOTTOM PROJECT NAVIGATION
============================================================

Used at the end of individual project pages to return to the
Projects catalog or continue to another project.
*/

.project-detail-navigation {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 1rem;

    margin-top: 2rem;
}


/*
============================================================
TABLET RESPONSIVE DESIGN
============================================================
*/

@media (max-width: 900px) {

    /*
    Stack the CPU pipeline vertically when there is not
    enough horizontal space.
    */

    .pipeline-flow {
        grid-template-columns: 1fr;

        max-width: 450px;

        margin-inline: auto;
        margin-top: 2rem;
    }


    .pipeline-stage {
        width: 100%;

        min-height: 85px;
    }


    .pipeline-arrow {
        justify-self: center;

        transform: rotate(90deg);
    }

}


/*
============================================================
MOBILE RESPONSIVE DESIGN
============================================================
*/

@media (max-width: 700px) {

    .project-detail-section {
        padding: 1.5rem 0 3rem;
    }


    .project-detail-header {
        margin-bottom: 2rem;
    }


    .project-summary {
        font-size: 1rem;
    }


    .project-subsection {
        padding: 1.4rem;
    }


    /*
    Verification comparisons become one column.
    */

    .verification-comparison {
        grid-template-columns: 1fr;
    }


    /*
    Learning cards become one column.
    */

    .learning-grid {
        grid-template-columns: 1fr;
    }


    /*
    Repository buttons use the available width.
    */

    .repository-button {
        width: 100%;
    }


    /*
    Stack project navigation controls vertically on smaller
    screens.
    */

    .project-detail-navigation {
        flex-direction: column;

        align-items: stretch;
    }


    /*
    Make both project navigation buttons fill the available
    width.
    */

    .project-detail-navigation .page-navigation-button {
        width: 100%;
    }

}


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

@media (prefers-reduced-motion: reduce) {

    .verification-figure img,
    .repository-button {
        transition: none;
    }


    .verification-figure > a:hover img,
    .repository-button:hover {
        transform: none;
    }

}