
/* ---------------------------------
   Projects Page
--------------------------------- */

.projects-page {
    width: min(100% - 48px, 1200px);

    margin: 0 auto;

    padding: 70px 0 100px;
}


/* ---------------------------------
   Page Introduction
--------------------------------- */

.projects-header {
    margin-bottom: 60px;
}

.projects-label {
    display: inline-block;

    margin-bottom: 16px;

    color: var(--brand);

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

    letter-spacing: 0.15em;
}

.projects-header h1,
.project-detail-header h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);

    line-height: 1.1;
    letter-spacing: -0.04em;

    color: var(--text);
}

.projects-intro,
.project-detail-description {
    max-width: 650px;

    margin-top: 20px;

    font-size: 1.1rem;
    line-height: 1.8;

    color: var(--muted-text);
}


/* ---------------------------------
   Collection Header
--------------------------------- */

.projects-collection {
    padding: 32px;

    border: 1px solid var(--border);
    border-radius: 20px;

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

.projects-section-header {
    display: flex;

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

    gap: 20px;

    margin-bottom: 28px;
}

.projects-section-header h2 {
    font-size: 1.8rem;

    color: var(--text);
}

.projects-section-header p {
    color: var(--muted-text);
    font-size: 0.9rem;
}


/* ---------------------------------
   Three-Column Grid
--------------------------------- */

.project-grid {
    display: grid;

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

    gap: 22px;
}

.projects-empty {
    grid-column: 1 / -1;

    color: var(--muted-text);
}


/* ---------------------------------
   Project Card
--------------------------------- */

.project-card {
    min-width: 0;

    overflow: hidden;

    background-color: var(--surface);

    border: 1px solid var(--border);
    border-radius: 14px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-3px);

    border-color: var(--brand);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.project-card-link {
    display: flex;
    flex-direction: column;

    height: 100%;

    color: inherit;

    text-decoration: none;
}


/* ---------------------------------
   Card Thumbnail
--------------------------------- */

.project-card-image {
    display: flex;

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

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background-color: #242424;
}

.project-card-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

.project-placeholder {
    color: white;

    font-family: monospace;
    font-size: 3.5rem;
    font-weight: 700;

    letter-spacing: -0.1em;
}


/* ---------------------------------
   Card Information
--------------------------------- */

.project-card-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    gap: 12px;

    padding: 22px;
}

.project-card-title {
    font-size: 1.25rem;

    line-height: 1.3;

    color: var(--text);
}

.project-card-description {
    flex: 1;

    font-size: 0.95rem;
    line-height: 1.6;

    color: var(--muted-text);
}

.project-card-action {
    margin-top: 8px;

    color: var(--brand);

    font-size: 0.9rem;
    font-weight: 600;
}


/* ---------------------------------
   Individual Project Page
--------------------------------- */

.project-detail {
    width: min(100% - 48px, 850px);

    margin: 0 auto;

    padding: 70px 0 100px;
}

.project-back-link {
    display: inline-block;

    margin-bottom: 48px;

    color: var(--brand);

    text-decoration: none;
}

.project-back-link:hover {
    text-decoration: underline;
}

.project-detail-header {
    margin-bottom: 36px;
}

.project-detail-image {
    display: flex;

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

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background-color: #242424;

    border-radius: 18px;
}

.project-detail-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.project-detail-image .project-placeholder {
    font-size: clamp(4rem, 10vw, 7rem);
}


/* ---------------------------------
   Project Details
--------------------------------- */

.project-detail-section {
    margin-top: 48px;
}

.project-detail-section h2 {
    margin-bottom: 18px;

    font-size: 1.6rem;

    color: var(--text);
}

.project-detail-text {
    font-size: 1.05rem;
    line-height: 1.8;

    color: var(--muted-text);
}

.project-detail-text p {
    margin-bottom: 16px;
}


/* ---------------------------------
   GitHub Button
--------------------------------- */

.project-github-button {
    display: inline-block;

    margin-top: 40px;

    padding: 14px 26px;

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

    border-radius: 999px;

    font-weight: 600;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.project-github-button:hover {
    background-color: var(--accent);

    transform: translateY(-2px);
}


/* ---------------------------------
   Responsive Layout
--------------------------------- */

@media (max-width: 900px) {

    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 600px) {

    .projects-page,
    .project-detail {
        width: min(100% - 32px, 1200px);

        padding-top: 40px;
    }

    .projects-collection {
        padding: 24px 16px;
    }

    .projects-section-header {
        align-items: flex-start;

        flex-direction: column;
    }

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

}


/* ---------------------------------
   Main Projects Page
--------------------------------- */

.projects-section-description {
    margin-top: 10px;

    font-size: 0.95rem;
    line-height: 1.6;

    color: var(--muted-text);
}


/* ---------------------------------
   Explore Section
--------------------------------- */

.projects-explore {
    margin-top: 32px;
}

.projects-explore > h2 {
    margin-bottom: 10px;

    font-size: 1.8rem;

    color: var(--text);
}

.projects-explore > .projects-section-description {
    margin-bottom: 26px;
}


/* ---------------------------------
   Archive Navigation Card
--------------------------------- */

.project-archive-link {
    display: flex;
    flex-direction: column;

    width: min(100%, 380px);

    padding: 28px;

    background-color: var(--surface);

    border: 1px solid var(--border);
    border-radius: 14px;

    color: inherit;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.project-archive-link:hover,
.project-archive-link:focus-visible {
    transform: translateY(-3px);

    border-color: var(--brand);

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.project-archive-icon {
    margin-bottom: 20px;

    font-family: monospace;
    font-size: 2.5rem;
    font-weight: 700;

    color: var(--brand);
}

.project-archive-link h3 {
    margin-bottom: 12px;

    font-size: 1.3rem;

    color: var(--text);
}

.project-archive-link p {
    margin-bottom: 24px;

    font-size: 0.95rem;
    line-height: 1.6;

    color: var(--muted-text);
}

.project-archive-action {
    margin-top: auto;

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

    color: var(--brand);
}


/* ---------------------------------
   Archive Back Link
--------------------------------- */

.project-archive-back {
    display: inline-block;

    margin-bottom: 40px;

    color: var(--brand);

    text-decoration: none;
}

.project-archive-back:hover {
    text-decoration: underline;
}


/* ---------------------------------
   Archive Pagination
--------------------------------- */

.project-pagination {
    display: flex;

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

    flex-wrap: wrap;

    gap: 20px;

    margin-top: 40px;
}

.project-pagination a {
    display: inline-block;

    padding: 10px 18px;

    border: 1px solid var(--brand);
    border-radius: 999px;

    color: var(--brand);

    font-weight: 600;
    text-decoration: none;
}

.project-pagination a:hover {
    background-color: var(--brand);

    color: white;
}

.project-pagination span {
    font-size: 0.9rem;

    color: var(--muted-text);
}