/* Project Page Styles */
.project-details {
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    width: 100%;
}

.project-header {
    margin-bottom: var(--gap-3xl);
}

.project-header .subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-color);
    line-height: var(--line-height-relaxed);
    padding: 8px 0;
}

.project-tags {
    display: flex;
    gap: var(--gap-md);
    flex-wrap: wrap;
    padding: 8px 0;
}

.project-tag {
    background: var(--card-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: var(--font-size-sm);
}

#project-content {
    padding-bottom: var(--content-padding);
}

.project-content-wrapper {
    display: flex;
    gap: var(--gap-3xl);
    position: relative;
    width: 100%;
    align-items: stretch;
    margin-top: 200px;
}

.project-main-content {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    justify-content: space-between;
    min-height: 100%;
}

.project-markdown-content {
    flex: 1 1 auto;
    overflow-y: visible;
    width: 100%;
    margin-bottom: var(--gap-3xl);
}

.project-markdown-content ul {
    list-style-type: disc;
    margin-left: 1.5em;
}

.project-markdown-content ol {
    list-style-type: decimal;
    margin-left: 1.5em;
}

.project-markdown-content h6 {
    margin-top: var(--gap-lg);  
}

.project-markdown-content p {
    margin-bottom: var(--gap-md);
    margin-top: var(--gap-md);
}

.project-gallery {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: var(--content-padding);
    position: relative;
}

.project-gallery img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* Next Project Component */
.next-project-button {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    flex-direction: row;
    text-decoration: none;
    color: inherit;
    min-width: 100px;
    position: relative;
}

.next-project-button .project-card-image-wrapper {
    height: 120px;
    width: 104px;
    min-width: 104px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-right: var(--gap-lg);
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.next-project-button .project-card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.next-project-label {
    opacity: 0.5;
}

.project-card-text {
    display: flex;
    flex-direction: column;
    line-height: 150%;
}

.next-project-button .project-card-content p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-height: calc(1.4em * 2);
}

/* Skeleton Loading Structure */
.skeleton-loader {
    margin-top: 200px;
}

.skeleton-gallery {
    width: 50%;
    display: flex;
    flex-direction: column;
    gap: var(--content-padding);
}

.skeleton-image {
    width: 100%;
    height: 300px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

.skeleton-title {
    width: 60%;
    height: 2.5em;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap-lg);
}

.skeleton-subtitle {
    margin-bottom: var(--gap-lg);
}

.skeleton-line {
    height: 1.2em;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap-sm);
}

.skeleton-line:first-child { width: 80%; }
.skeleton-line:last-child { width: 60%; }

.skeleton-tags {
    display: flex;
    gap: var(--gap-sm);
    flex-wrap: wrap;
}

.skeleton-tag {
    width: 80px;
    height: 2em;
    background: var(--border-color);
    border-radius: var(--radius-sm);
}

/* Project Breakpoints */
@media screen and (max-width: 1080px) {
    .project-gallery {
        gap: var(--gap-lg) !important;
        width: 55%;
    }

    .project-content-wrapper {
        gap: var(--gap-2xl) !important;
        align-items: flex-start;
        margin-top: 100px;
    }
    
    .project-main-content {
        position: relative;
        overflow-y: visible;
        flex: 1;
    }

    .project-sticky-wrapper {
        top: calc(var(--gap-lg) + 48px);
    }
}

@media screen and (max-width: 680px) {
    .project-content-wrapper {
        flex-direction: column;
        gap: 0 !important;
        margin-top: 0;
    }

    .project-gallery {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .project-main-content {
        order: 3;
        display: flex;
        flex-direction: column;
        position: relative;
        height: auto;
    }

    .project-header {
        order: 1;
        margin-bottom: var(--gap-2xl);
        margin-top: 50px;
    }

    .project-markdown-content {
        overflow-y: visible;
    }
    
    .skeleton-loader { margin-top: 0; }
    
    .skeleton-gallery {
        width: 100%;
        order: 2;
        margin-bottom: var(--gap-2xl);
    }
}
