/* ============================================ */
/*        Portfolio / Project Detail Pages       */
/*        (used by /portfolio/*.html)            */
/* ============================================ */

#proj-detail { padding: var(--sectionPadding); }
#proj-detail .cs-container { max-width: 80rem; margin: auto; }
#proj-detail .cs-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 64rem) {
    #proj-detail .cs-layout { grid-template-columns: 19rem 1fr; align-items: start; }
}

/* main article */
#proj-detail .cs-main { min-width: 0; }
#proj-detail .cs-back {
    display: inline-block; margin-bottom: 1.25rem; font-weight: 700; font-size: 0.9rem;
    color: var(--primary, #0cc0df); text-decoration: none;
}
#proj-detail .cs-back:hover { text-decoration: underline; }
/* in-article (blog detail) links */
#proj-detail .cs-main a { color: var(--primary, #0cc0df); text-decoration: none; font-weight: 600; }
#proj-detail .cs-main a:hover { text-decoration: underline; }
#proj-detail .cs-hero-img img {
    width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover;
    border-radius: 0.5rem; display: block;
}
#proj-detail .cs-proj-meta {
    list-style: none; margin: 1.5rem 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 0.9rem 2.5rem;
}
#proj-detail .cs-proj-meta strong {
    display: block; font-size: 0.72rem; text-transform: uppercase;
    letter-spacing: 0.06em; opacity: 0.55; margin-bottom: 0.15rem;
}
#proj-detail .cs-main .cs-title { margin-top: 0.5rem; }
#proj-detail .cs-main .cs-text { max-width: none; }
#proj-detail .cs-proj-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
#proj-detail .cs-proj-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0.5rem; }

/* sidebar */
#proj-detail .cs-sidebar { display: flex; flex-direction: column; gap: 2rem; }
@media (max-width: 63.9375rem) {
    #proj-detail .cs-sidebar { order: 2; }
    #proj-detail .cs-main { order: 1; }
}
#proj-detail .cs-widget { border: 1px solid rgba(0, 0, 0, 0.09); border-radius: 0.6rem; padding: 1.5rem; }
#proj-detail .cs-widget-title {
    font-size: 1.15rem; margin: 0 0 1rem; padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--primary, #1f7a8c); color: var(--headerColor, #1a1a1a);
}
#proj-detail .cs-cat-list { list-style: none; margin: 0; padding: 0; }
#proj-detail .cs-cat-list li { border-bottom: 1px solid rgba(0, 0, 0, 0.07); }
#proj-detail .cs-cat-list li:last-child { border-bottom: none; }
#proj-detail .cs-cat-list a {
    display: block; padding: 0.6rem 0; color: var(--bodyTextColor, #444);
    text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
#proj-detail .cs-cat-list a:hover { color: var(--primary, #1f7a8c); }
#proj-detail .cs-recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
#proj-detail .cs-recent { display: flex; gap: 0.85rem; align-items: center; text-decoration: none; color: inherit; }
#proj-detail .cs-recent img { width: 70px; height: 70px; object-fit: cover; border-radius: 0.4rem; flex-shrink: 0; }
#proj-detail .cs-recent-name { display: block; font-weight: 700; font-size: 0.9rem; line-height: 1.3; color: var(--headerColor, #1a1a1a); }
#proj-detail .cs-recent-type { display: block; font-size: 0.78rem; opacity: 0.6; margin-top: 0.15rem; }
#proj-detail .cs-recent:hover .cs-recent-name { color: var(--primary, #1f7a8c); }
#proj-detail .cs-tag-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
#proj-detail .cs-tag {
    font-size: 0.8rem; padding: 0.4rem 0.75rem; border-radius: 999px;
    background: rgba(0, 0, 0, 0.05); color: var(--bodyTextColor, #444); text-decoration: none;
}
#proj-detail .cs-tag:hover { background: var(--primary, #1f7a8c); color: #fff; }
#proj-detail .cs-cta-card { background: var(--primary, #1f7a8c); border-color: transparent; color: #fff; }
#proj-detail .cs-cta-card .cs-widget-title { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.4); }
#proj-detail .cs-cta-card p { font-size: 0.92rem; line-height: 1.55; margin: 0 0 1.25rem; opacity: 0.95; }
#proj-detail .cs-cta-btn { display: block; text-align: center; margin-bottom: 0.75rem; }
#proj-detail .cs-call-btn {
    display: block; text-align: center; font-weight: 700; color: #fff; text-decoration: none;
    padding: 0.6rem; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 0.4rem;
}
#proj-detail .cs-call-btn:hover { background: rgba(255, 255, 255, 0.15); }

/* bottom CTA dual buttons */
#cta-697 .cs-cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
#cta-697 .cs-button-transparent {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; color: #fff; text-decoration: none;
    padding: 0 2rem; min-height: 3.5rem; border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 0.4rem; font-size: 1rem;
}
#cta-697 .cs-button-transparent:hover { background: rgba(255, 255, 255, 0.15); }

/* dark mode */
body.dark-mode #proj-detail .cs-widget { border-color: rgba(255, 255, 255, 0.12); }
body.dark-mode #proj-detail .cs-cat-list li { border-color: rgba(255, 255, 255, 0.1); }
body.dark-mode #proj-detail .cs-tag { background: rgba(255, 255, 255, 0.08); }
