/* Project Detail Page Styles */

/* CSS Variable Aliases for Compatibility */
:root {
    --primary-color: var(--accent-primary, #6366f1);
    --primary-color-alpha: rgba(99, 102, 241, 0.15);
    --primary-gradient: var(--accent-gradient, linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%));
    --accent-green: #10b981;
}

[data-theme="dark"] {
    --primary-color-alpha: rgba(99, 102, 241, 0.2);
}

/* Project Hero */
.project-hero {
    padding: 120px 0 60px;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.project-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top right, var(--primary-color-alpha) 0%, transparent 50%);
    pointer-events: none;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

.project-hero-content {
    max-width: 800px;
}

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-category {
    background: var(--primary-gradient);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.project-year {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.project-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags .tag {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Project Showcase */
.project-showcase {
    padding: 0 0 80px;
    background: var(--bg-secondary);
    transform: translateY(-40px);
}

.showcase-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
    background: var(--bg-card);
}

.showcase-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Project Details */
.project-details {
    padding: 80px 0;
    background: var(--bg-primary);
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
}

.details-main {
    max-width: 100%;
}

.detail-section {
    margin-bottom: 3rem;
}

.detail-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.detail-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 3px;
}

.detail-section p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    color: var(--accent-green);
    font-size: 1.25rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.feature-list li strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.feature-list li p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.tech-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.architecture-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.architecture-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.architecture-list li:last-child {
    border-bottom: none;
}

.architecture-list li strong {
    color: var(--text-primary);
}

/* Sidebar */
.details-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-list li:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tags span {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
}

.cta-card {
    background: var(--primary-gradient);
    border: none;
}

.cta-card h3,
.cta-card p {
    color: white;
}

.cta-card p {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.cta-card .btn {
    width: 100%;
    justify-content: center;
    background: white;
    color: var(--primary-color);
}

.cta-card .btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* More Projects */
.more-projects {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.more-projects h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.projects-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.project-preview {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--bg-card);
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-preview:hover img {
    transform: scale(1.05);
}

.preview-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
}

.preview-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.preview-content span {
    font-size: 0.9rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-content span i {
    transition: transform 0.3s ease;
}

.project-preview:hover .preview-content span i {
    transform: translateX(5px);
}

/* Screenshots Gallery */
.screenshots-gallery {
    padding: 60px 0;
    background: var(--bg-primary);
}

.screenshots-gallery h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.02);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .details-sidebar {
        position: relative;
        top: 0;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .sidebar-card:last-child {
        grid-column: span 2;
    }
    
    .project-details {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .project-hero {
        padding: 90px 0 30px;
    }
    
    .back-link {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
    
    .project-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .project-category {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .project-year {
        font-size: 0.85rem;
    }
    
    .project-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .project-subtitle {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
    }
    
    .project-tags {
        gap: 0.4rem;
    }
    
    .project-tags .tag {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    .project-showcase {
        padding: 0 0 50px;
        transform: translateY(-20px);
    }
    
    .showcase-image {
        border-radius: 12px;
    }
    
    .projects-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .details-sidebar {
        grid-template-columns: 1fr;
    }
    
    .sidebar-card:last-child {
        grid-column: span 1;
    }
    
    .sidebar-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .sidebar-card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .info-list li {
        padding: 0.6rem 0;
    }
    
    .info-label,
    .info-value {
        font-size: 0.85rem;
    }
    
    .tech-tags span {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
    
    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tech-item {
        padding: 1rem;
    }
    
    .tech-item img {
        width: 36px;
        height: 36px;
    }
    
    .tech-item span {
        font-size: 0.85rem;
    }
    
    .detail-section {
        margin-bottom: 2rem;
    }
    
    .detail-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .detail-section p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .feature-list li {
        padding: 1rem 0;
        gap: 0.75rem;
    }
    
    .feature-list li i {
        font-size: 1.1rem;
    }
    
    .feature-list li strong {
        font-size: 0.95rem;
    }
    
    .feature-list li p {
        font-size: 0.9rem;
    }
    
    .architecture-list li {
        padding: 0.75rem 0;
        font-size: 0.95rem;
    }
    
    .more-projects {
        padding: 50px 0;
    }
    
    .more-projects h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .preview-content {
        padding: 1rem;
    }
    
    .preview-content h4 {
        font-size: 1rem;
    }
    
    .preview-content span {
        font-size: 0.85rem;
    }
    
    .cta-card p {
        font-size: 0.9rem;
    }
    
    .screenshots-gallery {
        padding: 40px 0;
    }
    
    .screenshots-gallery h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .project-hero {
        padding: 80px 0 24px;
    }
    
    .project-title {
        font-size: 1.5rem;
    }
    
    .project-subtitle {
        font-size: 0.95rem;
    }
    
    .project-tags .tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .feature-list li {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }
    
    .feature-list li i {
        margin-top: 0;
    }
    
    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .tech-item {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .tech-item img {
        width: 32px;
        height: 32px;
    }
    
    .tech-item span {
        font-size: 0.8rem;
    }
    
    .sidebar-card {
        padding: 1rem;
    }
    
    .detail-section h2 {
        font-size: 1.25rem;
    }
    
    .detail-section p {
        font-size: 0.95rem;
    }
}
